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
@ -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)")));
|
||||
}
|
||||
|
||||
@ -18,6 +18,7 @@ signals:
|
||||
void settingsChanged();
|
||||
public slots:
|
||||
void buttonClicked(QAbstractButton* button);
|
||||
void on_chooseFile_clicked();
|
||||
void syncSettings();
|
||||
void restorePrefs();
|
||||
void rememberPrefs();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user