refs #768, wizard allowing to map models from pilot client

* step by step guiding thru mapping steps
* single model write function in writer
* adjusted stylesheet
This commit is contained in:
Klaus Basan
2016-10-17 03:26:47 +02:00
parent 592e330278
commit 0c5ea48463
6 changed files with 1060 additions and 6 deletions

View File

@@ -40,6 +40,11 @@ namespace BlackCore
// void
}
CStatusMessageList CDatabaseWriter::asyncPublishModel(const CAircraftModel &model)
{
return this->asyncPublishModels(CAircraftModelList({ model }));
}
CStatusMessageList CDatabaseWriter::asyncPublishModels(const CAircraftModelList &models)
{
CStatusMessageList msgs;

View File

@@ -36,7 +36,10 @@ namespace BlackCore
//! Constructor
CDatabaseWriter(const BlackMisc::Network::CUrl &baseUrl, QObject *parent);
//! Write model to DB
//! Write models to DB
BlackMisc::CStatusMessageList asyncPublishModel(const BlackMisc::Simulation::CAircraftModel &model);
//! Write models to DB
BlackMisc::CStatusMessageList asyncPublishModels(const BlackMisc::Simulation::CAircraftModelList &models);
//! Shutdown
@@ -54,10 +57,10 @@ namespace BlackCore
void ps_postModelsResponse(QNetworkReply *nwReplyPtr);
private:
BlackMisc::Network::CUrl m_modelPublishUrl;
QNetworkReply *m_pendingReply = nullptr;
qint64 m_replyPendingSince = -1;
bool m_shutdown = false;
BlackMisc::Network::CUrl m_modelPublishUrl;
QNetworkReply *m_pendingReply = nullptr;
qint64 m_replyPendingSince = -1;
bool m_shutdown = false;
//! Kill the pending reply
bool killPendingReply();

View File

@@ -0,0 +1,322 @@
/* Copyright (C) 2016
* 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 "dbquickmappingwizard.h"
#include "ui_dbquickmappingwizard.h"
#include "dbaircrafticaoselectorcomponent.h"
#include "dbairlinenameselectorcomponent.h"
#include "blackgui/views/aircrafticaoview.h"
#include "blackgui/views/liveryview.h"
#include "blackgui/views/distributorview.h"
#include "blackgui/uppercasevalidator.h"
#include "blackgui/guiapplication.h"
#include "blackcore/webdataservices.h"
#include "blackcore/db/databasewriter.h"
using namespace BlackCore;
using namespace BlackCore::Db;
using namespace BlackMisc;
using namespace BlackMisc::Aviation;
using namespace BlackMisc::Simulation;
namespace BlackGui
{
namespace Components
{
CDbQuickMappingWizard::CDbQuickMappingWizard(QWidget *parent) :
QWizard(parent),
ui(new Ui::CDbQuickMappingWizard)
{
Q_ASSERT_X(sGui, Q_FUNC_INFO, "Missing sGui");
Q_ASSERT_X(sGui->hasWebDataServices(), Q_FUNC_INFO, "Missing web services");
Q_ASSERT_X(sGui->getWebDataServices()->getDatabaseWriter(), Q_FUNC_INFO, "Missing writer");
ui->setupUi(this);
ui->selector_AircraftIcaoCode->setFocus();
ui->selector_AircraftIcaoCode->displayWithIcaoDescription(false);
ui->selector_AircraftIcaoCode->displayMode(CDbAircraftIcaoSelectorComponent::DisplayCompleterString);
ui->selector_AirlineIcaoCode->displayWithIcaoDescription(false);
ui->editor_AircraftModel->allowDrop(false);
ui->editor_AircraftModel->setReadOnly(true);
connect(sGui->getWebDataServices(), &CWebDataServices::allSwiftDbDataRead, this, &CDbQuickMappingWizard::ps_webDataRead);
connect(sGui->getWebDataServices()->getDatabaseWriter(), &CDatabaseWriter::publishedModels, this, &CDbQuickMappingWizard::ps_publishedModels);
connect(this, &CDbQuickMappingWizard::currentIdChanged, this, &CDbQuickMappingWizard::ps_currentWizardPageChanged);
connect(ui->selector_AircraftIcaoCode, &CDbAircraftIcaoSelectorComponent::changedAircraftIcao, this, &CDbQuickMappingWizard::ps_aircraftSelected);
connect(ui->selector_AirlineIcaoCode, &CDbAirlineIcaoSelectorComponent::changedAirlineIcao, this, &CDbQuickMappingWizard::ps_airlineSelected);
connect(ui->selector_AirlineName, &CDbAirlineIcaoSelectorComponent::changedAirlineIcao, this, &CDbQuickMappingWizard::ps_airlineSelected);
// init if data already available
this->ps_webDataRead();
}
CDbQuickMappingWizard::~CDbQuickMappingWizard()
{ }
const CLogCategoryList &CDbQuickMappingWizard::getLogCategories()
{
static const BlackMisc::CLogCategoryList cats { CLogCategory::mapping(), CLogCategory::guiComponent() };
return cats;
}
void CDbQuickMappingWizard::presetAircraftIcao(const BlackMisc::Aviation::CAircraftIcaoCode &aircraftIcao)
{
this->clear();
ui->selector_AircraftIcaoCode->setAircraftIcao(aircraftIcao);
ui->selector_AircraftIcaoCode->setFocus();
}
void CDbQuickMappingWizard::presetModel(const BlackMisc::Simulation::CAircraftModel &model)
{
QString ms = model.getModelString();
if (!model.getDescription().isEmpty())
{
ms += " (";
ms += model.getDescription();
ms += ")";
}
this->presetAircraftIcao(model.getAircraftIcaoCode());
ui->selector_AirlineIcaoCode->setAirlineIcao(model.getAirlineIcaoCode());
ui->selector_AirlineName->setAirlineIcao(model.getAirlineIcaoCode());
ui->comp_Distributor->view()->selectDbKey(model.getDistributor().getDbKey());
ui->le_ModelString->setText(model.hasModelString() ? ms : "<no model string>");
ui->selector_AircraftIcaoCode->setFocus();
const CLivery livery(model.getLivery());
if (livery.isColorLivery())
{
ui->comp_ColorSearch->presetColorLivery(livery);
ui->rb_ColorLivery->setChecked(true);
}
this->m_model = model;
}
void CDbQuickMappingWizard::clear()
{
this->m_lastId = 0;
ui->editor_AircraftModel->clear();
ui->comp_Log->clear();
this->restart();
}
void CDbQuickMappingWizard::setAircraftIcaoFilter()
{
const CAircraftIcaoCode icao(ui->selector_AircraftIcaoCode->getAircraftIcao());
if (icao.isLoadedFromDb())
{
ui->comp_AircraftIcao->view()->sortByPropertyIndex(CAircraftIcaoCode::IndexRank);
ui->comp_AircraftIcao->filter(icao);
ui->comp_AircraftIcao->view()->selectDbKey(icao.getDbKey());
}
}
void CDbQuickMappingWizard::setAirlineIcaoFilter()
{
const CAirlineIcaoCode icao(ui->selector_AirlineIcaoCode->getAirlineIcao());
if (icao.isLoadedFromDb())
{
ui->comp_Livery->view()->sortByPropertyIndex(CLivery::IndexDbIntegerKey);
ui->comp_Livery->filterByAirline(icao);
ui->comp_Livery->view()->selectRow(0);
}
}
void CDbQuickMappingWizard::setColorFilter()
{
const CLivery colorLivery(ui->comp_ColorSearch->getLivery());
if (colorLivery.isLoadedFromDb())
{
ui->comp_Livery->filter(colorLivery);
ui->comp_Livery->view()->selectRow(0);
}
}
CLivery CDbQuickMappingWizard::getFirstSelectedOrDefaultLivery() const
{
return ui->comp_Livery->view()->firstSelectedOrDefaultObject();
}
CAircraftIcaoCode CDbQuickMappingWizard::getFirstSelectedOrDefaultAircraftIcao() const
{
return ui->comp_AircraftIcao->view()->firstSelectedOrDefaultObject();
}
BlackMisc::Simulation::CDistributor CDbQuickMappingWizard::getFirstSelectedOrDefaultDistributor() const
{
return ui->comp_Distributor->view()->firstSelectedOrDefaultObject();
}
void CDbQuickMappingWizard::ps_webDataRead()
{
if (!sGui || !sGui->hasWebDataServices()) { return; }
}
void CDbQuickMappingWizard::ps_publishedModels(const CAircraftModelList &modelsPublished, const CAircraftModelList &modelsSkipped, const CStatusMessageList &messages, bool requestSuccessful, bool directWrite)
{
Q_UNUSED(modelsPublished);
Q_UNUSED(modelsSkipped);
Q_UNUSED(directWrite);
CStatusMessageList msgs;
if (requestSuccessful)
{
msgs.push_back(CStatusMessage(this, CStatusMessage::SeverityInfo, "Publishing request sent"));
}
else
{
msgs.push_back(CStatusMessage(this, CStatusMessage::SeverityError, "Publishing request failed"));
}
msgs.push_back(messages);
ui->comp_Log->appendStatusMessagesToList(msgs);
}
void CDbQuickMappingWizard::ps_currentWizardPageChanged(int id)
{
const bool forward = id > this->m_lastId;
const bool colorMode = ui->rb_ColorLivery->isChecked();
this->m_lastId = id;
const Pages page = static_cast<Pages>(id);
switch (page)
{
case PageAircraftSelect:
{
this->setAircraftIcaoFilter();
}
break;
case PageColor:
if (!colorMode)
{
forward ? this->next() : this->back();
}
break;
case PageLiverySelect:
{
if (colorMode)
{
this->setColorFilter();
}
else
{
this->setAirlineIcaoFilter();
}
}
break;
case PageConfirmation:
{
ui->editor_AircraftModel->setLivery(this->getFirstSelectedOrDefaultLivery());
ui->editor_AircraftModel->setDistributor(this->getFirstSelectedOrDefaultDistributor());
ui->editor_AircraftModel->setAircraftIcao(this->getFirstSelectedOrDefaultAircraftIcao());
const CStatusMessageList msgs(this->validateData());
const bool errorFree = !msgs.hasWarningOrErrorMessages();
ui->fr_ConfirmationOk->setVisible(errorFree);
ui->fr_ConfirmationStillErrors->setVisible(!errorFree);
if (!errorFree)
{
ui->editor_AircraftModel->showOverlayMessages(msgs);
}
}
break;
case PageCredentials:
{
ui->comp_Log->clear();
}
break;
case PageSendStatus:
{
this->writeModeltoDb();
}
break;
default:
break;
}
}
bool CDbQuickMappingWizard::validateCurrentPage()
{
const Pages page = static_cast<Pages>(this->currentId());
bool ok = false;
switch (page)
{
case PageConfirmation:
{
const CStatusMessageList msgs(this->validateData());
ok = !msgs.hasWarningOrErrorMessages();
}
break;
case PageCredentials:
{
ok = ui->comp_DbLogin->isUserAuthenticated();
}
break;
default:
{
ok = true;
}
break;
}
return ok;
}
CStatusMessageList CDbQuickMappingWizard::validateData() const
{
CStatusMessageList msgs(ui->editor_AircraftModel->validate(true));
if (ui->le_ModelString->text().isEmpty())
{
const CStatusMessage error(this, CStatusMessage::SeverityError, "Missing model string", true);
msgs.push_back(error);
}
return msgs;
}
void CDbQuickMappingWizard::consolidateModel()
{
CAircraftModel model = this->m_model;
model.setAircraftIcaoCode(ui->editor_AircraftModel->getAircraftIcao());
model.setDistributor(ui->editor_AircraftModel->getDistributor());
model.setLivery(ui->editor_AircraftModel->getLivery());
this->m_model = model;
}
void CDbQuickMappingWizard::writeModeltoDb()
{
this->consolidateModel();
const CStatusMessageList msgs = sGui->getWebDataServices()->getDatabaseWriter()->asyncPublishModel(this->m_model);
ui->comp_Log->appendStatusMessagesToList(msgs);
}
void CDbQuickMappingWizard::ps_airlineSelected(const CAirlineIcaoCode &icao)
{
if (icao.isLoadedFromDb())
{
ui->cb_VirtualAirline->setChecked(icao.isVirtualAirline());
ui->cb_Military->setChecked(icao.isMilitary());
ui->selector_AirlineName->setAirlineIcao(icao);
ui->selector_AirlineIcaoCode->setAirlineIcao(icao);
// already trigger sorting, if sorting is already correct it does nothing
// avoids issue with later selection overridden by sorting/filtering
this->setAirlineIcaoFilter();
}
}
void CDbQuickMappingWizard::ps_aircraftSelected(const CAircraftIcaoCode &icao)
{
if (icao.isLoadedFromDb())
{
ui->cb_Military->setChecked(icao.isMilitary());
// already trigger sorting, if sorting is already correct it does nothing
// avoids issue with later selection overridden by sorting/filtering
this->setAircraftIcaoFilter();
}
}
} // ns
} // ns

View File

@@ -0,0 +1,120 @@
/* Copyright (C) 2016
* 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_DBQUICKMAPPINGWIZARD_H
#define BLACKGUI_COMPONENTS_DBQUICKMAPPINGWIZARD_H
#include "blackmisc/simulation/aircraftmodel.h"
#include "blackmisc/aviation/aircrafticaocode.h"
#include <QWizard>
#include <QScopedPointer>
namespace Ui { class CDbQuickMappingWizard; }
namespace BlackGui
{
namespace Components
{
/*!
* Wizard to quickly provide a single mapping
*/
class CDbQuickMappingWizard : public QWizard
{
Q_OBJECT
public:
//! The wizard pages
enum Pages
{
PageIntro,
PageAircraftSelect,
PageColor,
PageLiverySelect,
PageDistributorSelect,
PageConfirmation,
PageCredentials,
PageSendStatus
};
//! Constructor
explicit CDbQuickMappingWizard(QWidget *parent = nullptr);
//! Destructor
~CDbQuickMappingWizard();
//! Preset values
void presetAircraftIcao(const BlackMisc::Aviation::CAircraftIcaoCode &aircraftIcao);
//! Preset a model
void presetModel(const BlackMisc::Simulation::CAircraftModel &model);
//! Clear wizard
void clear();
//! \copydoc QWizard::validateCurrentPage
virtual bool validateCurrentPage() override;
//! Log categories
static const BlackMisc::CLogCategoryList &getLogCategories();
private:
QScopedPointer<Ui::CDbQuickMappingWizard> ui;
int m_lastId = 0;
BlackMisc::Simulation::CAircraftModel m_model; // model to be mapped
//! Set the filter
void setAircraftIcaoFilter();
//! Set the filter
void setAirlineIcaoFilter();
//! Set color filter
void setColorFilter();
//! Livery assigned
BlackMisc::Aviation::CLivery getFirstSelectedOrDefaultLivery() const;
//! Aircraft ICAO assigned
BlackMisc::Aviation::CAircraftIcaoCode getFirstSelectedOrDefaultAircraftIcao() const;
//! Distributor assigned
BlackMisc::Simulation::CDistributor getFirstSelectedOrDefaultDistributor() const;
//! Validate the data
BlackMisc::CStatusMessageList validateData() const;
//! Consolidate model data
void consolidateModel();
//! Write the model to DB
void writeModeltoDb();
private slots:
//! Web data have been read
void ps_webDataRead();
//! Models published
void ps_publishedModels(const BlackMisc::Simulation::CAircraftModelList &modelsPublished,
const BlackMisc::Simulation::CAircraftModelList &modelsSkipped,
const BlackMisc::CStatusMessageList &messages,
bool requestSuccessful, bool directWrite);
//! Current page has been changed
void ps_currentWizardPageChanged(int id);
//! Airline selected
void ps_airlineSelected(const BlackMisc::Aviation::CAirlineIcaoCode &icao);
//! Aircraft selected
void ps_aircraftSelected(const BlackMisc::Aviation::CAircraftIcaoCode &icao);
};
} // ns
} // ns
#endif // guard

View File

@@ -0,0 +1,600 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>CDbQuickMappingWizard</class>
<widget class="QWizard" name="CDbQuickMappingWizard">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>800</width>
<height>600</height>
</rect>
</property>
<property name="minimumSize">
<size>
<width>800</width>
<height>600</height>
</size>
</property>
<property name="windowTitle">
<string>swift Mapping Wizard</string>
</property>
<property name="wizardStyle">
<enum>QWizard::ClassicStyle</enum>
</property>
<widget class="QWizardPage" name="wp1_Intro">
<property name="title">
<string>Model</string>
</property>
<property name="subTitle">
<string>First description</string>
</property>
<layout class="QVBoxLayout" name="vl_IntroPage">
<item>
<widget class="QFrame" name="fr_Introduction">
<layout class="QHBoxLayout" name="hl_Introduction">
<property name="spacing">
<number>20</number>
</property>
<property name="leftMargin">
<number>3</number>
</property>
<item>
<widget class="QLabel" name="lbl_IntroIcon">
<property name="text">
<string/>
</property>
<property name="pixmap">
<pixmap resource="../../blackmisc/blackmisc.qrc">:/own/icons/own/swift3D/sw3DGreen-48.png</pixmap>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="lbl_IntroText">
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;You are about to write a new mapping for your current model to the swift DB. Hereby you agree&lt;br/&gt;with the swift CLA and license terms. For details please consult the swift about and legal page.&lt;br/&gt;Thank you for supporting swift&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="textFormat">
<enum>Qt::RichText</enum>
</property>
</widget>
</item>
<item>
<spacer name="hs_Introduction">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
<item>
<layout class="QFormLayout" name="fl_IntroData">
<item row="0" column="0">
<widget class="QLabel" name="lbl_ModelString">
<property name="text">
<string>Model</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="le_ModelString">
<property name="readOnly">
<bool>true</bool>
</property>
<property name="placeholderText">
<string>model`s unique key</string>
</property>
</widget>
</item>
<item row="1" column="0" colspan="2">
<widget class="QWidget" name="wi_Empty" native="true">
<property name="minimumSize">
<size>
<width>0</width>
<height>25</height>
</size>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="lbl_AircraftIcaoCode">
<property name="text">
<string>Aircraft ICAO code</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="BlackGui::Components::CDbAircraftIcaoSelectorComponent" name="selector_AircraftIcaoCode">
<property name="focusPolicy">
<enum>Qt::StrongFocus</enum>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QWidget" name="wi_AircraftIcaoHints" native="true">
<layout class="QHBoxLayout" name="hl_AircraftIcaoHints">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>30</number>
</property>
<item>
<widget class="QLabel" name="lbl_HintAircraftIcaoIcon">
<property name="maximumSize">
<size>
<width>20</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="pixmap">
<pixmap resource="../../blackmisc/blackmisc.qrc">:/pastel/icons/pastel/16/infomation.png</pixmap>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="lbl_HintAircraftIcao">
<property name="text">
<string>Hint: You can also search on the next page</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="lbl_AirlineOrNoAirline">
<property name="text">
<string>Does the aircraft belong to an airline?</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QWidget" name="wi_AirlineOrNoAirline" native="true">
<layout class="QVBoxLayout" name="vl_AirlineOrNoAirline">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>6</number>
</property>
<item>
<widget class="QRadioButton" name="rb_ColorLivery">
<property name="text">
<string>no, this is a (small) aircraft without airline livery. Use a color livery instead.</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="rb_AirlineLivery">
<property name="text">
<string>yes, it belongs to an airline or Air Force</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QFrame" name="fr_IntroAirlineSelection">
<layout class="QFormLayout" name="fl_AircraftIcaoIntro">
<property name="horizontalSpacing">
<number>12</number>
</property>
<item row="2" column="0">
<widget class="QLabel" name="lbl_AirlineSelector">
<property name="text">
<string>Airline ICAO</string>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="lbl_AirlineName">
<property name="text">
<string>Airline name</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="BlackGui::Components::CDbAirlineNameSelectorComponent" name="selector_AirlineName">
<property name="maximumSize">
<size>
<width>225</width>
<height>16777215</height>
</size>
</property>
<property name="focusPolicy">
<enum>Qt::StrongFocus</enum>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QLabel" name="lbl_VirtualAirline">
<property name="text">
<string>Virtual airline?</string>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QCheckBox" name="cb_VirtualAirline"/>
</item>
<item row="6" column="0">
<widget class="QLabel" name="lbl_Military">
<property name="text">
<string>Military?</string>
</property>
</widget>
</item>
<item row="6" column="1">
<widget class="QCheckBox" name="cb_Military"/>
</item>
<item row="2" column="1">
<widget class="BlackGui::Components::CDbAirlineIcaoSelectorComponent" name="selector_AirlineIcaoCode">
<property name="maximumSize">
<size>
<width>225</width>
<height>16777215</height>
</size>
</property>
<property name="focusPolicy">
<enum>Qt::StrongFocus</enum>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QWidget" name="wi_HintAirlineIcao" native="true">
<layout class="QHBoxLayout" name="hl_HintAirlineIcao">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QLabel" name="lbl_HintIconAirlineIcao">
<property name="maximumSize">
<size>
<width>20</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="pixmap">
<pixmap resource="../../blackmisc/blackmisc.qrc">:/pastel/icons/pastel/16/infomation.png</pixmap>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="lbl_HintAirlineIcao">
<property name="text">
<string>Hint: Start virtual airlines with &quot;V&quot;, e.g. &quot;VLHA&quot;</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<widget class="QWizardPage" name="wp2_Aircraft">
<property name="title">
<string>Aircraft</string>
</property>
<property name="subTitle">
<string>Please select the ICAO code which best represents yout model</string>
</property>
<layout class="QVBoxLayout" name="vl_AircraftPage">
<item>
<widget class="BlackGui::Components::CDbAircraftIcaoComponent" name="comp_AircraftIcao">
<property name="minimumSize">
<size>
<width>0</width>
<height>300</height>
</size>
</property>
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWizardPage" name="wp3_LiveryColor">
<property name="title">
<string>Livery</string>
</property>
<property name="subTitle">
<string>Livery by color</string>
</property>
<layout class="QVBoxLayout" name="vl_LiveryColorPage">
<item>
<widget class="QFrame" name="fr_ColorInfo">
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<layout class="QVBoxLayout" name="vl_ColorInfo">
<item>
<widget class="QLabel" name="lbl_ColorInfo">
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Your aircraft does not belong to an airline.&lt;br/&gt;Select its fuselage and tail color (or its primary and secondary color).&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="textFormat">
<enum>Qt::RichText</enum>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="BlackGui::Components::CDbLiveryColorSearch" name="comp_ColorSearch">
<property name="minimumSize">
<size>
<width>0</width>
<height>60</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>300</width>
<height>16777215</height>
</size>
</property>
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWizardPage" name="wp4_Livery">
<property name="title">
<string>Livery</string>
</property>
<property name="subTitle">
<string>Please select the livery best matching your aircraft</string>
</property>
<layout class="QVBoxLayout" name="vl_LiveryPage">
<item>
<widget class="BlackGui::Components::CDbLiveryComponent" name="comp_Livery">
<property name="minimumSize">
<size>
<width>0</width>
<height>300</height>
</size>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWizardPage" name="wp5_Distributor">
<property name="title">
<string>Distributor / package</string>
</property>
<property name="subTitle">
<string>Select the correct package / distributor</string>
</property>
<layout class="QVBoxLayout" name="vl_DistributorPage">
<item>
<widget class="BlackGui::Components::CDbDistributorComponent" name="comp_Distributor"/>
</item>
</layout>
</widget>
<widget class="QWizardPage" name="wp6_Confirmation">
<property name="title">
<string>Confirmation</string>
</property>
<property name="subTitle">
<string>Check if the data are correct</string>
</property>
<layout class="QVBoxLayout" name="vl_ConfirmationPage">
<item>
<widget class="BlackGui::Editors::CAircraftModelForm" name="editor_AircraftModel">
<property name="minimumSize">
<size>
<width>0</width>
<height>200</height>
</size>
</property>
</widget>
</item>
<item>
<widget class="QFrame" name="fr_ConfirmationOk">
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLabel" name="lbl_Confirmation">
<property name="text">
<string>You can now send the data to the database. Press the &quot;Next&quot; button.</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QFrame" name="fr_ConfirmationStillErrors">
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QLabel" name="lbl_StillErrors">
<property name="text">
<string>There are still errors. Use the &quot;Back&quot; button and review your selections.</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
<widget class="QWizardPage" name="wp7_Credentials">
<property name="title">
<string>Credentials</string>
</property>
<property name="subTitle">
<string>Please tell us who you are</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="BlackGui::Components::CDbLoginComponent" name="comp_DbLogin">
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWizardPage" name="wp8_SendStatus">
<property name="title">
<string>Status</string>
</property>
<property name="subTitle">
<string>Overall status confirmation</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="BlackGui::Components::CLogComponent" name="comp_Log">
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
<customwidgets>
<customwidget>
<class>BlackGui::Components::CDbAircraftIcaoSelectorComponent</class>
<extends>QFrame</extends>
<header>blackgui/components/dbaircrafticaoselectorcomponent.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>BlackGui::Components::CDbAirlineIcaoSelectorComponent</class>
<extends>QFrame</extends>
<header>blackgui/components/dbairlineicaoselectorcomponent.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>BlackGui::Components::CDbLiveryColorSearch</class>
<extends>QFrame</extends>
<header>blackgui/components/dbliverycolorsearch.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>BlackGui::Components::CDbAircraftIcaoComponent</class>
<extends>QFrame</extends>
<header>blackgui/components/dbaircrafticaocomponent.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>BlackGui::Components::CDbLiveryComponent</class>
<extends>QFrame</extends>
<header>blackgui/components/dbliverycomponent.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>BlackGui::Components::CDbAirlineNameSelectorComponent</class>
<extends>QFrame</extends>
<header>blackgui/components/dbairlinenameselectorcomponent.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>BlackGui::Components::CLogComponent</class>
<extends>QFrame</extends>
<header>blackgui/components/logcomponent.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>BlackGui::Editors::CAircraftModelForm</class>
<extends>QFrame</extends>
<header>blackgui/editors/aircraftmodelform.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>BlackGui::Components::CDbDistributorComponent</class>
<extends>QFrame</extends>
<header>blackgui/components/dbdistributorcomponent.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>BlackGui::Components::CDbLoginComponent</class>
<extends>QFrame</extends>
<header>blackgui/components/dblogincomponent.h</header>
<container>1</container>
</customwidget>
</customwidgets>
<tabstops>
<tabstop>le_ModelString</tabstop>
<tabstop>selector_AircraftIcaoCode</tabstop>
<tabstop>rb_ColorLivery</tabstop>
<tabstop>rb_AirlineLivery</tabstop>
<tabstop>selector_AirlineIcaoCode</tabstop>
<tabstop>selector_AirlineName</tabstop>
<tabstop>cb_VirtualAirline</tabstop>
<tabstop>cb_Military</tabstop>
</tabstops>
<resources>
<include location="../../blackmisc/blackmisc.qrc"/>
</resources>
<connections/>
</ui>

View File

@@ -50,7 +50,7 @@ QMainWindow::separator:hover {
background: transparent;
}
/* Dialog, sometime main window */
/* Dialog, sometimes main window */
QDialog {
background-image: url(:/textures/icons/textures/texture-outer.jpg);
background-color: darkslategray;
@@ -513,6 +513,10 @@ QTableView, QTreeView, QListView {
padding:0px;
}
QTableView::item:selected {
background-color: blue;
}
QTreeView {
show-decoration-selected: 1;
}