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

GPS Display gadget: also display SNR above each satellite bar in the display gadget.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2203 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
edouard 2010-12-08 17:22:55 +00:00 committed by edouard
parent 970b155870
commit d8db3087ca
3 changed files with 718 additions and 692 deletions

View File

@ -1,692 +1,697 @@
<?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>560</width> <width>579</width>
<height>376</height> <height>379</height>
</rect> </rect>
</property> </property>
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayoutTop"> <layout class="QVBoxLayout" name="verticalLayoutTop">
<property name="spacing"> <property name="spacing">
<number>0</number> <number>0</number>
</property> </property>
<property name="margin"> <property name="margin">
<number>6</number> <number>6</number>
</property> </property>
<item> <item>
<widget class="QSplitter" name="splitter"> <widget class="QSplitter" name="splitter">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding"> <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="orientation"> <property name="orientation">
<enum>Qt::Vertical</enum> <enum>Qt::Vertical</enum>
</property> </property>
<property name="childrenCollapsible"> <property name="childrenCollapsible">
<bool>true</bool> <bool>true</bool>
</property> </property>
<widget class="QWidget" name="layoutWidget"> <widget class="QWidget" name="layoutWidget">
<layout class="QGridLayout" name="gridLayout" rowstretch="1,0" columnstretch="1,0"> <layout class="QGridLayout" name="gridLayout" rowstretch="1,0" columnstretch="1,0">
<item row="0" column="0"> <item row="0" column="0">
<layout class="QVBoxLayout" name="infoVerticalLayout" stretch="0,0,0,0,0,0,0,0,0,0,0,0,0,1"> <layout class="QVBoxLayout" name="infoVerticalLayout" stretch="0,0,0,0,0,0,0,0,0,0,0,0,0,1">
<property name="spacing"> <property name="spacing">
<number>0</number> <number>0</number>
</property> </property>
<item> <item>
<layout class="QHBoxLayout" name="infoHorizontalLayout1" stretch="0,0,1,0,1,0,1"> <layout class="QHBoxLayout" name="infoHorizontalLayout1" stretch="0,0,1,0,1,0,1">
<property name="spacing"> <property name="spacing">
<number>0</number> <number>0</number>
</property> </property>
<item> <item>
<widget class="QLabel" name="lat_label"> <widget class="QLabel" name="lat_label">
<property name="text"> <property name="text">
<string>Coord:</string> <string>Coord:</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<spacer name="horizontalSpacer_4"> <spacer name="horizontalSpacer_4">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
<property name="sizeType"> <property name="sizeType">
<enum>QSizePolicy::Minimum</enum> <enum>QSizePolicy::Minimum</enum>
</property> </property>
<property name="sizeHint" stdset="0"> <property name="sizeHint" stdset="0">
<size> <size>
<width>6</width> <width>6</width>
<height>0</height> <height>0</height>
</size> </size>
</property> </property>
</spacer> </spacer>
</item> </item>
<item> <item>
<widget class="QLabel" name="coord_value"> <widget class="QLabel" name="coord_value">
<property name="text"> <property name="text">
<string>Unknown</string> <string>Unknown</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<spacer name="horizontalSpacer_5"> <spacer name="horizontalSpacer_5">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
<property name="sizeType"> <property name="sizeType">
<enum>QSizePolicy::Minimum</enum> <enum>QSizePolicy::Minimum</enum>
</property> </property>
<property name="sizeHint" stdset="0"> <property name="sizeHint" stdset="0">
<size> <size>
<width>6</width> <width>6</width>
<height>0</height> <height>0</height>
</size> </size>
</property> </property>
</spacer> </spacer>
</item> </item>
<item> <item>
<widget class="QLabel" name="coord_value_2"> <widget class="QLabel" name="coord_value_2">
<property name="text"> <property name="text">
<string>Unknown</string> <string>Unknown</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<spacer name="horizontalSpacer_6"> <spacer name="horizontalSpacer_6">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
<property name="sizeType"> <property name="sizeType">
<enum>QSizePolicy::Minimum</enum> <enum>QSizePolicy::Minimum</enum>
</property> </property>
<property name="sizeHint" stdset="0"> <property name="sizeHint" stdset="0">
<size> <size>
<width>6</width> <width>6</width>
<height>0</height> <height>0</height>
</size> </size>
</property> </property>
</spacer> </spacer>
</item> </item>
<item> <item>
<widget class="QLabel" name="coord_value_3"> <widget class="QLabel" name="coord_value_3">
<property name="text"> <property name="text">
<string>Unknown</string> <string>Unknown</string>
</property> </property>
</widget> </widget>
</item> </item>
</layout> </layout>
</item> </item>
<item> <item>
<spacer name="verticalSpacer_3"> <spacer name="verticalSpacer_3">
<property name="orientation"> <property name="orientation">
<enum>Qt::Vertical</enum> <enum>Qt::Vertical</enum>
</property> </property>
<property name="sizeType"> <property name="sizeType">
<enum>QSizePolicy::Preferred</enum> <enum>QSizePolicy::Preferred</enum>
</property> </property>
<property name="sizeHint" stdset="0"> <property name="sizeHint" stdset="0">
<size> <size>
<width>20</width> <width>20</width>
<height>6</height> <height>6</height>
</size> </size>
</property> </property>
</spacer> </spacer>
</item> </item>
<item> <item>
<layout class="QHBoxLayout" name="infoHorizontalLayout2" stretch="0,0,1,0,0,0,1"> <layout class="QHBoxLayout" name="infoHorizontalLayout2" stretch="0,0,1,0,0,0,1">
<property name="spacing"> <property name="spacing">
<number>0</number> <number>0</number>
</property> </property>
<item> <item>
<widget class="QLabel" name="speed_label"> <widget class="QLabel" name="speed_label">
<property name="text"> <property name="text">
<string>Speed:</string> <string>Speed:</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<spacer name="horizontalSpacer_7"> <spacer name="horizontalSpacer_7">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
<property name="sizeType"> <property name="sizeType">
<enum>QSizePolicy::Minimum</enum> <enum>QSizePolicy::Minimum</enum>
</property> </property>
<property name="sizeHint" stdset="0"> <property name="sizeHint" stdset="0">
<size> <size>
<width>6</width> <width>6</width>
<height>0</height> <height>0</height>
</size> </size>
</property> </property>
</spacer> </spacer>
</item> </item>
<item> <item>
<widget class="QLabel" name="speed_value"> <widget class="QLabel" name="speed_value">
<property name="text"> <property name="text">
<string>Unknown</string> <string>Unknown</string>
</property> </property>
<property name="scaledContents"> <property name="scaledContents">
<bool>true</bool> <bool>true</bool>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<spacer name="horizontalSpacer_9"> <spacer name="horizontalSpacer_9">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
<property name="sizeType"> <property name="sizeType">
<enum>QSizePolicy::Minimum</enum> <enum>QSizePolicy::Minimum</enum>
</property> </property>
<property name="sizeHint" stdset="0"> <property name="sizeHint" stdset="0">
<size> <size>
<width>6</width> <width>6</width>
<height>0</height> <height>0</height>
</size> </size>
</property> </property>
</spacer> </spacer>
</item> </item>
<item> <item>
<widget class="QLabel" name="bear_label"> <widget class="QLabel" name="bear_label">
<property name="text"> <property name="text">
<string>Heading:</string> <string>Heading:</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<spacer name="horizontalSpacer_8"> <spacer name="horizontalSpacer_8">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
<property name="sizeType"> <property name="sizeType">
<enum>QSizePolicy::Minimum</enum> <enum>QSizePolicy::Minimum</enum>
</property> </property>
<property name="sizeHint" stdset="0"> <property name="sizeHint" stdset="0">
<size> <size>
<width>6</width> <width>6</width>
<height>0</height> <height>0</height>
</size> </size>
</property> </property>
</spacer> </spacer>
</item> </item>
<item> <item>
<widget class="QLabel" name="bear_value"> <widget class="QLabel" name="bear_value">
<property name="text"> <property name="text">
<string>Unknown</string> <string>Unknown</string>
</property> </property>
</widget> </widget>
</item> </item>
</layout> </layout>
</item> </item>
<item> <item>
<spacer name="verticalSpacer_5"> <spacer name="verticalSpacer_5">
<property name="orientation"> <property name="orientation">
<enum>Qt::Vertical</enum> <enum>Qt::Vertical</enum>
</property> </property>
<property name="sizeType"> <property name="sizeType">
<enum>QSizePolicy::Preferred</enum> <enum>QSizePolicy::Preferred</enum>
</property> </property>
<property name="sizeHint" stdset="0"> <property name="sizeHint" stdset="0">
<size> <size>
<width>20</width> <width>20</width>
<height>4</height> <height>4</height>
</size> </size>
</property> </property>
</spacer> </spacer>
</item> </item>
<item> <item>
<widget class="Line" name="line1"> <widget class="Line" name="line1">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<spacer name="verticalSpacer_6"> <spacer name="verticalSpacer_6">
<property name="orientation"> <property name="orientation">
<enum>Qt::Vertical</enum> <enum>Qt::Vertical</enum>
</property> </property>
<property name="sizeType"> <property name="sizeType">
<enum>QSizePolicy::Preferred</enum> <enum>QSizePolicy::Preferred</enum>
</property> </property>
<property name="sizeHint" stdset="0"> <property name="sizeHint" stdset="0">
<size> <size>
<width>20</width> <width>20</width>
<height>4</height> <height>4</height>
</size> </size>
</property> </property>
</spacer> </spacer>
</item> </item>
<item> <item>
<layout class="QHBoxLayout" name="infoHorizontalLayout3" stretch="0,0,1"> <layout class="QHBoxLayout" name="infoHorizontalLayout3" stretch="0,0,1">
<item> <item>
<widget class="QLabel" name="label"> <widget class="QLabel" name="label">
<property name="text"> <property name="text">
<string>H / V / P DOP:</string> <string>H / V / P DOP:</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<spacer name="horizontalSpacer_13"> <spacer name="horizontalSpacer_13">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
<property name="sizeType"> <property name="sizeType">
<enum>QSizePolicy::Minimum</enum> <enum>QSizePolicy::Minimum</enum>
</property> </property>
<property name="sizeHint" stdset="0"> <property name="sizeHint" stdset="0">
<size> <size>
<width>6</width> <width>6</width>
<height>0</height> <height>0</height>
</size> </size>
</property> </property>
</spacer> </spacer>
</item> </item>
<item> <item>
<widget class="QLabel" name="dop_value"> <widget class="QLabel" name="dop_value">
<property name="text"> <property name="text">
<string>0 / 0 / 0</string> <string>0 / 0 / 0</string>
</property> </property>
</widget> </widget>
</item> </item>
</layout> </layout>
</item> </item>
<item> <item>
<spacer name="verticalSpacer_8"> <spacer name="verticalSpacer_8">
<property name="orientation"> <property name="orientation">
<enum>Qt::Vertical</enum> <enum>Qt::Vertical</enum>
</property> </property>
<property name="sizeType"> <property name="sizeType">
<enum>QSizePolicy::Preferred</enum> <enum>QSizePolicy::Preferred</enum>
</property> </property>
<property name="sizeHint" stdset="0"> <property name="sizeHint" stdset="0">
<size> <size>
<width>20</width> <width>20</width>
<height>4</height> <height>4</height>
</size> </size>
</property> </property>
</spacer> </spacer>
</item> </item>
<item> <item>
<widget class="Line" name="line2"> <widget class="Line" name="line2">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<spacer name="verticalSpacer_7"> <spacer name="verticalSpacer_7">
<property name="orientation"> <property name="orientation">
<enum>Qt::Vertical</enum> <enum>Qt::Vertical</enum>
</property> </property>
<property name="sizeType"> <property name="sizeType">
<enum>QSizePolicy::Preferred</enum> <enum>QSizePolicy::Preferred</enum>
</property> </property>
<property name="sizeHint" stdset="0"> <property name="sizeHint" stdset="0">
<size> <size>
<width>20</width> <width>20</width>
<height>4</height> <height>4</height>
</size> </size>
</property> </property>
</spacer> </spacer>
</item> </item>
<item> <item>
<layout class="QHBoxLayout" name="infoHorizontalLayout4" stretch="0,0,1"> <layout class="QHBoxLayout" name="infoHorizontalLayout4" stretch="0,0,1">
<property name="spacing"> <property name="spacing">
<number>0</number> <number>0</number>
</property> </property>
<item> <item>
<widget class="QLabel" name="status_label"> <widget class="QLabel" name="status_label">
<property name="text"> <property name="text">
<string>Sats Used:</string> <string>Sats Used:</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<spacer name="horizontalSpacer_10"> <spacer name="horizontalSpacer_10">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
<property name="sizeType"> <property name="sizeType">
<enum>QSizePolicy::Minimum</enum> <enum>QSizePolicy::Minimum</enum>
</property> </property>
<property name="sizeHint" stdset="0"> <property name="sizeHint" stdset="0">
<size> <size>
<width>6</width> <width>6</width>
<height>0</height> <height>0</height>
</size> </size>
</property> </property>
</spacer> </spacer>
</item> </item>
<item> <item>
<widget class="QLabel" name="status_value"> <widget class="QLabel" name="status_value">
<property name="text"> <property name="text">
<string>Unknown</string> <string>Unknown</string>
</property> </property>
</widget> </widget>
</item> </item>
</layout> </layout>
</item> </item>
<item> <item>
<spacer name="verticalSpacer_4"> <spacer name="verticalSpacer_4">
<property name="orientation"> <property name="orientation">
<enum>Qt::Vertical</enum> <enum>Qt::Vertical</enum>
</property> </property>
<property name="sizeType"> <property name="sizeType">
<enum>QSizePolicy::Preferred</enum> <enum>QSizePolicy::Preferred</enum>
</property> </property>
<property name="sizeHint" stdset="0"> <property name="sizeHint" stdset="0">
<size> <size>
<width>20</width> <width>20</width>
<height>6</height> <height>6</height>
</size> </size>
</property> </property>
</spacer> </spacer>
</item> </item>
<item> <item>
<layout class="QHBoxLayout" name="infoHorizontalLayout5" stretch="0,0,1,0,0"> <layout class="QHBoxLayout" name="infoHorizontalLayout5" stretch="0,0,1,0,0">
<property name="spacing"> <property name="spacing">
<number>0</number> <number>0</number>
</property> </property>
<item> <item>
<widget class="QLabel" name="fix_label"> <widget class="QLabel" name="fix_label">
<property name="text"> <property name="text">
<string>Fix Type:</string> <string>Fix Type:</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<spacer name="horizontalSpacer_11"> <spacer name="horizontalSpacer_11">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
<property name="sizeType"> <property name="sizeType">
<enum>QSizePolicy::Minimum</enum> <enum>QSizePolicy::Minimum</enum>
</property> </property>
<property name="sizeHint" stdset="0"> <property name="sizeHint" stdset="0">
<size> <size>
<width>6</width> <width>6</width>
<height>0</height> <height>0</height>
</size> </size>
</property> </property>
</spacer> </spacer>
</item> </item>
<item> <item>
<widget class="QLabel" name="fix_value"> <widget class="QLabel" name="fix_value">
<property name="text"> <property name="text">
<string>Unknown</string> <string>Unknown</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<spacer name="horizontalSpacer_12"> <spacer name="horizontalSpacer_12">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
<property name="sizeType"> <property name="sizeType">
<enum>QSizePolicy::Minimum</enum> <enum>QSizePolicy::Minimum</enum>
</property> </property>
<property name="sizeHint" stdset="0"> <property name="sizeHint" stdset="0">
<size> <size>
<width>6</width> <width>6</width>
<height>0</height> <height>0</height>
</size> </size>
</property> </property>
</spacer> </spacer>
</item> </item>
<item> <item>
<widget class="QLabel" name="time_value"> <widget class="QLabel" name="time_value">
<property name="text"> <property name="text">
<string>Unknown</string> <string>Unknown</string>
</property> </property>
</widget> </widget>
</item> </item>
</layout> </layout>
</item> </item>
<item> <item>
<spacer name="verticalSpacer"> <spacer name="verticalSpacer">
<property name="orientation"> <property name="orientation">
<enum>Qt::Vertical</enum> <enum>Qt::Vertical</enum>
</property> </property>
<property name="sizeType"> <property name="sizeType">
<enum>QSizePolicy::Ignored</enum> <enum>QSizePolicy::Ignored</enum>
</property> </property>
<property name="sizeHint" stdset="0"> <property name="sizeHint" stdset="0">
<size> <size>
<width>20</width> <width>20</width>
<height>40</height> <height>40</height>
</size> </size>
</property> </property>
</spacer> </spacer>
</item> </item>
</layout> </layout>
</item> </item>
<item row="1" column="0"> <item row="1" column="0">
<layout class="QHBoxLayout" name="horizontalLayout2" stretch="0,0,0,1,0"> <layout class="QHBoxLayout" name="horizontalLayout2" stretch="0,0,0,1,0">
<property name="spacing"> <property name="spacing">
<number>0</number> <number>0</number>
</property> </property>
<item> <item>
<spacer name="horizontalSpacer"> <spacer name="horizontalSpacer">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
<property name="sizeType"> <property name="sizeType">
<enum>QSizePolicy::Preferred</enum> <enum>QSizePolicy::Preferred</enum>
</property> </property>
<property name="sizeHint" stdset="0"> <property name="sizeHint" stdset="0">
<size> <size>
<width>9</width> <width>9</width>
<height>20</height> <height>20</height>
</size> </size>
</property> </property>
</spacer> </spacer>
</item> </item>
<item> <item>
<layout class="QVBoxLayout" name="verticalLayout"> <layout class="QVBoxLayout" name="verticalLayout">
<item> <item>
<widget class="QPushButton" name="connectButton"> <widget class="QPushButton" name="connectButton">
<property name="text"> <property name="text">
<string>Connect</string> <string>Connect</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QPushButton" name="disconnectButton"> <widget class="QPushButton" name="disconnectButton">
<property name="text"> <property name="text">
<string>Disconnect</string> <string>Disconnect</string>
</property> </property>
</widget> </widget>
</item> </item>
</layout> </layout>
</item> </item>
<item> <item>
<spacer name="horizontalSpacer_2"> <spacer name="horizontalSpacer_2">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
<property name="sizeType"> <property name="sizeType">
<enum>QSizePolicy::Preferred</enum> <enum>QSizePolicy::Preferred</enum>
</property> </property>
<property name="sizeHint" stdset="0"> <property name="sizeHint" stdset="0">
<size> <size>
<width>9</width> <width>9</width>
<height>20</height> <height>20</height>
</size> </size>
</property> </property>
</spacer> </spacer>
</item> </item>
<item> <item>
<spacer name="horizontalSpacer_3"> <spacer name="horizontalSpacer_3">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
<property name="sizeHint" stdset="0"> <property name="sizeHint" stdset="0">
<size> <size>
<width>0</width> <width>0</width>
<height>20</height> <height>20</height>
</size> </size>
</property> </property>
</spacer> </spacer>
</item> </item>
<item> <item>
<widget class="QGraphicsView" name="flatEarth"> <widget class="QGraphicsView" name="flatEarth">
<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>191</width> <width>191</width>
<height>95</height> <height>95</height>
</size> </size>
</property> </property>
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
<width>191</width> <width>191</width>
<height>95</height> <height>95</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="Location of GCS on the Earth"/> <string extracomment="Location of GCS on the Earth"/>
</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="optimizationFlags"> <property name="optimizationFlags">
<set>QGraphicsView::DontAdjustForAntialiasing</set> <set>QGraphicsView::DontAdjustForAntialiasing</set>
</property> </property>
</widget> </widget>
</item> </item>
</layout> </layout>
</item> </item>
<item row="1" column="1"> <item row="1" column="1">
<widget class="GpsSnrWidget" name="gpsSnrWidget"> <widget class="GpsSnrWidget" name="gpsSnrWidget">
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
<width>250</width> <width>250</width>
<height>95</height> <height>95</height>
</size> </size>
</property> </property>
<property name="verticalScrollBarPolicy"> <property name="toolTip">
<enum>Qt::ScrollBarAlwaysOff</enum> <string>Displays the SNR for each detected sat.
</property> Satellite number (PRN) is displayed inside the green bar.
<property name="horizontalScrollBarPolicy"> Sat SNR is displayed above (in dBHz)</string>
<enum>Qt::ScrollBarAlwaysOff</enum> </property>
</property> <property name="verticalScrollBarPolicy">
</widget> <enum>Qt::ScrollBarAlwaysOff</enum>
</item> </property>
<item row="0" column="1"> <property name="horizontalScrollBarPolicy">
<layout class="QVBoxLayout" name="verticalLayout_3" stretch="0,1"> <enum>Qt::ScrollBarAlwaysOff</enum>
<property name="spacing"> </property>
<number>0</number> </widget>
</property> </item>
<item> <item row="0" column="1">
<widget class="GpsConstellationWidget" name="gpsSky"> <layout class="QVBoxLayout" name="verticalLayout_3" stretch="0,1">
<property name="maximumSize"> <property name="spacing">
<size> <number>0</number>
<width>250</width> </property>
<height>250</height> <item>
</size> <widget class="GpsConstellationWidget" name="gpsSky">
</property> <property name="maximumSize">
<property name="verticalScrollBarPolicy"> <size>
<enum>Qt::ScrollBarAlwaysOff</enum> <width>250</width>
</property> <height>250</height>
<property name="horizontalScrollBarPolicy"> </size>
<enum>Qt::ScrollBarAlwaysOff</enum> </property>
</property> <property name="verticalScrollBarPolicy">
</widget> <enum>Qt::ScrollBarAlwaysOff</enum>
</item> </property>
<item> <property name="horizontalScrollBarPolicy">
<spacer name="verticalSpacer_2"> <enum>Qt::ScrollBarAlwaysOff</enum>
<property name="orientation"> </property>
<enum>Qt::Vertical</enum> </widget>
</property> </item>
<property name="sizeType"> <item>
<enum>QSizePolicy::Ignored</enum> <spacer name="verticalSpacer_2">
</property> <property name="orientation">
<property name="sizeHint" stdset="0"> <enum>Qt::Vertical</enum>
<size> </property>
<width>20</width> <property name="sizeType">
<height>40</height> <enum>QSizePolicy::Ignored</enum>
</size> </property>
</property> <property name="sizeHint" stdset="0">
</spacer> <size>
</item> <width>20</width>
</layout> <height>40</height>
</item> </size>
</layout> </property>
</widget> </spacer>
<widget class="QGroupBox" name="dataStreamGroupBox"> </item>
<property name="title"> </layout>
<string>GPS Data Stream</string> </item>
</property> </layout>
<layout class="QVBoxLayout" name="verticalLayout_4"> </widget>
<property name="margin"> <widget class="QGroupBox" name="dataStreamGroupBox">
<number>0</number> <property name="title">
</property> <string>GPS Data Stream</string>
<item> </property>
<widget class="QTextBrowser" name="textBrowser"> <layout class="QVBoxLayout" name="verticalLayout_4">
<property name="sizePolicy"> <property name="margin">
<sizepolicy hsizetype="Expanding" vsizetype="Ignored"> <number>0</number>
<horstretch>0</horstretch> </property>
<verstretch>0</verstretch> <item>
</sizepolicy> <widget class="QTextBrowser" name="textBrowser">
</property> <property name="sizePolicy">
<property name="minimumSize"> <sizepolicy hsizetype="Expanding" vsizetype="Ignored">
<size> <horstretch>0</horstretch>
<width>0</width> <verstretch>0</verstretch>
<height>50</height> </sizepolicy>
</size> </property>
</property> <property name="minimumSize">
<property name="verticalScrollBarPolicy"> <size>
<enum>Qt::ScrollBarAlwaysOn</enum> <width>0</width>
</property> <height>50</height>
<property name="lineWrapMode"> </size>
<enum>QTextEdit::WidgetWidth</enum> </property>
</property> <property name="verticalScrollBarPolicy">
<property name="acceptRichText"> <enum>Qt::ScrollBarAlwaysOn</enum>
<bool>false</bool> </property>
</property> <property name="lineWrapMode">
</widget> <enum>QTextEdit::WidgetWidth</enum>
</item> </property>
</layout> <property name="acceptRichText">
</widget> <bool>false</bool>
</widget> </property>
</item> </widget>
</layout> </item>
</widget> </layout>
<customwidgets> </widget>
<customwidget> </widget>
<class>GpsConstellationWidget</class> </item>
<extends>QGraphicsView</extends> </layout>
<header>gpsconstellationwidget.h</header> </widget>
</customwidget> <customwidgets>
<customwidget> <customwidget>
<class>GpsSnrWidget</class> <class>GpsConstellationWidget</class>
<extends>QGraphicsView</extends> <extends>QGraphicsView</extends>
<header>gpssnrwidget.h</header> <header>gpsconstellationwidget.h</header>
</customwidget> </customwidget>
</customwidgets> <customwidget>
<resources/> <class>GpsSnrWidget</class>
<connections/> <extends>QGraphicsView</extends>
</ui> <header>gpssnrwidget.h</header>
</customwidget>
</customwidgets>
<resources/>
<connections/>
</ui>

View File

@ -21,6 +21,11 @@ GpsSnrWidget::GpsSnrWidget(QWidget *parent) :
satTexts[i] = new QGraphicsSimpleTextItem("##",boxes[i]); satTexts[i] = new QGraphicsSimpleTextItem("##",boxes[i]);
satTexts[i]->setBrush(QColor("Black")); satTexts[i]->setBrush(QColor("Black"));
satTexts[i]->setFont(QFont("Courier")); satTexts[i]->setFont(QFont("Courier"));
satSNRs[i] = new QGraphicsSimpleTextItem("##",boxes[i]);
satSNRs[i]->setBrush(QColor("Black"));
satSNRs[i]->setFont(QFont("Courier"));
} }
} }
@ -108,6 +113,21 @@ void GpsSnrWidget::drawSat(int index) {
matrix.scale(scale,scale); matrix.scale(scale,scale);
matrix.translate(-textRect.width()/2,-textRect.height()); matrix.translate(-textRect.width()/2,-textRect.height());
satTexts[index]->setTransform(matrix,false); satTexts[index]->setTransform(matrix,false);
QString snrString = QString().number(snr);
if (snrString.length() ==1) { // Will probably never happen!
snrString = "0" + snrString;
}
satSNRs[index]->setText(snrString);
textRect = satSNRs[index]->boundingRect();
matrix.reset();
scale = 0.85 * (boxRect.width() / textRect.width());
matrix.translate( boxRect.width()/2,0);
matrix.scale(scale,scale);
matrix.translate(-textRect.width()/2,-textRect.height());
satSNRs[index]->setTransform(matrix,false);
} else { } else {
boxes[index]->hide(); boxes[index]->hide();
} }

View File

@ -22,6 +22,7 @@ private:
QGraphicsScene *scene; QGraphicsScene *scene;
QGraphicsRectItem *boxes[MAX_SATTELITES]; QGraphicsRectItem *boxes[MAX_SATTELITES];
QGraphicsSimpleTextItem* satTexts[MAX_SATTELITES]; QGraphicsSimpleTextItem* satTexts[MAX_SATTELITES];
QGraphicsSimpleTextItem* satSNRs[MAX_SATTELITES];
void drawSat(int index); void drawSat(int index);