mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-22 14:55:36 +08:00
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:
committed by
Roland Winklmeier
parent
aafff6cd82
commit
10325ee8a9
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
@@ -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">
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -27,12 +27,13 @@ namespace BlackGui
|
||||
{
|
||||
CDropSite::CDropSite(QWidget *parent) : QLabel(parent)
|
||||
{
|
||||
setFrameStyle(QFrame::Sunken | QFrame::StyledPanel);
|
||||
setAlignment(Qt::AlignCenter);
|
||||
setAcceptDrops(true);
|
||||
this->setInfoText(tr("<drop content>"));
|
||||
connect(sGui, &CGuiApplication::styleSheetsChanged, this, &CDropSite::ps_onStyleSheetsChanged);
|
||||
this->setFrameStyle(QFrame::Sunken | QFrame::StyledPanel);
|
||||
this->setAlignment(Qt::AlignCenter);
|
||||
this->setAcceptDrops(true);
|
||||
this->setTextFormat(Qt::RichText);
|
||||
this->setInfoText("drop data here");
|
||||
this->ps_onStyleSheetsChanged();
|
||||
connect(sGui, &CGuiApplication::styleSheetsChanged, this, &CDropSite::ps_onStyleSheetsChanged);
|
||||
}
|
||||
|
||||
void CDropSite::setInfoText(const QString &dropSiteText)
|
||||
@@ -50,7 +51,8 @@ namespace BlackGui
|
||||
|
||||
void CDropSite::resetText()
|
||||
{
|
||||
setText(this->m_infoText);
|
||||
const QString html = "<img src=':/own/icons/own/drophere16.png'> " + this->m_infoText.toHtmlEscaped();
|
||||
setText(html);
|
||||
}
|
||||
|
||||
void CDropSite::dragEnterEvent(QDragEnterEvent *event)
|
||||
|
||||
@@ -7,13 +7,13 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>402</width>
|
||||
<height>241</height>
|
||||
<height>271</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>220</height>
|
||||
<height>225</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
@@ -40,7 +40,7 @@
|
||||
<property name="title">
|
||||
<string>Aircraft ICAO</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gl_AircraftIcao">
|
||||
<layout class="QGridLayout" name="gl_AircraftIcao" columnstretch="0,1,0">
|
||||
<item row="1" column="1">
|
||||
<widget class="QWidget" name="wi_DesignatorRank" native="true">
|
||||
<layout class="QHBoxLayout" name="hl_DesignatorRank">
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
<property name="title">
|
||||
<string>Airline ICAO</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gl_AirlineIcao">
|
||||
<layout class="QGridLayout" name="gl_AirlineIcao" columnstretch="0,1,0">
|
||||
<item row="5" column="1">
|
||||
<widget class="QWidget" name="wi_Timestamps" native="true">
|
||||
<layout class="QHBoxLayout" name="hl_Timestamps">
|
||||
|
||||
@@ -6,14 +6,14 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>299</width>
|
||||
<height>175</height>
|
||||
<width>297</width>
|
||||
<height>200</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>175</height>
|
||||
<height>185</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
@@ -40,7 +40,7 @@
|
||||
<property name="title">
|
||||
<string>Distributor</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gl_Distributor">
|
||||
<layout class="QGridLayout" name="gl_Distributor" columnstretch="0,1,1,0">
|
||||
<item row="2" column="1">
|
||||
<widget class="QLineEdit" name="le_Alias1">
|
||||
<property name="placeholderText">
|
||||
|
||||
@@ -2,14 +2,6 @@
|
||||
<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>
|
||||
@@ -34,7 +26,7 @@
|
||||
<property name="title">
|
||||
<string>Livery</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gl_Livery">
|
||||
<layout class="QGridLayout" name="gl_Livery" columnstretch="0,1,1,1,0">
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="lbl_Timestamp">
|
||||
<property name="text">
|
||||
@@ -140,14 +132,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="BlackGui::CLabelAndIcon" name="lai_Id">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="BlackGui::CLabelAndIcon" name="lai_Id"/>
|
||||
</item>
|
||||
<item row="6" column="0" colspan="4">
|
||||
<widget class="BlackGui::Editors::CAirlineIcaoForm" name="editor_AirlineIcao">
|
||||
|
||||
@@ -2,14 +2,6 @@
|
||||
<ui version="4.0">
|
||||
<class>CLabelAndIcon</class>
|
||||
<widget class="QFrame" name="CLabelAndIcon">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>50</width>
|
||||
<height>15</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Frame</string>
|
||||
</property>
|
||||
@@ -52,6 +44,19 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="hs_LabelAndAction">
|
||||
<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>
|
||||
<resources/>
|
||||
|
||||
@@ -119,12 +119,13 @@ BlackGui--COverlayMessages {
|
||||
}
|
||||
|
||||
BlackGui--CDropSite {
|
||||
color: blue;
|
||||
border: 2px solid green;
|
||||
color: grey;
|
||||
border: 2px dashed grey;
|
||||
border-radius: 5px;
|
||||
min-height: 20px;
|
||||
max-height: 20px;
|
||||
min-height: 18px;
|
||||
max-height: 18px;
|
||||
margin: 2px;
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
/* Validator bar */
|
||||
|
||||
@@ -423,6 +423,9 @@
|
||||
<file>icons/own/swift/swiftCircle512.png</file>
|
||||
<file>icons/own/swift/swiftCircle1024.png</file>
|
||||
<file>icons/own/swift/swiftCartoonNova64.png</file>
|
||||
<file>icons/own/drophere24.png</file>
|
||||
<file>icons/own/drophere48.png</file>
|
||||
<file>icons/own/drophere16.png</file>
|
||||
</qresource>
|
||||
<qresource prefix="/qled">
|
||||
<file>icons/qled/circle_black.svg</file>
|
||||
|
||||
BIN
src/blackmisc/icons/own/dropHere.pdn
Normal file
BIN
src/blackmisc/icons/own/dropHere.pdn
Normal file
Binary file not shown.
BIN
src/blackmisc/icons/own/drophere16.png
Normal file
BIN
src/blackmisc/icons/own/drophere16.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 433 B |
BIN
src/blackmisc/icons/own/drophere24.png
Normal file
BIN
src/blackmisc/icons/own/drophere24.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 595 B |
BIN
src/blackmisc/icons/own/drophere48.png
Normal file
BIN
src/blackmisc/icons/own/drophere48.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.0 KiB |
Reference in New Issue
Block a user