mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-02 06:35:52 +08:00
refs #768, updated forms
* set focus proxy * use CDbLiveryColorSearchDialog * adjusted to selector updates
This commit is contained in:
@@ -43,10 +43,11 @@ namespace BlackGui
|
||||
ui(new Ui::CAircraftIcaoForm)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
this->setFocusProxy(ui->le_Id);
|
||||
ui->lai_id->set(CIcons::appAircraftIcao16(), "Id:");
|
||||
ui->le_Updated->setReadOnly(true);
|
||||
ui->le_Id->setReadOnly(true);
|
||||
ui->aircraft_Selector->withIcaoDescription(false);
|
||||
ui->aircraft_Selector->displayWithIcaoDescription(false);
|
||||
connect(ui->aircraft_Selector, &CDbAircraftIcaoSelectorComponent::changedAircraftIcao, this, &CAircraftIcaoForm::setValue);
|
||||
|
||||
// drag and drop
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>225</height>
|
||||
<height>200</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
@@ -58,11 +58,8 @@
|
||||
</property>
|
||||
<item>
|
||||
<widget class="BlackGui::Components::CDbAircraftIcaoSelectorComponent" name="aircraft_Selector">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -130,22 +127,32 @@
|
||||
</item>
|
||||
<item row="0" column="2" rowspan="9">
|
||||
<widget class="BlackGui::Editors::CValidationIndicator" name="val_Indicator">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>10</width>
|
||||
<width>16</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<widget class="BlackGui::Components::CAircraftCombinedTypeSelector" name="combined_TypeSelector"/>
|
||||
<widget class="BlackGui::Components::CAircraftCombinedTypeSelector" name="combined_TypeSelector">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="1">
|
||||
<widget class="QWidget" name="wi_Checkboxes" native="true">
|
||||
@@ -164,6 +171,12 @@
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QComboBox" name="cb_Wtc">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>50</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Wake turbulence category</string>
|
||||
</property>
|
||||
@@ -212,7 +225,7 @@
|
||||
<string>Legacy aircraft, e.g. Concord, ME109</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Legacy</string>
|
||||
<string>Leg.</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -298,7 +311,7 @@
|
||||
<string>Type / Engine / Engine count</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Combined type:</string>
|
||||
<string>Comb. type:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -354,7 +367,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QWidget" name="wi_IataFmily" native="true">
|
||||
<widget class="QWidget" name="wi_IataFamily" native="true">
|
||||
<layout class="QHBoxLayout" name="hl_IataFamily">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
@@ -400,6 +413,12 @@
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>BlackGui::Components::CDbAircraftIcaoSelectorComponent</class>
|
||||
<extends>QFrame</extends>
|
||||
<header>blackgui/components/dbaircrafticaoselectorcomponent.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>BlackGui::CLabelAndIcon</class>
|
||||
<extends>QFrame</extends>
|
||||
@@ -423,20 +442,16 @@
|
||||
<header>blackgui/components/aircraftcombinedtypeselector.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>BlackGui::Components::CDbAircraftIcaoSelectorComponent</class>
|
||||
<extends>QFrame</extends>
|
||||
<header>blackgui/components/dbaircrafticaoselectorcomponent.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<tabstops>
|
||||
<tabstop>le_Id</tabstop>
|
||||
<tabstop>aircraft_Selector</tabstop>
|
||||
<tabstop>cb_Rank</tabstop>
|
||||
<tabstop>le_Iata</tabstop>
|
||||
<tabstop>le_Family</tabstop>
|
||||
<tabstop>le_Manufacturer</tabstop>
|
||||
<tabstop>le_ModelDescription</tabstop>
|
||||
<tabstop>combined_TypeSelector</tabstop>
|
||||
<tabstop>cb_Wtc</tabstop>
|
||||
<tabstop>cb_RealWorld</tabstop>
|
||||
<tabstop>cb_Legacy</tabstop>
|
||||
|
||||
@@ -42,7 +42,7 @@ namespace BlackGui
|
||||
ui->le_Id->setReadOnly(true);
|
||||
ui->lai_Id->set(CIcons::appAirlineIcao16(), "Id:");
|
||||
|
||||
ui->selector_AirlineDesignator->withIcaoDescription(false);
|
||||
ui->selector_AirlineDesignator->displayWithIcaoDescription(false);
|
||||
connect(ui->selector_AirlineName, &CDbAirlineIcaoSelectorComponent::changedAirlineIcao, this, &CAirlineIcaoForm::setValue);
|
||||
connect(ui->selector_AirlineDesignator, &CDbAirlineIcaoSelectorComponent::changedAirlineIcao, this, &CAirlineIcaoForm::setValue);
|
||||
|
||||
|
||||
@@ -68,11 +68,8 @@
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="BlackGui::Components::CDbCountrySelectorComponent" name="country_Selector">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -243,25 +240,22 @@
|
||||
<widget class="BlackGui::Editors::CValidationIndicator" name="val_Indicator">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>10</width>
|
||||
<width>16</width>
|
||||
<height>100</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="BlackGui::Components::CDbAirlineNameSelectorComponent" name="selector_AirlineName">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -288,12 +282,6 @@
|
||||
<extends>QLabel</extends>
|
||||
<header>blackgui/dropsite.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>BlackGui::Components::CDbCountrySelectorComponent</class>
|
||||
<extends>QFrame</extends>
|
||||
<header>blackgui/components/dbcountryselectorcomponent.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>BlackGui::Components::CDbAirlineIcaoSelectorComponent</class>
|
||||
<extends>QFrame</extends>
|
||||
@@ -306,12 +294,20 @@
|
||||
<header>blackgui/components/dbairlinenameselectorcomponent.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>BlackGui::Components::CDbCountrySelectorComponent</class>
|
||||
<extends>QFrame</extends>
|
||||
<header>blackgui/components/dbcountryselectorcomponent.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<tabstops>
|
||||
<tabstop>le_Id</tabstop>
|
||||
<tabstop>cb_Va</tabstop>
|
||||
<tabstop>cb_Military</tabstop>
|
||||
<tabstop>le_TelephonyDesignator</tabstop>
|
||||
<tabstop>selector_AirlineName</tabstop>
|
||||
<tabstop>country_Selector</tabstop>
|
||||
<tabstop>le_Updated</tabstop>
|
||||
</tabstops>
|
||||
<resources/>
|
||||
|
||||
@@ -34,6 +34,7 @@ namespace BlackGui
|
||||
ui(new Ui::CDistributorForm)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
this->setFocusProxy(ui->distributor_Selector);
|
||||
ui->le_Updated->setReadOnly(true);
|
||||
ui->distributor_Selector->withDistributorDescription(false);
|
||||
ui->lai_Id->set(CIcons::appDistributors16(), "Id:");
|
||||
|
||||
@@ -101,15 +101,15 @@
|
||||
<widget class="BlackGui::Editors::CValidationIndicator" name="val_Indicator">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>10</width>
|
||||
<width>16</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -121,6 +121,9 @@
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
@@ -170,7 +173,11 @@
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<tabstops>
|
||||
<tabstop>distributor_Selector</tabstop>
|
||||
<tabstop>le_Description</tabstop>
|
||||
<tabstop>le_Alias1</tabstop>
|
||||
<tabstop>le_Alias2</tabstop>
|
||||
<tabstop>le_Updated</tabstop>
|
||||
</tabstops>
|
||||
<resources/>
|
||||
<connections/>
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
class QWidget;
|
||||
|
||||
namespace BlackMisc { namespace Network { class CAuthenticatedUser; } }
|
||||
|
||||
namespace BlackGui
|
||||
{
|
||||
namespace Editors
|
||||
|
||||
@@ -137,6 +137,8 @@ namespace BlackGui
|
||||
void CLiveryForm::allowDrop(bool allowDrop)
|
||||
{
|
||||
ui->drop_DropData->allowDrop(allowDrop);
|
||||
ui->comp_LiverySelector->allowDrop(allowDrop);
|
||||
ui->editor_AirlineIcao->allowDrop(allowDrop);
|
||||
}
|
||||
|
||||
bool CLiveryForm::isDropAllowed() const
|
||||
@@ -152,6 +154,8 @@ namespace BlackGui
|
||||
ui->color_Fuselage->setReadOnly(readOnly);
|
||||
ui->color_Tail->setReadOnly(readOnly);
|
||||
ui->editor_AirlineIcao->setReadOnly(readOnly);
|
||||
ui->pb_SearchColor->setVisible(!readOnly);
|
||||
ui->pb_TempLivery->setVisible(!readOnly);
|
||||
CGuiUtility::checkBoxReadOnly(ui->cb_Military, readOnly);
|
||||
}
|
||||
|
||||
@@ -210,7 +214,7 @@ namespace BlackGui
|
||||
{
|
||||
if (!this->m_colorSearch)
|
||||
{
|
||||
this->m_colorSearch = new CDbLiveryColorSearch(this);
|
||||
this->m_colorSearch = new CDbLiveryColorSearchDialog(this);
|
||||
this->m_colorSearch->setModal(true);
|
||||
}
|
||||
const QDialog::DialogCode c = static_cast<QDialog::DialogCode>(this->m_colorSearch->exec());
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
#include "blackgui/blackguiexport.h"
|
||||
#include "blackgui/editors/form.h"
|
||||
#include "blackgui/components/dbliverycolorsearch.h"
|
||||
#include "blackgui/components/dbliverycolorsearchdialog.h"
|
||||
#include "blackmisc/aviation/airlineicaocode.h"
|
||||
#include "blackmisc/aviation/livery.h"
|
||||
#include "blackmisc/statusmessagelist.h"
|
||||
@@ -89,7 +89,7 @@ namespace BlackGui
|
||||
private:
|
||||
QScopedPointer<Ui::CLiveryForm> ui;
|
||||
BlackMisc::Aviation::CLivery m_originalLivery; //!< object allowing to override values
|
||||
BlackGui::Components::CDbLiveryColorSearch *m_colorSearch = nullptr; //!< search for color
|
||||
BlackGui::Components::CDbLiveryColorSearchDialog *m_colorSearch = nullptr; //!< search for color
|
||||
};
|
||||
} // ns
|
||||
} // ns
|
||||
|
||||
@@ -2,6 +2,14 @@
|
||||
<ui version="4.0">
|
||||
<class>CLiveryForm</class>
|
||||
<widget class="QFrame" name="CLiveryForm">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>361</width>
|
||||
<height>422</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Livery editor</string>
|
||||
</property>
|
||||
@@ -119,15 +127,15 @@
|
||||
<widget class="BlackGui::Editors::CValidationIndicator" name="val_Indicator">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>10</width>
|
||||
<width>16</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -142,6 +150,9 @@
|
||||
<height>225</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1" colspan="3">
|
||||
@@ -170,6 +181,9 @@
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item alignment="Qt::AlignLeft">
|
||||
@@ -180,6 +194,9 @@
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
@@ -206,7 +223,11 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1" colspan="2">
|
||||
<widget class="BlackGui::Components::CDbLiverySelectorComponent" name="comp_LiverySelector"/>
|
||||
<widget class="BlackGui::Components::CDbLiverySelectorComponent" name="comp_LiverySelector">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
@@ -252,8 +273,13 @@
|
||||
</customwidgets>
|
||||
<tabstops>
|
||||
<tabstop>le_Id</tabstop>
|
||||
<tabstop>pb_SearchColor</tabstop>
|
||||
<tabstop>pb_TempLivery</tabstop>
|
||||
<tabstop>comp_LiverySelector</tabstop>
|
||||
<tabstop>cb_Military</tabstop>
|
||||
<tabstop>le_Description</tabstop>
|
||||
<tabstop>color_Fuselage</tabstop>
|
||||
<tabstop>color_Tail</tabstop>
|
||||
<tabstop>le_Updated</tabstop>
|
||||
</tabstops>
|
||||
<resources/>
|
||||
|
||||
Reference in New Issue
Block a user