mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-23 07:15:35 +08:00
Allow to start core
This commit is contained in:
@@ -7,6 +7,8 @@
|
||||
#include <QDesktopServices>
|
||||
#include <QUrl>
|
||||
#include <QDir>
|
||||
#include <QProcess>
|
||||
#include <QFileInfo>
|
||||
|
||||
/*
|
||||
* Constructor
|
||||
@@ -80,4 +82,11 @@ void CIntroWindow::buttonClicked() const
|
||||
QString path = QDir::toNativeSeparators(BlackMisc::Settings::CSettingUtilities::getSettingsDirectory());
|
||||
QDesktopServices::openUrl(QUrl("file:///" + path));
|
||||
}
|
||||
else if (sender == this->ui->pb_CoreStart)
|
||||
{
|
||||
//! \todo make fully OS independent
|
||||
QString sfx = QFileInfo(QCoreApplication::applicationFilePath()).suffix();
|
||||
QString core = QDir(QApplication::applicationDirPath()).filePath("swiftcore." + sfx);
|
||||
QProcess::startDetached(core);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<string>swift intro screen</string>
|
||||
</property>
|
||||
<property name="windowIcon">
|
||||
<iconset resource="../../src/blackgui/blackgui.qrc">
|
||||
<iconset>
|
||||
<normaloff>:/blackgui/icons/aircraftdeparture.png</normaloff>:/blackgui/icons/aircraftdeparture.png</iconset>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
@@ -146,6 +146,13 @@ voice included</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pb_CoreStart">
|
||||
<property name="text">
|
||||
<string>start core</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -245,9 +252,7 @@ voice included</string>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources>
|
||||
<include location="../../src/blackgui/blackgui.qrc"/>
|
||||
</resources>
|
||||
<resources/>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>bb_OkCancel</sender>
|
||||
@@ -329,6 +334,22 @@ voice included</string>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>pb_CoreStart</sender>
|
||||
<signal>clicked()</signal>
|
||||
<receiver>CIntroWindow</receiver>
|
||||
<slot>buttonClicked()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>90</x>
|
||||
<y>194</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>0</x>
|
||||
<y>218</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
<slots>
|
||||
<slot>buttonClicked()</slot>
|
||||
|
||||
Reference in New Issue
Block a user