-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Expand file tree
/
Copy pathEditIndexDialog.h
More file actions
50 lines (39 loc) · 1.12 KB
/
EditIndexDialog.h
File metadata and controls
50 lines (39 loc) · 1.12 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
#ifndef EDITINDEXDIALOG_H
#define EDITINDEXDIALOG_H
#include "sql/ObjectIdentifier.h"
#include "sql/sqlitetypes.h"
#include <QDialog>
#include <QModelIndex>
class DBBrowserDB;
namespace Ui {
class EditIndexDialog;
}
class EditIndexDialog : public QDialog
{
Q_OBJECT
public:
explicit EditIndexDialog(DBBrowserDB& db, const sqlb::ObjectIdentifier& indexName, bool createIndex, QWidget* parent = nullptr);
~EditIndexDialog() override;
private slots:
void accept() override;
void reject() override;
void tableChanged(int table_name_idx);
void checkInput();
void addToIndex(const QModelIndex& idx = QModelIndex());
void removeFromIndex(const QModelIndex& idx = QModelIndex());
void moveColumnUp();
void moveColumnDown();
void addExpressionColumn();
private:
DBBrowserDB& pdb;
sqlb::ObjectIdentifier curIndex;
sqlb::Index index;
bool newIndex;
Ui::EditIndexDialog* ui;
std::string m_sRestorePointName;
void updateColumnLists();
void updateSqlText();
void moveCurrentColumn(bool down);
void tableChanged(const QString& new_table, bool initialLoad);
};
#endif