-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mainwindow.h
97 lines (62 loc) · 2.17 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
97
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <windows.h>
#include <QProcess>
#include <QStandardPaths>
#include <QMessageBox>
#include <QSystemTrayIcon>
#include <QTimer>
//#include <QMenu>
QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
MainWindow(QWidget *parent = nullptr);
~MainWindow();
//Für das Tastenkürzel die 3 überschriebenen Methoden
void showEvent(QShowEvent* event) override;
void closeEvent(QCloseEvent* event) override;
bool nativeEvent(const QByteArray& eventType, void* message, long long* result) override;
//Zum Speichern der Einstellungen
void saveSettings();
void loadSettings();
void addToAutostart();
void removeFromAutostart();
//Minimieren mit Systray überschreiben
void changeEvent(QEvent *event) override;
private slots:
void on_pushButton_clicked();
void on_pushButton_3_clicked();
void on_pushButton_2_clicked();
void on_resumePlaybackCheckBox_clicked();
void on_playPauseButton_clicked();
void on_pushButton_4_clicked();
void on_pushButton_5_clicked();
void on_pushButtonSaveSettings_clicked();
void on_pushButtonReset_clicked();
void on_checkBoxAutostart_stateChanged(int arg1);
void on_checkBoxStartMinimised_stateChanged(int arg1);
void on_lineEditHotkey_textChanged(const QString &arg1);
void on_comboBoxModifier_1_currentTextChanged(const QString &arg1);
void on_comboBoxModifier_2_currentTextChanged(const QString &arg1);
void on_checkBoxHotkey_stateChanged(int arg1);
void on_checkBoxMinimizeToTray_stateChanged(int arg1);
void trayIconActivated(QSystemTrayIcon::ActivationReason reason);
private:
Ui::MainWindow *ui;
bool IsSpotifyOpen();
bool IsSpotifyActiveWindow();
void pfadSetzen();
void setHotkey();
//Hotkey-Variablen
int modifier1, modifier2, hotkey;
//Tray-Icon
QSystemTrayIcon *trayIcon;
void activateMainWindow();
void hideMainWindow();
};
#endif // MAINWINDOW_H