mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-02 15:15:50 +08:00
refs #886, added wizard component for initial data load
* added buttons to CDbLoadOverviewComponent * wizard component/page * added to wizard
This commit is contained in:
committed by
Mathew Sutcliffe
parent
9b4b2f70cc
commit
b94eab581e
55
src/blackgui/components/initialdataloadcomponent.cpp
Normal file
55
src/blackgui/components/initialdataloadcomponent.cpp
Normal file
@@ -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
|
||||
Reference in New Issue
Block a user