mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-14 08:45:36 +08:00
refs #886, configuration button in launcher
This commit is contained in:
@@ -527,5 +527,7 @@
|
|||||||
<file>icons/misc/skull128.png</file>
|
<file>icons/misc/skull128.png</file>
|
||||||
<file>icons/misc/skull256.png</file>
|
<file>icons/misc/skull256.png</file>
|
||||||
<file>icons/misc/skull512.png</file>
|
<file>icons/misc/skull512.png</file>
|
||||||
|
<file>icons/misc/toolWizard64.png</file>
|
||||||
|
<file>icons/misc/toolWizard128.png</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
|||||||
BIN
src/blackmisc/icons/misc/toolWizard128.png
Normal file
BIN
src/blackmisc/icons/misc/toolWizard128.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 13 KiB |
BIN
src/blackmisc/icons/misc/toolWizard64.png
Normal file
BIN
src/blackmisc/icons/misc/toolWizard64.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.6 KiB |
@@ -10,6 +10,7 @@
|
|||||||
#include "swiftlauncher.h"
|
#include "swiftlauncher.h"
|
||||||
#include "ui_swiftlauncher.h"
|
#include "ui_swiftlauncher.h"
|
||||||
#include "blackconfig/buildconfig.h"
|
#include "blackconfig/buildconfig.h"
|
||||||
|
#include "blackgui/components/configurationwizard.h"
|
||||||
#include "blackgui/guiapplication.h"
|
#include "blackgui/guiapplication.h"
|
||||||
#include "blackgui/stylesheetutility.h"
|
#include "blackgui/stylesheetutility.h"
|
||||||
#include "blackcore/context/contextapplicationproxy.h"
|
#include "blackcore/context/contextapplicationproxy.h"
|
||||||
@@ -29,6 +30,7 @@
|
|||||||
|
|
||||||
using namespace BlackConfig;
|
using namespace BlackConfig;
|
||||||
using namespace BlackGui;
|
using namespace BlackGui;
|
||||||
|
using namespace BlackGui::Components;
|
||||||
using namespace BlackCore;
|
using namespace BlackCore;
|
||||||
using namespace BlackCore::Application;
|
using namespace BlackCore::Application;
|
||||||
using namespace BlackCore::Context;
|
using namespace BlackCore::Context;
|
||||||
@@ -50,6 +52,7 @@ CSwiftLauncher::CSwiftLauncher(QWidget *parent) :
|
|||||||
connect(ui->tb_SwiftGui, &QPushButton::pressed, this, &CSwiftLauncher::ps_startButtonPressed);
|
connect(ui->tb_SwiftGui, &QPushButton::pressed, this, &CSwiftLauncher::ps_startButtonPressed);
|
||||||
connect(ui->tb_Database, &QPushButton::pressed, this, &CSwiftLauncher::ps_startButtonPressed);
|
connect(ui->tb_Database, &QPushButton::pressed, this, &CSwiftLauncher::ps_startButtonPressed);
|
||||||
connect(ui->tb_BackToMain, &QToolButton::pressed, this, &CSwiftLauncher::ps_showMainPage);
|
connect(ui->tb_BackToMain, &QToolButton::pressed, this, &CSwiftLauncher::ps_showMainPage);
|
||||||
|
connect(ui->tb_ConfigurationWizard, &QToolButton::pressed, this, &CSwiftLauncher::ps_startWizard);
|
||||||
connect(ui->tb_Launcher, &QToolBox::currentChanged, this, &CSwiftLauncher::ps_tabChanged);
|
connect(ui->tb_Launcher, &QToolBox::currentChanged, this, &CSwiftLauncher::ps_tabChanged);
|
||||||
|
|
||||||
// use version signal as trigger for completion
|
// use version signal as trigger for completion
|
||||||
@@ -521,3 +524,12 @@ void CSwiftLauncher::ps_checkRunningApplicationsAndCore()
|
|||||||
ui->tb_SwiftMappingTool->setEnabled(!foundLocalMappingTool && m_startMappingToolWaitCycles < 1);
|
ui->tb_SwiftMappingTool->setEnabled(!foundLocalMappingTool && m_startMappingToolWaitCycles < 1);
|
||||||
ui->tb_SwiftGui->setEnabled(!foundLocalPilotClientGui && m_startGuiWaitCycles < 1);
|
ui->tb_SwiftGui->setEnabled(!foundLocalPilotClientGui && m_startGuiWaitCycles < 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CSwiftLauncher::ps_startWizard()
|
||||||
|
{
|
||||||
|
if (!m_wizard)
|
||||||
|
{
|
||||||
|
m_wizard.reset(new CConfigurationWizard(this));
|
||||||
|
}
|
||||||
|
m_wizard->show();
|
||||||
|
}
|
||||||
|
|||||||
@@ -26,6 +26,7 @@
|
|||||||
#include <QNetworkReply>
|
#include <QNetworkReply>
|
||||||
|
|
||||||
namespace Ui { class CSwiftLauncher; }
|
namespace Ui { class CSwiftLauncher; }
|
||||||
|
namespace BlackGui { namespace Components { class CConfigurationWizard; }}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* swift launcher tool
|
* swift launcher tool
|
||||||
@@ -76,6 +77,7 @@ protected:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
QScopedPointer<Ui::CSwiftLauncher> ui;
|
QScopedPointer<Ui::CSwiftLauncher> ui;
|
||||||
|
QScopedPointer<BlackGui::Components::CConfigurationWizard> m_wizard;
|
||||||
BlackMisc::CData<BlackCore::Data::TUpdateInfo> m_updateInfo { this, &CSwiftLauncher::ps_changedUpdateInfoCache }; //!< version cache
|
BlackMisc::CData<BlackCore::Data::TUpdateInfo> m_updateInfo { this, &CSwiftLauncher::ps_changedUpdateInfoCache }; //!< version cache
|
||||||
BlackMisc::CData<BlackCore::Data::TLauncherSetup> m_setup { this }; //! setup, ie last user selection
|
BlackMisc::CData<BlackCore::Data::TLauncherSetup> m_setup { this }; //! setup, ie last user selection
|
||||||
QString m_executable;
|
QString m_executable;
|
||||||
@@ -183,6 +185,9 @@ private slots:
|
|||||||
|
|
||||||
//! Check if applicationas are already running
|
//! Check if applicationas are already running
|
||||||
void ps_checkRunningApplicationsAndCore();
|
void ps_checkRunningApplicationsAndCore();
|
||||||
|
|
||||||
|
//! Start the configuration wizard
|
||||||
|
void ps_startWizard();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // guard
|
#endif // guard
|
||||||
|
|||||||
@@ -722,52 +722,18 @@ p, li { white-space: pre-wrap; }
|
|||||||
<attribute name="label">
|
<attribute name="label">
|
||||||
<string>Start application</string>
|
<string>Start application</string>
|
||||||
</attribute>
|
</attribute>
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
<layout class="QGridLayout" name="gl_Start">
|
||||||
<item row="1" column="2" alignment="Qt::AlignHCenter">
|
<item row="0" column="2">
|
||||||
<widget class="QLabel" name="lbl_SwiftData">
|
<widget class="QToolButton" name="tb_SwiftMappingTool">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>start swift data (the mapping tool)</string>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>mapping tool</string>
|
<string>mapping tool</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="4" alignment="Qt::AlignHCenter">
|
|
||||||
<widget class="QLabel" name="lbl_Database">
|
|
||||||
<property name="text">
|
|
||||||
<string>goto swift DB</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1">
|
|
||||||
<widget class="QToolButton" name="tb_SwiftCore">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>start swift core</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>swift core</string>
|
|
||||||
</property>
|
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../blackmisc/blackmisc.qrc">
|
<iconset resource="../blackmisc/blackmisc.qrc">
|
||||||
<normaloff>:/own/icons/own/swift3D/sw3DOrange-256.png</normaloff>:/own/icons/own/swift3D/sw3DOrange-256.png</iconset>
|
<normaloff>:/own/icons/own/swift3D/sw3DGreen-256.png</normaloff>:/own/icons/own/swift3D/sw3DGreen-256.png</iconset>
|
||||||
</property>
|
|
||||||
<property name="iconSize">
|
|
||||||
<size>
|
|
||||||
<width>64</width>
|
|
||||||
<height>64</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QToolButton" name="tb_SwiftGui">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>start swift GUI</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>swift GUI</string>
|
|
||||||
</property>
|
|
||||||
<property name="icon">
|
|
||||||
<iconset resource="../blackmisc/blackmisc.qrc">
|
|
||||||
<normaloff>:/own/icons/own/swift3D/sw3DBlue-256.png</normaloff>:/own/icons/own/swift3D/sw3DBlue-256.png</iconset>
|
|
||||||
</property>
|
</property>
|
||||||
<property name="iconSize">
|
<property name="iconSize">
|
||||||
<size>
|
<size>
|
||||||
@@ -791,23 +757,37 @@ p, li { white-space: pre-wrap; }
|
|||||||
</property>
|
</property>
|
||||||
<property name="iconSize">
|
<property name="iconSize">
|
||||||
<size>
|
<size>
|
||||||
<width>64</width>
|
<width>48</width>
|
||||||
<height>64</height>
|
<height>48</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="2">
|
<item row="1" column="2" alignment="Qt::AlignHCenter">
|
||||||
<widget class="QToolButton" name="tb_SwiftMappingTool">
|
<widget class="QLabel" name="lbl_SwiftData">
|
||||||
<property name="toolTip">
|
|
||||||
<string>start swift data (the mapping tool)</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>mapping tool</string>
|
<string>mapping tool</string>
|
||||||
</property>
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1" alignment="Qt::AlignHCenter">
|
||||||
|
<widget class="QLabel" name="lbl_SwiftCore">
|
||||||
|
<property name="text">
|
||||||
|
<string>core</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QToolButton" name="tb_SwiftGui">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>start swift GUI</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>swift GUI</string>
|
||||||
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../blackmisc/blackmisc.qrc">
|
<iconset resource="../blackmisc/blackmisc.qrc">
|
||||||
<normaloff>:/own/icons/own/swift3D/sw3DGreen-256.png</normaloff>:/own/icons/own/swift3D/sw3DGreen-256.png</iconset>
|
<normaloff>:/own/icons/own/swift3D/sw3DBlue-256.png</normaloff>:/own/icons/own/swift3D/sw3DBlue-256.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="iconSize">
|
<property name="iconSize">
|
||||||
<size>
|
<size>
|
||||||
@@ -824,28 +804,56 @@ p, li { white-space: pre-wrap; }
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="1" alignment="Qt::AlignHCenter">
|
<item row="0" column="1">
|
||||||
<widget class="QLabel" name="lbl_SwiftCore">
|
<widget class="QToolButton" name="tb_SwiftCore">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>start swift core</string>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>core</string>
|
<string>swift core</string>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="../blackmisc/blackmisc.qrc">
|
||||||
|
<normaloff>:/own/icons/own/swift3D/sw3DOrange-256.png</normaloff>:/own/icons/own/swift3D/sw3DOrange-256.png</iconset>
|
||||||
|
</property>
|
||||||
|
<property name="iconSize">
|
||||||
|
<size>
|
||||||
|
<width>64</width>
|
||||||
|
<height>64</height>
|
||||||
|
</size>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="3">
|
<item row="0" column="3">
|
||||||
<spacer name="hs_Start">
|
<widget class="QToolButton" name="tb_ConfigurationWizard">
|
||||||
<property name="orientation">
|
<property name="text">
|
||||||
<enum>Qt::Horizontal</enum>
|
<string>...</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizeType">
|
<property name="icon">
|
||||||
<enum>QSizePolicy::Fixed</enum>
|
<iconset resource="../blackmisc/blackmisc.qrc">
|
||||||
|
<normaloff>:/misc/icons/misc/toolWizard128.png</normaloff>:/misc/icons/misc/toolWizard128.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizeHint" stdset="0">
|
<property name="iconSize">
|
||||||
<size>
|
<size>
|
||||||
<width>25</width>
|
<width>48</width>
|
||||||
<height>20</height>
|
<height>48</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
</spacer>
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="3" alignment="Qt::AlignHCenter">
|
||||||
|
<widget class="QLabel" name="lbl_Wizard">
|
||||||
|
<property name="text">
|
||||||
|
<string>config</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="4" alignment="Qt::AlignHCenter">
|
||||||
|
<widget class="QLabel" name="lbl_Database">
|
||||||
|
<property name="text">
|
||||||
|
<string>goto DB</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
|
|||||||
Reference in New Issue
Block a user