summaryrefslogtreecommitdiff
path: root/client/ProxyClientApp.h
blob: cc0a7ebb5c3c665655373833b2c39c19dda9db2f (plain)
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


#ifndef PROXY_CLIENT_APPLICATION_H
#define PROXY_CLIENT_APPLICATION_H

#include <QSystemTrayIcon>
#include <QApplication>
#include "Dialog.h"
#include "FileOpThread.h"


//class ProxyClientApp: public QtSingleApplication //this will be paid later )))
class ProxyClientApp: public QApplication
{
	Q_OBJECT
	
public:
	/**
	 * @brief	create an instance of ProxyClientApp
	 */
	ProxyClientApp(int &argc, char *argv[]);
	
private slots:
	void trayActivated(QSystemTrayIcon::ActivationReason reason);
    void showProxyDialog();
    void DialogClosed(int result);
    void configUpdated();
	void quitApp();

private:
	QSystemTrayIcon *trayIcon;
    ProxyDialog *dialog;
	FileOpThread fileOpThread;

    // fucking tray icon workaround
    quint64 closeTime;
};


#endif