From 4ea21c2d194a66c393b19238651d9d85b5537cd7 Mon Sep 17 00:00:00 2001 From: krepa098 Date: Sun, 16 Nov 2014 12:58:43 +0100 Subject: [PATCH] (c) --- src/chatlog/chatline.cpp | 16 ++++++++++++++++ src/chatlog/chatline.h | 16 ++++++++++++++++ src/chatlog/chatlinecontent.cpp | 16 ++++++++++++++++ src/chatlog/chatlinecontent.h | 16 ++++++++++++++++ src/chatlog/chatlinecontentproxy.cpp | 16 ++++++++++++++++ src/chatlog/chatlinecontentproxy.h | 16 ++++++++++++++++ src/chatlog/chatlog.cpp | 16 ++++++++++++++++ src/chatlog/chatlog.h | 16 ++++++++++++++++ src/chatlog/chatmessage.cpp | 20 +++++++++++++++++--- src/chatlog/chatmessage.h | 16 ++++++++++++++++ src/chatlog/content/filetransferwidget.cpp | 16 ++++++++++++++++ src/chatlog/content/filetransferwidget.h | 16 ++++++++++++++++ src/chatlog/content/image.cpp | 16 ++++++++++++++++ src/chatlog/content/image.h | 16 ++++++++++++++++ src/chatlog/content/spinner.cpp | 16 ++++++++++++++++ src/chatlog/content/spinner.h | 16 ++++++++++++++++ src/chatlog/content/text.cpp | 16 ++++++++++++++++ src/chatlog/content/text.h | 16 ++++++++++++++++ src/chatlog/customtextdocument.cpp | 16 ++++++++++++++++ src/chatlog/customtextdocument.h | 16 ++++++++++++++++ src/misc/smileypack.cpp | 2 +- 21 files changed, 322 insertions(+), 4 deletions(-) diff --git a/src/chatlog/chatline.cpp b/src/chatlog/chatline.cpp index cad1b0f82..e26969d7f 100644 --- a/src/chatlog/chatline.cpp +++ b/src/chatlog/chatline.cpp @@ -1,3 +1,19 @@ +/* + Copyright (C) 2014 by Project Tox + + This file is part of qTox, a Qt-based graphical interface for Tox. + + This program is libre software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + See the COPYING file for more details. +*/ + #include "chatline.h" #include "chatlog.h" #include "chatlinecontent.h" diff --git a/src/chatlog/chatline.h b/src/chatlog/chatline.h index 1354dab5e..78e225ed3 100644 --- a/src/chatlog/chatline.h +++ b/src/chatlog/chatline.h @@ -1,3 +1,19 @@ +/* + Copyright (C) 2014 by Project Tox + + This file is part of qTox, a Qt-based graphical interface for Tox. + + This program is libre software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + See the COPYING file for more details. +*/ + #ifndef CHATLINE_H #define CHATLINE_H diff --git a/src/chatlog/chatlinecontent.cpp b/src/chatlog/chatlinecontent.cpp index f51cd3179..0881a8b87 100644 --- a/src/chatlog/chatlinecontent.cpp +++ b/src/chatlog/chatlinecontent.cpp @@ -1,3 +1,19 @@ +/* + Copyright (C) 2014 by Project Tox + + This file is part of qTox, a Qt-based graphical interface for Tox. + + This program is libre software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + See the COPYING file for more details. +*/ + #include "chatlinecontent.h" void ChatLineContent::setChatLine(ChatLine* chatline) diff --git a/src/chatlog/chatlinecontent.h b/src/chatlog/chatlinecontent.h index 25f51e91e..bd2017653 100644 --- a/src/chatlog/chatlinecontent.h +++ b/src/chatlog/chatlinecontent.h @@ -1,3 +1,19 @@ +/* + Copyright (C) 2014 by Project Tox + + This file is part of qTox, a Qt-based graphical interface for Tox. + + This program is libre software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + See the COPYING file for more details. +*/ + #ifndef CHATLINECONTENT_H #define CHATLINECONTENT_H diff --git a/src/chatlog/chatlinecontentproxy.cpp b/src/chatlog/chatlinecontentproxy.cpp index 28eac44ef..8ac308ae1 100644 --- a/src/chatlog/chatlinecontentproxy.cpp +++ b/src/chatlog/chatlinecontentproxy.cpp @@ -1,3 +1,19 @@ +/* + Copyright (C) 2014 by Project Tox + + This file is part of qTox, a Qt-based graphical interface for Tox. + + This program is libre software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + See the COPYING file for more details. +*/ + #include "chatlinecontentproxy.h" #include #include diff --git a/src/chatlog/chatlinecontentproxy.h b/src/chatlog/chatlinecontentproxy.h index aa69fae36..bf225a17c 100644 --- a/src/chatlog/chatlinecontentproxy.h +++ b/src/chatlog/chatlinecontentproxy.h @@ -1,3 +1,19 @@ +/* + Copyright (C) 2014 by Project Tox + + This file is part of qTox, a Qt-based graphical interface for Tox. + + This program is libre software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + See the COPYING file for more details. +*/ + #ifndef CHATLINECONTENTPROXY_H #define CHATLINECONTENTPROXY_H diff --git a/src/chatlog/chatlog.cpp b/src/chatlog/chatlog.cpp index fcb1e09a3..8d47ebeae 100644 --- a/src/chatlog/chatlog.cpp +++ b/src/chatlog/chatlog.cpp @@ -1,3 +1,19 @@ +/* + Copyright (C) 2014 by Project Tox + + This file is part of qTox, a Qt-based graphical interface for Tox. + + This program is libre software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + See the COPYING file for more details. +*/ + #include "chatlog.h" #include "chatline.h" #include "chatmessage.h" diff --git a/src/chatlog/chatlog.h b/src/chatlog/chatlog.h index dec719b79..6177819a0 100644 --- a/src/chatlog/chatlog.h +++ b/src/chatlog/chatlog.h @@ -1,3 +1,19 @@ +/* + Copyright (C) 2014 by Project Tox + + This file is part of qTox, a Qt-based graphical interface for Tox. + + This program is libre software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + See the COPYING file for more details. +*/ + #ifndef CHATLOG_H #define CHATLOG_H diff --git a/src/chatlog/chatmessage.cpp b/src/chatlog/chatmessage.cpp index 0c577a4ae..10ec4b94c 100644 --- a/src/chatlog/chatmessage.cpp +++ b/src/chatlog/chatmessage.cpp @@ -1,3 +1,19 @@ +/* + Copyright (C) 2014 by Project Tox + + This file is part of qTox, a Qt-based graphical interface for Tox. + + This program is libre software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + See the COPYING file for more details. +*/ + #include "chatmessage.h" #include "content/text.h" #include "content/spinner.h" @@ -8,9 +24,7 @@ ChatMessage::ChatMessage(QGraphicsScene* scene, const QString& rawMessage) : ChatLine(scene) , rawString(rawMessage) { -// addColumn(new Text(author, true), ColumnFormat(75.0, ColumnFormat::FixedSize, 1, ColumnFormat::Right)); -// addColumn(content, ColumnFormat(1.0, ColumnFormat::VariableSize)); -// addColumn(new Spinner(QSizeF(16, 16)), ColumnFormat(50.0, ColumnFormat::FixedSize, 1, ColumnFormat::Right)); + } void ChatMessage::markAsSent(const QDateTime &time) diff --git a/src/chatlog/chatmessage.h b/src/chatlog/chatmessage.h index 8ea906a5b..282bd0703 100644 --- a/src/chatlog/chatmessage.h +++ b/src/chatlog/chatmessage.h @@ -1,3 +1,19 @@ +/* + Copyright (C) 2014 by Project Tox + + This file is part of qTox, a Qt-based graphical interface for Tox. + + This program is libre software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + See the COPYING file for more details. +*/ + #ifndef CHATMESSAGE_H #define CHATMESSAGE_H diff --git a/src/chatlog/content/filetransferwidget.cpp b/src/chatlog/content/filetransferwidget.cpp index fef501647..ca81bdbcf 100644 --- a/src/chatlog/content/filetransferwidget.cpp +++ b/src/chatlog/content/filetransferwidget.cpp @@ -1,3 +1,19 @@ +/* + Copyright (C) 2014 by Project Tox + + This file is part of qTox, a Qt-based graphical interface for Tox. + + This program is libre software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + See the COPYING file for more details. +*/ + #include "filetransferwidget.h" #include "ui_filetransferwidget.h" diff --git a/src/chatlog/content/filetransferwidget.h b/src/chatlog/content/filetransferwidget.h index b09c09023..e5158caf3 100644 --- a/src/chatlog/content/filetransferwidget.h +++ b/src/chatlog/content/filetransferwidget.h @@ -1,3 +1,19 @@ +/* + Copyright (C) 2014 by Project Tox + + This file is part of qTox, a Qt-based graphical interface for Tox. + + This program is libre software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + See the COPYING file for more details. +*/ + #ifndef FILETRANSFERWIDGET_H #define FILETRANSFERWIDGET_H diff --git a/src/chatlog/content/image.cpp b/src/chatlog/content/image.cpp index ec87ae456..79cab6df0 100644 --- a/src/chatlog/content/image.cpp +++ b/src/chatlog/content/image.cpp @@ -1,3 +1,19 @@ +/* + Copyright (C) 2014 by Project Tox + + This file is part of qTox, a Qt-based graphical interface for Tox. + + This program is libre software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + See the COPYING file for more details. +*/ + #include "image.h" #include diff --git a/src/chatlog/content/image.h b/src/chatlog/content/image.h index 633bc4c01..ad84bd0fa 100644 --- a/src/chatlog/content/image.h +++ b/src/chatlog/content/image.h @@ -1,3 +1,19 @@ +/* + Copyright (C) 2014 by Project Tox + + This file is part of qTox, a Qt-based graphical interface for Tox. + + This program is libre software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + See the COPYING file for more details. +*/ + #ifndef IMAGE_H #define IMAGE_H diff --git a/src/chatlog/content/spinner.cpp b/src/chatlog/content/spinner.cpp index 0f1a17887..554e6a5bc 100644 --- a/src/chatlog/content/spinner.cpp +++ b/src/chatlog/content/spinner.cpp @@ -1,3 +1,19 @@ +/* + Copyright (C) 2014 by Project Tox + + This file is part of qTox, a Qt-based graphical interface for Tox. + + This program is libre software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + See the COPYING file for more details. +*/ + #include "spinner.h" #include diff --git a/src/chatlog/content/spinner.h b/src/chatlog/content/spinner.h index c31e93af7..c2553dd67 100644 --- a/src/chatlog/content/spinner.h +++ b/src/chatlog/content/spinner.h @@ -1,3 +1,19 @@ +/* + Copyright (C) 2014 by Project Tox + + This file is part of qTox, a Qt-based graphical interface for Tox. + + This program is libre software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + See the COPYING file for more details. +*/ + #ifndef SPINNER_H #define SPINNER_H diff --git a/src/chatlog/content/text.cpp b/src/chatlog/content/text.cpp index 8760e02e4..81a613511 100644 --- a/src/chatlog/content/text.cpp +++ b/src/chatlog/content/text.cpp @@ -1,3 +1,19 @@ +/* + Copyright (C) 2014 by Project Tox + + This file is part of qTox, a Qt-based graphical interface for Tox. + + This program is libre software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + See the COPYING file for more details. +*/ + #include "text.h" #include "../customtextdocument.h" diff --git a/src/chatlog/content/text.h b/src/chatlog/content/text.h index c43c64ff1..a2a83096e 100644 --- a/src/chatlog/content/text.h +++ b/src/chatlog/content/text.h @@ -8,6 +8,22 @@ class CustomTextDocument; +/* + Copyright (C) 2014 by Project Tox + + This file is part of qTox, a Qt-based graphical interface for Tox. + + This program is libre software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + See the COPYING file for more details. +*/ + class Text : public ChatLineContent { public: diff --git a/src/chatlog/customtextdocument.cpp b/src/chatlog/customtextdocument.cpp index ddcec13f0..676fbae09 100644 --- a/src/chatlog/customtextdocument.cpp +++ b/src/chatlog/customtextdocument.cpp @@ -1,3 +1,19 @@ +/* + Copyright (C) 2014 by Project Tox + + This file is part of qTox, a Qt-based graphical interface for Tox. + + This program is libre software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + See the COPYING file for more details. +*/ + #include "customtextdocument.h" #include "../misc/smileypack.h" diff --git a/src/chatlog/customtextdocument.h b/src/chatlog/customtextdocument.h index 7a8478925..ed6a065db 100644 --- a/src/chatlog/customtextdocument.h +++ b/src/chatlog/customtextdocument.h @@ -1,3 +1,19 @@ +/* + Copyright (C) 2014 by Project Tox + + This file is part of qTox, a Qt-based graphical interface for Tox. + + This program is libre software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + See the COPYING file for more details. +*/ + #ifndef CUSTOMTEXTDOCUMENT_H #define CUSTOMTEXTDOCUMENT_H diff --git a/src/misc/smileypack.cpp b/src/misc/smileypack.cpp index a6b5c86a6..aacbf1d25 100644 --- a/src/misc/smileypack.cpp +++ b/src/misc/smileypack.cpp @@ -192,7 +192,7 @@ void SmileyPack::cacheSmiley(const QString &name) { // The -1 is to avoid having the space for descenders under images move the text down // We can't remove it because Qt doesn't support CSS display or vertical-align - int fontHeight = QFontInfo(Style::getFont(Style::Big)).pixelSize() - 1; + //TODO: int fontHeight = QFontInfo(Style::getFont(Style::Big)).pixelSize() - 1; QSize size(16, 16); QString filename = QDir(path).filePath(name); QImage img(filename);