-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmainwindow.h
More file actions
65 lines (52 loc) · 1.51 KB
/
Copy pathmainwindow.h
File metadata and controls
65 lines (52 loc) · 1.51 KB
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
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <QVariant>
#include <QtSql/QtSql>
#include <QtSql/QSqlQuery>
#include <QtSql/QSqlDatabase>
#include <QtSql/QSqlQueryModel>
#include <QSortFilterProxyModel>
#include "mysortfilterproxymodel.h"
#include "dbconnection.h"
enum SortingMethods { SQL, StandartModel, MyModel };
namespace Ui {
class MainWindow;
}
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();
void sortBySQL(int column);
void testFunc(const QSqlQueryModel &model);
void testFunc(StProxyModel *model);
void testFunc(MySortFilterProxyModel *model);
private slots:
void on_submitButton_clicked();
void on_actionAdd_Connection_triggered();
void getOpenedDatabase(QSqlDatabase *m_db);
void on_sectionClicked(int column);
void on_actionHide_vertical_headers_triggered();
void on_revertButton_clicked();
void on_actionQMap_triggered();
void on_actionQuickSort_triggered();
void on_actionHeapSort_triggered();
void on_actionStableSort_triggered();
void on_actionSimpleSort_triggered();
void on_actionTimSort_triggered();
private:
Ui::MainWindow *ui;
QSqlDatabase *db;
DBconnection *connection;
QSqlQueryModel model;
StProxyModel stProxyModel;
MySortFilterProxyModel myProxyModel;
SortingMethods choice;
MySortingMethods sortChoice;
bool hideFlag;
signals:
void sortChoiceChanged(MySortingMethods ch);
};
#endif // MAINWINDOW_H