-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsqlviewer.h
41 lines (32 loc) · 848 Bytes
/
sqlviewer.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
#ifndef SQLVIEWER_H
#define SQLVIEWER_H
#include <QMainWindow>
#include <QModelIndex>
#include <QTableView>
#include "dbconnectdialog.h"
#include "DBHandler.h"
#include "tablelist.h"
QT_BEGIN_NAMESPACE
namespace Ui { class SqlViewer; }
QT_END_NAMESPACE
class SqlViewer : public QMainWindow
{
Q_OBJECT
public:
SqlViewer(QWidget *parent = nullptr);
~SqlViewer();
public slots:
void connectDbDialog();
void onConnectionDialogAccepted();
void onConnectionDialogRejected();
// void updateTableList();
void openTableTab(const QModelIndex &index);
private:
Ui::SqlViewer *ui;
DbConnectDialog *connectionDialog;
QMap<QString, QTableView *> tableMap;
DBHandler *dbHandler;
bool tabAlreadyExists(const QString &tableName) const;
void tabCloseRequestHandler(int index);
};
#endif // SQLVIEWER_H