From 1cdaf2ecdc8dd910eff291170dd19278dcbbaa3f Mon Sep 17 00:00:00 2001 From: cranphin Date: Sat, 28 Aug 2010 23:14:31 +0000 Subject: [PATCH] Some cleanup, renamed labels/values, tidier layout. git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1450 ebee16cc-31ac-478f-84a7-5cbb03baadba --- .../plugins/gpsdisplay/gpsdisplaywidget.cpp | 32 +- .../plugins/gpsdisplay/gpsdisplaywidget.ui | 880 +++++++----------- 2 files changed, 352 insertions(+), 560 deletions(-) diff --git a/ground/src/plugins/gpsdisplay/gpsdisplaywidget.cpp b/ground/src/plugins/gpsdisplay/gpsdisplaywidget.cpp index 068174a1e..08125df3d 100644 --- a/ground/src/plugins/gpsdisplay/gpsdisplaywidget.cpp +++ b/ground/src/plugins/gpsdisplay/gpsdisplaywidget.cpp @@ -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); } diff --git a/ground/src/plugins/gpsdisplay/gpsdisplaywidget.ui b/ground/src/plugins/gpsdisplay/gpsdisplaywidget.ui index b5db3ad48..83a5a3e16 100644 --- a/ground/src/plugins/gpsdisplay/gpsdisplaywidget.ui +++ b/ground/src/plugins/gpsdisplay/gpsdisplaywidget.ui @@ -1,544 +1,336 @@ - - - GpsDisplayWidget - - - - 0 - 0 - 570 - 302 - - - - Form - - - - - 190 - 10 - 171 - 171 - - - - - 0 - 0 - - - - - 171 - 171 - - - - - 171 - 171 - - - - false - - - - - - Qt::ScrollBarAlwaysOff - - - Qt::ScrollBarAlwaysOff - - - - 0.000000000000000 - 0.000000000000000 - 169.000000000000000 - 169.000000000000000 - - - - - - - 370 - 114 - 191 - 67 - - - - - 0 - 0 - - - - - - - - - - 10 - 4 - 171 - 177 - - - - - 0 - 0 - - - - GPS Status - - - - - - 15 - - - 0 - - - 0 - - - - - - 0 - 0 - - - - - 50 - 0 - - - - Latitude: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - TextLabel - - - - - - - - - 15 - - - 0 - - - 0 - - - - - - 0 - 0 - - - - - 50 - 0 - - - - Longitude: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - TextLabel - - - - - - - - - 15 - - - 0 - - - 0 - - - - - - 0 - 0 - - - - - 50 - 0 - - - - Bearing: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - TextLabel - - - - - - - - - 15 - - - 0 - - - 0 - - - - - - 0 - 0 - - - - - 50 - 0 - - - - Speed: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - TextLabel - - - - - - - - - 15 - - - 0 - - - 0 - - - - - - 0 - 0 - - - - - 50 - 0 - - - - Fix Type: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - TextLabel - - - - - - - - - 15 - - - 0 - - - 0 - - - - - - 0 - 0 - - - - - 50 - 0 - - - - GPS Time: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - TextLabel - - - - - - - - - 15 - - - 0 - - - 0 - - - - - - 0 - 0 - - - - - 50 - 0 - - - - GPS Date: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - TextLabel - - - - - - - - - 15 - - - 0 - - - 0 - - - - - - 0 - 0 - - - - - 50 - 0 - - - - Status: - - - Qt::PlainText - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - Unknown - - - - - - - - - - - 10 - 180 - 551 - 111 - - - - - 0 - 0 - - - - GPS Data Stream - - - - - 0 - 40 - 551 - 71 - - - - - Courier New - 8 - - - - Qt::ScrollBarAlwaysOn - - - QTextEdit::WidgetWidth - - - - - - 360 - 10 - 75 - 23 - - - - Connect - - - - - - 450 - 10 - 75 - 23 - - - - Disconnect - - - - - - - 370 - 10 - 191 - 95 - - - - - 0 - 0 - - - - false - - - - - - Qt::ScrollBarAlwaysOff - - - Qt::ScrollBarAlwaysOff - - - QGraphicsView::DontAdjustForAntialiasing - - - - - - + + + GpsDisplayWidget + + + + 0 + 0 + 570 + 302 + + + + Form + + + + + 190 + 10 + 171 + 171 + + + + + 0 + 0 + + + + + 171 + 171 + + + + + 171 + 171 + + + + false + + + + + + Qt::ScrollBarAlwaysOff + + + Qt::ScrollBarAlwaysOff + + + + 0.000000000000000 + 0.000000000000000 + 169.000000000000000 + 169.000000000000000 + + + + + + + 370 + 114 + 191 + 67 + + + + + 0 + 0 + + + + + + + + + + 10 + 4 + 171 + 177 + + + + + 0 + 0 + + + + GPS Status + + + + + 0 + 20 + 171 + 151 + + + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + 12 + + + 1 + + + + + Status: + + + + + + + Unknown + + + + + + + Latitude: + + + + + + + Unknown + + + + + + + Longitude: + + + + + + + Bearing: + + + + + + + Speed: + + + + + + + Fix Type: + + + + + + + GPS Time: + + + + + + + GPS Date: + + + + + + + Unknown + + + + + + + Unknown + + + + + + + Unknown + + + + + + + Unknown + + + + + + + Unknown + + + + + + + Unknown + + + + + + + + + + 10 + 180 + 551 + 111 + + + + + 0 + 0 + + + + GPS Data Stream + + + + + 0 + 40 + 551 + 71 + + + + + Courier New + 8 + + + + Qt::ScrollBarAlwaysOn + + + QTextEdit::WidgetWidth + + + + + + 360 + 10 + 75 + 23 + + + + Connect + + + + + + 450 + 10 + 75 + 23 + + + + Disconnect + + + + + + + 370 + 10 + 191 + 95 + + + + + 0 + 0 + + + + false + + + + + + Qt::ScrollBarAlwaysOff + + + Qt::ScrollBarAlwaysOff + + + QGraphicsView::DontAdjustForAntialiasing + + + + + +