1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-11-29 07:24:13 +01:00

Updated new map user controls

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@800 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
pip 2010-06-17 15:48:43 +00:00 committed by pip
parent 849c1096a7
commit e48edb21b8
3 changed files with 518 additions and 122 deletions

View File

@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>321</width>
<height>588</height>
<width>327</width>
<height>757</height>
</rect>
</property>
<property name="sizePolicy">
@ -36,13 +36,16 @@
<property name="windowTitle">
<string>OPMap Control Panel</string>
</property>
<property name="styleSheet">
<string notr="true">background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 rgba(210, 210, 210, 255), stop:1 rgba(180, 180, 180, 255));</string>
</property>
<widget class="QWidget" name="layoutWidget">
<property name="geometry">
<rect>
<x>5</x>
<y>7</y>
<width>309</width>
<height>561</height>
<x>0</x>
<y>10</y>
<width>318</width>
<height>731</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
@ -66,6 +69,12 @@
</property>
<item>
<widget class="QGroupBox" name="groupBox_5">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="title">
<string>MapType</string>
</property>
@ -83,15 +92,28 @@
<number>5</number>
</property>
<item>
<widget class="QComboBox" name="comboBox"/>
<widget class="QComboBox" name="comboBox">
<property name="font">
<font>
<weight>50</weight>
<bold>false</bold>
</font>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="title">
<string>Goto Place</string>
<string>Find Place</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@ -109,15 +131,35 @@
<item>
<layout class="QHBoxLayout" name="horizontalLayout_5">
<item>
<widget class="QLineEdit" name="lineEdit"/>
<widget class="QLineEdit" name="lineEdit">
<property name="font">
<font>
<weight>50</weight>
<bold>false</bold>
</font>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButtonGO">
<property name="font">
<font>
<weight>50</weight>
<bold>false</bold>
</font>
</property>
<property name="cursor">
<cursorShape>OpenHandCursor</cursorShape>
</property>
<property name="text">
<string>GO</string>
<string/>
</property>
<property name="icon">
<iconset resource="../coreplugin/core.qrc">
<normaloff>:/core/images/find.png</normaloff>:/core/images/find.png</iconset>
</property>
<property name="flat">
<bool>true</bool>
</property>
</widget>
</item>
@ -125,9 +167,20 @@
</item>
<item>
<widget class="QLabel" name="label">
<property name="font">
<font>
<pointsize>8</pointsize>
<weight>75</weight>
<italic>false</italic>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>GeoCoderStatusCode</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
</layout>
@ -135,6 +188,12 @@
</item>
<item>
<widget class="QGroupBox" name="groupBox_6">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="title">
<string>Way Points</string>
</property>
@ -155,21 +214,53 @@
<layout class="QHBoxLayout" name="horizontalLayout_6">
<item>
<widget class="QPushButton" name="pushButtonAddWayPoint">
<property name="font">
<font>
<weight>50</weight>
<bold>false</bold>
</font>
</property>
<property name="cursor">
<cursorShape>OpenHandCursor</cursorShape>
</property>
<property name="toolTip">
<string>Add a new Way Point</string>
</property>
<property name="text">
<string>Add</string>
<string/>
</property>
<property name="icon">
<iconset resource="../coreplugin/core.qrc">
<normaloff>:/core/images/plus.png</normaloff>:/core/images/plus.png</iconset>
</property>
<property name="flat">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButtonDeleteWayPoint">
<property name="font">
<font>
<weight>50</weight>
<bold>false</bold>
</font>
</property>
<property name="cursor">
<cursorShape>OpenHandCursor</cursorShape>
</property>
<property name="toolTip">
<string>Delete a Way Point</string>
</property>
<property name="text">
<string>Delete</string>
<string/>
</property>
<property name="icon">
<iconset resource="../coreplugin/core.qrc">
<normaloff>:/core/images/minus.png</normaloff>:/core/images/minus.png</iconset>
</property>
<property name="flat">
<bool>true</bool>
</property>
</widget>
</item>
@ -177,6 +268,12 @@
</item>
<item>
<widget class="QListView" name="listViewWayPoints">
<property name="font">
<font>
<weight>50</weight>
<bold>false</bold>
</font>
</property>
<property name="frameShape">
<enum>QFrame::WinPanel</enum>
</property>
@ -185,8 +282,249 @@
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_7">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="title">
<string>Home Geo Fence Distance</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
<property name="flat">
<bool>true</bool>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_7">
<item>
<widget class="QPushButton" name="pushButtonGeoFenceM">
<property name="font">
<font>
<weight>50</weight>
<bold>false</bold>
</font>
</property>
<property name="cursor">
<cursorShape>OpenHandCursor</cursorShape>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../coreplugin/core.qrc">
<normaloff>:/core/images/minus.png</normaloff>:/core/images/minus.png</iconset>
</property>
<property name="flat">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButtonGeoFenceP">
<property name="font">
<font>
<weight>50</weight>
<bold>false</bold>
</font>
</property>
<property name="cursor">
<cursorShape>OpenHandCursor</cursorShape>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../coreplugin/core.qrc">
<normaloff>:/core/images/plus.png</normaloff>:/core/images/plus.png</iconset>
</property>
<property name="flat">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_6">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>Meters</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="spinBoxGeoFenceDistance">
<property name="font">
<font>
<pointsize>9</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="minimum">
<number>50</number>
</property>
<property name="maximum">
<number>2000</number>
</property>
<property name="singleStep">
<number>50</number>
</property>
<property name="value">
<number>100</number>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_3">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="title">
<string>Zoom</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
<property name="flat">
<bool>true</bool>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<widget class="QPushButton" name="pushButtonZoomM">
<property name="font">
<font>
<weight>50</weight>
<bold>false</bold>
</font>
</property>
<property name="cursor">
<cursorShape>OpenHandCursor</cursorShape>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../coreplugin/core.qrc">
<normaloff>:/core/images/minus.png</normaloff>:/core/images/minus.png</iconset>
</property>
<property name="flat">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButtonZoomP">
<property name="font">
<font>
<weight>50</weight>
<bold>false</bold>
</font>
</property>
<property name="cursor">
<cursorShape>OpenHandCursor</cursorShape>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../coreplugin/core.qrc">
<normaloff>:/core/images/plus.png</normaloff>:/core/images/plus.png</iconset>
</property>
<property name="flat">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_4">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>Increment</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QDoubleSpinBox" name="doubleSpinBox">
<property name="font">
<font>
<pointsize>9</pointsize>
<weight>75</weight>
<italic>false</italic>
<bold>true</bold>
</font>
</property>
<property name="cursor">
<cursorShape>ArrowCursor</cursorShape>
</property>
<property name="singleStep">
<double>0.100000000000000</double>
</property>
<property name="value">
<double>1.000000000000000</double>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QLabel" name="label_5">
<property name="font">
<font>
<pointsize>9</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>CurrentZoom=</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_2">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="title">
<string>Rotate</string>
</property>
@ -205,31 +543,70 @@
</property>
<item>
<widget class="QPushButton" name="pushButtonRL">
<property name="font">
<font>
<weight>50</weight>
<bold>false</bold>
</font>
</property>
<property name="cursor">
<cursorShape>OpenHandCursor</cursorShape>
</property>
<property name="text">
<string>Left</string>
<string/>
</property>
<property name="icon">
<iconset resource="../coreplugin/core.qrc">
<normaloff>:/core/images/undo.png</normaloff>:/core/images/undo.png</iconset>
</property>
<property name="flat">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButtonRC">
<property name="font">
<font>
<weight>50</weight>
<bold>false</bold>
</font>
</property>
<property name="cursor">
<cursorShape>OpenHandCursor</cursorShape>
</property>
<property name="text">
<string>Center</string>
<string/>
</property>
<property name="icon">
<iconset resource="../coreplugin/core.qrc">
<normaloff>:/core/images/clear.png</normaloff>:/core/images/clear.png</iconset>
</property>
<property name="flat">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButtonRR">
<property name="font">
<font>
<weight>50</weight>
<bold>false</bold>
</font>
</property>
<property name="cursor">
<cursorShape>OpenHandCursor</cursorShape>
</property>
<property name="text">
<string>Right</string>
<string/>
</property>
<property name="icon">
<iconset resource="../coreplugin/core.qrc">
<normaloff>:/core/images/redo.png</normaloff>:/core/images/redo.png</iconset>
</property>
<property name="flat">
<bool>true</bool>
</property>
</widget>
</item>
@ -237,9 +614,16 @@
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_3">
<widget class="QGroupBox" name="groupBox_4">
<property name="font">
<font>
<weight>75</weight>
<italic>false</italic>
<bold>true</bold>
</font>
</property>
<property name="title">
<string>Zoom</string>
<string>Misc</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@ -247,137 +631,126 @@
<property name="flat">
<bool>true</bool>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<layout class="QVBoxLayout" name="verticalLayout_7">
<property name="topMargin">
<number>5</number>
</property>
<property name="bottomMargin">
<number>5</number>
</property>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<layout class="QHBoxLayout" name="horizontalLayout_4">
<item>
<widget class="QPushButton" name="pushButtonZoomP">
<widget class="QCheckBox" name="checkBox">
<property name="font">
<font>
<weight>50</weight>
<italic>false</italic>
<bold>false</bold>
</font>
</property>
<property name="cursor">
<cursorShape>OpenHandCursor</cursorShape>
</property>
<property name="text">
<string>+</string>
<string>ShowGridLines</string>
</property>
<property name="checked">
<bool>false</bool>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButtonZoomM">
<widget class="QCheckBox" name="checkBox_2">
<property name="font">
<font>
<weight>50</weight>
<italic>false</italic>
<bold>false</bold>
</font>
</property>
<property name="cursor">
<cursorShape>OpenHandCursor</cursorShape>
</property>
<property name="text">
<string>-</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_4">
<property name="text">
<string>ZoomIncrement</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QDoubleSpinBox" name="doubleSpinBox">
<property name="cursor">
<cursorShape>OpenHandCursor</cursorShape>
</property>
<property name="singleStep">
<double>0.100000000000000</double>
</property>
<property name="value">
<double>1.000000000000000</double>
<string>UseOpenGL</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QLabel" name="label_5">
<widget class="QPushButton" name="pushButton">
<property name="font">
<font>
<weight>50</weight>
<italic>false</italic>
<bold>false</bold>
</font>
</property>
<property name="cursor">
<cursorShape>OpenHandCursor</cursorShape>
</property>
<property name="styleSheet">
<string notr="true">background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 rgba(160, 160, 160, 255), stop:1 rgba(180, 180, 180, 255));</string>
</property>
<property name="text">
<string>CurrentZoom=</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_4">
<property name="title">
<string>Misc</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
<string>Reload Map</string>
</property>
<property name="flat">
<bool>true</bool>
<bool>false</bool>
</property>
<layout class="QVBoxLayout" name="verticalLayout_7">
<property name="topMargin">
<number>5</number>
</property>
<property name="bottomMargin">
<number>5</number>
</property>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_4">
<item>
<widget class="QCheckBox" name="checkBox">
<property name="cursor">
<cursorShape>OpenHandCursor</cursorShape>
</property>
<property name="text">
<string>ShowGridLines</string>
</property>
<property name="checked">
<bool>false</bool>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="checkBox_2">
<property name="cursor">
<cursorShape>OpenHandCursor</cursorShape>
</property>
<property name="text">
<string>UseOpenGL</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QPushButton" name="pushButton">
<property name="cursor">
<cursorShape>OpenHandCursor</cursorShape>
</property>
<property name="text">
<string>ReloadMap</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="Line" name="line">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QGroupBox" name="groupBox_8">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="title">
<string>Map Progress</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
<property name="flat">
<bool>true</bool>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<property name="topMargin">
<number>5</number>
</property>
<property name="bottomMargin">
<number>5</number>
</property>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QProgressBar" name="progressBar">
<widget class="QProgressBar" name="progressBarMap">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
@ -404,6 +777,8 @@
</layout>
</widget>
</widget>
<resources/>
<resources>
<include location="../coreplugin/core.qrc"/>
</resources>
<connections/>
</ui>

View File

@ -270,4 +270,23 @@ void OPMapGadgetWidget::on_checkBox_2_clicked(bool checked)
map->SetUseOpenGL(checked);
}
void OPMapGadgetWidget::on_pushButtonGeoFenceM_clicked()
{
int geo_fence_distance = controlpanel_ui->spinBoxGeoFenceDistance->value();
int step = controlpanel_ui->spinBoxGeoFenceDistance->singleStep();
controlpanel_ui->spinBoxGeoFenceDistance->setValue(geo_fence_distance - step);
geo_fence_distance = controlpanel_ui->spinBoxGeoFenceDistance->value();
}
void OPMapGadgetWidget::on_pushButtonGeoFenceP_clicked()
{
int geo_fence_distance = controlpanel_ui->spinBoxGeoFenceDistance->value();
int step = controlpanel_ui->spinBoxGeoFenceDistance->singleStep();
controlpanel_ui->spinBoxGeoFenceDistance->setValue(geo_fence_distance + step);
geo_fence_distance = controlpanel_ui->spinBoxGeoFenceDistance->value();
}
// *************************************************************************************

View File

@ -68,6 +68,8 @@ private slots:
void on_pushButtonRL_clicked();
void on_pushButtonZoomM_clicked();
void on_pushButtonZoomP_clicked();
void on_pushButtonGeoFenceM_clicked();
void on_pushButtonGeoFenceP_clicked();
void zoomChanged(double zoom);
void on_checkBox_2_clicked(bool checked);