diff --git a/src/blackgui/components/configurationwizard.cpp b/src/blackgui/components/configurationwizard.cpp
index c4d45bcaa..c2aa3ee97 100644
--- a/src/blackgui/components/configurationwizard.cpp
+++ b/src/blackgui/components/configurationwizard.cpp
@@ -19,15 +19,16 @@ namespace BlackGui
ui(new Ui::CConfigurationWizard)
{
ui->setupUi(this);
+ ui->wp_CopyCaches->setConfigComponent(ui->comp_CopyCaches);
+ ui->wp_CopySettings->setConfigComponent(ui->comp_CopySettings);
+ ui->wp_Simulator->setConfigComponent(ui->comp_Simulator);
+ ui->wp_DataLoad->setConfigComponent(ui->comp_DataLoad);
// no other versions, skip copy pages
if (!ui->comp_CopySettings->hasOtherVersionData())
{
this->setStartId(ConfigSimulator);
}
- ui->wp_CopyCaches->setConfigComponent(ui->comp_CopyCaches);
- ui->wp_CopySettings->setConfigComponent(ui->comp_CopySettings);
- ui->wp_Simulator->setConfigComponent(ui->comp_Simulator);
connect(this, &QWizard::currentIdChanged, this, &CConfigurationWizard::wizardCurrentIdChanged);
}
diff --git a/src/blackgui/components/configurationwizard.ui b/src/blackgui/components/configurationwizard.ui
index 08d85516c..655777821 100644
--- a/src/blackgui/components/configurationwizard.ui
+++ b/src/blackgui/components/configurationwizard.ui
@@ -127,6 +127,32 @@
+
+
+
+ 4
+
+
+ 4
+
+
+ 4
+
+
+ 4
+
+ -
+
+
+ QFrame::StyledPanel
+
+
+ QFrame::Raised
+
+
+
+
+
@@ -153,6 +179,18 @@
blackgui/components/copyconfigurationcomponent.h
1
+
+ BlackGui::Components::CInitialDataLoadWizardPage
+ QWizardPage
+ blackgui/components/initialdataloadcomponent.h
+ 1
+
+
+ BlackGui::Components::CInitialDataLoadComponent
+ QFrame
+ blackgui/components/initialdataloadcomponent.h
+ 1
+
diff --git a/src/blackgui/components/dbloadoverviewcomponent.cpp b/src/blackgui/components/dbloadoverviewcomponent.cpp
index 84b9fb39a..0675eec29 100644
--- a/src/blackgui/components/dbloadoverviewcomponent.cpp
+++ b/src/blackgui/components/dbloadoverviewcomponent.cpp
@@ -56,6 +56,9 @@ namespace BlackGui
connect(ui->tb_SharedReloadModels, &QToolButton::pressed, this, &CDbLoadOverviewComponent::ps_refreshSharedPressed);
connect(ui->tb_SharedReloadDistributors, &QToolButton::pressed, this, &CDbLoadOverviewComponent::ps_refreshSharedPressed);
+ connect(ui->pb_LoadAllFromDB, &QPushButton::pressed, this, &CDbLoadOverviewComponent::loadAllFromDb);
+ connect(ui->pb_LoadAllFromShared, &QPushButton::pressed, this, &CDbLoadOverviewComponent::loadAllFromShared);
+
connect(sGui->getWebDataServices(), &CWebDataServices::dataRead, this, &CDbLoadOverviewComponent::ps_dataLoaded);
connect(this, &CDbLoadOverviewComponent::ps_triggerDigestGuiUpdate, this, &CDbLoadOverviewComponent::ps_setValues);
}
@@ -107,6 +110,29 @@ namespace BlackGui
return m_loadIndicator && this->isVisible() && m_loadIndicator->isAnimated();
}
+ bool CDbLoadOverviewComponent::isLoadInProgress() const
+ {
+ return m_loadInProgress;
+ }
+
+ void CDbLoadOverviewComponent::showLoadAllButtons(bool shared, bool db)
+ {
+ const bool widget = shared || db;
+ ui->wi_LoadAllButtons->setVisible(widget);
+ ui->pb_LoadAllFromDB->setVisible(db);
+ ui->pb_LoadAllFromShared->setVisible(shared);
+ }
+
+ void CDbLoadOverviewComponent::loadAllFromDb()
+ {
+ this->triggerLoadingFromDb(CEntityFlags::AllDbEntitiesNoInfoObjects);
+ }
+
+ void CDbLoadOverviewComponent::loadAllFromShared()
+ {
+ this->triggerLoadingFromSharedFiles(CEntityFlags::AllDbEntitiesNoInfoObjects);
+ }
+
void CDbLoadOverviewComponent::centerLoadIndicator()
{
if (!m_loadIndicator) { return; }
@@ -247,31 +273,43 @@ namespace BlackGui
void CDbLoadOverviewComponent::ps_refreshDbPressed()
{
- if (this->m_reloading) { return; }
+ if (this->m_loadInProgress) { return; }
const QObject *sender = QObject::sender();
const CEntityFlags::Entity entity = CEntityFlags::singleEntityByName(sender->objectName());
+ this->triggerLoadingFromDb(entity);
+ }
+
+ void CDbLoadOverviewComponent::triggerLoadingFromDb(CEntityFlags::Entity entities)
+ {
+ if (this->m_loadInProgress) { return; }
// DB entities
- const CEntityFlags::Entity triggeredEntity = sGui->getWebDataServices()->triggerLoadingDirectlyFromDb(entity);
- if (triggeredEntity == CEntityFlags::NoEntity) { return; }
- this->m_reloading = true;
+ const CEntityFlags::Entity triggeredEntities = sGui->getWebDataServices()->triggerLoadingDirectlyFromDb(entities);
+ if (triggeredEntities == CEntityFlags::NoEntity) { return; }
+ this->m_loadInProgress = true;
this->showLoading();
// shared files ts
- sGui->getWebDataServices()->triggerLoadingOfSharedFilesHeaders(entity);
+ sGui->getWebDataServices()->triggerLoadingOfSharedFilesHeaders(entities);
sGui->getWebDataServices()->triggerReadOfInfoObjects();
}
void CDbLoadOverviewComponent::ps_refreshSharedPressed()
{
- if (this->m_reloading) { return; }
+ if (this->m_loadInProgress) { return; }
const QObject *sender = QObject::sender();
const CEntityFlags::Entity entity = CEntityFlags::singleEntityByName(sender->objectName());
+ this->triggerLoadingFromSharedFiles(entity);
+ }
+
+ void CDbLoadOverviewComponent::triggerLoadingFromSharedFiles(CEntityFlags::Entity entities)
+ {
+ if (this->m_loadInProgress) { return; }
// DB entities
- const CEntityFlags::Entity triggeredEntity = sGui->getWebDataServices()->triggerLoadingDirectlyFromSharedFiles(entity, true);
- if (triggeredEntity == CEntityFlags::NoEntity) { return; }
- this->m_reloading = true;
+ const CEntityFlags::Entity triggeredEntities = sGui->getWebDataServices()->triggerLoadingDirectlyFromSharedFiles(entities, true);
+ if (triggeredEntities == CEntityFlags::NoEntity) { return; }
+ this->m_loadInProgress = true;
this->showLoading();
// shared files ts
@@ -284,7 +322,7 @@ namespace BlackGui
if (!entities.testFlag(CEntityFlags::InfoObjectEntity) && !CEntityFlags::anySwiftDbEntity(entities)) { return; }
if (state == CEntityFlags::ReadFinished || state == CEntityFlags::ReadFinishedRestricted)
{
- this->m_reloading = false;
+ this->m_loadInProgress = false;
emit this->ps_triggerDigestGuiUpdate();
}
}
diff --git a/src/blackgui/components/dbloadoverviewcomponent.h b/src/blackgui/components/dbloadoverviewcomponent.h
index 034478488..3eb63519e 100644
--- a/src/blackgui/components/dbloadoverviewcomponent.h
+++ b/src/blackgui/components/dbloadoverviewcomponent.h
@@ -50,6 +50,18 @@ namespace BlackGui
//! Showing load indicator?
bool isShowingLoadIndicator() const;
+ //! Loading in progress?
+ bool isLoadInProgress() const;
+
+ //! Show load all buttons
+ void showLoadAllButtons(bool shared, bool db);
+
+ //! Load all from DB
+ void loadAllFromDb();
+
+ //! Load all from shared
+ void loadAllFromShared();
+
signals:
//! Trigger GUI update
//! \private
@@ -65,8 +77,14 @@ namespace BlackGui
private:
QScopedPointer ui;
BlackGui::CLoadIndicator *m_loadIndicator = nullptr; //!< load indicator if needed
- bool m_reloading = false;
BlackMisc::CDigestSignal m_dsTriggerGuiUpdate { this, &CDbLoadOverviewComponent::ps_triggerDigestGuiUpdate, &CDbLoadOverviewComponent::ps_setValues, 750, 4 };
+ bool m_loadInProgress = false; //!< data loading in progress
+
+ //! Trigger loading from DB
+ void triggerLoadingFromDb(BlackMisc::Network::CEntityFlags::Entity entities);
+
+ //! Trigger loading from shared files
+ void triggerLoadingFromSharedFiles(BlackMisc::Network::CEntityFlags::Entity entities);
//! Show loading
void showLoading();
diff --git a/src/blackgui/components/dbloadoverviewcomponent.ui b/src/blackgui/components/dbloadoverviewcomponent.ui
index 6f59e032a..c290435ea 100644
--- a/src/blackgui/components/dbloadoverviewcomponent.ui
+++ b/src/blackgui/components/dbloadoverviewcomponent.ui
@@ -6,12 +6,12 @@
0
0
- 640
- 279
+ 630
+ 307
- Frame
+ Loading from shared/DB
@@ -29,20 +29,463 @@
4
- -
-
-
+
-
+
+
- 0
- 50
+ 48
+ 16777215
+
+ refresh from database
+
- Shared URLs will go here
+
+
+
+
+ :/pastel/icons/pastel/16/arrow-refresh.png:/pastel/icons/pastel/16/arrow-refresh.png
- -
+
-
+
+
+ Airports:
+
+
+
+ -
+
+
+ Shared ts:
+
+
+
+ -
+
+
+ Shared:
+
+
+
+ -
+
+
+ true
+
+
+ count
+
+
+
+ -
+
+
+
+ 48
+ 16777215
+
+
+
+ refresh from shared files
+
+
+ ...
+
+
+
+ :/pastel/icons/pastel/16/arrow-refresh.png:/pastel/icons/pastel/16/arrow-refresh.png
+
+
+
+ -
+
+
+
+ 48
+ 16777215
+
+
+
+ refresh from shared files
+
+
+ ...
+
+
+
+ :/pastel/icons/pastel/16/arrow-refresh.png:/pastel/icons/pastel/16/arrow-refresh.png
+
+
+
+ -
+
+
+
+ 48
+ 16777215
+
+
+
+ refresh from shared files
+
+
+ ...
+
+
+
+ :/pastel/icons/pastel/16/arrow-refresh.png:/pastel/icons/pastel/16/arrow-refresh.png
+
+
+
+ -
+
+
+
+ 48
+ 16777215
+
+
+
+ refresh from shared files
+
+
+ ...
+
+
+
+ :/pastel/icons/pastel/16/arrow-refresh.png:/pastel/icons/pastel/16/arrow-refresh.png
+
+
+
+ -
+
+
+
+ 48
+ 16777215
+
+
+
+ refresh from shared files
+
+
+ ...
+
+
+
+ :/pastel/icons/pastel/16/arrow-refresh.png:/pastel/icons/pastel/16/arrow-refresh.png
+
+
+
+ -
+
+
+
+ 48
+ 16777215
+
+
+
+ refresh from shared files
+
+
+ ...
+
+
+
+ :/pastel/icons/pastel/16/arrow-refresh.png:/pastel/icons/pastel/16/arrow-refresh.png
+
+
+
+ -
+
+
+ Shared
+
+
+ Shr.:
+
+
+
+ -
+
+
+ DB:
+
+
+
+ -
+
+
+
+ 48
+ 16777215
+
+
+
+ refresh from shared files
+
+
+ ...
+
+
+
+ :/pastel/icons/pastel/16/arrow-refresh.png:/pastel/icons/pastel/16/arrow-refresh.png
+
+
+
+ -
+
+
+
+ 48
+ 16777215
+
+
+
+ refresh from database
+
+
+
+
+
+
+ :/pastel/icons/pastel/16/arrow-refresh.png:/pastel/icons/pastel/16/arrow-refresh.png
+
+
+
+ -
+
+
+
+ 48
+ 16777215
+
+
+
+ refresh from database
+
+
+
+ :/pastel/icons/pastel/16/arrow-refresh.png:/pastel/icons/pastel/16/arrow-refresh.png
+
+
+
+ -
+
+
+
+ 48
+ 16777215
+
+
+
+ refresh from database
+
+
+
+
+
+
+ :/pastel/icons/pastel/16/arrow-refresh.png:/pastel/icons/pastel/16/arrow-refresh.png
+
+
+
+ -
+
+
+
+ 48
+ 16777215
+
+
+
+ refresh from database
+
+
+
+
+
+
+ :/pastel/icons/pastel/16/arrow-refresh.png:/pastel/icons/pastel/16/arrow-refresh.png
+
+
+
+ -
+
+
+
+ 48
+ 16777215
+
+
+
+ refresh from database
+
+
+
+
+
+
+ :/pastel/icons/pastel/16/arrow-refresh.png:/pastel/icons/pastel/16/arrow-refresh.png
+
+
+
+ -
+
+
+
+ 48
+ 16777215
+
+
+
+ refresh from database
+
+
+
+
+
+
+ :/pastel/icons/pastel/16/arrow-refresh.png:/pastel/icons/pastel/16/arrow-refresh.png
+
+
+
+ -
+
+
+
+ 100
+ 0
+
+
+
+ true
+
+
+ File ts
+
+
+
+ -
+
+
+ true
+
+
+ count
+
+
+
+ -
+
+
+ true
+
+
+ count
+
+
+
+ -
+
+
+ DB count
+
+
+ DB#:
+
+
+
+ -
+
+
+
+ 100
+ 0
+
+
+
+ true
+
+
+ DB ts
+
+
+
+ -
+
+
+ true
+
+
+ count
+
+
+
+ -
+
+
+
+ 100
+ 0
+
+
+
+ true
+
+
+ File ts
+
+
+
+ -
+
+
+ true
+
+
+ count
+
+
+
+ -
+
+
+ Cache ts:
+
+
+
+ -
+
+
+
+ 100
+ 0
+
+
+
+ true
+
+
+ File ts
+
+
+
+ -
+
+
+ true
+
+
+ count
+
+
+
+ -
DB URL will go here .....
@@ -66,18 +509,60 @@
- -
-
+
-
+
+
+
+ 0
+ 50
+
+
+
+ Shared URLs will go here
+
+
+
+ -
+
+
+
+ 100
+ 0
+
+
true
- count
+ DB ts
- -
-
+
-
+
+
+
+ 100
+ 0
+
+
+
+ true
+
+
+ DB ts
+
+
+
+ -
+
+
+ DB ts:
+
+
+
+ -
+
100
@@ -92,6 +577,170 @@
+ -
+
+
+
+ 100
+ 0
+
+
+
+ true
+
+
+ cache ts
+
+
+
+ -
+
+
+ true
+
+
+ count
+
+
+
+ -
+
+
+ Cache count
+
+
+ C#:
+
+
+
+ -
+
+
+ true
+
+
+ count
+
+
+
+ -
+
+
+ true
+
+
+ count
+
+
+
+ -
+
+
+ Airlines:
+
+
+
+ -
+
+
+
+ 100
+ 0
+
+
+
+ true
+
+
+ File ts
+
+
+
+ -
+
+
+ DB URL:
+
+
+
+ -
+
+
+
+ 100
+ 0
+
+
+
+ true
+
+
+ File ts
+
+
+
+ -
+
+
+
+ 100
+ 0
+
+
+
+ true
+
+
+ File ts
+
+
+
+ -
+
+
+ Distributors:
+
+
+
+ -
+
+
+
+ 100
+ 0
+
+
+
+ true
+
+
+ cache ts
+
+
+
+ -
+
+
+
+ 100
+ 0
+
+
+
+ true
+
+
+ File ts
+
+
+
+ -
+
+
+ Models:
+
+
+
-
@@ -118,6 +767,32 @@
+ -
+
+
+
+ 100
+ 0
+
+
+
+ true
+
+
+ cache ts
+
+
+
+ -
+
+
+ true
+
+
+ count
+
+
+
-
@@ -248,673 +923,57 @@
- -
-
-
- Models:
-
-
-
- -
-
-
- DB ts:
-
-
-
- -
-
-
-
- 100
- 0
-
-
-
- true
-
-
- DB ts
-
-
-
- -
-
-
-
- 100
- 0
-
-
-
- true
-
-
- cache ts
-
-
-
- -
-
-
-
- 100
- 0
-
-
-
- true
-
-
- DB ts
-
-
-
- -
-
-
- true
-
-
- count
-
-
-
- -
-
-
-
- 100
- 0
-
-
-
- true
-
-
- cache ts
-
-
-
- -
-
-
- Cache #:
-
-
-
- -
-
-
- true
-
-
- count
-
-
-
- -
-
-
- Airlines:
-
-
-
- -
-
-
- true
-
-
- count
-
-
-
- -
-
-
- true
-
-
- count
-
-
-
- -
-
-
- true
-
-
- count
-
-
-
- -
-
-
- DB #:
-
-
-
- -
-
-
-
- 100
- 0
-
-
-
- true
-
-
- DB ts
-
-
-
- -
-
-
- Cache ts:
-
-
-
- -
-
-
- true
-
-
- count
-
-
-
- -
-
-
-
- 100
- 0
-
-
-
- true
-
-
- File ts
-
-
-
- -
-
-
- true
-
-
- count
-
-
-
- -
-
-
- true
-
-
- count
-
-
-
- -
-
-
-
- 100
- 0
-
-
-
- true
-
-
- File ts
-
-
-
- -
-
-
-
- 100
- 0
-
-
-
- true
-
-
- File ts
-
-
-
- -
-
-
-
- 100
- 0
-
-
-
- true
-
-
- File ts
-
-
-
- -
-
-
-
- 100
- 0
-
-
-
- true
-
-
- File ts
-
-
-
- -
-
-
- Distributors:
-
-
-
- -
-
-
-
- 100
- 0
-
-
-
- true
-
-
- File ts
-
-
-
- -
-
-
-
- 100
- 0
-
-
-
- true
-
-
- cache ts
-
-
-
- -
-
-
-
- 100
- 0
-
-
-
- true
-
-
- File ts
-
-
-
- -
-
-
- DB URL:
-
-
-
- -
-
-
- true
-
-
- count
-
-
-
- -
-
-
- Shared ts:
-
-
-
- -
-
-
- Shared:
-
-
-
- -
-
-
- Airports:
-
-
-
- -
-
-
-
- 48
- 16777215
-
-
-
- refresh from shared files
-
-
- ...
-
-
-
- :/pastel/icons/pastel/16/arrow-refresh.png:/pastel/icons/pastel/16/arrow-refresh.png
-
-
-
- -
-
-
-
- 48
- 16777215
-
-
-
- refresh from shared files
-
-
- ...
-
-
-
- :/pastel/icons/pastel/16/arrow-refresh.png:/pastel/icons/pastel/16/arrow-refresh.png
-
-
-
- -
-
-
-
- 48
- 16777215
-
-
-
- refresh from shared files
-
-
- ...
-
-
-
- :/pastel/icons/pastel/16/arrow-refresh.png:/pastel/icons/pastel/16/arrow-refresh.png
-
-
-
- -
-
-
-
- 48
- 16777215
-
-
-
- refresh from shared files
-
-
- ...
-
-
-
- :/pastel/icons/pastel/16/arrow-refresh.png:/pastel/icons/pastel/16/arrow-refresh.png
-
-
-
- -
-
-
-
- 48
- 16777215
-
-
-
- refresh from shared files
-
-
- ...
-
-
-
- :/pastel/icons/pastel/16/arrow-refresh.png:/pastel/icons/pastel/16/arrow-refresh.png
-
-
-
- -
-
-
-
- 48
- 16777215
-
-
-
- refresh from shared files
-
-
- ...
-
-
-
- :/pastel/icons/pastel/16/arrow-refresh.png:/pastel/icons/pastel/16/arrow-refresh.png
-
-
-
- -
-
-
- Shared
-
-
- Shr.:
-
-
-
- -
-
-
-
- 48
- 16777215
-
-
-
- refresh from shared files
-
-
- ...
-
-
-
- :/pastel/icons/pastel/16/arrow-refresh.png:/pastel/icons/pastel/16/arrow-refresh.png
-
-
-
- -
-
-
- DB:
-
-
-
- -
-
-
-
- 48
- 16777215
-
-
-
- refresh from database
-
-
-
- :/pastel/icons/pastel/16/arrow-refresh.png:/pastel/icons/pastel/16/arrow-refresh.png
-
-
-
- -
-
-
-
- 48
- 16777215
-
-
-
- refresh from database
-
-
-
-
-
-
- :/pastel/icons/pastel/16/arrow-refresh.png:/pastel/icons/pastel/16/arrow-refresh.png
-
-
-
- -
-
-
-
- 48
- 16777215
-
-
-
- refresh from database
-
-
-
-
-
-
- :/pastel/icons/pastel/16/arrow-refresh.png:/pastel/icons/pastel/16/arrow-refresh.png
-
-
-
- -
-
-
-
- 48
- 16777215
-
-
-
- refresh from database
-
-
-
-
-
-
- :/pastel/icons/pastel/16/arrow-refresh.png:/pastel/icons/pastel/16/arrow-refresh.png
-
-
-
- -
-
-
-
- 48
- 16777215
-
-
-
- refresh from database
-
-
-
-
-
-
- :/pastel/icons/pastel/16/arrow-refresh.png:/pastel/icons/pastel/16/arrow-refresh.png
-
-
-
- -
-
-
-
- 48
- 16777215
-
-
-
- refresh from database
-
-
-
-
-
-
- :/pastel/icons/pastel/16/arrow-refresh.png:/pastel/icons/pastel/16/arrow-refresh.png
-
-
-
- -
-
-
-
- 48
- 16777215
-
-
-
- refresh from database
-
-
-
-
-
-
- :/pastel/icons/pastel/16/arrow-refresh.png:/pastel/icons/pastel/16/arrow-refresh.png
-
+
-
+
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
-
+
+
+ load from shared
+
+
+
+ :/pastel/icons/pastel/16/disk.png:/pastel/icons/pastel/16/disk.png
+
+
+
+ -
+
+
+ load from DB
+
+
+
+ :/pastel/icons/pastel/16/database.png:/pastel/icons/pastel/16/database.png
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+
diff --git a/src/blackgui/components/initialdataloadcomponent.cpp b/src/blackgui/components/initialdataloadcomponent.cpp
new file mode 100644
index 000000000..667aff40f
--- /dev/null
+++ b/src/blackgui/components/initialdataloadcomponent.cpp
@@ -0,0 +1,55 @@
+/* Copyright (C) 2017
+ * swift project Community / Contributors
+ *
+ * This file is part of swift project. It is subject to the license terms in the LICENSE file found in the top-level
+ * directory of this distribution and at http://www.swift-project.org/license.html. No part of swift project,
+ * including this file, may be copied, modified, propagated, or distributed except according to the terms
+ * contained in the LICENSE file.
+ */
+
+#include "initialdataloadcomponent.h"
+#include "ui_initialdataloadcomponent.h"
+
+namespace BlackGui
+{
+ namespace Components
+ {
+ CInitialDataLoadComponent::CInitialDataLoadComponent(QWidget *parent) :
+ QFrame(parent),
+ ui(new Ui::CInitialDataLoadComponent)
+ {
+ ui->setupUi(this);
+ ui->comp_DataUpdates->showLoadAllButtons(true, false);
+ }
+
+ CInitialDataLoadComponent::~CInitialDataLoadComponent()
+ { }
+
+ void CInitialDataLoadComponent::loadAllFromShared()
+ {
+ ui->comp_DataUpdates->loadAllFromShared();
+ }
+
+ void CInitialDataLoadComponent::loadAllFromDb()
+ {
+ ui->comp_DataUpdates->loadAllFromDb();
+ }
+
+ bool CInitialDataLoadComponent::isLoadInProgress() const
+ {
+ return ui->comp_DataUpdates->isLoadInProgress();
+ }
+
+ void CInitialDataLoadWizardPage::initializePage()
+ {
+ Q_ASSERT_X(m_config, Q_FUNC_INFO, "Missing config");
+ QTimer::singleShot(500, m_config, [ = ] { m_config->loadAllFromShared(); });
+ }
+
+ bool CInitialDataLoadWizardPage::validatePage()
+ {
+ Q_ASSERT_X(m_config, Q_FUNC_INFO, "Missing config");
+ return !m_config->isLoadInProgress();
+ }
+ } // ns
+} // ns
diff --git a/src/blackgui/components/initialdataloadcomponent.h b/src/blackgui/components/initialdataloadcomponent.h
new file mode 100644
index 000000000..054456229
--- /dev/null
+++ b/src/blackgui/components/initialdataloadcomponent.h
@@ -0,0 +1,76 @@
+/* Copyright (C) 2017
+ * swift project Community / Contributors
+ *
+ * This file is part of swift project. It is subject to the license terms in the LICENSE file found in the top-level
+ * directory of this distribution and at http://www.swift-project.org/license.html. No part of swift project,
+ * including this file, may be copied, modified, propagated, or distributed except according to the terms
+ * contained in the LICENSE file.
+ */
+
+//! \file
+
+#ifndef BLACKGUI_COMPONENTS_INITIALDATALOADCOMPONENT_H
+#define BLACKGUI_COMPONENTS_INITIALDATALOADCOMPONENT_H
+
+#include
+#include
+#include
+
+namespace Ui { class CInitialDataLoadComponent; }
+namespace BlackGui
+{
+ namespace Components
+ {
+ /**
+ * Initial data load to prefill caches
+ * \remark Normally used in wizard
+ */
+ class CInitialDataLoadComponent : public QFrame
+ {
+ Q_OBJECT
+
+ public:
+ //! Constructor
+ explicit CInitialDataLoadComponent(QWidget *parent = nullptr);
+
+ //! Destructor
+ virtual ~CInitialDataLoadComponent();
+
+ //! \copydoc BlackGui::Components::CDbLoadOverviewComponent::loadAllFromShared
+ void loadAllFromShared();
+
+ //! \copydoc BlackGui::Components::CDbLoadOverviewComponent::loadAllFromDb
+ void loadAllFromDb();
+
+ //! \copydoc BlackGui::Components::CDbLoadOverviewComponent::isLoadInProgress
+ bool isLoadInProgress() const;
+
+ private:
+ QScopedPointer ui;
+ };
+
+ /**
+ * Wizard page for CInitialDataLoadComponent
+ */
+ class CInitialDataLoadWizardPage : public QWizardPage
+ {
+ public:
+ //! Constructors
+ using QWizardPage::QWizardPage;
+
+ //! Set config
+ void setConfigComponent(CInitialDataLoadComponent *config) { m_config = config; }
+
+ //! \copydoc QWizardPage::initializePage
+ virtual void initializePage() override;
+
+ //! \copydoc QWizardPage::validatePage
+ virtual bool validatePage() override;
+
+ private:
+ CInitialDataLoadComponent *m_config = nullptr;
+ };
+ } // ns
+} // ns
+
+#endif // guard
diff --git a/src/blackgui/components/initialdataloadcomponent.ui b/src/blackgui/components/initialdataloadcomponent.ui
new file mode 100644
index 000000000..e8cdf6c05
--- /dev/null
+++ b/src/blackgui/components/initialdataloadcomponent.ui
@@ -0,0 +1,128 @@
+
+
+ CInitialDataLoadComponent
+
+
+
+ 0
+ 0
+ 640
+ 480
+
+
+
+ Initial data loading
+
+
+ QFrame::StyledPanel
+
+
+ QFrame::Raised
+
+
+
+ 4
+
+
+ 4
+
+
+ 4
+
+
+ 4
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
-
+
+
+ Qt::AutoText
+
+
+ :/own/icons/own/swift3D/sw3DGreen-32.png
+
+
+
+ -
+
+
+ <html><head/><body><p>We recommend to download an initial data set. This may some time, but then you can start to use all tool straight away with full functionality.</p></body></html>
+
+
+ true
+
+
+
+
+
+
+ -
+
+
+ Data loading
+
+
+
+ 4
+
+
+ 4
+
+
+ 4
+
+
+ 4
+
+
-
+
+
+ -
+
+
+ QFrame::StyledPanel
+
+
+ QFrame::Raised
+
+
+
+
+
+
+
+
+
+
+ BlackGui::Components::CDbLoadOverviewComponent
+ QFrame
+ blackgui/components/dbloadoverviewcomponent.h
+ 1
+
+
+ BlackGui::Components::CInfoBarWebReadersStatusSmallComponent
+ QFrame
+ blackgui/components/infobarwebreadersstatussmallcomponent.h
+ 1
+
+
+
+
+
+
+