mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-30 20:15:35 +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/skull256.png</file>
|
||||
<file>icons/misc/skull512.png</file>
|
||||
<file>icons/misc/toolWizard64.png</file>
|
||||
<file>icons/misc/toolWizard128.png</file>
|
||||
</qresource>
|
||||
</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 "ui_swiftlauncher.h"
|
||||
#include "blackconfig/buildconfig.h"
|
||||
#include "blackgui/components/configurationwizard.h"
|
||||
#include "blackgui/guiapplication.h"
|
||||
#include "blackgui/stylesheetutility.h"
|
||||
#include "blackcore/context/contextapplicationproxy.h"
|
||||
@@ -29,6 +30,7 @@
|
||||
|
||||
using namespace BlackConfig;
|
||||
using namespace BlackGui;
|
||||
using namespace BlackGui::Components;
|
||||
using namespace BlackCore;
|
||||
using namespace BlackCore::Application;
|
||||
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_Database, &QPushButton::pressed, this, &CSwiftLauncher::ps_startButtonPressed);
|
||||
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);
|
||||
|
||||
// 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_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>
|
||||
|
||||
namespace Ui { class CSwiftLauncher; }
|
||||
namespace BlackGui { namespace Components { class CConfigurationWizard; }}
|
||||
|
||||
/*!
|
||||
* swift launcher tool
|
||||
@@ -76,6 +77,7 @@ protected:
|
||||
|
||||
private:
|
||||
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::TLauncherSetup> m_setup { this }; //! setup, ie last user selection
|
||||
QString m_executable;
|
||||
@@ -183,6 +185,9 @@ private slots:
|
||||
|
||||
//! Check if applicationas are already running
|
||||
void ps_checkRunningApplicationsAndCore();
|
||||
|
||||
//! Start the configuration wizard
|
||||
void ps_startWizard();
|
||||
};
|
||||
|
||||
#endif // guard
|
||||
|
||||
@@ -722,52 +722,18 @@ p, li { white-space: pre-wrap; }
|
||||
<attribute name="label">
|
||||
<string>Start application</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="1" column="2" alignment="Qt::AlignHCenter">
|
||||
<widget class="QLabel" name="lbl_SwiftData">
|
||||
<layout class="QGridLayout" name="gl_Start">
|
||||
<item row="0" column="2">
|
||||
<widget class="QToolButton" name="tb_SwiftMappingTool">
|
||||
<property name="toolTip">
|
||||
<string>start swift data (the mapping tool)</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>mapping tool</string>
|
||||
</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">
|
||||
<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>
|
||||
</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>
|
||||
<normaloff>:/own/icons/own/swift3D/sw3DGreen-256.png</normaloff>:/own/icons/own/swift3D/sw3DGreen-256.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
@@ -791,23 +757,37 @@ p, li { white-space: pre-wrap; }
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>64</width>
|
||||
<height>64</height>
|
||||
<width>48</width>
|
||||
<height>48</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QToolButton" name="tb_SwiftMappingTool">
|
||||
<property name="toolTip">
|
||||
<string>start swift data (the mapping tool)</string>
|
||||
</property>
|
||||
<item row="1" column="2" alignment="Qt::AlignHCenter">
|
||||
<widget class="QLabel" name="lbl_SwiftData">
|
||||
<property name="text">
|
||||
<string>mapping tool</string>
|
||||
</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">
|
||||
<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 name="iconSize">
|
||||
<size>
|
||||
@@ -824,28 +804,56 @@ p, li { white-space: pre-wrap; }
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1" alignment="Qt::AlignHCenter">
|
||||
<widget class="QLabel" name="lbl_SwiftCore">
|
||||
<item row="0" column="1">
|
||||
<widget class="QToolButton" name="tb_SwiftCore">
|
||||
<property name="toolTip">
|
||||
<string>start swift core</string>
|
||||
</property>
|
||||
<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>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<spacer name="hs_Start">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
<widget class="QToolButton" name="tb_ConfigurationWizard">
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
<property name="icon">
|
||||
<iconset resource="../blackmisc/blackmisc.qrc">
|
||||
<normaloff>:/misc/icons/misc/toolWizard128.png</normaloff>:/misc/icons/misc/toolWizard128.png</iconset>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>25</width>
|
||||
<height>20</height>
|
||||
<width>48</width>
|
||||
<height>48</height>
|
||||
</size>
|
||||
</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>
|
||||
</layout>
|
||||
</widget>
|
||||
|
||||
Reference in New Issue
Block a user