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 "ui_introwindow.h"
#include "blackcore/dbus_server.h" #include "blackcore/dbus_server.h"
#include "blackmisc/networkutils.h" #include "blackmisc/networkutils.h"
#include "blackmisc/settingutilities.h"
#include <QDesktopServices> #include <QDesktopServices>
#include <QUrl> #include <QUrl>
#include <QDir>
/* /*
* Constructor * Constructor
@@ -70,4 +72,9 @@ void CIntroWindow::buttonClicked() const
{ {
QDesktopServices::openUrl(QUrl("https://dev.vatsim-germany.org/", QUrl::TolerantMode)); 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> </widget>
</item> </item>
<item> <item>
<widget class="QPushButton" name="pb_DeleteSettingsFile"> <widget class="QPushButton" name="pb_SettingsDir">
<property name="text"> <property name="text">
<string>del.settings</string> <string>settings dir.</string>
</property> </property>
</widget> </widget>
</item> </item>
@@ -256,8 +256,8 @@ voice included</string>
<slot>accept()</slot> <slot>accept()</slot>
<hints> <hints>
<hint type="sourcelabel"> <hint type="sourcelabel">
<x>257</x> <x>240</x>
<y>230</y> <y>290</y>
</hint> </hint>
<hint type="destinationlabel"> <hint type="destinationlabel">
<x>157</x> <x>157</x>
@@ -272,8 +272,8 @@ voice included</string>
<slot>reject()</slot> <slot>reject()</slot>
<hints> <hints>
<hint type="sourcelabel"> <hint type="sourcelabel">
<x>310</x> <x>240</x>
<y>230</y> <y>290</y>
</hint> </hint>
<hint type="destinationlabel"> <hint type="destinationlabel">
<x>286</x> <x>286</x>
@@ -304,8 +304,8 @@ voice included</string>
<slot>buttonClicked()</slot> <slot>buttonClicked()</slot>
<hints> <hints>
<hint type="sourcelabel"> <hint type="sourcelabel">
<x>262</x> <x>238</x>
<y>58</y> <y>75</y>
</hint> </hint>
<hint type="destinationlabel"> <hint type="destinationlabel">
<x>322</x> <x>322</x>
@@ -313,6 +313,22 @@ voice included</string>
</hint> </hint>
</hints> </hints>
</connection> </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> </connections>
<slots> <slots>
<slot>buttonClicked()</slot> <slot>buttonClicked()</slot>