mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-30 15:52:12 +01:00
New map options page update.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@822 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
parent
6d5433fdd1
commit
46be975628
BIN
ground/src/plugins/opmap/images/ok.png
Normal file
BIN
ground/src/plugins/opmap/images/ok.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 103 B |
@ -5,5 +5,6 @@
|
|||||||
<file>images/waypoint.png</file>
|
<file>images/waypoint.png</file>
|
||||||
<file>images/minus.png</file>
|
<file>images/minus.png</file>
|
||||||
<file>images/plus.png</file>
|
<file>images/plus.png</file>
|
||||||
|
<file>images/ok.png</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
@ -36,12 +36,12 @@ OPMapGadget::OPMapGadget(QString classId, OPMapGadgetWidget *widget, QWidget *pa
|
|||||||
|
|
||||||
OPMapGadget::~OPMapGadget()
|
OPMapGadget::~OPMapGadget()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void OPMapGadget::loadConfiguration(IUAVGadgetConfiguration* config)
|
void OPMapGadget::loadConfiguration(IUAVGadgetConfiguration *config)
|
||||||
{
|
{
|
||||||
OPMapGadgetConfiguration *m = qobject_cast<OPMapGadgetConfiguration*>(config);
|
OPMapGadgetConfiguration *m = qobject_cast<OPMapGadgetConfiguration*>(config);
|
||||||
|
|
||||||
m_widget->setMapProvider(m->mapProvider());
|
m_widget->setMapProvider(m->mapProvider());
|
||||||
m_widget->setZoom(m->zoom());
|
m_widget->setZoom(m->zoom());
|
||||||
m_widget->setPosition(QPointF(m->longitude(), m->latitude()));
|
m_widget->setPosition(QPointF(m->longitude(), m->latitude()));
|
||||||
|
@ -27,48 +27,55 @@
|
|||||||
|
|
||||||
#include "opmapgadgetconfiguration.h"
|
#include "opmapgadgetconfiguration.h"
|
||||||
#include <QtCore/QDataStream>
|
#include <QtCore/QDataStream>
|
||||||
|
#include <QDir>
|
||||||
|
|
||||||
OPMapGadgetConfiguration::OPMapGadgetConfiguration(QString classId, const QByteArray &state, QObject *parent) :
|
OPMapGadgetConfiguration::OPMapGadgetConfiguration(QString classId, const QByteArray &state, QObject *parent) :
|
||||||
IUAVGadgetConfiguration(classId, parent),
|
IUAVGadgetConfiguration(classId, parent),
|
||||||
m_mapProvider("OpenStreetMap"),
|
m_mapProvider("GoogleHybrid"),
|
||||||
m_defaultZoom(2),
|
m_defaultZoom(2),
|
||||||
m_defaultLatitude(0),
|
m_defaultLatitude(0),
|
||||||
m_defaultLongitude(0),
|
m_defaultLongitude(0),
|
||||||
m_useMemoryCache(true),
|
m_useMemoryCache(true),
|
||||||
m_cacheLocation("")
|
m_cacheLocation(QDir::currentPath() + QDir::separator() + "mapscache" + QDir::separator())
|
||||||
{
|
{
|
||||||
if (state.count() > 0) {
|
if (state.count() > 0)
|
||||||
|
{
|
||||||
QDataStream stream(state);
|
QDataStream stream(state);
|
||||||
|
|
||||||
int zoom;
|
int zoom;
|
||||||
double latitude;
|
double latitude;
|
||||||
double longitude;
|
double longitude;
|
||||||
QString mapProvider;
|
QString mapProvider;
|
||||||
bool useMemoryCache;
|
bool useMemoryCache;
|
||||||
QString cacheLocation;
|
QString cacheLocation;
|
||||||
|
|
||||||
stream >> zoom;
|
stream >> zoom;
|
||||||
stream >> latitude;
|
stream >> latitude;
|
||||||
stream >> longitude;
|
stream >> longitude;
|
||||||
stream >> mapProvider;
|
stream >> mapProvider;
|
||||||
stream >> useMemoryCache;
|
stream >> useMemoryCache;
|
||||||
stream >> cacheLocation;
|
stream >> cacheLocation;
|
||||||
|
|
||||||
m_defaultZoom = zoom;
|
m_defaultZoom = zoom;
|
||||||
m_defaultLatitude = latitude;
|
m_defaultLatitude = latitude;
|
||||||
m_defaultLongitude = longitude;
|
m_defaultLongitude = longitude;
|
||||||
if (mapProvider != "") m_mapProvider = mapProvider;
|
if (!mapProvider.isEmpty()) m_mapProvider = mapProvider;
|
||||||
m_useMemoryCache = useMemoryCache;
|
m_useMemoryCache = useMemoryCache;
|
||||||
if (cacheLocation != "") m_cacheLocation = cacheLocation;
|
if (!cacheLocation.isEmpty()) m_cacheLocation = cacheLocation;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
IUAVGadgetConfiguration *OPMapGadgetConfiguration::clone()
|
IUAVGadgetConfiguration * OPMapGadgetConfiguration::clone()
|
||||||
{
|
{
|
||||||
OPMapGadgetConfiguration *m = new OPMapGadgetConfiguration(this->classId());
|
OPMapGadgetConfiguration *m = new OPMapGadgetConfiguration(this->classId());
|
||||||
|
|
||||||
m->m_defaultZoom = m_defaultZoom;
|
m->m_defaultZoom = m_defaultZoom;
|
||||||
m->m_defaultLatitude = m_defaultLatitude;
|
m->m_defaultLatitude = m_defaultLatitude;
|
||||||
m->m_defaultLongitude = m_defaultLongitude;
|
m->m_defaultLongitude = m_defaultLongitude;
|
||||||
m->m_mapProvider = m_mapProvider;
|
m->m_mapProvider = m_mapProvider;
|
||||||
m->m_useMemoryCache = m_useMemoryCache;
|
m->m_useMemoryCache = m_useMemoryCache;
|
||||||
m->m_cacheLocation = m_cacheLocation;
|
m->m_cacheLocation = m_cacheLocation;
|
||||||
|
|
||||||
return m;
|
return m;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -76,12 +83,13 @@ QByteArray OPMapGadgetConfiguration::saveState() const
|
|||||||
{
|
{
|
||||||
QByteArray bytes;
|
QByteArray bytes;
|
||||||
QDataStream stream(&bytes, QIODevice::WriteOnly);
|
QDataStream stream(&bytes, QIODevice::WriteOnly);
|
||||||
|
|
||||||
stream << m_defaultZoom;
|
stream << m_defaultZoom;
|
||||||
stream << m_defaultLatitude;
|
stream << m_defaultLatitude;
|
||||||
stream << m_defaultLongitude;
|
stream << m_defaultLongitude;
|
||||||
stream << m_mapProvider;
|
stream << m_mapProvider;
|
||||||
stream << m_useMemoryCache;
|
stream << m_useMemoryCache;
|
||||||
stream << m_cacheLocation;
|
stream << m_cacheLocation;
|
||||||
|
|
||||||
return bytes;
|
return bytes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -40,18 +40,18 @@ OPMapGadgetFactory::~OPMapGadgetFactory()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
Core::IUAVGadget* OPMapGadgetFactory::createGadget(QWidget *parent)
|
Core::IUAVGadget * OPMapGadgetFactory::createGadget(QWidget *parent)
|
||||||
{
|
{
|
||||||
OPMapGadgetWidget* gadgetWidget = new OPMapGadgetWidget(parent);
|
OPMapGadgetWidget *gadgetWidget = new OPMapGadgetWidget(parent);
|
||||||
return new OPMapGadget(QString("OPMapGadget"), gadgetWidget, parent);
|
return new OPMapGadget(QString("OPMapGadget"), gadgetWidget, parent);
|
||||||
}
|
}
|
||||||
|
|
||||||
IUAVGadgetConfiguration *OPMapGadgetFactory::createConfiguration(const QByteArray &state)
|
IUAVGadgetConfiguration * OPMapGadgetFactory::createConfiguration(const QByteArray &state)
|
||||||
{
|
{
|
||||||
return new OPMapGadgetConfiguration(QString("OPMapGadget"), state);
|
return new OPMapGadgetConfiguration(QString("OPMapGadget"), state);
|
||||||
}
|
}
|
||||||
|
|
||||||
IOptionsPage *OPMapGadgetFactory::createOptionsPage(IUAVGadgetConfiguration *config)
|
IOptionsPage * OPMapGadgetFactory::createOptionsPage(IUAVGadgetConfiguration *config)
|
||||||
{
|
{
|
||||||
return new OPMapGadgetOptionsPage(qobject_cast<OPMapGadgetConfiguration*>(config));
|
return new OPMapGadgetOptionsPage(qobject_cast<OPMapGadgetConfiguration*>(config));
|
||||||
}
|
}
|
||||||
|
@ -35,8 +35,11 @@
|
|||||||
#include <QtGui/QVBoxLayout>
|
#include <QtGui/QVBoxLayout>
|
||||||
#include <QtGui/QFileDialog>
|
#include <QtGui/QFileDialog>
|
||||||
|
|
||||||
|
#include "opmapcontrol/opmapcontrol.h"
|
||||||
|
|
||||||
#include "ui_opmapgadgetoptionspage.h"
|
#include "ui_opmapgadgetoptionspage.h"
|
||||||
|
|
||||||
|
// *********************************************
|
||||||
|
|
||||||
OPMapGadgetOptionsPage::OPMapGadgetOptionsPage(OPMapGadgetConfiguration *config, QObject *parent) :
|
OPMapGadgetOptionsPage::OPMapGadgetOptionsPage(OPMapGadgetConfiguration *config, QObject *parent) :
|
||||||
IOptionsPage(parent),
|
IOptionsPage(parent),
|
||||||
@ -50,6 +53,10 @@ QWidget *OPMapGadgetOptionsPage::createPage(QWidget *parent)
|
|||||||
QWidget *w = new QWidget(parent);
|
QWidget *w = new QWidget(parent);
|
||||||
m_page->setupUi(w);
|
m_page->setupUi(w);
|
||||||
|
|
||||||
|
// populate the map provider combobox
|
||||||
|
m_page->providerComboBox->clear();
|
||||||
|
m_page->providerComboBox->addItems(mapcontrol::Helper::MapTypes());
|
||||||
|
|
||||||
int index = m_page->providerComboBox->findText(m_config->mapProvider());
|
int index = m_page->providerComboBox->findText(m_config->mapProvider());
|
||||||
index = (index >= 0) ? index : 0;
|
index = (index >= 0) ? index : 0;
|
||||||
m_page->providerComboBox->setCurrentIndex(index);
|
m_page->providerComboBox->setCurrentIndex(index);
|
||||||
@ -60,6 +67,7 @@ QWidget *OPMapGadgetOptionsPage::createPage(QWidget *parent)
|
|||||||
m_page->lineEditCacheLocation->setText(m_config->cacheLocation());
|
m_page->lineEditCacheLocation->setText(m_config->cacheLocation());
|
||||||
|
|
||||||
connect(m_page->pushButtonCacheLocation, SIGNAL(clicked()), this, SLOT(on_pushButtonCacheLocation_clicked()));
|
connect(m_page->pushButtonCacheLocation, SIGNAL(clicked()), this, SLOT(on_pushButtonCacheLocation_clicked()));
|
||||||
|
connect(m_page->pushButtonCacheDefaults, SIGNAL(clicked()), this, SLOT(on_pushButtonCacheDefaults_clicked()));
|
||||||
|
|
||||||
return w;
|
return w;
|
||||||
}
|
}
|
||||||
@ -70,11 +78,17 @@ void OPMapGadgetOptionsPage::on_pushButtonCacheLocation_clicked()
|
|||||||
|
|
||||||
// QDir dirPath(dir);
|
// QDir dirPath(dir);
|
||||||
// dir = dirPath.entryList(QDir::AllDirs | QDir::NoDotAndDotDot);
|
// dir = dirPath.entryList(QDir::AllDirs | QDir::NoDotAndDotDot);
|
||||||
// m_page->lineEditCacheLocation->setText(dir);
|
// if (!dir.isEmpty()) m_page->lineEditCacheLocation->setText(dir);
|
||||||
|
|
||||||
QFileDialog::Options options;
|
QFileDialog::Options options(QFileDialog::ShowDirsOnly);
|
||||||
QString path = QFileDialog::getExistingDirectory(qobject_cast<QWidget*>(this), tr("Choose a directory"), dir, options);
|
QString path = QFileDialog::getExistingDirectory(qobject_cast<QWidget*>(this), tr("Choose a cache directory"), dir, options);
|
||||||
if (!path.isNull()) m_page->lineEditCacheLocation->setText(path);
|
if (!path.isEmpty()) m_page->lineEditCacheLocation->setText(path);
|
||||||
|
}
|
||||||
|
|
||||||
|
void OPMapGadgetOptionsPage::on_pushButtonCacheDefaults_clicked()
|
||||||
|
{
|
||||||
|
m_page->pushButtonUseMemoryCache->setChecked(true);
|
||||||
|
m_page->lineEditCacheLocation->setText(QDir::currentPath() + QDir::separator() + "mapscache" + QDir::separator());
|
||||||
}
|
}
|
||||||
|
|
||||||
void OPMapGadgetOptionsPage::apply()
|
void OPMapGadgetOptionsPage::apply()
|
||||||
|
@ -58,6 +58,7 @@ public slots:
|
|||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void on_pushButtonCacheLocation_clicked();
|
void on_pushButtonCacheLocation_clicked();
|
||||||
|
void on_pushButtonCacheDefaults_clicked();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
OPMapGadgetConfiguration *m_config;
|
OPMapGadgetConfiguration *m_config;
|
||||||
|
@ -25,6 +25,31 @@
|
|||||||
</property>
|
</property>
|
||||||
<item row="4" column="0">
|
<item row="4" column="0">
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_7">
|
<layout class="QHBoxLayout" name="horizontalLayout_7">
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="pushButtonCacheDefaults">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="cursor">
|
||||||
|
<cursorShape>OpenHandCursor</cursorShape>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string> Default </string>
|
||||||
|
</property>
|
||||||
|
<property name="checkable">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="checked">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="flat">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<spacer name="horizontalSpacer">
|
<spacer name="horizontalSpacer">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
@ -49,6 +74,19 @@
|
|||||||
<property name="cursor">
|
<property name="cursor">
|
||||||
<cursorShape>OpenHandCursor</cursorShape>
|
<cursorShape>OpenHandCursor</cursorShape>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">QPushButton {
|
||||||
|
}
|
||||||
|
QPushButton:pressed {
|
||||||
|
}
|
||||||
|
QPushButton:hover {
|
||||||
|
}
|
||||||
|
QPushButton:checked {
|
||||||
|
/*background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
|
||||||
|
stop: 0 rgba(180, 190, 220, 255), stop: 1 rgba(200, 230, 255, 255));*/
|
||||||
|
}
|
||||||
|
</string>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string> Use Memory Cache </string>
|
<string> Use Memory Cache </string>
|
||||||
</property>
|
</property>
|
||||||
@ -79,21 +117,6 @@
|
|||||||
<property name="cursor">
|
<property name="cursor">
|
||||||
<cursorShape>OpenHandCursor</cursorShape>
|
<cursorShape>OpenHandCursor</cursorShape>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>OpenStreetMap</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>Google</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>Google Sat</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
@ -194,7 +217,11 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLineEdit" name="lineEditCacheLocation"/>
|
<widget class="QLineEdit" name="lineEditCacheLocation">
|
||||||
|
<property name="autoFillBackground">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="pushButtonCacheLocation">
|
<widget class="QPushButton" name="pushButtonCacheLocation">
|
||||||
|
@ -28,6 +28,7 @@
|
|||||||
#include <QStringList>
|
#include <QStringList>
|
||||||
#include <QtGui/QHBoxLayout>
|
#include <QtGui/QHBoxLayout>
|
||||||
#include <QtGui/QVBoxLayout>
|
#include <QtGui/QVBoxLayout>
|
||||||
|
#include <QDir>
|
||||||
#include "extensionsystem/pluginmanager.h"
|
#include "extensionsystem/pluginmanager.h"
|
||||||
|
|
||||||
#include "ui_opmap_controlpanel.h"
|
#include "ui_opmap_controlpanel.h"
|
||||||
@ -42,7 +43,7 @@ OPMapGadgetWidget::OPMapGadgetWidget(QWidget *parent) : QWidget(parent)
|
|||||||
controlpanel_ui = NULL;
|
controlpanel_ui = NULL;
|
||||||
map = NULL;
|
map = NULL;
|
||||||
|
|
||||||
follow_uav = false;
|
m_follow_uav = false;
|
||||||
|
|
||||||
// **************
|
// **************
|
||||||
// Get required UAVObjects
|
// Get required UAVObjects
|
||||||
@ -172,10 +173,9 @@ void OPMapGadgetWidget::setPosition(QPointF pos)
|
|||||||
|
|
||||||
void OPMapGadgetWidget::setMapProvider(QString provider)
|
void OPMapGadgetWidget::setMapProvider(QString provider)
|
||||||
{
|
{
|
||||||
// haven't yet decided how to populate the map provider combobox on the options page
|
if (map)
|
||||||
// if (map)
|
if (map->isStarted())
|
||||||
// if (map->isStarted())
|
map->SetMapType(mapcontrol::Helper::MapTypeFromString(provider));
|
||||||
// map->SetMapType(mapcontrol::Helper::MapTypeFromString(provider));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void OPMapGadgetWidget::setUseMemoryCache(bool useMemoryCache)
|
void OPMapGadgetWidget::setUseMemoryCache(bool useMemoryCache)
|
||||||
@ -188,18 +188,18 @@ void OPMapGadgetWidget::setCacheLocation(QString cacheLocation)
|
|||||||
{
|
{
|
||||||
cacheLocation = cacheLocation.trimmed(); // remove any surrounding spaces
|
cacheLocation = cacheLocation.trimmed(); // remove any surrounding spaces
|
||||||
|
|
||||||
if (cacheLocation.isEmpty()) return; // tut tut
|
if (cacheLocation.isEmpty()) return;
|
||||||
|
|
||||||
#if defined(Q_WS_WIN)
|
#if defined(Q_WS_WIN)
|
||||||
if (!cacheLocation.endsWith('/')) cacheLocation += '/';
|
if (!cacheLocation.endsWith('/')) cacheLocation += '/';
|
||||||
#elif defined(Q_WS_X11)
|
#elif defined(Q_WS_X11)
|
||||||
if (!cacheLocation.endsWith('/')) cacheLocation += '/';
|
if (!cacheLocation.endsWith(QDir::separator())) cacheLocation += QDir::separator();
|
||||||
#elif defined(Q_WS_MAC)
|
#elif defined(Q_WS_MAC)
|
||||||
if (!cacheLocation.endsWith('/')) cacheLocation += '/';
|
if (!cacheLocation.endsWith(QDir::separator())) cacheLocation += QDir::separator();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
QDir dir(cacheLocation);
|
QDir dir;
|
||||||
if (!dir.exists())
|
if (!dir.exists(cacheLocation))
|
||||||
if (!dir.mkpath(cacheLocation))
|
if (!dir.mkpath(cacheLocation))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -216,7 +216,7 @@ void OPMapGadgetWidget::updatePosition()
|
|||||||
// get current position data
|
// get current position data
|
||||||
PositionActual::DataFields data = m_positionActual->getData();
|
PositionActual::DataFields data = m_positionActual->getData();
|
||||||
|
|
||||||
if (map && follow_uav)
|
if (map && m_follow_uav)
|
||||||
{ // center the map onto the UAV
|
{ // center the map onto the UAV
|
||||||
map->SetCurrentPosition(internals::PointLatLng(data.Latitude, data.Longitude));
|
map->SetCurrentPosition(internals::PointLatLng(data.Latitude, data.Longitude));
|
||||||
}
|
}
|
||||||
@ -418,16 +418,12 @@ QPushButton * OPMapGadgetWidget::createTransparentButton(QWidget *parent, QStrin
|
|||||||
void OPMapGadgetWidget::createMapOverlayUserControls()
|
void OPMapGadgetWidget::createMapOverlayUserControls()
|
||||||
{
|
{
|
||||||
QPushButton *zoomout = new QPushButton("");
|
QPushButton *zoomout = new QPushButton("");
|
||||||
zoomout->setFlat(true);
|
|
||||||
zoomout->setToolTip(tr("Zoom out"));
|
zoomout->setToolTip(tr("Zoom out"));
|
||||||
zoomout->setCursor(Qt::OpenHandCursor);
|
zoomout->setCursor(Qt::OpenHandCursor);
|
||||||
|
zoomout->setFlat(true);
|
||||||
zoomout->setIcon(QIcon(QString::fromUtf8(":/opmap/images/minus.png")));
|
zoomout->setIcon(QIcon(QString::fromUtf8(":/opmap/images/minus.png")));
|
||||||
// zoomout->setIconSize(QSize(12, 12));
|
|
||||||
zoomout->setIconSize(QSize(32, 32));
|
zoomout->setIconSize(QSize(32, 32));
|
||||||
zoomout->setFixedSize(32, 32);
|
zoomout->setFixedSize(32, 32);
|
||||||
// zoomout->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
|
|
||||||
// zoomout->setWindowOpacity(0.7);
|
|
||||||
// zoomout->setBackgroundRole(QPalette(QColor(0, 0, 0, 0)));
|
|
||||||
connect(zoomout, SIGNAL(clicked(bool)), this, SLOT(zoomOut()));
|
connect(zoomout, SIGNAL(clicked(bool)), this, SLOT(zoomOut()));
|
||||||
|
|
||||||
// QPushButton *zoomin = createTransparentButton(map, "", QString::fromUtf8(":/core/images/plus.png"));
|
// QPushButton *zoomin = createTransparentButton(map, "", QString::fromUtf8(":/core/images/plus.png"));
|
||||||
|
@ -81,15 +81,16 @@ private slots:
|
|||||||
void OnTilesStillToLoad(int number);
|
void OnTilesStillToLoad(int number);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool follow_uav; // true if the map is to stay centered on the UAV
|
bool m_follow_uav; // true if the map is to stay centered on the UAV
|
||||||
|
|
||||||
double heading; // compass/uav heading
|
double m_heading; // uav heading
|
||||||
|
|
||||||
QTimer *m_updateTimer;
|
QTimer *m_updateTimer;
|
||||||
|
|
||||||
PositionActual *m_positionActual;
|
PositionActual *m_positionActual;
|
||||||
|
|
||||||
Ui::OPMapControlPanel *controlpanel_ui;
|
Ui::OPMapControlPanel *controlpanel_ui;
|
||||||
|
|
||||||
mapcontrol::OPMapWidget *map;
|
mapcontrol::OPMapWidget *map;
|
||||||
|
|
||||||
QPushButton * createTransparentButton(QWidget *parent, QString text, QString icon);
|
QPushButton * createTransparentButton(QWidget *parent, QString text, QString icon);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user