mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-02-09 21:28:30 -06:00
- PreferencesDialog::importSettings() calls MainWindow::reloadSettings() indirectly - PreferencesDIalog::exportSettings() calls PreferencesDialog::saveSettings() when beginning - Settings::importSettings() clear m_hCache - Update Korean translation that can be translated from the above changes
74 lines
1.6 KiB
C++
74 lines
1.6 KiB
C++
#ifndef PREFERENCESDIALOG_H
|
|
#define PREFERENCESDIALOG_H
|
|
|
|
#include <QDialog>
|
|
|
|
class QTreeWidgetItem;
|
|
class QFrame;
|
|
class QSslCertificate;
|
|
class QAbstractButton;
|
|
|
|
class ProxyDialog;
|
|
|
|
namespace Ui {
|
|
class PreferencesDialog;
|
|
}
|
|
|
|
class PreferencesDialog : public QDialog
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
enum Tabs
|
|
{
|
|
TabGeneral,
|
|
TabDatabase,
|
|
TabDataBrowser,
|
|
TabSql,
|
|
TabExtensions,
|
|
TabRemote
|
|
};
|
|
|
|
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 removeExtension();
|
|
void activateRemoteTab(bool active);
|
|
void addClientCertificate();
|
|
void removeClientCertificate();
|
|
void chooseRemoteCloneDirectory();
|
|
void updatePreviewFont();
|
|
void adjustColorsToStyle(int style);
|
|
void configureProxy();
|
|
|
|
void on_buttonManageFileExtension_clicked();
|
|
void on_buttonBox_clicked(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 addClientCertToTable(const QString& path, const QSslCertificate& cert);
|
|
void exportSettings();
|
|
void importSettings();
|
|
|
|
protected:
|
|
bool eventFilter(QObject *obj, QEvent *event) override;
|
|
};
|
|
|
|
#endif
|