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

Slight UI tweaks.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1247 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
dankers 2010-08-08 20:47:32 +00:00 committed by dankers
parent f041569bfe
commit a39546591a
4 changed files with 457 additions and 122 deletions

View File

@ -76,6 +76,12 @@ GpsDisplayWidget::GpsDisplayWidget(QWidget *parent) : QWidget(parent)
widget->gpsWorld->setSizePolicy(QSizePolicy::Fixed,QSizePolicy::Fixed); widget->gpsWorld->setSizePolicy(QSizePolicy::Fixed,QSizePolicy::Fixed);
world->setScale(factor); world->setScale(factor);
//Not elegant, just load the image for now
QGraphicsScene *fescene = new QGraphicsScene(this);
QPixmap earthpix( ":/gpsgadget/images/flatEarth.png" );
fescene->addPixmap( earthpix );
widget->flatEarth->setScene(fescene);
connect(widget->connectButton, SIGNAL(clicked(bool)), connect(widget->connectButton, SIGNAL(clicked(bool)),
this,SLOT(connectButtonClicked())); this,SLOT(connectButtonClicked()));
parser=new NMEAParser(); parser=new NMEAParser();

View File

@ -6,115 +6,18 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>488</width> <width>570</width>
<height>279</height> <height>302</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
<string>Form</string> <string>Form</string>
</property> </property>
<widget class="QFrame" name="frame">
<property name="geometry">
<rect>
<x>10</x>
<y>10</y>
<width>281</width>
<height>91</height>
</rect>
</property>
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Sunken</enum>
</property>
<widget class="QLabel" name="label">
<property name="geometry">
<rect>
<x>10</x>
<y>10</y>
<width>251</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>Position:</string>
</property>
<property name="indent">
<number>-1</number>
</property>
</widget>
<widget class="QLabel" name="label_2">
<property name="geometry">
<rect>
<x>10</x>
<y>30</y>
<width>61</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>Fix:</string>
</property>
</widget>
<widget class="QLabel" name="label_3">
<property name="geometry">
<rect>
<x>10</x>
<y>50</y>
<width>111</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>Bearing:</string>
</property>
</widget>
<widget class="QLabel" name="label_4">
<property name="geometry">
<rect>
<x>150</x>
<y>50</y>
<width>111</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>Speed:</string>
</property>
</widget>
<widget class="QLabel" name="label_5">
<property name="geometry">
<rect>
<x>90</x>
<y>30</y>
<width>161</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>HDOP:</string>
</property>
</widget>
<widget class="QLabel" name="label_6">
<property name="geometry">
<rect>
<x>10</x>
<y>70</y>
<width>121</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>Time:</string>
</property>
</widget>
</widget>
<widget class="QPushButton" name="connectButton"> <widget class="QPushButton" name="connectButton">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>10</x> <x>483</x>
<y>110</y> <y>220</y>
<width>75</width> <width>75</width>
<height>23</height> <height>23</height>
</rect> </rect>
@ -126,7 +29,7 @@
<widget class="QGraphicsView" name="gpsWorld"> <widget class="QGraphicsView" name="gpsWorld">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>300</x> <x>190</x>
<y>10</y> <y>10</y>
<width>171</width> <width>171</width>
<height>171</height> <height>171</height>
@ -153,6 +56,9 @@
<property name="acceptDrops"> <property name="acceptDrops">
<bool>false</bool> <bool>false</bool>
</property> </property>
<property name="toolTip">
<string extracomment="Shows locations of satellites"/>
</property>
<property name="verticalScrollBarPolicy"> <property name="verticalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOff</enum> <enum>Qt::ScrollBarAlwaysOff</enum>
</property> </property>
@ -168,31 +74,30 @@
</rectf> </rectf>
</property> </property>
</widget> </widget>
<widget class="QGraphicsView" name="graphicsView_2"> <widget class="QGraphicsView" name="gpsGraph">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>100</x> <x>370</x>
<y>110</y> <y>114</y>
<width>191</width> <width>191</width>
<height>71</height> <height>67</height>
</rect> </rect>
</property> </property>
</widget> <property name="sizePolicy">
<widget class="QTextBrowser" name="textBrowser"> <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<property name="geometry"> <horstretch>0</horstretch>
<rect> <verstretch>0</verstretch>
<x>10</x> </sizepolicy>
<y>190</y> </property>
<width>461</width> <property name="toolTip">
<height>81</height> <string extracomment="Individual satellite information"/>
</rect>
</property> </property>
</widget> </widget>
<widget class="QPushButton" name="pushButton_2"> <widget class="QPushButton" name="pushButton_2">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>10</x> <x>483</x>
<y>140</y> <y>250</y>
<width>75</width> <width>75</width>
<height>23</height> <height>23</height>
</rect> </rect>
@ -201,6 +106,429 @@
<string>Disconnect</string> <string>Disconnect</string>
</property> </property>
</widget> </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>Lattitude:</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>190</y>
<width>461</width>
<height>101</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>10</x>
<y>20</y>
<width>441</width>
<height>71</height>
</rect>
</property>
<property name="verticalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOn</enum>
</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> </widget>
<resources/> <resources/>
<connections/> <connections/>

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

View File

@ -1,5 +1,6 @@
<RCC> <RCC>
<qresource prefix="/gpsgadget"> <qresource prefix="/gpsgadget">
<file>images/gpsEarth.svg</file> <file>images/gpsEarth.svg</file>
<file>images/flatEarth.png</file>
</qresource> </qresource>
</RCC> </RCC>