-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdiarywindow.hpp
42 lines (32 loc) · 864 Bytes
/
diarywindow.hpp
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
#ifndef DIARYWINDOW_HPP
#define DIARYWINDOW_HPP
#include <iostream>
#include <QMainWindow>
#include "database.hpp"
#include "config.hpp"
using namespace std;
namespace Ui{ class DiaryWindow; }
class DiaryWindow : public QMainWindow
{
Q_OBJECT
private:
Ui::DiaryWindow *ui;
Database* database = nullptr;
bool isEdited = false;
int selectedItem = -1;
std::string getTimeFormat();
void displayMessage();
void clearInput();
void setDefault();
private slots:
void on_RemoveButton_clicked();
void on_EditButton_clicked();
void on_list_clicked(const QModelIndex &index);
void on_list_doubleClicked(const QModelIndex &index);
void on_save_button_clicked();
void on_tabBar_tabBarClicked(int index);
public:
explicit DiaryWindow(QWidget *parent = 0);
~DiaryWindow();
};
#endif // DIARYWINDOW_HPP