mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-26 10:45:37 +08:00
Slightly changed ATC stations appearance, reload ATIS / load METAR
This commit is contained in:
@@ -33,6 +33,12 @@ namespace BlackGui
|
|||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
this->m_timerComponent = new CTimerBasedComponent(SLOT(update()), this);
|
this->m_timerComponent = new CTimerBasedComponent(SLOT(update()), this);
|
||||||
|
|
||||||
|
// some icons
|
||||||
|
this->ui->pb_AtcStationsAtisReload->setIcon(CIcons::atis());
|
||||||
|
this->ui->pb_AtcStationsAtisReload->setText("");
|
||||||
|
this->ui->pb_AtcStationsLoadMetar->setIcon(CIcons::metar());
|
||||||
|
this->ui->pb_AtcStationsLoadMetar->setText("");
|
||||||
|
|
||||||
// set station mode
|
// set station mode
|
||||||
this->ui->tvp_AtcStationsOnline->setStationMode(CAtcStationListModel::StationsOnline);
|
this->ui->tvp_AtcStationsOnline->setStationMode(CAtcStationListModel::StationsOnline);
|
||||||
this->ui->tvp_AtcStationsBooked->setStationMode(CAtcStationListModel::StationsBooked);
|
this->ui->tvp_AtcStationsBooked->setStationMode(CAtcStationListModel::StationsBooked);
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>400</width>
|
<width>400</width>
|
||||||
<height>501</height>
|
<height>462</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
@@ -39,7 +39,7 @@
|
|||||||
<item>
|
<item>
|
||||||
<widget class="BlackGui::Views::CAtcStationView" name="tvp_AtcStationsOnline">
|
<widget class="BlackGui::Views::CAtcStationView" name="tvp_AtcStationsOnline">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
@@ -68,48 +68,117 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QGroupBox" name="gb_AtcStationsOnlineInfo">
|
<widget class="QFrame" name="fr_AtcStationsOnlineBottom">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
<property name="maximumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>16777215</width>
|
<width>16777215</width>
|
||||||
<height>110</height>
|
<height>75</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="title">
|
<property name="frameShape">
|
||||||
<string>Info (ATIS, METAR, ...)</string>
|
<enum>QFrame::NoFrame</enum>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="vl_AtcStationsOnlineAtisGroup">
|
<property name="frameShadow">
|
||||||
<property name="spacing">
|
<enum>QFrame::Raised</enum>
|
||||||
<number>0</number>
|
</property>
|
||||||
|
<layout class="QGridLayout" name="gl_AtcStationsInfoAtis">
|
||||||
|
<property name="sizeConstraint">
|
||||||
|
<enum>QLayout::SetDefaultConstraint</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="leftMargin">
|
<property name="leftMargin">
|
||||||
<number>0</number>
|
<number>2</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="topMargin">
|
<property name="topMargin">
|
||||||
<number>12</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="rightMargin">
|
<property name="rightMargin">
|
||||||
<number>0</number>
|
<number>2</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="bottomMargin">
|
<property name="bottomMargin">
|
||||||
<number>2</number>
|
<number>2</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<property name="horizontalSpacing">
|
||||||
|
<number>2</number>
|
||||||
|
</property>
|
||||||
|
<property name="verticalSpacing">
|
||||||
|
<number>4</number>
|
||||||
|
</property>
|
||||||
|
<item row="1" column="3">
|
||||||
|
<widget class="QLineEdit" name="le_AtcStationsOnlineMetar">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string extracomment="METAR: Airport ICAO code">METAR: Airport ICAO code</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>EDDF</string>
|
||||||
|
</property>
|
||||||
|
<property name="maxLength">
|
||||||
|
<number>5</number>
|
||||||
|
</property>
|
||||||
|
<property name="frame">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="3">
|
||||||
|
<widget class="QPushButton" name="pb_AtcStationsLoadMetar">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Load METAR</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>METAR</string>
|
||||||
|
</property>
|
||||||
|
<property name="flat">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="3">
|
||||||
|
<widget class="QPushButton" name="pb_AtcStationsAtisReload">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Reload ATIS</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>ATIS</string>
|
||||||
|
</property>
|
||||||
|
<property name="flat">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1" rowspan="4" colspan="2">
|
||||||
<widget class="QTextEdit" name="te_AtcStationsOnlineInfo">
|
<widget class="QTextEdit" name="te_AtcStationsOnlineInfo">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
@@ -123,100 +192,10 @@
|
|||||||
<property name="maximumSize">
|
<property name="maximumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>16777215</width>
|
<width>16777215</width>
|
||||||
<height>100</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QFrame" name="fr_AtcStationsOnlineBottom">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>16777215</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="frameShape">
|
|
||||||
<enum>QFrame::NoFrame</enum>
|
|
||||||
</property>
|
|
||||||
<property name="frameShadow">
|
|
||||||
<enum>QFrame::Raised</enum>
|
|
||||||
</property>
|
|
||||||
<layout class="QGridLayout" name="gridLayout_6">
|
|
||||||
<property name="sizeConstraint">
|
|
||||||
<enum>QLayout::SetDefaultConstraint</enum>
|
|
||||||
</property>
|
|
||||||
<property name="leftMargin">
|
|
||||||
<number>5</number>
|
|
||||||
</property>
|
|
||||||
<property name="topMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="rightMargin">
|
|
||||||
<number>2</number>
|
|
||||||
</property>
|
|
||||||
<property name="bottomMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<item row="0" column="1">
|
|
||||||
<widget class="QPushButton" name="pb_AtcStationsLoadMetar">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Load METAR</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="2">
|
|
||||||
<widget class="QPushButton" name="pb_AtcStationsAtisReload">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Reload ATIS</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QLineEdit" name="le_AtcStationsOnlineMetar">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>60</width>
|
|
||||||
<height>16777215</height>
|
<height>16777215</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="toolTip">
|
<property name="readOnly">
|
||||||
<string extracomment="Airport ICAO code"/>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>EDDF</string>
|
|
||||||
</property>
|
|
||||||
<property name="maxLength">
|
|
||||||
<number>5</number>
|
|
||||||
</property>
|
|
||||||
<property name="frame">
|
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
|
|||||||
@@ -100,13 +100,13 @@ namespace BlackGui
|
|||||||
|
|
||||||
void CDockWidget::hideEvent(QHideEvent *event)
|
void CDockWidget::hideEvent(QHideEvent *event)
|
||||||
{
|
{
|
||||||
qDebug() << "hide" << this->objectName() << "v:" << isVisible() << "h:" << isHidden();
|
// qDebug() << "hide" << this->objectName() << "v:" << isVisible() << "h:" << isHidden();
|
||||||
QDockWidget::hideEvent(event);
|
QDockWidget::hideEvent(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CDockWidget::showEvent(QShowEvent *event)
|
void CDockWidget::showEvent(QShowEvent *event)
|
||||||
{
|
{
|
||||||
qDebug() << "show" << this->objectName() << "v:" << isVisible() << "h:" << isHidden();
|
// qDebug() << "show" << this->objectName() << "v:" << isVisible() << "h:" << isHidden();
|
||||||
QDockWidget::showEvent(event);
|
QDockWidget::showEvent(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -35,7 +35,9 @@ namespace BlackMisc
|
|||||||
static const CIconList icons(
|
static const CIconList icons(
|
||||||
{
|
{
|
||||||
// keep indexes alphabetically sorted and in sync with CIcons
|
// keep indexes alphabetically sorted and in sync with CIcons
|
||||||
|
CIcon(CIcons::AviationAtis, "ATIS"),
|
||||||
CIcon(CIcons::AviationAttitudeIndicator, "attitude indicator"),
|
CIcon(CIcons::AviationAttitudeIndicator, "attitude indicator"),
|
||||||
|
CIcon(CIcons::AviationMetar, "METAR"),
|
||||||
CIcon(CIcons::GeoPosition, "geo position"),
|
CIcon(CIcons::GeoPosition, "geo position"),
|
||||||
CIcon(CIcons::NetworkCapabilityTextOnly, "text only"),
|
CIcon(CIcons::NetworkCapabilityTextOnly, "text only"),
|
||||||
CIcon(CIcons::NetworkCapabilityUnknown, "unknown"),
|
CIcon(CIcons::NetworkCapabilityUnknown, "unknown"),
|
||||||
|
|||||||
@@ -30,7 +30,9 @@ namespace BlackMisc
|
|||||||
{
|
{
|
||||||
switch (index)
|
switch (index)
|
||||||
{
|
{
|
||||||
|
case AviationAtis: return atis();
|
||||||
case AviationAttitudeIndicator: return attitudeIndicator16();
|
case AviationAttitudeIndicator: return attitudeIndicator16();
|
||||||
|
case AviationMetar: return metar();
|
||||||
case GeoPosition: return geoPosition16();
|
case GeoPosition: return geoPosition16();
|
||||||
case NetworkCapabilityTextOnly: return capabilityTextOnly();
|
case NetworkCapabilityTextOnly: return capabilityTextOnly();
|
||||||
case NetworkCapabilityUnknown: return capabilityUnknown();
|
case NetworkCapabilityUnknown: return capabilityUnknown();
|
||||||
|
|||||||
@@ -29,6 +29,8 @@ namespace BlackMisc
|
|||||||
{
|
{
|
||||||
// keep indexes alphabetically sorted and in sync with CIconList
|
// keep indexes alphabetically sorted and in sync with CIconList
|
||||||
AviationAttitudeIndicator,
|
AviationAttitudeIndicator,
|
||||||
|
AviationAtis,
|
||||||
|
AviationMetar,
|
||||||
GeoPosition,
|
GeoPosition,
|
||||||
NetworkCapabilityTextOnly,
|
NetworkCapabilityTextOnly,
|
||||||
NetworkCapabilityUnknown,
|
NetworkCapabilityUnknown,
|
||||||
@@ -683,6 +685,18 @@ namespace BlackMisc
|
|||||||
return pm;
|
return pm;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//! METAR
|
||||||
|
static const QPixmap &metar()
|
||||||
|
{
|
||||||
|
return weatherCloudy16();
|
||||||
|
}
|
||||||
|
|
||||||
|
//! ATIS
|
||||||
|
static const QPixmap &atis()
|
||||||
|
{
|
||||||
|
return text16();
|
||||||
|
}
|
||||||
|
|
||||||
//! Geo position
|
//! Geo position
|
||||||
static const QPixmap &geoPosition16()
|
static const QPixmap &geoPosition16()
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user