refs #209, open directory of settings file in startup GUI

This commit is contained in:
Klaus Basan
2014-04-15 03:00:02 +02:00
parent 7e45a92969
commit 8abdde609f
2 changed files with 31 additions and 8 deletions

View File

@@ -2,8 +2,10 @@
#include "ui_introwindow.h"
#include "blackcore/dbus_server.h"
#include "blackmisc/networkutils.h"
#include "blackmisc/settingutilities.h"
#include <QDesktopServices>
#include <QUrl>
#include <QDir>
/*
* 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));
}
}

View File

@@ -188,9 +188,9 @@ voice included</string>
</widget>
</item>
<item>
<widget class="QPushButton" name="pb_DeleteSettingsFile">
<widget class="QPushButton" name="pb_SettingsDir">
<property name="text">
<string>del.settings</string>
<string>settings dir.</string>
</property>
</widget>
</item>
@@ -256,8 +256,8 @@ voice included</string>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">
<x>257</x>
<y>230</y>
<x>240</x>
<y>290</y>
</hint>
<hint type="destinationlabel">
<x>157</x>
@@ -272,8 +272,8 @@ voice included</string>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
<x>310</x>
<y>230</y>
<x>240</x>
<y>290</y>
</hint>
<hint type="destinationlabel">
<x>286</x>
@@ -304,8 +304,8 @@ voice included</string>
<slot>buttonClicked()</slot>
<hints>
<hint type="sourcelabel">
<x>262</x>
<y>58</y>
<x>238</x>
<y>75</y>
</hint>
<hint type="destinationlabel">
<x>322</x>
@@ -313,6 +313,22 @@ voice included</string>
</hint>
</hints>
</connection>
<connection>
<sender>pb_SettingsDir</sender>
<signal>clicked()</signal>
<receiver>CIntroWindow</receiver>
<slot>buttonClicked()</slot>
<hints>
<hint type="sourcelabel">
<x>197</x>
<y>97</y>
</hint>
<hint type="destinationlabel">
<x>86</x>
<y>250</y>
</hint>
</hints>
</connection>
</connections>
<slots>
<slot>buttonClicked()</slot>