1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-18 03:52:11 +01:00

Some cleanup, renamed labels/values, tidier layout.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1450 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
cranphin 2010-08-28 23:14:31 +00:00 committed by cranphin
parent 8128c3bbfa
commit 1cdaf2ecdc
2 changed files with 352 additions and 560 deletions

View File

@ -94,10 +94,10 @@ void GpsDisplayWidget::setSpeedHeading(double speed, double heading)
temp.append(QString::number(speed,'g',10)); temp.append(QString::number(speed,'g',10));
temp.append(" Heaging: "); temp.append(" Heaging: ");
temp.append(QString::number(heading,'g',10)); temp.append(QString::number(heading,'g',10));
widget->speed_label->setText(QString::number(speed,'g',10)); widget->speed_value->setText(QString::number(speed,'g',10));
widget->speed_label->adjustSize(); widget->speed_value->adjustSize();
widget->bear_label->setText(QString::number(heading,'g',10)); widget->bear_value->setText(QString::number(heading,'g',10));
widget->bear_label->adjustSize(); widget->bear_value->adjustSize();
// widget->textBrowser->append(temp); // widget->textBrowser->append(temp);
} }
@ -108,10 +108,10 @@ void GpsDisplayWidget::setDateTime(double date, double time)
temp.append(QString::number(date,'g',10)); temp.append(QString::number(date,'g',10));
temp.append(" Time: "); temp.append(" Time: ");
temp.append(QString::number(time,'g',10)); temp.append(QString::number(time,'g',10));
widget->gdate_label->setText(QString::number(date,'g',10)); widget->gdate_value->setText(QString::number(date,'g',10));
widget->gdate_label->adjustSize(); widget->gdate_value->adjustSize();
widget->gtime_label->setText(QString::number(time,'g',10)); widget->gtime_value->setText(QString::number(time,'g',10));
widget->gdate_label->adjustSize(); widget->gdate_value->adjustSize();
//widget->textBrowser->append(temp); //widget->textBrowser->append(temp);
} }
@ -125,8 +125,8 @@ void GpsDisplayWidget::setSVs(int sv)
{ {
QString temp = "Fix: Sats: "; QString temp = "Fix: Sats: ";
temp.append(QString::number(sv)); temp.append(QString::number(sv));
widget->label_2->setText(temp); widget->status_value->setText(temp);
widget->label_2->adjustSize(); widget->status_value->adjustSize();
} }
void GpsDisplayWidget::setPosition(double lat, double lon, double alt) void GpsDisplayWidget::setPosition(double lat, double lon, double alt)
@ -137,12 +137,12 @@ void GpsDisplayWidget::setPosition(double lat, double lon, double alt)
temp.append(QString::number(lon,'g',10)); temp.append(QString::number(lon,'g',10));
temp.append(" "); temp.append(" ");
temp.append(QString::number(alt,'g',10)); temp.append(QString::number(alt,'g',10));
widget->lat_label->setText(QString::number(lat,'g',10)); widget->lat_value->setText(QString::number(lat,'g',10));
widget->lat_label->adjustSize(); widget->lat_value->adjustSize();
widget->long_label->setText(QString::number(lon,'g',10)); widget->long_value->setText(QString::number(lon,'g',10));
widget->long_label->adjustSize(); widget->long_value->adjustSize();
//widget->alt_label->setText(QString::number(alt,'g',10)); //widget->alt_value->setText(QString::number(alt,'g',10));
//widget->alt_label->adjustSize(); //widget->alt_value->adjustSize();
//widget->textBrowser->append(temp); //widget->textBrowser->append(temp);
} }

View File

@ -1,544 +1,336 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0"> <ui version="4.0">
<class>GpsDisplayWidget</class> <class>GpsDisplayWidget</class>
<widget class="QWidget" name="GpsDisplayWidget"> <widget class="QWidget" name="GpsDisplayWidget">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>570</width> <width>570</width>
<height>302</height> <height>302</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
<string>Form</string> <string>Form</string>
</property> </property>
<widget class="QGraphicsView" name="gpsWorld"> <widget class="QGraphicsView" name="gpsWorld">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>190</x> <x>190</x>
<y>10</y> <y>10</y>
<width>171</width> <width>171</width>
<height>171</height> <height>171</height>
</rect> </rect>
</property> </property>
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed"> <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>171</width> <width>171</width>
<height>171</height> <height>171</height>
</size> </size>
</property> </property>
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
<width>171</width> <width>171</width>
<height>171</height> <height>171</height>
</size> </size>
</property> </property>
<property name="acceptDrops"> <property name="acceptDrops">
<bool>false</bool> <bool>false</bool>
</property> </property>
<property name="toolTip"> <property name="toolTip">
<string extracomment="Shows locations of satellites"/> <string extracomment="Shows locations of satellites"/>
</property> </property>
<property name="verticalScrollBarPolicy"> <property name="verticalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOff</enum> <enum>Qt::ScrollBarAlwaysOff</enum>
</property> </property>
<property name="horizontalScrollBarPolicy"> <property name="horizontalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOff</enum> <enum>Qt::ScrollBarAlwaysOff</enum>
</property> </property>
<property name="sceneRect"> <property name="sceneRect">
<rectf> <rectf>
<x>0.000000000000000</x> <x>0.000000000000000</x>
<y>0.000000000000000</y> <y>0.000000000000000</y>
<width>169.000000000000000</width> <width>169.000000000000000</width>
<height>169.000000000000000</height> <height>169.000000000000000</height>
</rectf> </rectf>
</property> </property>
</widget> </widget>
<widget class="QGraphicsView" name="gpsGraph"> <widget class="QGraphicsView" name="gpsGraph">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>370</x> <x>370</x>
<y>114</y> <y>114</y>
<width>191</width> <width>191</width>
<height>67</height> <height>67</height>
</rect> </rect>
</property> </property>
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed"> <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="toolTip"> <property name="toolTip">
<string extracomment="Individual satellite information"/> <string extracomment="Individual satellite information"/>
</property> </property>
</widget> </widget>
<widget class="QGroupBox" name="groupBox"> <widget class="QGroupBox" name="statusGroupBox">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>10</x> <x>10</x>
<y>4</y> <y>4</y>
<width>171</width> <width>171</width>
<height>177</height> <height>177</height>
</rect> </rect>
</property> </property>
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed"> <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="title"> <property name="title">
<string>GPS Status</string> <string>GPS Status</string>
</property> </property>
<layout class="QGridLayout" name="gridLayout"> <widget class="QWidget" name="formLayoutWidget">
<item row="4" column="0"> <property name="geometry">
<layout class="QHBoxLayout" name="horizontalLayout"> <rect>
<property name="spacing"> <x>0</x>
<number>15</number> <y>20</y>
</property> <width>171</width>
<property name="leftMargin"> <height>151</height>
<number>0</number> </rect>
</property> </property>
<property name="rightMargin"> <layout class="QFormLayout" name="formLayout">
<number>0</number> <property name="labelAlignment">
</property> <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
<item> </property>
<widget class="QLabel" name="label"> <property name="horizontalSpacing">
<property name="sizePolicy"> <number>12</number>
<sizepolicy hsizetype="Fixed" vsizetype="Fixed"> </property>
<horstretch>0</horstretch> <property name="verticalSpacing">
<verstretch>0</verstretch> <number>1</number>
</sizepolicy> </property>
</property> <item row="0" column="0">
<property name="minimumSize"> <widget class="QLabel" name="status_label">
<size> <property name="text">
<width>50</width> <string>Status:</string>
<height>0</height> </property>
</size> </widget>
</property> </item>
<property name="text"> <item row="0" column="1">
<string>Latitude:</string> <widget class="QLabel" name="status_value">
</property> <property name="text">
<property name="alignment"> <string>Unknown</string>
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> </property>
</property> </widget>
</widget> </item>
</item> <item row="1" column="0">
<item> <widget class="QLabel" name="lat_label">
<widget class="QLabel" name="lat_label"> <property name="text">
<property name="text"> <string>Latitude:</string>
<string>TextLabel</string> </property>
</property> </widget>
</widget> </item>
</item> <item row="1" column="1">
</layout> <widget class="QLabel" name="lat_value">
</item> <property name="text">
<item row="5" column="0"> <string>Unknown</string>
<layout class="QHBoxLayout" name="horizontalLayout_2"> </property>
<property name="spacing"> </widget>
<number>15</number> </item>
</property> <item row="2" column="0">
<property name="leftMargin"> <widget class="QLabel" name="long_label">
<number>0</number> <property name="text">
</property> <string>Longitude:</string>
<property name="rightMargin"> </property>
<number>0</number> </widget>
</property> </item>
<item> <item row="3" column="0">
<widget class="QLabel" name="label_9"> <widget class="QLabel" name="bear_label">
<property name="sizePolicy"> <property name="text">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed"> <string>Bearing:</string>
<horstretch>0</horstretch> </property>
<verstretch>0</verstretch> </widget>
</sizepolicy> </item>
</property> <item row="4" column="0">
<property name="minimumSize"> <widget class="QLabel" name="speed_label">
<size> <property name="text">
<width>50</width> <string>Speed:</string>
<height>0</height> </property>
</size> </widget>
</property> </item>
<property name="text"> <item row="5" column="0">
<string>Longitude:</string> <widget class="QLabel" name="fix_label">
</property> <property name="text">
<property name="alignment"> <string>Fix Type:</string>
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> </property>
</property> </widget>
</widget> </item>
</item> <item row="6" column="0">
<item> <widget class="QLabel" name="gtime_label">
<widget class="QLabel" name="long_label"> <property name="text">
<property name="text"> <string>GPS Time:</string>
<string>TextLabel</string> </property>
</property> </widget>
</widget> </item>
</item> <item row="7" column="0">
</layout> <widget class="QLabel" name="gdate_label">
</item> <property name="text">
<item row="6" column="0"> <string>GPS Date:</string>
<layout class="QHBoxLayout" name="horizontalLayout_3"> </property>
<property name="spacing"> </widget>
<number>15</number> </item>
</property> <item row="2" column="1">
<property name="leftMargin"> <widget class="QLabel" name="long_value">
<number>0</number> <property name="text">
</property> <string>Unknown</string>
<property name="rightMargin"> </property>
<number>0</number> </widget>
</property> </item>
<item> <item row="3" column="1">
<widget class="QLabel" name="label_11"> <widget class="QLabel" name="bear_value">
<property name="sizePolicy"> <property name="text">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed"> <string>Unknown</string>
<horstretch>0</horstretch> </property>
<verstretch>0</verstretch> </widget>
</sizepolicy> </item>
</property> <item row="4" column="1">
<property name="minimumSize"> <widget class="QLabel" name="speed_value">
<size> <property name="text">
<width>50</width> <string>Unknown</string>
<height>0</height> </property>
</size> </widget>
</property> </item>
<property name="text"> <item row="5" column="1">
<string>Bearing:</string> <widget class="QLabel" name="fix_value">
</property> <property name="text">
<property name="alignment"> <string>Unknown</string>
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> </property>
</property> </widget>
</widget> </item>
</item> <item row="6" column="1">
<item> <widget class="QLabel" name="gtime_value">
<widget class="QLabel" name="bear_label"> <property name="text">
<property name="text"> <string>Unknown</string>
<string>TextLabel</string> </property>
</property> </widget>
</widget> </item>
</item> <item row="7" column="1">
</layout> <widget class="QLabel" name="gdate_value">
</item> <property name="text">
<item row="7" column="0"> <string>Unknown</string>
<layout class="QHBoxLayout" name="horizontalLayout_5"> </property>
<property name="spacing"> </widget>
<number>15</number> </item>
</property> </layout>
<property name="leftMargin"> </widget>
<number>0</number> </widget>
</property> <widget class="QGroupBox" name="dataStreamGroupBox">
<property name="rightMargin"> <property name="geometry">
<number>0</number> <rect>
</property> <x>10</x>
<item> <y>180</y>
<widget class="QLabel" name="label_15"> <width>551</width>
<property name="sizePolicy"> <height>111</height>
<sizepolicy hsizetype="Fixed" vsizetype="Fixed"> </rect>
<horstretch>0</horstretch> </property>
<verstretch>0</verstretch> <property name="sizePolicy">
</sizepolicy> <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
</property> <horstretch>0</horstretch>
<property name="minimumSize"> <verstretch>0</verstretch>
<size> </sizepolicy>
<width>50</width> </property>
<height>0</height> <property name="title">
</size> <string>GPS Data Stream</string>
</property> </property>
<property name="text"> <widget class="QTextBrowser" name="textBrowser">
<string>Speed:</string> <property name="geometry">
</property> <rect>
<property name="alignment"> <x>0</x>
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> <y>40</y>
</property> <width>551</width>
</widget> <height>71</height>
</item> </rect>
<item> </property>
<widget class="QLabel" name="speed_label"> <property name="font">
<property name="text"> <font>
<string>TextLabel</string> <family>Courier New</family>
</property> <pointsize>8</pointsize>
</widget> </font>
</item> </property>
</layout> <property name="verticalScrollBarPolicy">
</item> <enum>Qt::ScrollBarAlwaysOn</enum>
<item row="8" column="0"> </property>
<layout class="QHBoxLayout" name="horizontalLayout_6"> <property name="lineWrapMode">
<property name="spacing"> <enum>QTextEdit::WidgetWidth</enum>
<number>15</number> </property>
</property> </widget>
<property name="leftMargin"> <widget class="QPushButton" name="connectButton">
<number>0</number> <property name="geometry">
</property> <rect>
<property name="rightMargin"> <x>360</x>
<number>0</number> <y>10</y>
</property> <width>75</width>
<item> <height>23</height>
<widget class="QLabel" name="label_17"> </rect>
<property name="sizePolicy"> </property>
<sizepolicy hsizetype="Fixed" vsizetype="Fixed"> <property name="text">
<horstretch>0</horstretch> <string>Connect</string>
<verstretch>0</verstretch> </property>
</sizepolicy> </widget>
</property> <widget class="QPushButton" name="pushButton_2">
<property name="minimumSize"> <property name="geometry">
<size> <rect>
<width>50</width> <x>450</x>
<height>0</height> <y>10</y>
</size> <width>75</width>
</property> <height>23</height>
<property name="text"> </rect>
<string>Fix Type:</string> </property>
</property> <property name="text">
<property name="alignment"> <string>Disconnect</string>
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> </property>
</property> </widget>
</widget> </widget>
</item> <widget class="QGraphicsView" name="flatEarth">
<item> <property name="geometry">
<widget class="QLabel" name="fix_label"> <rect>
<property name="text"> <x>370</x>
<string>TextLabel</string> <y>10</y>
</property> <width>191</width>
</widget> <height>95</height>
</item> </rect>
</layout> </property>
</item> <property name="sizePolicy">
<item row="9" column="0"> <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<layout class="QHBoxLayout" name="horizontalLayout_7"> <horstretch>0</horstretch>
<property name="spacing"> <verstretch>0</verstretch>
<number>15</number> </sizepolicy>
</property> </property>
<property name="leftMargin"> <property name="acceptDrops">
<number>0</number> <bool>false</bool>
</property> </property>
<property name="rightMargin"> <property name="toolTip">
<number>0</number> <string extracomment="Location of GCS on the Earth"/>
</property> </property>
<item> <property name="verticalScrollBarPolicy">
<widget class="QLabel" name="label_19"> <enum>Qt::ScrollBarAlwaysOff</enum>
<property name="sizePolicy"> </property>
<sizepolicy hsizetype="Fixed" vsizetype="Fixed"> <property name="horizontalScrollBarPolicy">
<horstretch>0</horstretch> <enum>Qt::ScrollBarAlwaysOff</enum>
<verstretch>0</verstretch> </property>
</sizepolicy> <property name="optimizationFlags">
</property> <set>QGraphicsView::DontAdjustForAntialiasing</set>
<property name="minimumSize"> </property>
<size> </widget>
<width>50</width> </widget>
<height>0</height> <resources/>
</size> <connections/>
</property> </ui>
<property name="text">
<string>GPS Time:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="gtime_label">
<property name="text">
<string>TextLabel</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="10" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_8">
<property name="spacing">
<number>15</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<item>
<widget class="QLabel" name="label_21">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>50</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>GPS Date:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="gdate_label">
<property name="text">
<string>TextLabel</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="2" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_4">
<property name="spacing">
<number>15</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<item>
<widget class="QLabel" name="label_13">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>50</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>Status:</string>
</property>
<property name="textFormat">
<enum>Qt::PlainText</enum>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_2">
<property name="text">
<string>Unknown</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<widget class="QGroupBox" name="groupBox_2">
<property name="geometry">
<rect>
<x>10</x>
<y>180</y>
<width>551</width>
<height>111</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>GPS Data Stream</string>
</property>
<widget class="QTextBrowser" name="textBrowser">
<property name="geometry">
<rect>
<x>0</x>
<y>40</y>
<width>551</width>
<height>71</height>
</rect>
</property>
<property name="font">
<font>
<family>Courier New</family>
<pointsize>8</pointsize>
</font>
</property>
<property name="verticalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOn</enum>
</property>
<property name="lineWrapMode">
<enum>QTextEdit::WidgetWidth</enum>
</property>
</widget>
<widget class="QPushButton" name="connectButton">
<property name="geometry">
<rect>
<x>360</x>
<y>10</y>
<width>75</width>
<height>23</height>
</rect>
</property>
<property name="text">
<string>Connect</string>
</property>
</widget>
<widget class="QPushButton" name="pushButton_2">
<property name="geometry">
<rect>
<x>450</x>
<y>10</y>
<width>75</width>
<height>23</height>
</rect>
</property>
<property name="text">
<string>Disconnect</string>
</property>
</widget>
</widget>
<widget class="QGraphicsView" name="flatEarth">
<property name="geometry">
<rect>
<x>370</x>
<y>10</y>
<width>191</width>
<height>95</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="acceptDrops">
<bool>false</bool>
</property>
<property name="toolTip">
<string extracomment="Location of GCS on the Earth"/>
</property>
<property name="verticalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOff</enum>
</property>
<property name="horizontalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOff</enum>
</property>
<property name="optimizationFlags">
<set>QGraphicsView::DontAdjustForAntialiasing</set>
</property>
</widget>
</widget>
<resources/>
<connections/>
</ui>