-
Notifications
You must be signed in to change notification settings - Fork 256
/
mainwindow.h
96 lines (74 loc) · 2.52 KB
/
mainwindow.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
/*
BAREOS® - Backup Archiving REcovery Open Sourced
Copyright (C) 2013-2013 Bareos GmbH & Co. KG
This program is Free Software; you can redistribute it and/or
modify it under the terms of version three of the GNU Affero General Public
License as published by the Free Software Foundation and included
in the file LICENSE.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
*/
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <version.h>
#include <QMainWindow>
#include <QApplication>
#include <QMessageBox>
#include <QSystemTrayIcon>
#include <QMap>
#include <QString>
#include <QStringList>
namespace Ui {
class MainWindow;
}
class QPlainTextEdit;
class MonitorTab;
class MonitorItem;
class SystemTrayIcon;
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
static MainWindow* instance();
static void destruct();
void addTabs(QStringList tabRefs);
private:
explicit MainWindow(QWidget *parent = 0);
Q_DISABLE_COPY(MainWindow);
~MainWindow();
QPlainTextEdit* getTextEdit(const QString& tabRef);
static MainWindow* mainWindowSingleton;
static bool already_destroyed;
Ui::MainWindow *ui;
QMap<QString,MonitorTab*>* monitorTabMap;
SystemTrayIcon* systemTrayIcon;
QStringList tabs;
int nTabs;
bool *bRefs;
public slots:
/* auto-connected slots to the UI */
void on_pushButton_Close_clicked();
/* ********************************************* */
/* auto-connected slots to the TrayMenu Actions */
void on_TrayMenu_About_triggered();
void on_TrayMenu_Quit_triggered();
void on_TrayMenu_Display_triggered();
/* ********************************************* */
/* auto-connected slots to the SystemTrayIcon */
void on_SystemTrayIcon_activated(QSystemTrayIcon::ActivationReason);
/* ********************************************* */
void onShowStatusbarMessage(QString);
void onAppendText(QString, QString);
void onClearText(const QString& tabRef);
void onStatusChanged(const QString& tabRef, int state);
void onFdJobIsRunning(bool running);
signals:
void refreshItems();
};
#endif // MAINWINDOW_H