Slightly changed ATC stations appearance, reload ATIS / load METAR

This commit is contained in:
Klaus Basan
2014-09-15 00:37:20 +02:00
parent 2d1226fefc
commit b989dec74d
6 changed files with 116 additions and 113 deletions

View File

@@ -33,6 +33,12 @@ namespace BlackGui
ui->setupUi(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
this->ui->tvp_AtcStationsOnline->setStationMode(CAtcStationListModel::StationsOnline);
this->ui->tvp_AtcStationsBooked->setStationMode(CAtcStationListModel::StationsBooked);

View File

@@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>400</width>
<height>501</height>
<height>462</height>
</rect>
</property>
<property name="windowTitle">
@@ -39,7 +39,7 @@
<item>
<widget class="BlackGui::Views::CAtcStationView" name="tvp_AtcStationsOnline">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
@@ -68,48 +68,117 @@
</widget>
</item>
<item>
<widget class="QGroupBox" name="gb_AtcStationsOnlineInfo">
<widget class="QFrame" name="fr_AtcStationsOnlineBottom">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>110</height>
<height>75</height>
</size>
</property>
<property name="title">
<string>Info (ATIS, METAR, ...)</string>
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<layout class="QVBoxLayout" name="vl_AtcStationsOnlineAtisGroup">
<property name="spacing">
<number>0</number>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<layout class="QGridLayout" name="gl_AtcStationsInfoAtis">
<property name="sizeConstraint">
<enum>QLayout::SetDefaultConstraint</enum>
</property>
<property name="leftMargin">
<number>0</number>
<number>2</number>
</property>
<property name="topMargin">
<number>12</number>
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
<number>2</number>
</property>
<property name="bottomMargin">
<number>2</number>
</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">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
@@ -123,100 +192,10 @@
<property name="maximumSize">
<size>
<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>
</size>
</property>
<property name="toolTip">
<string extracomment="Airport ICAO code"/>
</property>
<property name="text">
<string>EDDF</string>
</property>
<property name="maxLength">
<number>5</number>
</property>
<property name="frame">
<property name="readOnly">
<bool>true</bool>
</property>
</widget>

View File

@@ -100,13 +100,13 @@ namespace BlackGui
void CDockWidget::hideEvent(QHideEvent *event)
{
qDebug() << "hide" << this->objectName() << "v:" << isVisible() << "h:" << isHidden();
// qDebug() << "hide" << this->objectName() << "v:" << isVisible() << "h:" << isHidden();
QDockWidget::hideEvent(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);
}

View File

@@ -35,7 +35,9 @@ namespace BlackMisc
static const CIconList icons(
{
// keep indexes alphabetically sorted and in sync with CIcons
CIcon(CIcons::AviationAtis, "ATIS"),
CIcon(CIcons::AviationAttitudeIndicator, "attitude indicator"),
CIcon(CIcons::AviationMetar, "METAR"),
CIcon(CIcons::GeoPosition, "geo position"),
CIcon(CIcons::NetworkCapabilityTextOnly, "text only"),
CIcon(CIcons::NetworkCapabilityUnknown, "unknown"),

View File

@@ -30,7 +30,9 @@ namespace BlackMisc
{
switch (index)
{
case AviationAtis: return atis();
case AviationAttitudeIndicator: return attitudeIndicator16();
case AviationMetar: return metar();
case GeoPosition: return geoPosition16();
case NetworkCapabilityTextOnly: return capabilityTextOnly();
case NetworkCapabilityUnknown: return capabilityUnknown();

View File

@@ -29,6 +29,8 @@ namespace BlackMisc
{
// keep indexes alphabetically sorted and in sync with CIconList
AviationAttitudeIndicator,
AviationAtis,
AviationMetar,
GeoPosition,
NetworkCapabilityTextOnly,
NetworkCapabilityUnknown,
@@ -683,6 +685,18 @@ namespace BlackMisc
return pm;
}
//! METAR
static const QPixmap &metar()
{
return weatherCloudy16();
}
//! ATIS
static const QPixmap &atis()
{
return text16();
}
//! Geo position
static const QPixmap &geoPosition16()
{