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:
Miika Turkia 2013-10-14 07:19:13 +03:00 committed by Dirk Hohndel
parent 291ce1d9ac
commit 080b1bcc5a
2 changed files with 8 additions and 0 deletions

View file

@ -1,6 +1,7 @@
#include "preferences.h"
#include <QSettings>
#include <QDebug>
#include <QFileDialog>
PreferencesDialog* PreferencesDialog::instance()
{
@ -193,3 +194,9 @@ void PreferencesDialog::buttonClicked(QAbstractButton* button)
#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)")));
}

View file

@ -18,6 +18,7 @@ signals:
void settingsChanged();
public slots:
void buttonClicked(QAbstractButton* button);
void on_chooseFile_clicked();
void syncSettings();
void restorePrefs();
void rememberPrefs();