From 80ab55c4be62e5d7ee409291ccb6bd414cec51f2 Mon Sep 17 00:00:00 2001 From: Klaus Basan Date: Sat, 16 Jul 2016 02:54:18 +0200 Subject: [PATCH] refs #709, GUI component (load info) added to launcher (plus enabled webservices for launcher) --- src/swiftlauncher/main.cpp | 8 ++- src/swiftlauncher/swiftlauncher.cpp | 1 + src/swiftlauncher/swiftlauncher.ui | 77 ++++++++++++++++++++--------- 3 files changed, 62 insertions(+), 24 deletions(-) diff --git a/src/swiftlauncher/main.cpp b/src/swiftlauncher/main.cpp index 4da150db3..7a30be856 100644 --- a/src/swiftlauncher/main.cpp +++ b/src/swiftlauncher/main.cpp @@ -10,6 +10,7 @@ #include "swiftlauncher.h" #include "blackgui/guiapplication.h" #include "blackcore/registermetadata.h" +#include "blackcore/db/databasereaderconfig.h" #include "blackmisc/logmessage.h" #include "blackmisc/icons.h" @@ -23,16 +24,19 @@ using namespace BlackGui; using namespace BlackMisc; using namespace BlackCore; +using namespace BlackCore::Db; int main(int argc, char *argv[]) { - //! [CSwiftGuiStdApplication] + //! [SwiftApplicationDemo] CGuiApplication::highDpiScreenSupport(); QApplication qa(argc, argv); 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.parse(); - //! [CSwiftGuiStdApplication] + if (!a.start()) { return EXIT_FAILURE; } + //! [SwiftApplicationDemo] // Dialog to decide external or internal core CSwiftLauncher launcher; diff --git a/src/swiftlauncher/swiftlauncher.cpp b/src/swiftlauncher/swiftlauncher.cpp index 72471cf93..233b6e2ee 100644 --- a/src/swiftlauncher/swiftlauncher.cpp +++ b/src/swiftlauncher/swiftlauncher.cpp @@ -315,6 +315,7 @@ void CSwiftLauncher::ps_loadedUpdateInfo(bool success) this->ui->wi_NewVersionAvailable->setVisible(newVersionAvailable); this->ui->wi_NoNewVersion->setVisible(!newVersionAvailable); this->ui->le_LatestVersion->setText(latestVersion); + this->ui->le_Channel->setText(updateInfo.getChannel()); if (!downloadUrls.isEmpty()) { diff --git a/src/swiftlauncher/swiftlauncher.ui b/src/swiftlauncher/swiftlauncher.ui index d0eedbf2f..657d482c5 100644 --- a/src/swiftlauncher/swiftlauncher.ui +++ b/src/swiftlauncher/swiftlauncher.ui @@ -78,7 +78,7 @@ - 3 + 0 6 @@ -423,17 +423,24 @@ QFrame::Raised - - + + + + Channel: + + + + + true - - - - This version: + + + + true @@ -444,7 +451,21 @@ - + + + + This version: + + + + + + + true + + + + @@ -469,14 +490,7 @@ - - - - true - - - - + @@ -508,10 +522,10 @@ - + - check for updates + check again @@ -519,7 +533,17 @@ - + + + QFrame::StyledPanel + + + QFrame::Raised + + + + + QFrame::StyledPanel @@ -529,9 +553,6 @@ - fr_SoftwareUpdates - lbl_NoNewVersion - fr_DataUpdates @@ -772,6 +793,18 @@ p, li { white-space: pre-wrap; }
blackgui/components/logcomponent.h
1 + + BlackGui::Components::CDbLoadOverviewComponent + QFrame +
blackgui/components/dbloadoverviewcomponent.h
+ 1 +
+ + BlackGui::Components::CInfoBarWebReadersStatusSmallComponent + QFrame +
blackgui/components/infobarwebreadersstatussmallcomponent.h
+ 1 +