Files
sqlitebrowser/src/PreferencesDialog.h
Martin Kleusberg e6390b4d22 dbhub: Automatically generate a file name to save a database under
When fetching a remote database automatically generate a file name to
save the database as instead of asking the user for a path and name.

Also add a preferences option to set the directory for all cloned remote
databases.

This is obviously a trade-off: on the one hand this makes opening remote
databases simpler (it's just a double click), on the other hand it takes
control away from the users. The main reason for doing this, however, is
to indicate to the user that the cloned databases are going to be
controlled by DB4S. We have to keep track of the local databases in
order to update them from the right place, push them back to the right
place, etc. And because the local copies are under DB4S control we don't
want the user to move, rename, or delete them.
2017-03-20 23:06:58 +01:00

51 lines
1.1 KiB
C++

#ifndef PREFERENCESDIALOG_H
#define PREFERENCESDIALOG_H
#include <QDialog>
#include <QVariant>
#include <QHash>
class QTreeWidgetItem;
class QFrame;
class QTableWidget;
class QSslCertificate;
namespace Ui {
class PreferencesDialog;
}
class PreferencesDialog : public QDialog
{
Q_OBJECT
public:
explicit PreferencesDialog(QWidget* parent = 0);
~PreferencesDialog();
private slots:
virtual void loadSettings();
virtual void saveSettings();
virtual void chooseLocation();
virtual void showColourDialog(QTreeWidgetItem* item, int column);
virtual void addExtension();
virtual void removeExtension();
virtual void activateRemoteTab(bool active);
virtual void addClientCertificate();
virtual void removeClientCertificate();
void chooseRemoteCloneDirectory();
private:
Ui::PreferencesDialog *ui;
void fillLanguageBox();
void loadColorSetting(QFrame *frame, const QString &name);
void saveColorSetting(QFrame *frame, const QString &name);
void addClientCertToTable(const QString& path, const QSslCertificate& cert);
protected:
bool eventFilter(QObject *obj, QEvent *event);
};
#endif