1 /* 2 This file is part of Choqok, the KDE micro-blogging client 3 Copyright (C) 2011-2012 Mehrdad Momeny <mehrdad.momeny@gmail.com> 4 5 This program is free software; you can redistribute it and/or 6 modify it under the terms of the GNU General Public License as 7 published by the Free Software Foundation; either version 2 of 8 the License or (at your option) version 3 or any later version 9 accepted by the membership of KDE e.V. (or its successor approved 10 by the membership of KDE e.V.), which shall act as a proxy 11 defined in Section 14 of version 3 of the license. 12 13 This program is distributed in the hope that it will be useful, 14 but WITHOUT ANY WARRANTY; without even the implied warranty of 15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 GNU General Public License for more details. 17 18 You should have received a copy of the GNU General Public License along 19 with this program; if not, write to the Free Software Foundation, Inc., 20 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 21 */ 22 23 #ifndef NOTIFYSETTINGS_H 24 #define NOTIFYSETTINGS_H 25 26 #include <QColor> 27 #include <QFont> 28 #include <QObject> 29 #include <QPoint> 30 #include <QStringList> 31 32 #define NOTIFICATION_WIDTH 300 33 #define NOTIFICATION_HEIGHT 70 34 35 const QString baseText(QLatin1String("<table height=\"100%\" width=\"100%\"><tr><td rowspan=\"2\"\ 36 width=\"48\"><img src=\"img://profileImage\" width=\"48\" height=\"48\" /></td><td width=\"5\"><!-- EMPTY HAHA --></td><td><b>%1 :</b><a href='choqok://close'><img src='icon://close' title='%4' align='right' /></a><div dir=\"%3\">%2</div></td></tr></table>")); 37 38 class NotifySettings : public QObject 39 { 40 41 public: 42 NotifySettings(QObject *parent = nullptr); 43 virtual ~NotifySettings(); 44 45 QMap<QString, QStringList> accounts(); 46 void setAccounts(QMap<QString, QStringList> accounts); 47 48 int notifyInterval() const; 49 void setNotifyInterval(int interval); 50 51 QPoint position() const; 52 void setPosition(const QPoint &position); 53 54 QColor foregroundColor() const; 55 void setForegroundColor(const QColor &color); 56 57 QColor backgroundColor() const; 58 void setBackgroundColor(const QColor &color); 59 60 QFont font() const; 61 void setFont(const QFont &font); 62 63 void load(); 64 void save(); 65 66 private: 67 class Private; 68 Private *const d; 69 }; 70 71 #endif // NOTIFYSETTINGS_H 72