-
Notifications
You must be signed in to change notification settings - Fork 0
/
application.h
52 lines (45 loc) · 1.1 KB
/
application.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#ifndef APPLICATION_H
#define APPLICATION_H
#include <QApplication>
#include <QColor>
#include <QFont>
#include <QSystemTrayIcon>
#include "crowmon.h"
class Settings;
class Application : public QApplication
{
Q_OBJECT
public:
explicit Application(int & argc, char ** argv);
~Application();
private:
void doPollRepository(bool bForceShow = false);
void showWidget(const logmsg_t&);
protected:
logmsg_t parseLog(const QString&);
void timerEvent(QTimerEvent *event);
public:
void setSysIcon(QSystemTrayIcon* icon);
public slots:
void applySettings(Settings*);
void forceReDisplay();
void aboutToQuit();
void showSettings();
void handleSysTrayIconClick(QSystemTrayIcon::ActivationReason);
private:
logmsg_t m_lastlog;
int m_iTimerID;
int m_iLastRevision;
QString m_url;
QString m_user;
QString m_pwd;
QFont m_font;
QColor m_fontColor;
QColor m_color;
int m_iCheckPeriod;
int m_iOpacity;
int m_iDisplayTimeout;
QSystemTrayIcon* m_trayIcon = nullptr;
QMenu* m_trayMenu = nullptr;
};
#endif // APPLICATION_H