1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-17 02:52:12 +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(" Heaging: ");
temp.append(QString::number(heading,'g',10));
widget->speed_label->setText(QString::number(speed,'g',10));
widget->speed_label->adjustSize();
widget->bear_label->setText(QString::number(heading,'g',10));
widget->bear_label->adjustSize();
widget->speed_value->setText(QString::number(speed,'g',10));
widget->speed_value->adjustSize();
widget->bear_value->setText(QString::number(heading,'g',10));
widget->bear_value->adjustSize();
// widget->textBrowser->append(temp);
}
@ -108,10 +108,10 @@ void GpsDisplayWidget::setDateTime(double date, double time)
temp.append(QString::number(date,'g',10));
temp.append(" Time: ");
temp.append(QString::number(time,'g',10));
widget->gdate_label->setText(QString::number(date,'g',10));
widget->gdate_label->adjustSize();
widget->gtime_label->setText(QString::number(time,'g',10));
widget->gdate_label->adjustSize();
widget->gdate_value->setText(QString::number(date,'g',10));
widget->gdate_value->adjustSize();
widget->gtime_value->setText(QString::number(time,'g',10));
widget->gdate_value->adjustSize();
//widget->textBrowser->append(temp);
}
@ -125,8 +125,8 @@ void GpsDisplayWidget::setSVs(int sv)
{
QString temp = "Fix: Sats: ";
temp.append(QString::number(sv));
widget->label_2->setText(temp);
widget->label_2->adjustSize();
widget->status_value->setText(temp);
widget->status_value->adjustSize();
}
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(" ");
temp.append(QString::number(alt,'g',10));
widget->lat_label->setText(QString::number(lat,'g',10));
widget->lat_label->adjustSize();
widget->long_label->setText(QString::number(lon,'g',10));
widget->long_label->adjustSize();
//widget->alt_label->setText(QString::number(alt,'g',10));
//widget->alt_label->adjustSize();
widget->lat_value->setText(QString::number(lat,'g',10));
widget->lat_value->adjustSize();
widget->long_value->setText(QString::number(lon,'g',10));
widget->long_value->adjustSize();
//widget->alt_value->setText(QString::number(alt,'g',10));
//widget->alt_value->adjustSize();
//widget->textBrowser->append(temp);
}

View File

@ -1,544 +1,336 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>GpsDisplayWidget</class>
<widget class="QWidget" name="GpsDisplayWidget">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>570</width>
<height>302</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<widget class="QGraphicsView" name="gpsWorld">
<property name="geometry">
<rect>
<x>190</x>
<y>10</y>
<width>171</width>
<height>171</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>171</width>
<height>171</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>171</width>
<height>171</height>
</size>
</property>
<property name="acceptDrops">
<bool>false</bool>
</property>
<property name="toolTip">
<string extracomment="Shows locations of satellites"/>
</property>
<property name="verticalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOff</enum>
</property>
<property name="horizontalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOff</enum>
</property>
<property name="sceneRect">
<rectf>
<x>0.000000000000000</x>
<y>0.000000000000000</y>
<width>169.000000000000000</width>
<height>169.000000000000000</height>
</rectf>
</property>
</widget>
<widget class="QGraphicsView" name="gpsGraph">
<property name="geometry">
<rect>
<x>370</x>
<y>114</y>
<width>191</width>
<height>67</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string extracomment="Individual satellite information"/>
</property>
</widget>
<widget class="QGroupBox" name="groupBox">
<property name="geometry">
<rect>
<x>10</x>
<y>4</y>
<width>171</width>
<height>177</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>GPS Status</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="4" column="0">
<layout class="QHBoxLayout" name="horizontalLayout">
<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">
<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>Latitude:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="lat_label">
<property name="text">
<string>TextLabel</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="5" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_2">
<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_9">
<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>Longitude:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="long_label">
<property name="text">
<string>TextLabel</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="6" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_3">
<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_11">
<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>Bearing:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="bear_label">
<property name="text">
<string>TextLabel</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="7" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_5">
<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_15">
<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>Speed:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="speed_label">
<property name="text">
<string>TextLabel</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="8" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_6">
<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_17">
<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>Fix Type:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="fix_label">
<property name="text">
<string>TextLabel</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="9" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_7">
<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_19">
<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 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>
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>GpsDisplayWidget</class>
<widget class="QWidget" name="GpsDisplayWidget">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>570</width>
<height>302</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<widget class="QGraphicsView" name="gpsWorld">
<property name="geometry">
<rect>
<x>190</x>
<y>10</y>
<width>171</width>
<height>171</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>171</width>
<height>171</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>171</width>
<height>171</height>
</size>
</property>
<property name="acceptDrops">
<bool>false</bool>
</property>
<property name="toolTip">
<string extracomment="Shows locations of satellites"/>
</property>
<property name="verticalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOff</enum>
</property>
<property name="horizontalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOff</enum>
</property>
<property name="sceneRect">
<rectf>
<x>0.000000000000000</x>
<y>0.000000000000000</y>
<width>169.000000000000000</width>
<height>169.000000000000000</height>
</rectf>
</property>
</widget>
<widget class="QGraphicsView" name="gpsGraph">
<property name="geometry">
<rect>
<x>370</x>
<y>114</y>
<width>191</width>
<height>67</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string extracomment="Individual satellite information"/>
</property>
</widget>
<widget class="QGroupBox" name="statusGroupBox">
<property name="geometry">
<rect>
<x>10</x>
<y>4</y>
<width>171</width>
<height>177</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>GPS Status</string>
</property>
<widget class="QWidget" name="formLayoutWidget">
<property name="geometry">
<rect>
<x>0</x>
<y>20</y>
<width>171</width>
<height>151</height>
</rect>
</property>
<layout class="QFormLayout" name="formLayout">
<property name="labelAlignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
</property>
<property name="horizontalSpacing">
<number>12</number>
</property>
<property name="verticalSpacing">
<number>1</number>
</property>
<item row="0" column="0">
<widget class="QLabel" name="status_label">
<property name="text">
<string>Status:</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="status_value">
<property name="text">
<string>Unknown</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="lat_label">
<property name="text">
<string>Latitude:</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLabel" name="lat_value">
<property name="text">
<string>Unknown</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="long_label">
<property name="text">
<string>Longitude:</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="bear_label">
<property name="text">
<string>Bearing:</string>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="speed_label">
<property name="text">
<string>Speed:</string>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QLabel" name="fix_label">
<property name="text">
<string>Fix Type:</string>
</property>
</widget>
</item>
<item row="6" column="0">
<widget class="QLabel" name="gtime_label">
<property name="text">
<string>GPS Time:</string>
</property>
</widget>
</item>
<item row="7" column="0">
<widget class="QLabel" name="gdate_label">
<property name="text">
<string>GPS Date:</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLabel" name="long_value">
<property name="text">
<string>Unknown</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QLabel" name="bear_value">
<property name="text">
<string>Unknown</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QLabel" name="speed_value">
<property name="text">
<string>Unknown</string>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QLabel" name="fix_value">
<property name="text">
<string>Unknown</string>
</property>
</widget>
</item>
<item row="6" column="1">
<widget class="QLabel" name="gtime_value">
<property name="text">
<string>Unknown</string>
</property>
</widget>
</item>
<item row="7" column="1">
<widget class="QLabel" name="gdate_value">
<property name="text">
<string>Unknown</string>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
<widget class="QGroupBox" name="dataStreamGroupBox">
<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>