Ref T442, connected tree view signals

This commit is contained in:
Klaus Basan
2018-12-05 03:57:25 +01:00
parent 88a1f2d6ac
commit 624de52724
2 changed files with 15 additions and 4 deletions

View File

@@ -82,8 +82,9 @@ namespace BlackGui
ui->tvp_AtcStationsOnline->setStationMode(CAtcStationListModel::StationsOnline); ui->tvp_AtcStationsOnline->setStationMode(CAtcStationListModel::StationsOnline);
ui->tvp_AtcStationsBooked->setStationMode(CAtcStationListModel::StationsBooked); ui->tvp_AtcStationsBooked->setStationMode(CAtcStationListModel::StationsBooked);
// header // menus
ui->tvp_AtcStationsOnlineTree->setHeaderHidden(true); ui->tvp_AtcStationsOnline->menuRemoveItems(CAtcStationView::MenuClear);
ui->tvp_AtcStationsBooked->menuRemoveItems(CAtcStationView::MenuClear);
// Signal / Slots // Signal / Slots
connect(ui->le_AtcStationsOnlineMetar, &QLineEdit::returnPressed, this, &CAtcStationComponent::getMetarAsEntered); connect(ui->le_AtcStationsOnlineMetar, &QLineEdit::returnPressed, this, &CAtcStationComponent::getMetarAsEntered);
@@ -99,6 +100,8 @@ namespace BlackGui
connect(ui->tvp_AtcStationsOnline, &CAtcStationView::modelDataChangedDigest, this, &CAtcStationComponent::onCountChanged); connect(ui->tvp_AtcStationsOnline, &CAtcStationView::modelDataChangedDigest, this, &CAtcStationComponent::onCountChanged);
connect(ui->tvp_AtcStationsOnline, &CAtcStationView::requestComFrequency, this, &CAtcStationComponent::setComFrequency); connect(ui->tvp_AtcStationsOnline, &CAtcStationView::requestComFrequency, this, &CAtcStationComponent::setComFrequency);
connect(ui->tvp_AtcStationsOnline, &CAtcStationView::requestTextMessageWidget, this, &CAtcStationComponent::requestTextMessageWidget); connect(ui->tvp_AtcStationsOnline, &CAtcStationView::requestTextMessageWidget, this, &CAtcStationComponent::requestTextMessageWidget);
connect(ui->tvp_AtcStationsOnlineTree, &CAtcStationTreeView::requestComFrequency, this, &CAtcStationComponent::setComFrequency);
connect(ui->tvp_AtcStationsOnlineTree, &CAtcStationTreeView::requestTextMessageWidget, this, &CAtcStationComponent::requestTextMessageWidget);
connect(ui->comp_AtcStationsSettings, &CSettingsAtcStationsInlineComponent::changed, this, &CAtcStationComponent::forceUpdate, Qt::QueuedConnection); connect(ui->comp_AtcStationsSettings, &CSettingsAtcStationsInlineComponent::changed, this, &CAtcStationComponent::forceUpdate, Qt::QueuedConnection);

View File

@@ -187,9 +187,12 @@
<number>0</number> <number>0</number>
</property> </property>
<item> <item>
<widget class="QTreeView" name="tvp_AtcStationsOnlineTree"> <widget class="BlackGui::Views::CAtcStationTreeView" name="tvp_AtcStationsOnlineTree">
<property name="selectionMode"> <property name="selectionMode">
<enum>QAbstractItemView::NoSelection</enum> <enum>QAbstractItemView::SingleSelection</enum>
</property>
<property name="selectionBehavior">
<enum>QAbstractItemView::SelectRows</enum>
</property> </property>
<property name="animated"> <property name="animated">
<bool>true</bool> <bool>true</bool>
@@ -267,6 +270,11 @@
<header>blackgui/components/settingsatcstationsinlinecomponent.h</header> <header>blackgui/components/settingsatcstationsinlinecomponent.h</header>
<container>1</container> <container>1</container>
</customwidget> </customwidget>
<customwidget>
<class>BlackGui::Views::CAtcStationTreeView</class>
<extends>QTreeView</extends>
<header>blackgui/views/atcstationtreeview.h</header>
</customwidget>
</customwidgets> </customwidgets>
<tabstops> <tabstops>
<tabstop>tvp_AtcStationsOnline</tabstop> <tabstop>tvp_AtcStationsOnline</tabstop>