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

@ -80,7 +80,7 @@
<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>
@ -98,349 +98,141 @@
<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>
<width>171</width>
<height>151</height>
</rect>
</property> </property>
<property name="leftMargin"> <layout class="QFormLayout" name="formLayout">
<number>0</number> <property name="labelAlignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
</property> </property>
<property name="rightMargin"> <property name="horizontalSpacing">
<number>0</number> <number>12</number>
</property> </property>
<item> <property name="verticalSpacing">
<widget class="QLabel" name="label"> <number>1</number>
<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>
<item row="0" column="0">
<widget class="QLabel" name="status_label">
<property name="text"> <property name="text">
<string>Status:</string> <string>Status:</string>
</property> </property>
<property name="textFormat"> </widget>
<enum>Qt::PlainText</enum> </item>
</property> <item row="0" column="1">
<property name="alignment"> <widget class="QLabel" name="status_value">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> <property name="text">
<string>Unknown</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item row="1" column="0">
<widget class="QLabel" name="label_2"> <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"> <property name="text">
<string>Unknown</string> <string>Unknown</string>
</property> </property>
</widget> </widget>
</item> </item>
</layout> </layout>
</item>
</layout>
</widget> </widget>
<widget class="QGroupBox" name="groupBox_2"> </widget>
<widget class="QGroupBox" name="dataStreamGroupBox">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>10</x> <x>10</x>