mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-29 04:35:41 +08:00
refs #709, GUI component (load info) added to launcher
(plus enabled webservices for launcher)
This commit is contained in:
@@ -10,6 +10,7 @@
|
|||||||
#include "swiftlauncher.h"
|
#include "swiftlauncher.h"
|
||||||
#include "blackgui/guiapplication.h"
|
#include "blackgui/guiapplication.h"
|
||||||
#include "blackcore/registermetadata.h"
|
#include "blackcore/registermetadata.h"
|
||||||
|
#include "blackcore/db/databasereaderconfig.h"
|
||||||
#include "blackmisc/logmessage.h"
|
#include "blackmisc/logmessage.h"
|
||||||
#include "blackmisc/icons.h"
|
#include "blackmisc/icons.h"
|
||||||
|
|
||||||
@@ -23,16 +24,19 @@
|
|||||||
using namespace BlackGui;
|
using namespace BlackGui;
|
||||||
using namespace BlackMisc;
|
using namespace BlackMisc;
|
||||||
using namespace BlackCore;
|
using namespace BlackCore;
|
||||||
|
using namespace BlackCore::Db;
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
//! [CSwiftGuiStdApplication]
|
//! [SwiftApplicationDemo]
|
||||||
CGuiApplication::highDpiScreenSupport();
|
CGuiApplication::highDpiScreenSupport();
|
||||||
QApplication qa(argc, argv);
|
QApplication qa(argc, argv);
|
||||||
CGuiApplication a("swift launcher", CGuiApplication::Laucher, CIcons::swift1024());
|
CGuiApplication a("swift launcher", CGuiApplication::Laucher, CIcons::swift1024());
|
||||||
|
a.useWebDataServices(BlackCore::CWebReaderFlags::AllSwiftDbReaders, CDatabaseReaderConfigList::forLauncher());
|
||||||
a.addParserOption({{"i", "installer"}, QCoreApplication::translate("main", "Installer setup."), "installer"});
|
a.addParserOption({{"i", "installer"}, QCoreApplication::translate("main", "Installer setup."), "installer"});
|
||||||
a.parse();
|
a.parse();
|
||||||
//! [CSwiftGuiStdApplication]
|
if (!a.start()) { return EXIT_FAILURE; }
|
||||||
|
//! [SwiftApplicationDemo]
|
||||||
|
|
||||||
// Dialog to decide external or internal core
|
// Dialog to decide external or internal core
|
||||||
CSwiftLauncher launcher;
|
CSwiftLauncher launcher;
|
||||||
|
|||||||
@@ -315,6 +315,7 @@ void CSwiftLauncher::ps_loadedUpdateInfo(bool success)
|
|||||||
this->ui->wi_NewVersionAvailable->setVisible(newVersionAvailable);
|
this->ui->wi_NewVersionAvailable->setVisible(newVersionAvailable);
|
||||||
this->ui->wi_NoNewVersion->setVisible(!newVersionAvailable);
|
this->ui->wi_NoNewVersion->setVisible(!newVersionAvailable);
|
||||||
this->ui->le_LatestVersion->setText(latestVersion);
|
this->ui->le_LatestVersion->setText(latestVersion);
|
||||||
|
this->ui->le_Channel->setText(updateInfo.getChannel());
|
||||||
|
|
||||||
if (!downloadUrls.isEmpty())
|
if (!downloadUrls.isEmpty())
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -78,7 +78,7 @@
|
|||||||
<item>
|
<item>
|
||||||
<widget class="QToolBox" name="tb_Launcher">
|
<widget class="QToolBox" name="tb_Launcher">
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>3</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="tabSpacing">
|
<property name="tabSpacing">
|
||||||
<number>6</number>
|
<number>6</number>
|
||||||
@@ -423,17 +423,24 @@
|
|||||||
<enum>QFrame::Raised</enum>
|
<enum>QFrame::Raised</enum>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout_2">
|
<layout class="QGridLayout" name="gridLayout_2">
|
||||||
<item row="0" column="1">
|
<item row="1" column="0">
|
||||||
<widget class="QLineEdit" name="le_CurrentVersion">
|
<widget class="QLabel" name="lbl_Channel">
|
||||||
|
<property name="text">
|
||||||
|
<string>Channel:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<widget class="QLineEdit" name="le_Channel">
|
||||||
<property name="readOnly">
|
<property name="readOnly">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="0">
|
<item row="0" column="1">
|
||||||
<widget class="QLabel" name="lbl_CurrentVersion">
|
<widget class="QLineEdit" name="le_CurrentVersion">
|
||||||
<property name="text">
|
<property name="readOnly">
|
||||||
<string>This version:</string>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@@ -444,7 +451,21 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="1" colspan="3">
|
<item row="0" column="0">
|
||||||
|
<widget class="QLabel" name="lbl_CurrentVersion">
|
||||||
|
<property name="text">
|
||||||
|
<string>This version:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="3">
|
||||||
|
<widget class="QLineEdit" name="le_LatestVersion">
|
||||||
|
<property name="readOnly">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="1" colspan="3">
|
||||||
<widget class="QWidget" name="wi_NoNewVersion" native="true">
|
<widget class="QWidget" name="wi_NoNewVersion" native="true">
|
||||||
<layout class="QVBoxLayout" name="vl_NoNewVersion">
|
<layout class="QVBoxLayout" name="vl_NoNewVersion">
|
||||||
<property name="leftMargin">
|
<property name="leftMargin">
|
||||||
@@ -469,14 +490,7 @@
|
|||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="3">
|
<item row="2" column="1" colspan="3">
|
||||||
<widget class="QLineEdit" name="le_LatestVersion">
|
|
||||||
<property name="readOnly">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="1" colspan="3">
|
|
||||||
<widget class="QWidget" name="wi_NewVersionAvailable" native="true">
|
<widget class="QWidget" name="wi_NewVersionAvailable" native="true">
|
||||||
<layout class="QVBoxLayout" name="vl_NewVersionAvailable">
|
<layout class="QVBoxLayout" name="vl_NewVersionAvailable">
|
||||||
<property name="leftMargin">
|
<property name="leftMargin">
|
||||||
@@ -508,10 +522,10 @@
|
|||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="1" colspan="2">
|
<item row="1" column="2">
|
||||||
<widget class="QPushButton" name="pb_CheckForUpdates">
|
<widget class="QPushButton" name="pb_CheckForUpdates">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>check for updates</string>
|
<string>check again</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@@ -519,7 +533,17 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QFrame" name="fr_DataUpdates">
|
<widget class="BlackGui::Components::CInfoBarWebReadersStatusSmallComponent" name="comp_InfoBar">
|
||||||
|
<property name="frameShape">
|
||||||
|
<enum>QFrame::StyledPanel</enum>
|
||||||
|
</property>
|
||||||
|
<property name="frameShadow">
|
||||||
|
<enum>QFrame::Raised</enum>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="BlackGui::Components::CDbLoadOverviewComponent" name="fr_DataUpdates">
|
||||||
<property name="frameShape">
|
<property name="frameShape">
|
||||||
<enum>QFrame::StyledPanel</enum>
|
<enum>QFrame::StyledPanel</enum>
|
||||||
</property>
|
</property>
|
||||||
@@ -529,9 +553,6 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
<zorder>fr_SoftwareUpdates</zorder>
|
|
||||||
<zorder>lbl_NoNewVersion</zorder>
|
|
||||||
<zorder>fr_DataUpdates</zorder>
|
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QWidget" name="pg_CreditsLicense">
|
<widget class="QWidget" name="pg_CreditsLicense">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
@@ -772,6 +793,18 @@ p, li { white-space: pre-wrap; }
|
|||||||
<header>blackgui/components/logcomponent.h</header>
|
<header>blackgui/components/logcomponent.h</header>
|
||||||
<container>1</container>
|
<container>1</container>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
|
<customwidget>
|
||||||
|
<class>BlackGui::Components::CDbLoadOverviewComponent</class>
|
||||||
|
<extends>QFrame</extends>
|
||||||
|
<header>blackgui/components/dbloadoverviewcomponent.h</header>
|
||||||
|
<container>1</container>
|
||||||
|
</customwidget>
|
||||||
|
<customwidget>
|
||||||
|
<class>BlackGui::Components::CInfoBarWebReadersStatusSmallComponent</class>
|
||||||
|
<extends>QFrame</extends>
|
||||||
|
<header>blackgui/components/infobarwebreadersstatussmallcomponent.h</header>
|
||||||
|
<container>1</container>
|
||||||
|
</customwidget>
|
||||||
</customwidgets>
|
</customwidgets>
|
||||||
<resources>
|
<resources>
|
||||||
<include location="../blackmisc/blackmisc.qrc"/>
|
<include location="../blackmisc/blackmisc.qrc"/>
|
||||||
|
|||||||
Reference in New Issue
Block a user