File indexing completed on 2024-05-05 04:57:29
0001 /* 0002 This file is part of Choqok, the KDE micro-blogging client 0003 0004 SPDX-FileCopyrightText: 2011-2012 Mehrdad Momeny <mehrdad.momeny@gmail.com> 0005 0006 SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL 0007 */ 0008 0009 #ifndef NOTIFYSETTINGS_H 0010 #define NOTIFYSETTINGS_H 0011 0012 #include <QColor> 0013 #include <QFont> 0014 #include <QObject> 0015 #include <QPoint> 0016 #include <QStringList> 0017 0018 #define NOTIFICATION_WIDTH 300 0019 #define NOTIFICATION_HEIGHT 70 0020 0021 const QString baseText(QLatin1String("<table height=\"100%\" width=\"100%\"><tr><td rowspan=\"2\"\ 0022 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>")); 0023 0024 class NotifySettings : public QObject 0025 { 0026 0027 public: 0028 NotifySettings(QObject *parent = nullptr); 0029 virtual ~NotifySettings(); 0030 0031 QMap<QString, QStringList> accounts(); 0032 void setAccounts(QMap<QString, QStringList> accounts); 0033 0034 int notifyInterval() const; 0035 void setNotifyInterval(int interval); 0036 0037 QPoint position() const; 0038 void setPosition(const QPoint &position); 0039 0040 QColor foregroundColor() const; 0041 void setForegroundColor(const QColor &color); 0042 0043 QColor backgroundColor() const; 0044 void setBackgroundColor(const QColor &color); 0045 0046 QFont font() const; 0047 void setFont(const QFont &font); 0048 0049 void load(); 0050 void save(); 0051 0052 private: 0053 class Private; 0054 Private *const d; 0055 }; 0056 0057 #endif // NOTIFYSETTINGS_H