-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmainwindow.h
46 lines (39 loc) · 899 Bytes
/
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
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <windows.h>
#include <database.h>
#include <psapi.h>
#include <Strsafe.h>
#include <thread>
#include <chrono>
#include <QCloseEvent>
#include <QSystemTrayIcon>
namespace Ui {
class MainWindow;
}
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = nullptr);
~MainWindow();
void timeUpdater();
public slots:
void stopTimeUpdater();
void showOnDoubleClicked(QSystemTrayIcon::ActivationReason reason);
protected:
void closeEvent(QCloseEvent* event);
private:
struct Translation
{
WORD language;
WORD codePage;
};
bool isWork = true;
Ui::MainWindow *ui;
Database db;
const QStringList headers{"Application", "Time"};
QString getAppName() const;
};
#endif // MAINWINDOW_H