-
Notifications
You must be signed in to change notification settings - Fork 21
/
window.h
122 lines (102 loc) · 2.74 KB
/
window.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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
#ifndef WINDOW_H
#define WINDOW_H
#include <QSystemTrayIcon>
#include <QPlainTextEdit>
#include <QCoreApplication>
#include <QtCore/QtCore>
#ifndef QT_NO_SYSTEMTRAYICON
#include <QDialog>
#include "window_1.h"
struct AppConfiguration
{
QColor iconColor;
QSize size;
QPoint pos;
};
QT_BEGIN_NAMESPACE
class QAction; class QActionGroup;
class QCheckBox;class QComboBox;
class QGroupBox;
class QLabel;
class QLineEdit;
class QMenu;
class QPushButton;
class QSpinBox;
class QTextEdit;
QT_END_NAMESPACE
//! [0]
class Window : public QDialog
{
Q_OBJECT
public:
Window(QString onedrive_path, QString onedrive_arguments);
QString *arguments;
QString *path;
protected:
void closeEvent(QCloseEvent *event) override;
private slots:
void iconActivated(QSystemTrayIcon::ActivationReason reason);
void showMessage(QString &text);
void readStdOutput();
void readStdError();
void OpenConfigurationWindow();
void defineTrayIcon(const QColor &color);
void moreColors();
private:
void createIconGroupBox();
void createMessageGroupBox();
void createActions();
void createTrayIcon();
void execute(QString onedrive_path, QString onedrive_arguments);
void openFolder();
void restart();
void suspend();
void changeTrayIcon(bool forceChange, bool sync);
void quit();
void about();
void createConfigurationGroupBox();
void loadSettings();
void saveSettings();
void eventsInfo(QString info);
void eventsError(QString error);
void eventsOperation(QString Operation, QString fileName);
QString getShortDateTimeFormat();
bool auto_hide;
bool isSyncing;
QGroupBox *iconGroupBox;
QLabel *iconLabel;
QComboBox *iconComboBox;
QCheckBox *showIconCheckBox;
QProcess *process;
QGroupBox *messageGroupBox;
QLabel *typeLabel;
QLabel *durationLabel;
QLabel *durationWarningLabel;
QLabel *titleLabel;
QPlainTextEdit *events;
QString *stdOutputString;
QLabel *bodyLabel;
QComboBox *typeComboBox;
QSpinBox *durationSpinBox;
QLineEdit *titleEdit;
QTextEdit *bodyEdit;
QPushButton *showMessageButton;
QAction *freeSpaceAction;
QAction *statusAction;
QAction *consoleAction;
QAction *configurationAction;
QAction *openfolderAction;
QAction *restartAction;
QAction *suspendAction;
QActionGroup *iconColorGroup;
QAction *quitAction;
QAction *aboutAction;
QSystemTrayIcon *trayIcon;
QMenu *trayIconMenu;
QString *currentIconPath;
Window_1 *ConfigurationWindow;
AppConfiguration *appConfig;
};
//! [0]
#endif // QT_NO_SYSTEMTRAYICON
#endif