Extract the system tray functionality to its own class

LibraryWindow is already a monster, so we'll try to not make it bigger.
This commit is contained in:
Luis Ángel San Martín
2019-09-21 10:47:01 +02:00
parent 3c07e7269a
commit 8e99d9e59f
5 changed files with 167 additions and 41 deletions

View File

@ -5,7 +5,6 @@
#include <QMap>
#include <QModelIndex>
#include <QFileInfo>
#include <QSystemTrayIcon>
#include "yacreader_global_gui.h"
#include "yacreader_libraries.h"
@ -77,6 +76,10 @@ class EmptySpecialListWidget;
class EmptyReadingListWidget;
class YACReaderComicsViewsManager;
namespace YACReader {
class TrayIconController;
}
#include "comic_db.h"
using namespace YACReader;
@ -385,7 +388,7 @@ public slots:
void checkMaxNumLibraries();
void showErrorUpgradingLibrary(const QString &path);
void changeEvent(QEvent *event);
void closeApp(QCloseEvent *event);
private:
//fullscreen mode in Windows for preventing this bug: QTBUG-41309 https://bugreports.qt.io/browse/QTBUG-41309
@ -393,7 +396,8 @@ private:
QPoint previousPos;
QSize previousSize;
std::future<void> upgradeLibraryFuture;
QSystemTrayIcon trayIcon;
TrayIconController *trayIconController;
};
#endif