-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Expand file tree
/
Copy pathPreferencesDialog.h
More file actions
67 lines (51 loc) · 1.41 KB
/
PreferencesDialog.h
File metadata and controls
67 lines (51 loc) · 1.41 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
66
67
#ifndef PREFERENCESDIALOG_H
#define PREFERENCESDIALOG_H
#include <QDialog>
class QTreeWidgetItem;
class QFrame;
class QAbstractButton;
class ProxyDialog;
namespace Ui {
class PreferencesDialog;
}
class PreferencesDialog : public QDialog
{
Q_OBJECT
public:
enum Tabs
{
TabGeneral,
TabDatabase,
TabDataBrowser,
TabSql,
TabExtensions
};
explicit PreferencesDialog(QWidget* parent = nullptr, Tabs tab = TabGeneral);
~PreferencesDialog() override;
private slots:
void loadSettings();
void saveSettings(bool accept=true);
void chooseLocation();
void showColourDialog(QTreeWidgetItem* item, int column);
void addExtension();
void createBuiltinExtensionList();
void removeExtension();
void updatePreviewFont();
void adjustColorsToStyle(int style);
void configureProxy();
void showFileExtensionManager();
void buttonBoxClicked(QAbstractButton* button);
private:
Ui::PreferencesDialog* ui;
ProxyDialog* m_proxyDialog;
QStringList m_dbFileExtensions;
void fillLanguageBox();
void loadColorSetting(QFrame *frame, const std::string& name);
void setColorSetting(QFrame* frame, const QColor &color);
void saveColorSetting(QFrame* frame, const std::string& name);
void exportSettings();
void importSettings();
protected:
bool eventFilter(QObject *obj, QEvent *event) override;
};
#endif