mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-08-07 18:15:51 +08:00
refs #587, use model mode component in form
This commit is contained in:
@@ -41,7 +41,7 @@ namespace BlackGui
|
|||||||
model.setDescription(this->ui->le_Description->text());
|
model.setDescription(this->ui->le_Description->text());
|
||||||
model.setModelString(this->ui->le_ModelKey->text());
|
model.setModelString(this->ui->le_ModelKey->text());
|
||||||
model.setName(this->ui->le_Name->text());
|
model.setName(this->ui->le_Name->text());
|
||||||
model.setModelModeAsString(this->ui->cb_Include->currentText());
|
model.setModelMode(this->ui->selector_ModelMode->getMode());
|
||||||
return model;
|
return model;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -72,7 +72,7 @@ namespace BlackGui
|
|||||||
ui->le_Id->setText(model.getDbKeyAsString());
|
ui->le_Id->setText(model.getDbKeyAsString());
|
||||||
ui->le_Description->setText(model.getDescription());
|
ui->le_Description->setText(model.getDescription());
|
||||||
ui->le_Name->setText(model.getName());
|
ui->le_Name->setText(model.getName());
|
||||||
ui->cb_Include->setCurrentText(model.getModelModeAsString());
|
ui->selector_ModelMode->setValue(model.getModelMode());
|
||||||
ui->selector_Simulator->setValue(model.getSimulatorInfo());
|
ui->selector_Simulator->setValue(model.getSimulatorInfo());
|
||||||
m_originalModel = model;
|
m_originalModel = model;
|
||||||
}
|
}
|
||||||
@@ -82,11 +82,12 @@ namespace BlackGui
|
|||||||
const CAuthenticatedUser user(this->getUser());
|
const CAuthenticatedUser user(this->getUser());
|
||||||
if (user.isAdmin())
|
if (user.isAdmin())
|
||||||
{
|
{
|
||||||
ui->cb_Include->setEnabled(true);
|
ui->selector_ModelMode->setValue(CAircraftModel::Include);
|
||||||
|
ui->selector_ModelMode->setReadOnly(false);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ui->cb_Include->setEnabled(false);
|
ui->selector_ModelMode->setReadOnly(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
CForm::ps_userChanged();
|
CForm::ps_userChanged();
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>592</width>
|
<width>592</width>
|
||||||
<height>93</height>
|
<height>95</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
@@ -41,6 +41,18 @@
|
|||||||
<string>Simulator model</string>
|
<string>Simulator model</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gl_ModelMappingForm">
|
<layout class="QGridLayout" name="gl_ModelMappingForm">
|
||||||
|
<property name="leftMargin">
|
||||||
|
<number>3</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>3</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>3</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
|
<number>3</number>
|
||||||
|
</property>
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="BlackGui::CLabelAndIcon" name="lai_Id">
|
<widget class="BlackGui::CLabelAndIcon" name="lai_Id">
|
||||||
<property name="frameShape">
|
<property name="frameShape">
|
||||||
@@ -162,25 +174,13 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="6">
|
<item row="1" column="6">
|
||||||
<widget class="QComboBox" name="cb_Include">
|
<widget class="BlackGui::CModelModeSelector" name="selector_ModelMode">
|
||||||
<item>
|
<property name="frameShape">
|
||||||
<property name="text">
|
<enum>QFrame::StyledPanel</enum>
|
||||||
<string>Include</string>
|
</property>
|
||||||
</property>
|
<property name="frameShadow">
|
||||||
<property name="icon">
|
<enum>QFrame::Raised</enum>
|
||||||
<iconset resource="../../blackmisc/blackmisc.qrc">
|
</property>
|
||||||
<normaloff>:/diagona/icons/diagona/icons/paper-plane--plus.png</normaloff>:/diagona/icons/diagona/icons/paper-plane--plus.png</iconset>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>Exclude</string>
|
|
||||||
</property>
|
|
||||||
<property name="icon">
|
|
||||||
<iconset resource="../../blackmisc/blackmisc.qrc">
|
|
||||||
<normaloff>:/diagona/icons/diagona/icons/paper-plane--minus.png</normaloff>:/diagona/icons/diagona/icons/paper-plane--minus.png</iconset>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
@@ -189,6 +189,18 @@
|
|||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<customwidgets>
|
<customwidgets>
|
||||||
|
<customwidget>
|
||||||
|
<class>BlackGui::CSimulatorSelector</class>
|
||||||
|
<extends>QFrame</extends>
|
||||||
|
<header>blackgui/simulatorselector.h</header>
|
||||||
|
<container>1</container>
|
||||||
|
</customwidget>
|
||||||
|
<customwidget>
|
||||||
|
<class>BlackGui::CModelModeSelector</class>
|
||||||
|
<extends>QFrame</extends>
|
||||||
|
<header>blackgui/modelmodeselector.h</header>
|
||||||
|
<container>1</container>
|
||||||
|
</customwidget>
|
||||||
<customwidget>
|
<customwidget>
|
||||||
<class>BlackGui::CLabelAndIcon</class>
|
<class>BlackGui::CLabelAndIcon</class>
|
||||||
<extends>QFrame</extends>
|
<extends>QFrame</extends>
|
||||||
@@ -201,12 +213,6 @@
|
|||||||
<header>blackgui/editors/validationindicator.h</header>
|
<header>blackgui/editors/validationindicator.h</header>
|
||||||
<container>1</container>
|
<container>1</container>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
<customwidget>
|
|
||||||
<class>BlackGui::CSimulatorSelector</class>
|
|
||||||
<extends>QFrame</extends>
|
|
||||||
<header>blackgui/simulatorselector.h</header>
|
|
||||||
<container>1</container>
|
|
||||||
</customwidget>
|
|
||||||
</customwidgets>
|
</customwidgets>
|
||||||
<tabstops>
|
<tabstops>
|
||||||
<tabstop>le_Id</tabstop>
|
<tabstop>le_Id</tabstop>
|
||||||
@@ -216,8 +222,6 @@
|
|||||||
<tabstop>pb_Stash</tabstop>
|
<tabstop>pb_Stash</tabstop>
|
||||||
<tabstop>le_LastUpdated</tabstop>
|
<tabstop>le_LastUpdated</tabstop>
|
||||||
</tabstops>
|
</tabstops>
|
||||||
<resources>
|
<resources/>
|
||||||
<include location="../../blackmisc/blackmisc.qrc"/>
|
|
||||||
</resources>
|
|
||||||
<connections/>
|
<connections/>
|
||||||
</ui>
|
</ui>
|
||||||
|
|||||||
Reference in New Issue
Block a user