-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Expand file tree
/
Copy pathColumnDisplayFormatDialog.h
More file actions
45 lines (32 loc) · 964 Bytes
/
ColumnDisplayFormatDialog.h
File metadata and controls
45 lines (32 loc) · 964 Bytes
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
#ifndef COLUMNDISPLAYFORMATDIALOG_H
#define COLUMNDISPLAYFORMATDIALOG_H
#include <QDialog>
#include <unordered_map>
#include "sql/ObjectIdentifier.h"
class QString;
class DBBrowserDB;
namespace Ui {
class ColumnDisplayFormatDialog;
}
class ColumnDisplayFormatDialog : public QDialog
{
Q_OBJECT
public:
explicit ColumnDisplayFormatDialog(DBBrowserDB& db, const sqlb::ObjectIdentifier& tableName, const QString& colname, const QString& current_format, QWidget* parent = nullptr);
~ColumnDisplayFormatDialog() override;
QString selectedDisplayFormat() const;
protected:
void showEvent(QShowEvent *) override;
private slots:
void updateSqlCode();
void accept() override;
void setCustom(bool modified);
void help();
private:
Ui::ColumnDisplayFormatDialog* ui;
QString column_name;
std::unordered_map<std::string, QString> formatFunctions;
DBBrowserDB& pdb;
sqlb::ObjectIdentifier curTable;
};
#endif