refs #755, mapping UI improvements

* make drop area more obvious by icon and color
* improve forms so the layout looks better on large screens
* button to display model dialog (like distributor, ICAO, ...)
This commit is contained in:
Klaus Basan
2016-09-02 23:00:12 +02:00
committed by Roland Winklmeier
parent aafff6cd82
commit 10325ee8a9
18 changed files with 67 additions and 51 deletions

View File

@@ -447,7 +447,7 @@ namespace BlackGui
}
}
void CDbMappingComponent::ps_modifyModelDialog()
void CDbMappingComponent::modifyModelDialog()
{
// only one model selected, use as default
if (ui->comp_StashAircraft->view()->hasSingleSelectedRow())
@@ -945,7 +945,7 @@ namespace BlackGui
this->m_menuActions[0] = menuActions.addAction(this->m_menuActions[0], CIcons::appAircraftIcao16(), "Current aircraft ICAO", CMenuAction::pathStashEditor(), this, { mapComp, &CDbMappingComponent::ps_applyFormAircraftIcaoData });
this->m_menuActions[1] = menuActions.addAction(this->m_menuActions[1], CIcons::appDistributors16(), "Current distributor", CMenuAction::pathStashEditor(), this, { mapComp, &CDbMappingComponent::ps_applyFormDistributorData });
this->m_menuActions[2] = menuActions.addAction(this->m_menuActions[2], CIcons::appLiveries16(), "Current livery", CMenuAction::pathStashEditor(), this, { mapComp, &CDbMappingComponent::ps_applyFormLiveryData });
this->m_menuActions[3] = menuActions.addAction(this->m_menuActions[3], CIcons::databaseTable16(), "Modify DB model data", CMenuAction::pathStashEditor(), this, { mapComp, &CDbMappingComponent::ps_modifyModelDialog });
this->m_menuActions[3] = menuActions.addAction(this->m_menuActions[3], CIcons::databaseTable16(), "Modify DB model data", CMenuAction::pathStashEditor(), this, { mapComp, &CDbMappingComponent::modifyModelDialog });
}
this->nestedCustomMenu(menuActions);
}

View File

@@ -187,6 +187,9 @@ namespace BlackGui
//! Stash models
void stashSelectedModels();
//! Open model modify dialog
void modifyModelDialog();
signals:
//! Request to filter by livery
void filterByLivery(const BlackMisc::Aviation::CLivery &livery);
@@ -273,9 +276,6 @@ namespace BlackGui
//! Apply current DB data from form
void ps_applyFormDistributorData();
//! Open model modify dialog
void ps_modifyModelDialog();
//! Add to own model set
void ps_addToOwnModelSet();

View File

@@ -250,7 +250,7 @@
<property name="minimumSize">
<size>
<width>0</width>
<height>100</height>
<height>110</height>
</size>
</property>
</widget>
@@ -288,13 +288,13 @@
<x>0</x>
<y>0</y>
<width>882</width>
<height>425</height>
<height>450</height>
</rect>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>425</height>
<height>450</height>
</size>
</property>
<layout class="QHBoxLayout" name="hl_EditorsScrollArea">

View File

@@ -72,6 +72,7 @@ namespace BlackGui
connect(ui->pb_AirlineIcao, &QPushButton::pressed, this, &CDbStashComponent::ps_copyOverPartsToSelected);
connect(ui->pb_Livery, &QPushButton::pressed, this, &CDbStashComponent::ps_copyOverPartsToSelected);
connect(ui->pb_Distributor, &QPushButton::pressed, this, &CDbStashComponent::ps_copyOverPartsToSelected);
connect(ui->pb_Model, &QPushButton::pressed, this, &CDbStashComponent::ps_modifyModelDialog);
ui->tvp_StashAircraftModels->menuAddItems(CAircraftModelView::MenuRemoveSelectedRows);
ui->tvp_StashAircraftModels->setHighlightModelStrings(true);
@@ -450,6 +451,14 @@ namespace BlackGui
}
}
void CDbStashComponent::ps_modifyModelDialog()
{
if (this->getMappingComponent())
{
this->getMappingComponent()->modifyModelDialog();
}
}
void CDbStashComponent::ps_onRowCountChanged(int number, bool filter)
{
Q_UNUSED(number);

View File

@@ -159,6 +159,9 @@ namespace BlackGui
//! Copy over values
void ps_copyOverPartsToSelected();
//! Display model dialog
void ps_modifyModelDialog();
//! Row count changed
void ps_onRowCountChanged(int number, bool filter);

View File

@@ -124,6 +124,13 @@
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pb_Model">
<property name="text">
<string>Model</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pb_Distributor">
<property name="text">
@@ -171,6 +178,7 @@
<tabstop>pb_RemoveInvald</tabstop>
<tabstop>pb_Publish</tabstop>
<tabstop>cb_SelectedOnly</tabstop>
<tabstop>pb_Model</tabstop>
<tabstop>pb_Distributor</tabstop>
<tabstop>pb_AircraftIcao</tabstop>
<tabstop>pb_Livery</tabstop>