-
Notifications
You must be signed in to change notification settings - Fork 0
/
mainwindow.h
60 lines (53 loc) · 1.67 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
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QPushButton>
#include <QMainWindow>
#include <QStackedWidget>
#include <QWidget>
#include <QSignalMapper>
#include <QComboBox>
#include "secondlayoutwindow.h"
// #include "questionwindow.h"
#include "dialogwindow.h"
#include "questionssetup.h"
class MainWindow : public QMainWindow
{
Q_OBJECT
QStackedWidget *stacked_widget_main;
QComboBox *cbx_users;
QPushButton *pb_start_dialog;
QPushButton *pb_add_question;
QPushButton *pb_user_selection;
QPushButton *pb_general_questions;
QPushButton *pb_quit;
QWidget *wgt_choose_user;
QWidget *wgt_main;
DialogWindow *wgt_dialog;
// QuestionWindow *wgt_add_question;
QuestionsSetup *wgt_add_question;
QuestionsSetup *wgt_questions_setup;
bool CreateQuestionsTable(QString table_name, int table_id);
bool CreateUsersTable();
void FillUserTable(QString full_table_name);
// bool CreateGeneralTable(QString table_name, int table_id);
void CreateDialogWindow(QString &user, int table_id);
void CreateAddQuestionWindow(int table_id);
void CreateMainWindow(QString &user);
void CreateChooseUserWindow();
void connectPbToWindow(SecondLayoutWindow *wgt, QPushButton *pb);
void FillComboBox(QComboBox &cbx);
// bool userTableIsExist(QString user);
int createUserTableId();
int getUserTableId(QString &user);
bool userIsExist(QString &user);
public:
MainWindow(QWidget *parent = nullptr);
void goToMainWindow();
private slots:
void slotAddUser();
void slotDeleteUser();
void slotGoToMainWindow();
void slotGoUserSelection();
void slotGeneralQuestions();
};
#endif // MAINWINDOW_H