mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Enable file selection dialog for preferences
This enabled a file selection dialog for selecting default log file under the preferences. [Dirk Hohndel: added missing declaration to .h file] Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
291ce1d9ac
commit
080b1bcc5a
2 changed files with 8 additions and 0 deletions
|
@ -1,6 +1,7 @@
|
||||||
#include "preferences.h"
|
#include "preferences.h"
|
||||||
#include <QSettings>
|
#include <QSettings>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
#include <QFileDialog>
|
||||||
|
|
||||||
PreferencesDialog* PreferencesDialog::instance()
|
PreferencesDialog* PreferencesDialog::instance()
|
||||||
{
|
{
|
||||||
|
@ -193,3 +194,9 @@ void PreferencesDialog::buttonClicked(QAbstractButton* button)
|
||||||
|
|
||||||
|
|
||||||
#undef SB
|
#undef SB
|
||||||
|
|
||||||
|
void PreferencesDialog::on_chooseFile_clicked()
|
||||||
|
{
|
||||||
|
QFileInfo fi(system_default_filename());
|
||||||
|
ui.defaultfilename->setText(QFileDialog::getOpenFileName(this, tr("Open Default Log File"), fi.absolutePath(), tr("XML Files (*.xml)")));
|
||||||
|
}
|
||||||
|
|
|
@ -18,6 +18,7 @@ signals:
|
||||||
void settingsChanged();
|
void settingsChanged();
|
||||||
public slots:
|
public slots:
|
||||||
void buttonClicked(QAbstractButton* button);
|
void buttonClicked(QAbstractButton* button);
|
||||||
|
void on_chooseFile_clicked();
|
||||||
void syncSettings();
|
void syncSettings();
|
||||||
void restorePrefs();
|
void restorePrefs();
|
||||||
void rememberPrefs();
|
void rememberPrefs();
|
||||||
|
|
Loading…
Add table
Reference in a new issue