summaryrefslogtreecommitdiffstats
path: root/tcutils/mainwindow.h
blob: 1639522f325dbf6252183d9b909b2a449b37a434 (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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <xrdpapi.h>
#include <QSystemTrayIcon>
#include <QMenu>
#include <QCloseEvent>
#include <QFileDialog>
#include <QDir>
#include <QListWidgetItem>
#include <QList>
#include <QMessageBox>
#include <QTimer>
#include <QStatusBar>
//#include <QDebug>

#include "utils.h"

namespace Ui {
class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();

private:
    Ui::MainWindow  *ui;
    void            *wtsChannel;
    QSystemTrayIcon *trayIcon;
    QMenu           *trayMenu;
    bool             okToQuit;
    QRect            savedGeometry;
    QStatusBar      *statusBar;

    QList<QListWidgetItem *> itemList;

    void setupSystemTray();
    int  initWtsChannel();
    int  deinitWtsChannel();
    void setStatusMsg(QString msg);
    void closeEvent(QCloseEvent * event);

private slots:
    void onBtnRefreshClicked();
    void onBtnUnmountClicked();
    void onActionQuit();
    void onActionLaunch();
    void onSystemTrayClicked(QSystemTrayIcon::ActivationReason);
};

#endif // MAINWINDOW_H