From 8abdde609f8bbd37f0bbf829cf02e6ecc2ad6587 Mon Sep 17 00:00:00 2001 From: Klaus Basan Date: Tue, 15 Apr 2014 03:00:02 +0200 Subject: [PATCH] refs #209, open directory of settings file in startup GUI --- samples/blackgui/introwindow.cpp | 7 +++++++ samples/blackgui/introwindow.ui | 32 ++++++++++++++++++++++++-------- 2 files changed, 31 insertions(+), 8 deletions(-) diff --git a/samples/blackgui/introwindow.cpp b/samples/blackgui/introwindow.cpp index b0a2acd0b..a9b9ec6fe 100644 --- a/samples/blackgui/introwindow.cpp +++ b/samples/blackgui/introwindow.cpp @@ -2,8 +2,10 @@ #include "ui_introwindow.h" #include "blackcore/dbus_server.h" #include "blackmisc/networkutils.h" +#include "blackmisc/settingutilities.h" #include #include +#include /* * Constructor @@ -70,4 +72,9 @@ void CIntroWindow::buttonClicked() const { QDesktopServices::openUrl(QUrl("https://dev.vatsim-germany.org/", QUrl::TolerantMode)); } + else if (sender == this->ui->pb_SettingsDir) + { + QString path = QDir::toNativeSeparators(BlackMisc::Settings::CSettingUtilities::getSettingsDirectory()); + QDesktopServices::openUrl(QUrl("file:///" + path)); + } } diff --git a/samples/blackgui/introwindow.ui b/samples/blackgui/introwindow.ui index b084677fc..4a9ba7493 100644 --- a/samples/blackgui/introwindow.ui +++ b/samples/blackgui/introwindow.ui @@ -188,9 +188,9 @@ voice included - + - del.settings + settings dir. @@ -256,8 +256,8 @@ voice included accept() - 257 - 230 + 240 + 290 157 @@ -272,8 +272,8 @@ voice included reject() - 310 - 230 + 240 + 290 286 @@ -304,8 +304,8 @@ voice included buttonClicked() - 262 - 58 + 238 + 75 322 @@ -313,6 +313,22 @@ voice included + + pb_SettingsDir + clicked() + CIntroWindow + buttonClicked() + + + 197 + 97 + + + 86 + 250 + + + buttonClicked()