Updated user controls on the new map plug-in
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@875 ebee16cc-31ac-478f-84a7-5cbb03baadba
BIN
ground/src/plugins/opmap/images/button_bar.png
Normal file
After Width: | Height: | Size: 210 B |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1006 B After Width: | Height: | Size: 1006 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.3 KiB |
@ -18,6 +18,5 @@ SOURCES += opmapplugin.cpp \
|
||||
opmapgadget.cpp
|
||||
OTHER_FILES += OPMapGadget.pluginspec
|
||||
FORMS += opmapgadgetoptionspage.ui \
|
||||
opmap_controlpanel.ui \
|
||||
opmap_widget.ui
|
||||
RESOURCES += opmap.qrc
|
||||
|
@ -1,17 +1,15 @@
|
||||
<RCC>
|
||||
<qresource prefix="/opmap">
|
||||
<file>images/uav.png</file>
|
||||
<file>images/waypoint.png</file>
|
||||
<file>images/minus.png</file>
|
||||
<file>images/plus.png</file>
|
||||
<file>images/ok.png</file>
|
||||
<file>images/gcs.png</file>
|
||||
<file>images/pause.png</file>
|
||||
<file>images/stop.png</file>
|
||||
<file>images/circle.png</file>
|
||||
<file>images/go.png</file>
|
||||
<file>images/home.png</file>
|
||||
<file>images/hover.png</file>
|
||||
<file>images/hold.png</file>
|
||||
<file>images/uav.png</file>
|
||||
<file>images/gcs.png</file>
|
||||
<file>images/plus.png</file>
|
||||
<file>images/minus.png</file>
|
||||
<file>images/waypoint.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
@ -1,234 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>OPMapControlPanel</class>
|
||||
<widget class="QWidget" name="OPMapControlPanel">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>606</width>
|
||||
<height>83</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>7</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>OPMap Control Panel</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="layoutWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>40</y>
|
||||
<width>579</width>
|
||||
<height>25</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_7">
|
||||
<property name="leftMargin">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_13">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>8</pointsize>
|
||||
<weight>50</weight>
|
||||
<italic>false</italic>
|
||||
<bold>false</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color: rgba(255, 255, 255, 0);
|
||||
color: rgb(255, 255, 255, 200);</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Home Geo Fence Distance</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="spinBoxGeoFenceDistance">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>8</pointsize>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color: rgba(255, 255, 255, 0);
|
||||
color: rgb(255, 255, 255);</string>
|
||||
</property>
|
||||
<property name="frame">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="buttonSymbols">
|
||||
<enum>QAbstractSpinBox::NoButtons</enum>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>10</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>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>8</pointsize>
|
||||
<weight>50</weight>
|
||||
<bold>false</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color: rgba(255, 255, 255, 0);
|
||||
color: rgb(255, 255, 255);</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Meters</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<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="iconSize">
|
||||
<size>
|
||||
<width>12</width>
|
||||
<height>12</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="autoRepeat">
|
||||
<bool>true</bool>
|
||||
</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="styleSheet">
|
||||
<string notr="true">QPushButton {
|
||||
border-color: rgba(0, 0, 0, 0);
|
||||
}
|
||||
QPushButton:hover {
|
||||
background-color: qradialgradient(spread:pad, cx:0.5, cy:0.5, radius:0.1, fx:0.5, fy:0.5, stop:0 rgba(255, 0, 0, 255), stop:0.479904 rgba(255, 0, 0, 255), stop:0.522685 rgba(255, 255, 255, 255), stop:1 rgba(255, 255, 255, 0));
|
||||
}
|
||||
</string>
|
||||
</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="iconSize">
|
||||
<size>
|
||||
<width>12</width>
|
||||
<height>12</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="autoRepeat">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="autoDefault">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="default">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="flat">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<zorder>layoutWidget</zorder>
|
||||
<zorder>label_6</zorder>
|
||||
</widget>
|
||||
<resources>
|
||||
<include location="../coreplugin/core.qrc"/>
|
||||
</resources>
|
||||
<connections/>
|
||||
</ui>
|
@ -30,7 +30,7 @@
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="layoutWidget_7">
|
||||
<layout class="QHBoxLayout" name="layoutWidgetToolBar">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
@ -54,14 +54,17 @@
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="autoFillBackground">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color: rgb(72, 72, 72);</string>
|
||||
<string notr="true">background-color: qlineargradient(spread:pad, x1:0.5, y1:0, x2:0.5, y2:1, stop:0 rgba(71, 71, 71, 255), stop:1 rgba(120, 120, 120, 255));</string>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
<enum>QFrame::Plain</enum>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<property name="spacing">
|
||||
@ -77,7 +80,7 @@
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
<number>5</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="layoutWidget_8">
|
||||
@ -102,7 +105,7 @@
|
||||
<string>Show/Hide Flight Controls</string>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color: rgba(255, 255, 255, 0);
|
||||
<string notr="true">background-color: rgba(71, 71, 71, 0);
|
||||
color: rgb(255, 255, 255);</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
@ -139,8 +142,9 @@ color: rgb(255, 255, 255);</string>
|
||||
<string>Find place</string>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color: rgba(255, 255, 255, 0);
|
||||
color: rgb(255, 255, 255);</string>
|
||||
<string notr="true">background-color: rgba(71, 71, 71, 0);
|
||||
color: rgb(255, 255, 255);
|
||||
</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
@ -179,240 +183,13 @@ color: rgb(255, 255, 255);</string>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="toolButtonZoomM">
|
||||
<property name="toolTip">
|
||||
<string>Zoom out</string>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color: rgba(255, 255, 255, 0);
|
||||
color: rgb(255, 255, 255);</string>
|
||||
</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="iconSize">
|
||||
<size>
|
||||
<width>16</width>
|
||||
<height>16</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="autoRaise">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="toolButtonZoomP">
|
||||
<property name="toolTip">
|
||||
<string>Zoom in</string>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color: rgba(255, 255, 255, 0);
|
||||
color: rgb(255, 255, 255);</string>
|
||||
</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="iconSize">
|
||||
<size>
|
||||
<width>16</width>
|
||||
<height>16</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="autoRaise">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="comboBoxZoom">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Zoom level</string>
|
||||
</property>
|
||||
<property name="autoFillBackground">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color: rgba(128, 128, 128, 0);
|
||||
color: rgb(255, 255, 255);
|
||||
</string>
|
||||
</property>
|
||||
<property name="maxVisibleItems">
|
||||
<number>20</number>
|
||||
</property>
|
||||
<property name="frame">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_6">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="toolButtonRL">
|
||||
<property name="toolTip">
|
||||
<string>Rotate anticlockwise</string>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color: rgba(255, 255, 255, 0);
|
||||
color: rgb(255, 255, 255);</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../coreplugin/core.qrc">
|
||||
<normaloff>:/core/images/undo.png</normaloff>:/core/images/undo.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>16</width>
|
||||
<height>16</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="autoRepeat">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="autoRaise">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="toolButtonRC">
|
||||
<property name="toolTip">
|
||||
<string>Reset rotation</string>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color: rgba(255, 255, 255, 0);
|
||||
color: rgb(255, 255, 255);</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../coreplugin/core.qrc">
|
||||
<normaloff>:/core/images/clear.png</normaloff>:/core/images/clear.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>16</width>
|
||||
<height>16</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="autoRaise">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="toolButtonRR">
|
||||
<property name="toolTip">
|
||||
<string>Rotate clockwise</string>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color: rgba(255, 255, 255, 0);
|
||||
color: rgb(255, 255, 255);</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../coreplugin/core.qrc">
|
||||
<normaloff>:/core/images/redo.png</normaloff>:/core/images/redo.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>16</width>
|
||||
<height>16</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="autoRepeat">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="autoRaise">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="labelRotate">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>8</pointsize>
|
||||
<weight>50</weight>
|
||||
<bold>false</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color: rgba(255, 255, 255, 0);
|
||||
color: rgb(255, 255, 255);</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Rotate</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_7">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="toolButtonMapHome">
|
||||
<property name="toolTip">
|
||||
<string>Center map over home position</string>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color: rgba(255, 255, 255, 0);
|
||||
<string notr="true">background-color: rgba(71, 71, 71, 0);
|
||||
color: rgb(255, 255, 255);</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
@ -442,7 +219,7 @@ color: rgb(255, 255, 255);</string>
|
||||
<string>Center map over UAV position</string>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color: rgba(255, 255, 255, 0);
|
||||
<string notr="true">background-color: rgba(71, 71, 71, 0);
|
||||
color: rgb(255, 255, 255);</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
@ -491,7 +268,7 @@ color: rgb(255, 255, 255);</string>
|
||||
<string>Add a waypoint</string>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color: rgba(255, 255, 255, 0);
|
||||
<string notr="true">background-color: rgba(71, 71, 71, 0);
|
||||
color: rgb(255, 255, 255);</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
@ -515,6 +292,118 @@ color: rgb(255, 255, 255);</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_6">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="toolButtonZoomM">
|
||||
<property name="toolTip">
|
||||
<string>Zoom out</string>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color: rgba(71, 71, 71, 0);
|
||||
color: rgb(255, 255, 255);</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="opmap.qrc">
|
||||
<normaloff>:/opmap/images/minus.png</normaloff>:/opmap/images/minus.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>16</width>
|
||||
<height>16</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="autoRaise">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="toolButtonZoomP">
|
||||
<property name="toolTip">
|
||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;">
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt; color:#ffffff;">Zoom in</span></p></body></html></string>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color: rgba(71, 71, 71, 0);
|
||||
color: rgb(255, 255, 255);</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="opmap.qrc">
|
||||
<normaloff>:/opmap/images/plus.png</normaloff>:/opmap/images/plus.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>16</width>
|
||||
<height>16</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="autoRaise">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSlider" name="horizontalSliderZoom">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>130</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>130</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color: rgba(255, 255, 255, 0);
|
||||
color: rgb(255, 255, 255);</string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>19</number>
|
||||
</property>
|
||||
<property name="pageStep">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
@ -540,7 +429,7 @@ color: rgb(255, 255, 255);</string>
|
||||
<string>Reload map</string>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color: rgba(255, 255, 255, 0);
|
||||
<string notr="true">background-color: rgba(71, 71, 71, 0);
|
||||
color: rgb(255, 255, 255);</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
@ -568,7 +457,7 @@ color: rgb(255, 255, 255);</string>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<layout class="QHBoxLayout" name="horizontalLayoutCenter">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
@ -596,7 +485,7 @@ color: rgb(255, 255, 255);</string>
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 rgba(72, 72, 72, 255), stop:1 rgba(68, 68, 68, 255));</string>
|
||||
<string notr="true">background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 rgba(120, 120, 120, 255), stop:1 rgba(68, 68, 68, 255));</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||
<property name="margin">
|
||||
@ -714,7 +603,7 @@ color: rgb(255, 255, 255);</string>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="layoutWidget_5">
|
||||
<layout class="QHBoxLayout" name="layoutWidgetStatusBar_2">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
@ -764,7 +653,7 @@ color: rgb(255, 255, 255);</string>
|
||||
<number>5</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="layoutWidget_3">
|
||||
<layout class="QHBoxLayout" name="layoutWidgetStatusBar">
|
||||
<property name="spacing">
|
||||
<number>8</number>
|
||||
</property>
|
||||
|
@ -56,7 +56,8 @@ OPMapGadgetWidget::OPMapGadgetWidget(QWidget *parent) : QWidget(parent)
|
||||
// **************
|
||||
// create the widget that holds the user controls and the map
|
||||
|
||||
m_widget = new Ui_OPMap_Widget();
|
||||
m_widget = new Ui::OPMap_Widget();
|
||||
// m_widget = new Ui_OPMap_Widget();
|
||||
m_widget->setupUi(this);
|
||||
|
||||
// **************
|
||||
@ -79,17 +80,11 @@ OPMapGadgetWidget::OPMapGadgetWidget(QWidget *parent) : QWidget(parent)
|
||||
// **************
|
||||
// set the user control options
|
||||
|
||||
m_widget->labelRotate->setText(QString::number(m_map->Rotate()));
|
||||
// m_widget->labelNumTilesToLoad->setText(" 0");
|
||||
m_widget->labelMapPos->setText("");
|
||||
m_widget->labelMousePos->setText("");
|
||||
m_widget->progressBarMap->setMaximum(1);
|
||||
|
||||
m_widget->comboBoxZoom->clear();
|
||||
for (int i = 2; i <= 19; i++)
|
||||
m_widget->comboBoxZoom->addItem(QString::number(i), i);
|
||||
m_widget->comboBoxZoom->setCurrentIndex((int)(m_map->Zoom() + 0.5) - 2);
|
||||
|
||||
m_widget->widgetFlightControls->setVisible(false);
|
||||
m_widget->toolButtonFlightControlsShowHide->setIcon(QIcon(QString::fromUtf8(":/core/images/next.png")));
|
||||
|
||||
@ -148,8 +143,6 @@ OPMapGadgetWidget::OPMapGadgetWidget(QWidget *parent) : QWidget(parent)
|
||||
m_statusUpdateTimer->start();
|
||||
|
||||
// **************
|
||||
|
||||
connect(m_widget->comboBoxZoom, SIGNAL(currentIndexChanged(int)), this, SLOT(on_comboBoxZoom_currentIndexChanged(int)));
|
||||
}
|
||||
|
||||
// *************************************************************************************
|
||||
@ -241,6 +234,9 @@ void OPMapGadgetWidget::contextMenuEvent(QContextMenuEvent *event)
|
||||
menu.addAction(goMouseClickAct);
|
||||
menu.addAction(goHomeAct);
|
||||
menu.addAction(goUAVAct);
|
||||
|
||||
menu.addSeparator()->setText(tr("Follow"));
|
||||
|
||||
menu.addAction(followUAVpositionAct);
|
||||
menu.addAction(followUAVheadingAct);
|
||||
|
||||
@ -253,7 +249,7 @@ void OPMapGadgetWidget::contextMenuEvent(QContextMenuEvent *event)
|
||||
|
||||
menu.addSeparator();
|
||||
|
||||
menu.addAction(gridLinesAct);
|
||||
// menu.addAction(gridLinesAct);
|
||||
menu.addAction(openGLAct);
|
||||
|
||||
menu.exec(event->globalPos());
|
||||
@ -327,6 +323,9 @@ void OPMapGadgetWidget::updatePosition()
|
||||
|
||||
if (followUAVheadingAct->isChecked())
|
||||
m_map->SetRotate(-uav_heading); // rotate the map to match the uav heading
|
||||
else
|
||||
if (m_map->Rotate() != 0)
|
||||
m_map->SetRotate(0); // reset the rotation to '0'
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -357,10 +356,7 @@ void OPMapGadgetWidget::zoomChanged(double zoom)
|
||||
if (m_widget)
|
||||
{
|
||||
// m_widget->labelZoom->setText(" " + QString::number(zoom));
|
||||
|
||||
disconnect(m_widget->comboBoxZoom, SIGNAL(currentIndexChanged(int)), this, 0);
|
||||
m_widget->comboBoxZoom->setCurrentIndex(i_zoom - 2);
|
||||
connect(m_widget->comboBoxZoom, SIGNAL(currentIndexChanged(int)), this, SLOT(on_comboBoxZoom_currentIndexChanged(int)));
|
||||
m_widget->horizontalSliderZoom->setValue(i_zoom);
|
||||
}
|
||||
|
||||
switch (i_zoom)
|
||||
@ -448,33 +444,6 @@ void OPMapGadgetWidget::on_toolButtonFindPlace_clicked()
|
||||
findPlace();
|
||||
}
|
||||
|
||||
void OPMapGadgetWidget::on_toolButtonRL_clicked()
|
||||
{
|
||||
if (m_map)
|
||||
{
|
||||
m_map->SetRotate(m_map->Rotate() - 1);
|
||||
if (m_widget) m_widget->labelRotate->setText(" " + QString::number(m_map->Rotate()));
|
||||
}
|
||||
}
|
||||
|
||||
void OPMapGadgetWidget::on_toolButtonRC_clicked()
|
||||
{
|
||||
if (m_map)
|
||||
{
|
||||
m_map->SetRotate(0);
|
||||
if (m_widget) m_widget->labelRotate->setText(" " + QString::number(m_map->Rotate()));
|
||||
}
|
||||
}
|
||||
|
||||
void OPMapGadgetWidget::on_toolButtonRR_clicked()
|
||||
{
|
||||
if (m_map)
|
||||
{
|
||||
m_map->SetRotate(m_map->Rotate() + 1);
|
||||
if (m_widget) m_widget->labelRotate->setText(" " + QString::number(m_map->Rotate()));
|
||||
}
|
||||
}
|
||||
|
||||
void OPMapGadgetWidget::on_toolButtonZoomP_clicked()
|
||||
{
|
||||
zoomIn();
|
||||
@ -522,18 +491,6 @@ void OPMapGadgetWidget::on_pushButtonGeoFenceP_clicked()
|
||||
}
|
||||
}
|
||||
|
||||
void OPMapGadgetWidget::on_comboBoxZoom_currentIndexChanged(int index)
|
||||
{
|
||||
if (m_widget)
|
||||
{
|
||||
bool ok;
|
||||
int i = (int)m_widget->comboBoxZoom->itemData(index).toInt(&ok);
|
||||
|
||||
setZoom(2 + index);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void OPMapGadgetWidget::on_toolButtonFlightControlsShowHide_clicked()
|
||||
{
|
||||
if (m_widget)
|
||||
@ -557,6 +514,11 @@ void OPMapGadgetWidget::on_toolButtonMapUAV_clicked()
|
||||
followUAVpositionAct->toggle();
|
||||
}
|
||||
|
||||
void OPMapGadgetWidget::on_horizontalSliderZoom_sliderMoved(int position)
|
||||
{
|
||||
setZoom(position);
|
||||
}
|
||||
|
||||
void OPMapGadgetWidget::on_toolButtonHome_clicked()
|
||||
{
|
||||
}
|
||||
@ -952,12 +914,19 @@ void OPMapGadgetWidget::goUAV()
|
||||
void OPMapGadgetWidget::on_followUAVpositionAct_toggled(bool checked)
|
||||
{
|
||||
if (m_widget)
|
||||
{
|
||||
if (m_widget->toolButtonMapUAV->isChecked() != followUAVpositionAct->isChecked())
|
||||
m_widget->toolButtonMapUAV->setChecked(followUAVpositionAct->isChecked());
|
||||
|
||||
if (m_map)
|
||||
m_map->SetRotate(0); // reset the rotation to '0'
|
||||
}
|
||||
}
|
||||
|
||||
void OPMapGadgetWidget::on_followUAVheadingAct_toggled(bool checked)
|
||||
{
|
||||
if (!checked && m_map)
|
||||
m_map->SetRotate(0); // reset the rotation to '0'
|
||||
}
|
||||
|
||||
void OPMapGadgetWidget::openWayPointEditor()
|
||||
|
@ -34,7 +34,11 @@
|
||||
#include "uavobjects/uavobjectmanager.h"
|
||||
#include "uavobjects/positionactual.h"
|
||||
|
||||
class Ui_OPMap_Widget;
|
||||
//class Ui_OPMap_Widget;
|
||||
|
||||
namespace Ui {
|
||||
class OPMap_Widget;
|
||||
}
|
||||
|
||||
using namespace mapcontrol;
|
||||
|
||||
@ -71,17 +75,14 @@ private slots:
|
||||
// user control signals
|
||||
void on_toolButtonReload_clicked();
|
||||
void on_toolButtonFindPlace_clicked();
|
||||
void on_toolButtonRR_clicked();
|
||||
void on_toolButtonRC_clicked();
|
||||
void on_toolButtonRL_clicked();
|
||||
void on_toolButtonZoomM_clicked();
|
||||
void on_toolButtonZoomP_clicked();
|
||||
void on_pushButtonGeoFenceM_clicked();
|
||||
void on_pushButtonGeoFenceP_clicked();
|
||||
void on_comboBoxZoom_currentIndexChanged(int index);
|
||||
void on_toolButtonFlightControlsShowHide_clicked();
|
||||
void on_toolButtonMapHome_clicked();
|
||||
void on_toolButtonMapUAV_clicked();
|
||||
void on_horizontalSliderZoom_sliderMoved(int position);
|
||||
|
||||
void on_toolButtonHome_clicked();
|
||||
void on_toolButtonHoldPosition_clicked();
|
||||
@ -145,7 +146,8 @@ private:
|
||||
|
||||
PositionActual *m_positionActual;
|
||||
|
||||
Ui_OPMap_Widget *m_widget;
|
||||
// Ui_OPMap_Widget *m_widget;
|
||||
Ui::OPMap_Widget *m_widget;
|
||||
|
||||
mapcontrol::OPMapWidget *m_map;
|
||||
|
||||
|