yacreader/YACReaderLibrary/trayicon_controller.h
2019-09-21 12:11:39 +02:00

37 lines
594 B
C++

#ifndef TRAYICON_CONTROLLER_H
#define TRAYICON_CONTROLLER_H
#include <QtWidgets>
#include <QSystemTrayIcon>
class LibraryWindow;
namespace YACReader {
class TrayIconController : public QObject
{
Q_OBJECT
public:
TrayIconController(QSettings *settings,
LibraryWindow *window);
void updateIconVisibility();
bool handleCloseToTrayIcon(QCloseEvent *event);
QSystemTrayIcon trayIcon;
public slots:
void showWindow();
private:
QSettings *settings;
LibraryWindow *window;
QMenu *trayIconMenu;
};
}
#endif // TRAYICON_CONTROLLER_H