mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-16 00:05:45 -04:00
android goodies (pull request #94):
[Marco Bernasocchi] - adding needed files to support internal GPS via QtMobility, implementation of QgsQtLocationConnection is only a stub - cleaning up methods names - adding mobility to CMakeLists - testing - added hack to test parseData() - adding more parsing stuff - Adding debugging info and making connection fail if no QtSatellite datasource available - Initial working GPS with coordinates bug (values shifted) - Adding Initial GPS support to android using QtLocation - Adding Ground speed and direction - put ok button on top of widget to make it usable until scroll area is added (HACK to be Reverted later) - added vertical and horizontal accurancy - Removing test values qtlocationconnection - refactor debug messages - adding compass plugin - trying NathanW suggestion - adding new compass plugin - Fixed satellitesUpdated signals - removing setDataRate - temporarely removed calibrationLevel display to be reverted when https://sourceforge.net/p/necessitas/tickets/153/ is fixed - addin comment - making QLineEdits readonly - added calibration level support [Jürgen E. Fischer] - squashed, reindented and skipped some already addressed changes to qgisapp and vector layer provider
This commit is contained in:
parent
d2b5ed9204
commit
6055c11fe4
@ -80,6 +80,17 @@ IF (WITH_BINDINGS)
|
||||
SET (BINDINGS_GLOBAL_INSTALL FALSE CACHE BOOL "Install bindings to global python directory? (might need root)")
|
||||
ENDIF (WITH_BINDINGS)
|
||||
|
||||
#BUILD WITH QtMobility by default on android only. Other platform can force it
|
||||
IF (ANDROID)
|
||||
SET (DEFAULT_WITH_QTMOBILITY TRUE)
|
||||
ELSE (ANDROID)
|
||||
SET (DEFAULT_WITH_QTMOBILITY FALSE)
|
||||
ENDIF (ANDROID)
|
||||
SET (WITH_QTMOBILITY ${DEFAULT_WITH_QTMOBILITY} CACHE BOOL "Determines QtMobility related code should be build (for example internal GPS)")
|
||||
IF (WITH_QTMOBILITY)
|
||||
FIND_PACKAGE(QtMobility 1.1.0)
|
||||
ENDIF (WITH_QTMOBILITY)
|
||||
|
||||
SET (WITH_GLOBE FALSE CACHE BOOL "Determines whether Globe plugin should be built")
|
||||
IF (WITH_GLOBE)
|
||||
SET(QT_USE_QTOPENGL 1)
|
||||
|
163
cmake/FindQtMobility.cmake
Normal file
163
cmake/FindQtMobility.cmake
Normal file
@ -0,0 +1,163 @@
|
||||
INCLUDE(FindQt4)
|
||||
|
||||
set(MOBILITY_CONFIG_MKSPECS_FILE "")
|
||||
IF(EXISTS "${QT_MKSPECS_DIR}/features/mobilityconfig.prf")
|
||||
set(MOBILITY_CONFIG_MKSPECS_FILE "${QT_MKSPECS_DIR}/features/mobilityconfig.prf")
|
||||
ELSEIF(EXISTS "${QT_MKSPECS_DIR}/features/mobility.prf")
|
||||
set(MOBILITY_CONFIG_MKSPECS_FILE "${CMAKE_CURRENT_SOURCE_DIR}/cmakes/mobilityconfig.prf")
|
||||
ENDIF()
|
||||
|
||||
macro(export_component component)
|
||||
IF(NOT ${MOBILITY_CONFIG_MKSPECS_FILE} STREQUAL "")
|
||||
FILE(READ ${MOBILITY_CONFIG_MKSPECS_FILE} MOBILITY_FILE_CONTENTS)
|
||||
STRING(TOLOWER ${component} _COMPONENT)
|
||||
IF(${MOBILITY_FILE_CONTENTS} MATCHES "MOBILITY_CONFIG=.*${_COMPONENT}.*")
|
||||
STRING(TOUPPER ${component} _COMPONENT)
|
||||
SET(QT_MOBILITY_${_COMPONENT}_FOUND 1)
|
||||
SET(QT_MOBILITY_${_COMPONENT}_INCLUDE_DIR ${QT_MOBILITY_PARENT_INCLUDE_DIR}/Qt${component})
|
||||
SET(QT_MOBILITY_${_COMPONENT}_LIBRARY Qt${component})
|
||||
ADD_DEFINITIONS(-DHAVE_QT_MOBILITY_${_COMPONENT})
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
endmacro()
|
||||
|
||||
set(VERSION_INFO "")
|
||||
set(FEATURE_FILE_PREFIX "${QT_MKSPECS_DIR}/features/mobility")
|
||||
|
||||
if(DEFINED MOBILITY_VERSION)
|
||||
if(MOBILITY_VERSION STREQUAL "1.1" AND EXISTS "${FEATURE_FILE_PREFIX}11.prf")
|
||||
set(MOBILITY_PRF_FILE "${FEATURE_FILE_PREFIX}11.prf")
|
||||
set(VERSION_INFO "1.1")
|
||||
elseif(MOBILITY_VERSION STREQUAL "1.2" AND EXISTS "${FEATURE_FILE_PREFIX}12.prf")
|
||||
set(MOBILITY_PRF_FILE "${FEATURE_FILE_PREFIX}12.prf")
|
||||
set(VERSION_INFO "1.2")
|
||||
elseif(MOBILITY_VERSION STREQUAL "default" AND EXISTS "${FEATURE_FILE_PREFIX}.prf")
|
||||
set(MOBILITY_PRF_FILE "${FEATURE_FILE_PREFIX}.prf")
|
||||
set(VERSION_INFO "system's default")
|
||||
else()
|
||||
message(STATUS "Couldn't find QtMobility version: ${MOBILITY_VERSION}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED MOBILITY_PRF_FILE)
|
||||
if(EXISTS "${FEATURE_FILE_PREFIX}.prf")
|
||||
set(MOBILITY_PRF_FILE "${FEATURE_FILE_PREFIX}.prf")
|
||||
set(VERSION_INFO "system's default")
|
||||
elseif(EXISTS "${FEATURE_FILE_PREFIX}12.prf")
|
||||
set(MOBILITY_PRF_FILE "${FEATURE_FILE_PREFIX}12.prf")
|
||||
set(VERSION_INFO "1.2")
|
||||
elseif(EXISTS "${FEATURE_FILE_PREFIX}11.prf")
|
||||
set(MOBILITY_PRF_FILE "${FEATURE_FILE_PREFIX}11.prf")
|
||||
set(VERSION_INFO "1.1")
|
||||
else()
|
||||
message(FATAL_ERROR "Couldn't find any version of QtMobility.")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
message(STATUS "Using QtMobility version: ${VERSION_INFO}")
|
||||
|
||||
IF(DEFINED MOBILITY_PRF_FILE)
|
||||
FILE(READ ${MOBILITY_PRF_FILE} MOBILITY_FILE_CONTENTS)
|
||||
|
||||
STRING(REGEX MATCH "MOBILITY_PREFIX=([^\n]+)" QT_MOBILITY_PREFIX "${MOBILITY_FILE_CONTENTS}")
|
||||
SET(QT_MOBILITY_PREFIX ${CMAKE_MATCH_1})
|
||||
|
||||
STRING(REGEX MATCH "MOBILITY_INCLUDE=([^\n]+)" QT_MOBILITY_INCLUDE_DIR "${MOBILITY_FILE_CONTENTS}")
|
||||
SET(QT_MOBILITY_INCLUDE_DIR ${CMAKE_MATCH_1})
|
||||
|
||||
STRING(REGEX MATCH "MOBILITY_LIB=([^\n]+)" "\\1" QT_MOBILITY_LIBRARY "${MOBILITY_FILE_CONTENTS}")
|
||||
SET(QT_MOBILITY_LIBRARY_DIR ${CMAKE_MATCH_1})
|
||||
|
||||
#VERSION
|
||||
IF(NOT ${MOBILITY_CONFIG_MKSPECS_FILE} STREQUAL "")
|
||||
FILE(READ ${MOBILITY_CONFIG_MKSPECS_FILE} MOBILITY_CONFIG_FILE_CONTENTS)
|
||||
STRING(REGEX MATCH "MOBILITY_VERSION = ([^\n]+)" QT_MOBILITY_VERSION "${MOBILITY_CONFIG_FILE_CONTENTS}")
|
||||
SET(QT_MOBILITY_VERSION ${CMAKE_MATCH_1})
|
||||
|
||||
STRING(REGEX MATCH "MOBILITY_MAJOR_VERSION = ([^\n]+)" QT_MOBILITY_MAJOR_VERSION "${MOBILITY_CONFIG_FILE_CONTENTS}")
|
||||
SET(QT_MOBILITY_MAJOR_VERSION ${CMAKE_MATCH_1})
|
||||
|
||||
STRING(REGEX MATCH "MOBILITY_MINOR_VERSION = ([^\n]+)" QT_MOBILITY_MINOR_VERSION "${MOBILITY_CONFIG_FILE_CONTENTS}")
|
||||
SET(QT_MOBILITY_MINOR_VERSION ${CMAKE_MATCH_1})
|
||||
|
||||
STRING(REGEX MATCH "MOBILITY_PATCH_VERSION = ([^\n]+)" QT_MOBILITY_PATCH_VERSION "${MOBILITY_CONFIG_FILE_CONTENTS}")
|
||||
SET(QT_MOBILITY_PATCH_VERSION ${CMAKE_MATCH_1})
|
||||
|
||||
message(STATUS "QtMobility version: ${QT_MOBILITY_VERSION}")
|
||||
ELSE()
|
||||
SET(QT_MOBILITY_VERSION 1.0.0)
|
||||
SET(QT_MOBILITY_MAJOR_VERSION 1)
|
||||
SET(QT_MOBILITY_MINOR_VERSION 0)
|
||||
SET(QT_MOBILITY_PATCH_VERSION 0)
|
||||
ENDIF()
|
||||
|
||||
SET(QT_MOBILITY_PARENT_INCLUDE_DIR ${QT_MOBILITY_INCLUDE_DIR})
|
||||
SET(QT_MOBILITY_INCLUDE_DIR ${QT_MOBILITY_INCLUDE_DIR}/QtMobility)
|
||||
|
||||
IF(QtMobility_FIND_VERSION_EXACT)
|
||||
IF(QT_MOBILITY_VERSION VERSION_EQUAL QtMobility_FIND_VERSION)
|
||||
SET(QT_MOBILITY_FOUND TRUE)
|
||||
ELSE()
|
||||
SET(QT_MOBILITY_FOUND FALSE)
|
||||
IF(QT_MOBILITY_VERSION VERSION_LESS QtMobility_FIND_VERSION)
|
||||
SET(QT_MOBILITY_TOO_OLD TRUE)
|
||||
ELSE()
|
||||
SET(QT_MOBILITY_TOO_NEW TRUE)
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
ELSE()
|
||||
IF(QT_MOBILITY_VERSION VERSION_LESS QtMobility_FIND_VERSION)
|
||||
SET(QT_MOBILITY_FOUND FALSE)
|
||||
SET(QT_MOBILITY_TOO_OLD TRUE)
|
||||
ELSE()
|
||||
SET(QT_MOBILITY_FOUND TRUE)
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
ELSE()
|
||||
SET(QT_MOBILITY_FOUND NOTFOUND)
|
||||
SET(QT_MOBILITY_PREFIX NOTFOUND)
|
||||
SET(QT_MOBILITY_INCLUDE NOTFOUND)
|
||||
SET(QT_MOBILITY_LIB NOTFOUND)
|
||||
ENDIF()
|
||||
|
||||
IF(NOT QT_MOBILITY_FOUND)
|
||||
if(QT_MOBILITY_TOO_OLD)
|
||||
MESSAGE(FATAL_ERROR "The installed QtMobility version ${QT_MOBILITY_VERSION} it too old, version ${QtMobility_FIND_VERSION} is required.")
|
||||
ELSEIF(QT_MOBILITY_TOO_NEW)
|
||||
MESSAGE(FATAL_ERROR "The installed QtMobility version ${QT_MOBILITY_VERSION} it too new, version ${QtMobility_FIND_VERSION} is required.")
|
||||
ELSE()
|
||||
MESSAGE(FATAL_ERROR "QtMobility not found.")
|
||||
ENDIF()
|
||||
ELSE()
|
||||
INCLUDE_DIRECTORIES(${QT_MOBILITY_INCLUDE_DIR})
|
||||
export_component(Bearer)
|
||||
export_component(Feedback)
|
||||
export_component(Gallery)
|
||||
export_component(PublishSubscribe)
|
||||
export_component(Location)
|
||||
export_component(Organizer)
|
||||
export_component(ServiceFramework)
|
||||
export_component(SystemInfo)
|
||||
export_component(Contacts)
|
||||
export_component(Connectivity)
|
||||
export_component(Messaging)
|
||||
export_component(Versit)
|
||||
export_component(Sensors)
|
||||
# VersitOrganizer
|
||||
if(QT_MOBILITY_VERSIT_FOUND AND QT_MOBILITY_ORGANIZER_FOUND)
|
||||
SET(QT_MOBILITY_VERSITORGANIZER_FOUND 1)
|
||||
SET(QT_MOBILITY_VERSITORGANIZER_INCLUDE_DIR ${QT_MOBILITY_PARENT_INCLUDE_DIR}/QtVersitOrganizer)
|
||||
SET(QT_MOBILITY_VERSITORGANIZER_LIBRARY QtVersitOrganizer)
|
||||
endif()
|
||||
|
||||
# MultimediaKit - it's just 'multimedia' in the .prf file.
|
||||
IF(NOT ${MOBILITY_CONFIG_MKSPECS_FILE} STREQUAL "")
|
||||
FILE(READ ${MOBILITY_CONFIG_MKSPECS_FILE} MOBILITY_FILE_CONTENTS)
|
||||
IF(${MOBILITY_FILE_CONTENTS} MATCHES "MOBILITY_CONFIG=.*multimedia.*")
|
||||
SET(QT_MOBILITY_MULTIMEDIAKIT_FOUND 1)
|
||||
SET(QT_MOBILITY_MULTIMEDIAKIT_INCLUDE_DIR ${QT_MOBILITY_PARENT_INCLUDE_DIR}/QtMultimediaKit)
|
||||
SET(QT_MOBILITY_MULTIMEDIAKIT_LIBRARY QtMultimediaKit)
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
ENDIF()
|
@ -1,5 +1,5 @@
|
||||
/***************************************************************************
|
||||
qgsgpsinformationwidget.h - description
|
||||
qgsgpsinformationwidget.cpp - description
|
||||
-------------------
|
||||
begin : Sat Jan 01 2010
|
||||
copyright : (C) 2010 by Tim Sutton and Marco Hugentobler
|
||||
@ -184,6 +184,10 @@ QgsGPSInformationWidget::QgsGPSInformationWidget( QgsMapCanvas * thepCanvas, QWi
|
||||
{
|
||||
mRadAutodetect->setChecked( true );
|
||||
}
|
||||
else if ( myPortMode == "internalGPS" )
|
||||
{
|
||||
mRadInternal->setChecked( true );
|
||||
}
|
||||
else if ( myPortMode == "explicitPort" )
|
||||
{
|
||||
mRadUserPath->setChecked( true );
|
||||
@ -192,6 +196,11 @@ QgsGPSInformationWidget::QgsGPSInformationWidget( QgsMapCanvas * thepCanvas, QWi
|
||||
{
|
||||
mRadGpsd->setChecked( true );
|
||||
}
|
||||
//disable the internal port method if build is without QtLocation
|
||||
#ifndef HAVE_QT_MOBILITY_LOCATION
|
||||
mRadInternal->setDisabled( true );
|
||||
mRadAutodetect->setChecked( true );
|
||||
#endif
|
||||
|
||||
//auto digitising behaviour
|
||||
mCbxAutoAddVertices->setChecked( mySettings.value( "/gps/autoAddVertices", "false" ).toBool() );
|
||||
@ -256,6 +265,10 @@ QgsGPSInformationWidget::~QgsGPSInformationWidget()
|
||||
{
|
||||
mySettings.setValue( "/gps/portMode", "scanPorts" );
|
||||
}
|
||||
else if ( mRadInternal->isChecked() )
|
||||
{
|
||||
mySettings.setValue( "/gps/portMode", "internalGPS" );
|
||||
}
|
||||
else if ( mRadUserPath->isChecked() )
|
||||
{
|
||||
mySettings.setValue( "/gps/portMode", "explicitPort" );
|
||||
@ -406,6 +419,10 @@ void QgsGPSInformationWidget::connectGps()
|
||||
{
|
||||
port = QString( "%1:%2:%3" ).arg( mGpsdHost->text() ).arg( mGpsdPort->text() ).arg( mGpsdDevice->text() );
|
||||
}
|
||||
else if ( mRadInternal->isChecked() )
|
||||
{
|
||||
port = QString( "internalGPS" );
|
||||
}
|
||||
|
||||
mGPSPlainTextEdit->appendPlainText( tr( "Connecting..." ) );
|
||||
showStatusBarMessage( tr( "Connecting to GPS device..." ) );
|
||||
@ -678,10 +695,12 @@ void QgsGPSInformationWidget::displayGPSInformation( const QgsGPSInformation& in
|
||||
mTxtDateTime->setText( info.utcDateTime.toString( mDateTimeFormat ) ); //user specified format string for testing the millisecond part of time
|
||||
}
|
||||
mTxtSpeed->setText( tr( "%1 km/h" ).arg( info.speed, 0, 'f', 1 ) );
|
||||
mTxtDirection->setText( QString::number( info.direction, 'f', 1 ) );
|
||||
mTxtDirection->setText( QString::number( info.direction, 'f', 1 ) + QString::fromUtf8( "°" ) );
|
||||
mTxtHdop->setText( QString::number( info.hdop, 'f', 1 ) );
|
||||
mTxtVdop->setText( QString::number( info.vdop, 'f', 1 ) );
|
||||
mTxtPdop->setText( QString::number( info.pdop, 'f', 1 ) );
|
||||
mTxtHacc->setText( QString::number( info.hacc, 'f', 1 ) + "m" );
|
||||
mTxtVacc->setText( QString::number( info.vacc, 'f', 1 ) + "m" );
|
||||
mTxtFixMode->setText( info.fixMode == 'A' ? tr( "Automatic" ) : info.fixMode == 'M' ? tr( "Manual" ) : "" ); // A=automatic 2d/3d, M=manual; allowing for anything else
|
||||
mTxtFixType->setText( info.fixType == 3 ? tr( "3D" ) : info.fixType == 2 ? tr( "2D" ) : info.fixType == 1 ? tr( "No fix" ) : QString::number( info.fixType ) ); // 1=no fix, 2=2D, 3=3D; allowing for anything else
|
||||
mTxtQuality->setText( info.quality == 2 ? tr( "Differential" ) : info.quality == 1 ? tr( "Non-differential" ) : info.quality == 0 ? tr( "No position" ) : info.quality > 2 ? QString::number( info.quality ) : "" ); // allowing for anything else
|
||||
@ -794,7 +813,7 @@ void QgsGPSInformationWidget::on_mBtnAddVertex_clicked( )
|
||||
|
||||
void QgsGPSInformationWidget::addVertex( )
|
||||
{
|
||||
|
||||
QgsDebugMsg( "Adding Vertex" );
|
||||
if ( !mpRubberBand )
|
||||
{
|
||||
createRubberBand( );
|
||||
|
@ -191,6 +191,13 @@ ELSE(WIN32)
|
||||
ADD_DEFINITIONS(-D_TTY_POSIX_)
|
||||
ENDIF(WIN32)
|
||||
|
||||
IF (QT_MOBILITY_LOCATION_FOUND)
|
||||
SET(QGIS_CORE_SRCS
|
||||
${QGIS_CORE_SRCS}
|
||||
gps/qgsqtlocationconnection.cpp
|
||||
)
|
||||
ENDIF (QT_MOBILITY_LOCATION_FOUND)
|
||||
|
||||
IF (WITH_INTERNAL_SPATIALITE)
|
||||
IF (WIN32 OR APPLE OR ANDROID)
|
||||
INCLUDE_DIRECTORIES(${ICONV_INCLUDE_DIR})
|
||||
@ -274,6 +281,13 @@ SET(QGIS_CORE_MOC_HDRS
|
||||
gps/qextserialport/qextserialenumerator.h
|
||||
)
|
||||
|
||||
IF (QT_MOBILITY_LOCATION_FOUND)
|
||||
SET(QGIS_CORE_MOC_HDRS
|
||||
${QGIS_CORE_MOC_HDRS}
|
||||
gps/qgsqtlocationconnection.h
|
||||
)
|
||||
ENDIF (QT_MOBILITY_LOCATION_FOUND)
|
||||
|
||||
QT4_WRAP_CPP(QGIS_CORE_MOC_SRCS ${QGIS_CORE_MOC_HDRS})
|
||||
|
||||
# install headers
|
||||
@ -394,6 +408,13 @@ SET(QGIS_CORE_HDRS
|
||||
qgsspatialindex.h
|
||||
)
|
||||
|
||||
IF (QT_MOBILITY_LOCATION_FOUND)
|
||||
SET(QGIS_CORE_HDRS
|
||||
${QGIS_CORE_HDRS}
|
||||
gps/qgsqtlocationconnection.h
|
||||
)
|
||||
ENDIF (QT_MOBILITY_LOCATION_FOUND)
|
||||
|
||||
INCLUDE_DIRECTORIES(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
composer
|
||||
@ -494,6 +515,10 @@ IF(APPLE)
|
||||
TARGET_LINK_LIBRARIES(qgis_core "-framework CoreFoundation -framework IOKit")
|
||||
ENDIF(APPLE)
|
||||
|
||||
IF (QT_MOBILITY_LOCATION_FOUND)
|
||||
TARGET_LINK_LIBRARIES(qgis_core ${QT_MOBILITY_LOCATION_LIBRARY})
|
||||
ENDIF (QT_MOBILITY_LOCATION_FOUND)
|
||||
|
||||
TARGET_LINK_LIBRARIES(qgis_core
|
||||
${QT_QTMAIN_LIBRARY}
|
||||
${QT_QTXML_LIBRARY}
|
||||
|
@ -94,6 +94,8 @@ void QgsGPSConnection::clearLastGPSInformation()
|
||||
mLastGPSInformation.satellitesInView.clear();
|
||||
mLastGPSInformation.speed = 0;
|
||||
mLastGPSInformation.vdop = 0;
|
||||
mLastGPSInformation.hacc = -1;
|
||||
mLastGPSInformation.vacc = -1;
|
||||
mLastGPSInformation.quality = -1; // valid values: 0,1,2, maybe others
|
||||
mLastGPSInformation.satellitesUsed = 0;
|
||||
mLastGPSInformation.fixMode = ' ';
|
||||
|
@ -44,6 +44,8 @@ struct CORE_EXPORT QgsGPSInformation
|
||||
double pdop;
|
||||
double hdop;
|
||||
double vdop;
|
||||
double hacc; //horizontal accurancy in meters
|
||||
double vacc; //vertical accurancy in meters
|
||||
QDateTime utcDateTime;
|
||||
QChar fixMode;
|
||||
int fixType;
|
||||
|
@ -22,6 +22,10 @@
|
||||
#include "qgsnmeaconnection.h"
|
||||
#include "qgsgpsdconnection.h"
|
||||
|
||||
#ifdef HAVE_QT_MOBILITY_LOCATION
|
||||
#include "qgsqtlocationconnection.h"
|
||||
#endif
|
||||
|
||||
#include <QStringList>
|
||||
#include <QFileInfo>
|
||||
#include <QTimer>
|
||||
@ -30,6 +34,10 @@ QList< QPair<QString, QString> > QgsGPSDetector::availablePorts()
|
||||
{
|
||||
QList< QPair<QString, QString> > devs;
|
||||
|
||||
// try local QtLocation first
|
||||
#ifdef HAVE_QT_MOBILITY_LOCATION
|
||||
devs << QPair<QString, QString>( "internalGPS", tr( "internal GPS" ) );
|
||||
#endif
|
||||
// try local gpsd first
|
||||
devs << QPair<QString, QString>( "localhost:2947:", tr( "local gpsd" ) );
|
||||
|
||||
@ -145,6 +153,15 @@ void QgsGPSDetector::advance()
|
||||
|
||||
mConn = new QgsGpsdConnection( gpsParams[0], gpsParams[1].toShort(), gpsParams[2] );
|
||||
}
|
||||
else if ( mPortList[ mPortIndex ].first.contains( "internalGPS" ) )
|
||||
{
|
||||
#ifdef HAVE_QT_MOBILITY_LOCATION
|
||||
mConn = new QgsQtLocationConnection();
|
||||
#else
|
||||
qWarning( "QT_MOBILITY_LOCATION not found and mPortList matches internalGPS, this should never happen" );
|
||||
#endif
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
QextSerialPort *serial = new QextSerialPort( mPortList[ mPortIndex ].first, QextSerialPort::EventDriven );
|
||||
|
226
src/core/gps/qgsqtlocationconnection.cpp
Normal file
226
src/core/gps/qgsqtlocationconnection.cpp
Normal file
@ -0,0 +1,226 @@
|
||||
/***************************************************************************
|
||||
QgsQtLocationConnection.cpp - description
|
||||
---------------------
|
||||
begin : December 7th, 2011
|
||||
copyright : (C) 2011 by Marco Bernasocchi, Bernawebdesign.ch
|
||||
email : marco at bernawebdesign dot ch
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#include "qgsqtlocationconnection.h"
|
||||
#include "qgslogger.h"
|
||||
|
||||
#include <QLocalSocket>
|
||||
#include <QTimer>
|
||||
#include <QMetaType>
|
||||
|
||||
QgsQtLocationConnection::QgsQtLocationConnection( ): QgsGPSConnection( new QLocalSocket() )
|
||||
{
|
||||
//needed to fix https://sourceforge.net/p/necessitas/tickets/146/
|
||||
qRegisterMetaType< QList<QGeoSatelliteInfo> >( "QList<QGeoSatelliteInfo>" );
|
||||
|
||||
startGPS();
|
||||
startSatelliteMonitor();
|
||||
|
||||
//HACK to signal the gpsinformationwidget that we have a QtLocationConnection
|
||||
QTimer::singleShot( 500, this, SLOT( broadcastConnectionAvailable() ) );
|
||||
}
|
||||
|
||||
QgsQtLocationConnection::~QgsQtLocationConnection()
|
||||
{
|
||||
//connection will be closed by base class
|
||||
QgsDebugMsg( "entered." );
|
||||
}
|
||||
|
||||
//Needed to make connection detectable (half HACK)
|
||||
//this signals that the device has started the GPS sucessfully,
|
||||
//not that it has a fix yet.
|
||||
void QgsQtLocationConnection::broadcastConnectionAvailable()
|
||||
{
|
||||
if ( locationDataSource )
|
||||
{
|
||||
mStatus = GPSDataReceived;
|
||||
emit stateChanged( mLastGPSInformation );
|
||||
}
|
||||
}
|
||||
|
||||
//TODO: Temporarely needed to workaround https://sourceforge.net/p/necessitas/tickets/147/
|
||||
void QgsQtLocationConnection::positionUpdated( const QGeoPositionInfo &info )
|
||||
{
|
||||
mInfo = info;
|
||||
parseData();
|
||||
}
|
||||
|
||||
void QgsQtLocationConnection::parseData()
|
||||
{
|
||||
if ( locationDataSource )
|
||||
{
|
||||
mStatus = GPSDataReceived;
|
||||
//const QGeoPositionInfo &info = locationDataSource->lastKnownPosition();
|
||||
qDebug() << mInfo;
|
||||
if ( mInfo.isValid() )
|
||||
{
|
||||
// mInfo.HorizontalAccuracy;
|
||||
mLastGPSInformation.latitude = mInfo.coordinate().latitude();
|
||||
mLastGPSInformation.longitude = mInfo.coordinate().longitude() ;
|
||||
mLastGPSInformation.elevation = mInfo.coordinate().altitude();
|
||||
mLastGPSInformation.speed = mInfo.attribute( QGeoPositionInfo::GroundSpeed ) * 3.6; // m/s to km/h
|
||||
mLastGPSInformation.direction = mInfo.attribute( QGeoPositionInfo::Direction );
|
||||
mLastGPSInformation.utcDateTime = mInfo.timestamp();
|
||||
mLastGPSInformation.fixType = mInfo.coordinate().type() + 1;
|
||||
//< fixType, used for navigation (1 = Fix not available; 2 = 2D; 3 = 3D)
|
||||
//< coordinate().type(), returns 0 = Fix not available; 1 = 2D; 2 = 3D)
|
||||
mLastGPSInformation.hacc = mInfo.attribute( QGeoPositionInfo::HorizontalAccuracy ); //< Horizontal dilution of precision
|
||||
mLastGPSInformation.vacc = mInfo.attribute( QGeoPositionInfo::VerticalAccuracy ); //< Vertical dilution of precision
|
||||
|
||||
//TODO implement dop maybe by getting a
|
||||
//http://developer.android.com/reference/android/location/GpsStatus.NmeaListener.html
|
||||
//into QtLocation and subclass QgsNMEAConnection directly?
|
||||
mLastGPSInformation.pdop; //< Dilution of precision
|
||||
mLastGPSInformation.hdop; //< Horizontal dilution of precision
|
||||
mLastGPSInformation.vdop; //< Vertical dilution of precision
|
||||
|
||||
mLastGPSInformation.fixMode; //< Mode (M = Manual, forced to operate in 2D or 3D; A = Automatic, 3D/2D)
|
||||
mLastGPSInformation.quality; //< GPS quality indicator (0 = Invalid; 1 = Fix; 2 = Differential, 3 = Sensitive)
|
||||
mLastGPSInformation.status; //< Status (A = active or V = void)
|
||||
|
||||
emit stateChanged( mLastGPSInformation );
|
||||
QgsDebugMsg( "Valid QGeoPositionInfo, positionUpdated" );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void QgsQtLocationConnection::satellitesInViewUpdated(
|
||||
const QList<QGeoSatelliteInfo>& satellites )
|
||||
{
|
||||
// The number of satellites in view is updated
|
||||
mLastGPSInformation.satellitesInView.clear();
|
||||
for ( int i = 0; i < satellites.size(); ++i )
|
||||
{
|
||||
QGeoSatelliteInfo currentSatellite = satellites.at( i );
|
||||
QgsSatelliteInfo satelliteInfo;
|
||||
satelliteInfo.azimuth = currentSatellite.attribute( QGeoSatelliteInfo::Azimuth );
|
||||
satelliteInfo.elevation = currentSatellite.attribute( QGeoSatelliteInfo::Elevation );
|
||||
satelliteInfo.id = currentSatellite.prnNumber();
|
||||
satelliteInfo.signal = currentSatellite.signalStrength();
|
||||
mLastGPSInformation.satellitesInView.append( satelliteInfo );
|
||||
}
|
||||
mLastGPSInformation.satInfoComplete = true; //to be used to determine when to graph signal and satellite position
|
||||
emit stateChanged( mLastGPSInformation );
|
||||
QgsDebugMsg( "satellitesInViewUpdated" );
|
||||
}
|
||||
|
||||
void QgsQtLocationConnection::satellitesInUseUpdated(
|
||||
const QList<QGeoSatelliteInfo>& satellites )
|
||||
{
|
||||
// The number of satellites in use is updated
|
||||
mLastGPSInformation.satellitesUsed = QString::number( satellites.count() ).toInt();
|
||||
|
||||
mLastGPSInformation.satPrn.clear();
|
||||
for ( int i = 0; i < satellites.size(); ++i )
|
||||
{
|
||||
QGeoSatelliteInfo currentSatellite = satellites.at( i );
|
||||
//add pnr to mLastGPSInformation.satPrn
|
||||
mLastGPSInformation.satPrn.append( currentSatellite.prnNumber() );
|
||||
|
||||
//set QgsSatelliteInfo.inuse to true for the satellites in use
|
||||
for ( int i = 0; i < mLastGPSInformation.satellitesInView.size(); ++i )
|
||||
{
|
||||
QgsSatelliteInfo satInView = mLastGPSInformation.satellitesInView.at( i );
|
||||
if ( satInView.id == currentSatellite.prnNumber() )
|
||||
{
|
||||
satInView.inUse = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
mLastGPSInformation.satInfoComplete = true; //to be used to determine when to graph signal and satellite position
|
||||
emit stateChanged( mLastGPSInformation );
|
||||
QgsDebugMsg( "satellitesInUseUpdated" );
|
||||
}
|
||||
|
||||
void QgsQtLocationConnection::startGPS()
|
||||
{
|
||||
QgsDebugMsg( "Starting GPS QtLocation connection" );
|
||||
// Obtain the location data source if it is not obtained already
|
||||
if ( !locationDataSource )
|
||||
{
|
||||
locationDataSource = QGeoPositionInfoSource::createDefaultSource( this );
|
||||
if ( locationDataSource )
|
||||
{
|
||||
locationDataSource->setPreferredPositioningMethods( QGeoPositionInfoSource::SatellitePositioningMethods ); //QGeoPositionInfoSource::AllPositioningMethods
|
||||
// locationDataSource->setUpdateInterval(2000);
|
||||
// Whenever the location data source signals that the current
|
||||
// position is updated, the positionUpdated function is called.
|
||||
QObject::connect( locationDataSource,
|
||||
SIGNAL( positionUpdated( QGeoPositionInfo ) ),
|
||||
this,
|
||||
SLOT( positionUpdated( QGeoPositionInfo ) ) );
|
||||
// Start listening for position updates
|
||||
locationDataSource->startUpdates();
|
||||
}
|
||||
else
|
||||
{
|
||||
// Not able to obtain the location data source
|
||||
QgsDebugMsg( "No QtLocation Position Source" );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Start listening for position updates
|
||||
locationDataSource->startUpdates();
|
||||
}
|
||||
}
|
||||
|
||||
void QgsQtLocationConnection::startSatelliteMonitor()
|
||||
{
|
||||
QgsDebugMsg( "Starting GPS QtLocation satellite monitor" );
|
||||
if ( !satelliteInfoSource )
|
||||
{
|
||||
satelliteInfoSource = QGeoSatelliteInfoSource::createDefaultSource( this );
|
||||
if ( satelliteInfoSource )
|
||||
{
|
||||
QgsDebugMsg( "satelliteMonitor started" );
|
||||
// Whenever the satellite info source signals that the number of
|
||||
// satellites in use is updated, the satellitesInUseUpdated function
|
||||
// is called
|
||||
QObject::connect( satelliteInfoSource,
|
||||
SIGNAL( satellitesInUseUpdated(
|
||||
const QList<QGeoSatelliteInfo>& ) ),
|
||||
this,
|
||||
SLOT( satellitesInUseUpdated(
|
||||
const QList<QGeoSatelliteInfo>& ) ) );
|
||||
|
||||
// Whenever the satellite info source signals that the number of
|
||||
// satellites in view is updated, the satellitesInViewUpdated function
|
||||
// is called
|
||||
QObject::connect( satelliteInfoSource,
|
||||
SIGNAL( satellitesInViewUpdated(
|
||||
const QList<QGeoSatelliteInfo>& ) ),
|
||||
this,
|
||||
SLOT( satellitesInViewUpdated(
|
||||
const QList<QGeoSatelliteInfo>& ) ) );
|
||||
|
||||
// Start listening for satellite updates
|
||||
satelliteInfoSource->startUpdates();
|
||||
}
|
||||
else
|
||||
{
|
||||
// Not able to obtain the Satellite data source
|
||||
QgsDebugMsg( "No QtLocation Satellite Source" );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Start listening for position updates
|
||||
satelliteInfoSource->startUpdates();
|
||||
}
|
||||
}
|
62
src/core/gps/qgsqtlocationconnection.h
Normal file
62
src/core/gps/qgsqtlocationconnection.h
Normal file
@ -0,0 +1,62 @@
|
||||
/***************************************************************************
|
||||
QgsQtLocationConnection.h - description
|
||||
-------------------
|
||||
begin : December 7th, 2011
|
||||
copyright : (C) 2011 by Marco Bernasocchi, Bernawebdesign.ch
|
||||
email : marco at bernawebdesign dot ch
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef QGSQTLOCATIONCONNECTION_H
|
||||
#define QGSQTLOCATIONCONNECTION_H
|
||||
|
||||
#include "qgsgpsconnection.h"
|
||||
#include <QtCore/QPointer>
|
||||
#include <QtLocation/QGeoPositionInfoSource>
|
||||
#include <QtLocation/QGeoSatelliteInfo>
|
||||
#include <QtLocation/QGeoSatelliteInfoSource>
|
||||
|
||||
QTM_USE_NAMESPACE
|
||||
|
||||
class CORE_EXPORT QgsQtLocationConnection: public QgsGPSConnection
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
QgsQtLocationConnection();
|
||||
~QgsQtLocationConnection();
|
||||
|
||||
protected slots:
|
||||
/**Needed to make QtLocation detected*/
|
||||
void broadcastConnectionAvailable( );
|
||||
|
||||
/**Parse available data source content*/
|
||||
void parseData();
|
||||
|
||||
/**Called when the position updated.*/
|
||||
void positionUpdated( const QGeoPositionInfo &info );
|
||||
|
||||
/**Called when the number of satellites in view is updated.*/
|
||||
void satellitesInViewUpdated( const QList<QGeoSatelliteInfo>& satellites );
|
||||
|
||||
/**Called when the number of satellites in use is updated.*/
|
||||
void satellitesInUseUpdated( const QList<QGeoSatelliteInfo>& satellites );
|
||||
|
||||
private:
|
||||
void startGPS();
|
||||
void startSatelliteMonitor();
|
||||
QString mDevice;
|
||||
QGeoPositionInfo mInfo;
|
||||
QPointer<QGeoPositionInfoSource> locationDataSource;
|
||||
QPointer<QGeoSatelliteInfoSource> satelliteInfoSource;
|
||||
|
||||
};
|
||||
|
||||
#endif // QGSQTLOCATIONCONNECTION_H
|
@ -36,6 +36,11 @@ IF (WITH_GLOBE)
|
||||
ADD_SUBDIRECTORY(globe)
|
||||
ENDIF (WITH_GLOBE)
|
||||
|
||||
|
||||
IF (QT_MOBILITY_SENSORS_FOUND)
|
||||
ADD_SUBDIRECTORY(compass)
|
||||
ENDIF (QT_MOBILITY_SENSORS_FOUND)
|
||||
|
||||
# headers installed in qgis_core target
|
||||
|
||||
SUBDIRS (heatmap)
|
||||
|
51
src/plugins/compass/CMakeLists.txt
Normal file
51
src/plugins/compass/CMakeLists.txt
Normal file
@ -0,0 +1,51 @@
|
||||
|
||||
########################################################
|
||||
# Files
|
||||
|
||||
SET (COMPASS_SRCS
|
||||
compass.cpp
|
||||
qgscompassplugin.cpp
|
||||
qgscompassplugingui.cpp
|
||||
)
|
||||
|
||||
SET (COMPASS_UIS qgscompasspluginguibase.ui)
|
||||
|
||||
SET (COMPASS_MOC_HDRS
|
||||
compass.h
|
||||
qgscompassplugin.h
|
||||
qgscompassplugingui.h
|
||||
)
|
||||
|
||||
SET (COMPASS_RCCS compass.qrc)
|
||||
|
||||
########################################################
|
||||
# Build
|
||||
|
||||
QT4_WRAP_UI (COMPASS_UIS_H ${COMPASS_UIS})
|
||||
|
||||
QT4_WRAP_CPP (COMPASS_MOC_SRCS ${COMPASS_MOC_HDRS})
|
||||
|
||||
QT4_ADD_RESOURCES(COMPASS_RCC_SRCS ${COMPASS_RCCS})
|
||||
|
||||
ADD_LIBRARY (compassplugin MODULE ${COMPASS_SRCS} ${COMPASS_MOC_SRCS} ${COMPASS_RCC_SRCS} ${COMPASS_UIS_H})
|
||||
|
||||
INCLUDE_DIRECTORIES(
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
../../core ../../core/raster ../../core/renderer ../../core/symbology
|
||||
../../gui
|
||||
..
|
||||
)
|
||||
|
||||
TARGET_LINK_LIBRARIES(compassplugin
|
||||
qgis_core
|
||||
qgis_gui
|
||||
${QT_MOBILITY_SENSORS_LIBRARY}
|
||||
)
|
||||
|
||||
|
||||
########################################################
|
||||
# Install
|
||||
|
||||
INSTALL(TARGETS compassplugin
|
||||
RUNTIME DESTINATION ${QGIS_PLUGIN_DIR}
|
||||
LIBRARY DESTINATION ${QGIS_PLUGIN_DIR})
|
79
src/plugins/compass/compass.cpp
Normal file
79
src/plugins/compass/compass.cpp
Normal file
@ -0,0 +1,79 @@
|
||||
/***************************************************************************
|
||||
compass.cpp
|
||||
Functions:
|
||||
-------------------
|
||||
begin : Jan 28, 2012
|
||||
copyright : (C) 2012 by Marco Bernasocchi
|
||||
email : marco@bernawebdesign.ch
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#include "compass.h"
|
||||
|
||||
Compass::Compass()
|
||||
{
|
||||
// mRateVal = 0;
|
||||
// if (mRateVal > 0)
|
||||
// {
|
||||
// qDebug() << "Compasssensor setdatarate " << endl;
|
||||
// mSensor.setDataRate(mRateVal);
|
||||
// }
|
||||
// qDebug() << "Data rate 2: " << mSensor.dataRate();
|
||||
mSensor.addFilter( this );
|
||||
start();
|
||||
}
|
||||
|
||||
Compass::~Compass()
|
||||
{
|
||||
}
|
||||
|
||||
bool Compass::filter( QCompassReading *reading )
|
||||
{
|
||||
// int diff = ( reading->timestamp() - stamp );
|
||||
// stamp = reading->timestamp();
|
||||
|
||||
// QString str;
|
||||
// str = QString("%1 deg (%2 CalibLevel)")
|
||||
// .arg(reading->azimuth(), 3, 'f', 0)
|
||||
// .arg(reading->calibrationLevel(), 3, 'f', 0);
|
||||
// qDebug() << str << endl;
|
||||
|
||||
emit azimuthChanged( reading->azimuth(), reading->calibrationLevel() );
|
||||
return false; // don't store the reading in the sensor
|
||||
}
|
||||
|
||||
bool Compass::isActive()
|
||||
{
|
||||
return mSensor.isActive();
|
||||
}
|
||||
|
||||
bool Compass::start()
|
||||
{
|
||||
mSensor.start();
|
||||
if ( !mSensor.isActive() )
|
||||
{
|
||||
qDebug() << "Compasssensor didn't start!" << endl;
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Compass::stop()
|
||||
{
|
||||
mSensor.stop();
|
||||
if ( mSensor.isActive() )
|
||||
{
|
||||
qDebug() << "Compasssensor didn't stop!" << endl;
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
50
src/plugins/compass/compass.h
Normal file
50
src/plugins/compass/compass.h
Normal file
@ -0,0 +1,50 @@
|
||||
/***************************************************************************
|
||||
compass.h
|
||||
Functions: Reads data from a QtMobility QCompass
|
||||
-------------------
|
||||
begin : Jan 28, 2012
|
||||
copyright : (C) 2012 by Marco Bernasocchi
|
||||
email : marco@bernawebdesign.ch
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef _COMPASS_H__
|
||||
#define _COMPASS_H__
|
||||
|
||||
#include <QtGui>
|
||||
#include <QtCore>
|
||||
#include <QtSensors/QCompass>
|
||||
#include <QObject>
|
||||
|
||||
QTM_USE_NAMESPACE
|
||||
|
||||
class Compass : public QObject, public QCompassFilter
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
Compass();
|
||||
~Compass();
|
||||
bool filter( QCompassReading *reading );
|
||||
bool isActive();
|
||||
bool start();
|
||||
bool stop();
|
||||
|
||||
private:
|
||||
qtimestamp stamp;
|
||||
int mRateVal;
|
||||
QCompass mSensor;
|
||||
|
||||
signals:
|
||||
void azimuthChanged( const QVariant &azimuth, const QVariant &calibrationLevel );
|
||||
};
|
||||
|
||||
#endif // _COMPASS_H__
|
5
src/plugins/compass/compass.qrc
Normal file
5
src/plugins/compass/compass.qrc
Normal file
@ -0,0 +1,5 @@
|
||||
<RCC>
|
||||
<qresource prefix="/">
|
||||
<file>icons/mCompassRun.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
BIN
src/plugins/compass/icons/mCompassRun.png
Normal file
BIN
src/plugins/compass/icons/mCompassRun.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 7.2 KiB |
252
src/plugins/compass/qgscompassplugin.cpp
Normal file
252
src/plugins/compass/qgscompassplugin.cpp
Normal file
@ -0,0 +1,252 @@
|
||||
/***************************************************************************
|
||||
qgscompassplugin.cpp
|
||||
Functions:
|
||||
-------------------
|
||||
begin : Jan 28, 2012
|
||||
copyright : (C) 2012 by Marco Bernasocchi
|
||||
email : marco@bernawebdesign.ch
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
// includes
|
||||
|
||||
#include <qgisinterface.h>
|
||||
#include <qgisgui.h>
|
||||
#include <qgsapplication.h>
|
||||
#include "qgscompassplugin.h"
|
||||
|
||||
#include <QMenu>
|
||||
#include <QAction>
|
||||
#include <QFile>
|
||||
#include <QToolBar>
|
||||
#include <QMessageBox>
|
||||
#include "qgscompassplugingui.h"
|
||||
|
||||
|
||||
static const QString sName = QObject::tr( "Internal Compass" );
|
||||
static const QString sDescription = QObject::tr( "Shows a QtSensors compass reading" );
|
||||
static const QString sCategory = QObject::tr( "Plugins" );
|
||||
static const QString sPluginVersion = QObject::tr( "Version 0.9" );
|
||||
static const QgisPlugin::PLUGINTYPE sPluginType = QgisPlugin::UI;
|
||||
static const QString sPluginIcon = ":/compass.svn";
|
||||
|
||||
/**
|
||||
* Constructor for the plugin. The plugin is passed a pointer to the main app
|
||||
* and an interface object that provides access to exposed functions in QGIS.
|
||||
* @param qgis Pointer to the QGIS main window
|
||||
* @param _qI Pointer to the QGIS interface object
|
||||
*/
|
||||
QgsCompassPlugin::QgsCompassPlugin( QgisInterface * themQGisIface )
|
||||
: QgisPlugin( sName, sDescription, sCategory, sPluginVersion, sPluginType ),
|
||||
mQGisIface( themQGisIface )
|
||||
{
|
||||
/** Initialize the plugin */
|
||||
mDock = NULL;
|
||||
}
|
||||
|
||||
QgsCompassPlugin::~QgsCompassPlugin()
|
||||
{
|
||||
}
|
||||
|
||||
/* Following functions return name, description, version, and type for the plugin */
|
||||
QString QgsCompassPlugin::name()
|
||||
{
|
||||
return sName;
|
||||
}
|
||||
|
||||
QString QgsCompassPlugin::version()
|
||||
{
|
||||
return sPluginVersion;
|
||||
|
||||
}
|
||||
|
||||
QString QgsCompassPlugin::description()
|
||||
{
|
||||
return sDescription;
|
||||
|
||||
}
|
||||
|
||||
QString QgsCompassPlugin::category()
|
||||
{
|
||||
return sCategory;
|
||||
|
||||
}
|
||||
|
||||
int QgsCompassPlugin::type()
|
||||
{
|
||||
return QgisPlugin::UI;
|
||||
}
|
||||
|
||||
//method defined in interface
|
||||
void QgsCompassPlugin::help()
|
||||
{
|
||||
//implement me!
|
||||
}
|
||||
|
||||
/*
|
||||
* Initialize the GUI interface for the plugin
|
||||
*/
|
||||
void QgsCompassPlugin::initGui()
|
||||
{
|
||||
|
||||
// Create the action for tool
|
||||
mActionRunCompass = new QAction( QIcon(), tr( "Show compass" ), this );
|
||||
connect( mActionRunCompass, SIGNAL( triggered() ), this, SLOT( run() ) );
|
||||
|
||||
mActionAboutCompass = new QAction( QIcon(), tr( "&About" ), this );
|
||||
connect( mActionAboutCompass, SIGNAL( triggered() ), this, SLOT( about() ) );
|
||||
|
||||
setCurrentTheme( "" );
|
||||
// this is called when the icon theme is changed
|
||||
connect( mQGisIface, SIGNAL( currentThemeChanged( QString ) ), this, SLOT( setCurrentTheme( QString ) ) );
|
||||
|
||||
// Add the icon to the toolbar
|
||||
mQGisIface->pluginToolBar()->addAction( mActionRunCompass );
|
||||
//mQGisIface->pluginToolBar()->addAction( mActionAboutCompass );
|
||||
mQGisIface->addPluginToMenu( sName, mActionRunCompass );
|
||||
mQGisIface->addPluginToMenu( sName, mActionAboutCompass );
|
||||
// this is called when the icon theme is changed
|
||||
|
||||
}
|
||||
|
||||
// Slot called when the buffer menu item is activated
|
||||
void QgsCompassPlugin::run()
|
||||
{
|
||||
if ( ! mDock )
|
||||
{
|
||||
mDock = new QDockWidget( "Internal Compass", mQGisIface->mainWindow() );
|
||||
mQgsCompassPluginGui = new QgsCompassPluginGui( mDock );
|
||||
mDock->setWidget( mQgsCompassPluginGui );
|
||||
mDock->setFeatures( QDockWidget::DockWidgetClosable | QDockWidget::DockWidgetMovable | QDockWidget::DockWidgetFloatable );
|
||||
mQGisIface->addDockWidget( Qt::LeftDockWidgetArea, mDock );
|
||||
|
||||
}
|
||||
mDock->show();
|
||||
QObject::connect( mDock, SIGNAL( visibilityChanged( bool ) ), mQgsCompassPluginGui, SLOT( handleVisibilityChanged( bool ) ) );
|
||||
}
|
||||
|
||||
// Unload the plugin by cleaning up the GUI
|
||||
void QgsCompassPlugin::unload()
|
||||
{
|
||||
// remove the GUI
|
||||
mQGisIface->removeToolBarIcon( mActionRunCompass );
|
||||
mQGisIface->removePluginMenu( sName, mActionRunCompass );
|
||||
|
||||
//mQGisIface->removeToolBarIcon( mActionAboutCompass );
|
||||
mQGisIface->removePluginMenu( sName, mActionAboutCompass );
|
||||
|
||||
delete mActionRunCompass;
|
||||
delete mActionAboutCompass;
|
||||
delete mDock;
|
||||
}
|
||||
|
||||
//! Set icons to the current theme
|
||||
void QgsCompassPlugin::setCurrentTheme( QString )
|
||||
{
|
||||
mActionRunCompass->setIcon( getThemeIcon( "/mCompassRun.png" ) );
|
||||
mActionAboutCompass->setIcon( getThemeIcon( "/mActionAbout.png" ) );
|
||||
}
|
||||
|
||||
QIcon QgsCompassPlugin::getThemeIcon( const QString &theName )
|
||||
{
|
||||
if ( QFile::exists( QgsApplication::activeThemePath() + "/plugins" + theName ) )
|
||||
{
|
||||
return QIcon( QgsApplication::activeThemePath() + "/plugins" + theName );
|
||||
}
|
||||
else if ( QFile::exists( QgsApplication::defaultThemePath() + "/plugins" + theName ) )
|
||||
{
|
||||
return QIcon( QgsApplication::defaultThemePath() + "/plugins" + theName );
|
||||
}
|
||||
else
|
||||
{
|
||||
return QIcon( ":/icons" + theName );
|
||||
}
|
||||
}
|
||||
|
||||
void QgsCompassPlugin::about( )
|
||||
{
|
||||
QString title = QString( "About Internal Compass" );
|
||||
// sort by date of contribution
|
||||
QString text = QString( "<center><b>Internal Compass</b></center>"
|
||||
"<center>%1</center>"
|
||||
"<p>Shows reading of an internal compass using QtSensors<br/>"
|
||||
"<b>Developer:</b>"
|
||||
"<ol type=disc>"
|
||||
"<li>Marco Bernasocchi"
|
||||
"</ol>"
|
||||
"<p><b>Homepage:</b><br>"
|
||||
"<a href=\"http://opengis.ch\">http://opengis.ch</a></p>"
|
||||
"<p><b>Compass calibration:</b><br/>"
|
||||
"To calibrate the compass slowly rotate the device three times around each axis or "
|
||||
"rotate it like a on a Mobius strip.<br/>"
|
||||
"This <a href='http://www.youtube.com/watch?v=oNJJPeoG8lQ'>Video</a> demonstrates the process "
|
||||
"(this can be done from within QGIS as well).</p>"
|
||||
).arg( sPluginVersion );
|
||||
|
||||
// create dynamicaly because on Mac this dialog is modeless
|
||||
QWidget *w = new QWidget;
|
||||
w->setAttribute( Qt::WA_DeleteOnClose );
|
||||
w->setWindowIcon( getThemeIcon( "/compass.png" ) );
|
||||
QMessageBox::about( w, title, text );
|
||||
}
|
||||
|
||||
/**
|
||||
* Required extern functions needed for every plugin
|
||||
* These functions can be called prior to creating an instance
|
||||
* of the plugin class
|
||||
*/
|
||||
// Class factory to return a new instance of the plugin class
|
||||
QGISEXTERN QgisPlugin * classFactory( QgisInterface * themQGisIfacePointer )
|
||||
{
|
||||
return new QgsCompassPlugin( themQGisIfacePointer );
|
||||
}
|
||||
// Return the name of the plugin - note that we do not user class members as
|
||||
// the class may not yet be insantiated when this method is called.
|
||||
QGISEXTERN QString name()
|
||||
{
|
||||
return sName;
|
||||
}
|
||||
|
||||
// Return the description
|
||||
QGISEXTERN QString description()
|
||||
{
|
||||
return sDescription;
|
||||
}
|
||||
|
||||
// Return the category
|
||||
QGISEXTERN QString category()
|
||||
{
|
||||
return sCategory;
|
||||
}
|
||||
|
||||
// Return the type (either UI or MapLayer plugin)
|
||||
QGISEXTERN int type()
|
||||
{
|
||||
return sPluginType;
|
||||
}
|
||||
|
||||
// Return the version number for the plugin
|
||||
QGISEXTERN QString version()
|
||||
{
|
||||
return sPluginVersion;
|
||||
}
|
||||
|
||||
QGISEXTERN QString icon()
|
||||
{
|
||||
return sPluginIcon;
|
||||
}
|
||||
|
||||
// Delete ourself
|
||||
QGISEXTERN void unload( QgisPlugin * thePluginPointer )
|
||||
{
|
||||
delete thePluginPointer;
|
||||
}
|
100
src/plugins/compass/qgscompassplugin.h
Normal file
100
src/plugins/compass/qgscompassplugin.h
Normal file
@ -0,0 +1,100 @@
|
||||
/***************************************************************************
|
||||
qgscompassplugin.h
|
||||
Functions:
|
||||
-------------------
|
||||
begin : Jan 28, 2012
|
||||
copyright : (C) 2012 by Marco Bernasocchi
|
||||
email : marco@bernawebdesign.ch
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
#ifndef PLUGIN
|
||||
#define PLUGIN
|
||||
#include "../qgisplugin.h"
|
||||
#include "ui_qgscompasspluginguibase.h"
|
||||
#include "qgscompassplugingui.h"
|
||||
|
||||
class QgisInterface;
|
||||
|
||||
/**
|
||||
* \class QgsCompassPlugin
|
||||
*
|
||||
*/
|
||||
class QgsCompassPlugin: public QObject, public QgisPlugin, private Ui::QgsCompassPluginGuiBase
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
/**
|
||||
* Constructor for a plugin. The QgisInterface pointer is passed by
|
||||
* QGIS when it attempts to instantiate the plugin.
|
||||
* @param qI Pointer to the QgisInterface object
|
||||
*/
|
||||
QgsCompassPlugin( QgisInterface * );
|
||||
/**
|
||||
* Virtual function to return the name of the plugin. The name will be used when presenting a list
|
||||
* of installable plugins to the user
|
||||
*/
|
||||
virtual QString name();
|
||||
/**
|
||||
* Virtual function to return the version of the plugin.
|
||||
*/
|
||||
virtual QString version();
|
||||
/**
|
||||
* Virtual function to return a description of the plugins functions
|
||||
*/
|
||||
virtual QString description();
|
||||
/**
|
||||
* Virtual function to return a plugin category
|
||||
*/
|
||||
virtual QString category();
|
||||
/**
|
||||
* Return the plugin type
|
||||
*/
|
||||
virtual int type();
|
||||
//! Destructor
|
||||
virtual ~ QgsCompassPlugin();
|
||||
public slots:
|
||||
//! init the gui
|
||||
virtual void initGui();
|
||||
//! Show the dialog box
|
||||
void run();
|
||||
//! unload the plugin
|
||||
void unload();
|
||||
//! show the help document
|
||||
void help();
|
||||
//! update the plugins theme when the app tells us its theme is changed
|
||||
void setCurrentTheme( QString theThemeName );
|
||||
QIcon getThemeIcon( const QString &theThemeName );
|
||||
void about();
|
||||
private:
|
||||
|
||||
|
||||
//! Name of the plugin
|
||||
QString pluginNameQString;
|
||||
//! Version
|
||||
QString pluginVersionQString;
|
||||
//! Descrption of the plugin
|
||||
QString pluginDescriptionQString;
|
||||
//! Category of the plugin
|
||||
QString pluginCategoryQString;
|
||||
//! Plugin type as defined in Plugin::PLUGINTYPE
|
||||
int pluginType;
|
||||
//! Pointer to the QGIS interface object
|
||||
QgisInterface *mQGisIface;
|
||||
//! Pointer to the QAction object used in the menu and toolbar
|
||||
QAction *mActionRunCompass;
|
||||
QAction *mActionAboutCompass;
|
||||
|
||||
QDockWidget *mDock;
|
||||
QgsCompassPluginGui *mQgsCompassPluginGui;
|
||||
};
|
||||
|
||||
#endif
|
137
src/plugins/compass/qgscompassplugingui.cpp
Normal file
137
src/plugins/compass/qgscompassplugingui.cpp
Normal file
@ -0,0 +1,137 @@
|
||||
/***************************************************************************
|
||||
qgscompassplugingui.cpp
|
||||
Functions:
|
||||
-------------------
|
||||
begin : Jan 28, 2012
|
||||
copyright : (C) 2012 by Marco Bernasocchi
|
||||
email : marco@bernawebdesign.ch
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#include "qgisinterface.h"
|
||||
//#include "qgscontexthelp.h"
|
||||
#include "qgslogger.h"
|
||||
#include <QPainter>
|
||||
|
||||
#include "qgscompassplugingui.h"
|
||||
#include "compass.h"
|
||||
|
||||
QgsCompassPluginGui::QgsCompassPluginGui( QWidget * parent, Qt::WFlags fl )
|
||||
: QWidget( parent, fl )
|
||||
{
|
||||
setupUi( this );
|
||||
|
||||
compass = new Compass();
|
||||
|
||||
if ( ! compass->isActive() )
|
||||
{
|
||||
this->mWarningLabel->setText( "<font color='red'>No compass detected</font>" );
|
||||
}
|
||||
|
||||
QObject::connect( compass, SIGNAL( azimuthChanged( const QVariant&, const QVariant& ) ), this, SLOT( handleAzimuth( const QVariant&, const QVariant& ) ) );
|
||||
}
|
||||
|
||||
QgsCompassPluginGui::~QgsCompassPluginGui()
|
||||
{
|
||||
}
|
||||
|
||||
void QgsCompassPluginGui::handleVisibilityChanged( bool visible )
|
||||
{
|
||||
if ( visible )
|
||||
{
|
||||
compass->start();
|
||||
}
|
||||
else
|
||||
{
|
||||
compass->stop();
|
||||
}
|
||||
}
|
||||
|
||||
void QgsCompassPluginGui::handleAzimuth( const QVariant &azimuth, const QVariant &calLevel )
|
||||
{
|
||||
this->mAzimutDisplay->setText( QString( "%1" ).arg( azimuth.toInt() ) + QString::fromUtf8( "°" ) );
|
||||
|
||||
//TODO check when https://sourceforge.net/p/necessitas/tickets/153/ is fixed
|
||||
qreal calibrationLevel = calLevel.toReal() / 3;
|
||||
if ( calibrationLevel == 1 )
|
||||
{
|
||||
this->mCalibrationLabel->setStyleSheet( "Background-color:green" );
|
||||
}
|
||||
else if ( calibrationLevel <= 1 / 3 )
|
||||
{
|
||||
this->mCalibrationLabel->setStyleSheet( "Background-color:red" );
|
||||
this->mWarningLabel->setText( "<font color='red'><a href='http://www.youtube.com/watch?v=oNJJPeoG8lQ'>Compass calibration</a> needed</font>" );
|
||||
}
|
||||
else
|
||||
{
|
||||
this->mCalibrationLabel->setStyleSheet( "Background-color:yellow" );
|
||||
}
|
||||
rotatePixmap( this->mArrowPixmapLabel, QString( ":/images/north_arrows/default.png" ), -azimuth.toInt() );
|
||||
}
|
||||
|
||||
//Copied from QgsDecorationNorthArrowDialog adapted to be portable
|
||||
void QgsCompassPluginGui::rotatePixmap( QLabel * pixmapLabel, QString myFileNameQString, int theRotationInt )
|
||||
{
|
||||
QPixmap myQPixmap;
|
||||
if ( myQPixmap.load( myFileNameQString ) )
|
||||
{
|
||||
QPixmap myPainterPixmap( myQPixmap.height(), myQPixmap.width() );
|
||||
myPainterPixmap.fill();
|
||||
QPainter myQPainter;
|
||||
myQPainter.begin( &myPainterPixmap );
|
||||
|
||||
myQPainter.setRenderHint( QPainter::SmoothPixmapTransform );
|
||||
|
||||
double centerXDouble = myQPixmap.width() / 2;
|
||||
double centerYDouble = myQPixmap.height() / 2;
|
||||
//save the current canvas rotation
|
||||
myQPainter.save();
|
||||
//myQPainter.translate( (int)centerXDouble, (int)centerYDouble );
|
||||
|
||||
//rotate the canvas
|
||||
myQPainter.rotate( theRotationInt );
|
||||
//work out how to shift the image so that it appears in the center of the canvas
|
||||
//(x cos a + y sin a - x, -x sin a + y cos a - y)
|
||||
const double PI = 3.14159265358979323846;
|
||||
double myRadiansDouble = ( PI / 180 ) * theRotationInt;
|
||||
int xShift = static_cast<int>((
|
||||
( centerXDouble * cos( myRadiansDouble ) ) +
|
||||
( centerYDouble * sin( myRadiansDouble ) )
|
||||
) - centerXDouble );
|
||||
int yShift = static_cast<int>((
|
||||
( -centerXDouble * sin( myRadiansDouble ) ) +
|
||||
( centerYDouble * cos( myRadiansDouble ) )
|
||||
) - centerYDouble );
|
||||
|
||||
//draw the pixmap in the proper position
|
||||
myQPainter.drawPixmap( xShift, yShift, myQPixmap );
|
||||
|
||||
//unrotate the canvas again
|
||||
myQPainter.restore();
|
||||
myQPainter.end();
|
||||
|
||||
pixmapLabel->setPixmap( myPainterPixmap );
|
||||
}
|
||||
else
|
||||
{
|
||||
QPixmap myPainterPixmap( 200, 200 );
|
||||
myPainterPixmap.fill();
|
||||
QPainter myQPainter;
|
||||
myQPainter.begin( &myPainterPixmap );
|
||||
QFont myQFont( "time", 12, QFont::Bold );
|
||||
myQPainter.setFont( myQFont );
|
||||
myQPainter.setPen( Qt::red );
|
||||
myQPainter.drawText( 10, 20, tr( "Pixmap not found" ) );
|
||||
myQPainter.end();
|
||||
pixmapLabel->setPixmap( myPainterPixmap );
|
||||
}
|
||||
}
|
53
src/plugins/compass/qgscompassplugingui.h
Normal file
53
src/plugins/compass/qgscompassplugingui.h
Normal file
@ -0,0 +1,53 @@
|
||||
/***************************************************************************
|
||||
qgscompassplugingui.h
|
||||
Functions:
|
||||
-------------------
|
||||
begin : Jan 28, 2012
|
||||
copyright : (C) 2012 by Marco Bernasocchi
|
||||
email : marco@bernawebdesign.ch
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
#ifndef PLUGINGUI_H
|
||||
#define PLUGINGUI_H
|
||||
|
||||
#include "ui_qgscompasspluginguibase.h"
|
||||
#include "qgscontexthelp.h"
|
||||
|
||||
#include <QtGui/QDockWidget>
|
||||
#include "compass.h"
|
||||
|
||||
|
||||
class QgisInterface;
|
||||
|
||||
/**
|
||||
* \class QgsCompassPluginGui
|
||||
*/
|
||||
class QgsCompassPluginGui : public QWidget, private Ui::QgsCompassPluginGuiBase
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
QgsCompassPluginGui( QWidget* parent = 0, Qt::WFlags fl = 0 );
|
||||
~QgsCompassPluginGui();
|
||||
|
||||
private:
|
||||
QgisInterface * qI;
|
||||
Compass *compass;
|
||||
|
||||
private slots:
|
||||
// void on_buttonBox_helpRequested() { QgsContextHelp::run( metaObject()->className() ); }
|
||||
void handleVisibilityChanged( bool visible );
|
||||
void handleAzimuth( const QVariant &azimuth, const QVariant &calibrationLevel );
|
||||
void rotatePixmap( QLabel *pixmapLabel, QString myFileNameQString, int theRotationInt );
|
||||
};
|
||||
|
||||
#endif
|
75
src/plugins/compass/qgscompasspluginguibase.ui
Normal file
75
src/plugins/compass/qgscompasspluginguibase.ui
Normal file
@ -0,0 +1,75 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>QgsCompassPluginGuiBase</class>
|
||||
<widget class="QWidget" name="QgsCompassPluginGuiBase">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>251</width>
|
||||
<height>70</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Internal Compass</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="mCompassLabel">
|
||||
<property name="text">
|
||||
<string>Azimut</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="mAzimutDisplay">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="mCalibrationLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>10</horstretch>
|
||||
<verstretch>10</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="mArrowPixmapLabel">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignHCenter|Qt::AlignTop</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="mWarningLabel">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
@ -247,7 +247,7 @@ gray = no data
|
||||
<item row="4" column="0">
|
||||
<widget class="QStackedWidget" name="mStackedWidget">
|
||||
<property name="currentIndex">
|
||||
<number>3</number>
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="stackedWidgetPage1">
|
||||
<layout class="QGridLayout" name="gridLayout_11">
|
||||
@ -264,8 +264,8 @@ gray = no data
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>209</width>
|
||||
<height>501</height>
|
||||
<width>193</width>
|
||||
<height>504</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
@ -506,7 +506,7 @@ gray = no data
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="12" column="1">
|
||||
<item row="14" column="1">
|
||||
<spacer name="verticalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
@ -522,7 +522,7 @@ gray = no data
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="13" column="1">
|
||||
<item row="15" column="1">
|
||||
<widget class="QLineEdit" name="mTxtFixMode">
|
||||
<property name="toolTip">
|
||||
<string>GPS receiver configuration 2D/3D mode: Automatic or Manual</string>
|
||||
@ -532,14 +532,14 @@ gray = no data
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="13" column="0">
|
||||
<item row="15" column="0">
|
||||
<widget class="QLabel" name="mLblFixMode">
|
||||
<property name="text">
|
||||
<string>Mode</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="14" column="1">
|
||||
<item row="16" column="1">
|
||||
<widget class="QLineEdit" name="mTxtFixType">
|
||||
<property name="toolTip">
|
||||
<string>position fix dimensions: 2D, 3D or No fix</string>
|
||||
@ -549,14 +549,14 @@ gray = no data
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="14" column="0">
|
||||
<item row="16" column="0">
|
||||
<widget class="QLabel" name="mLblFixType">
|
||||
<property name="text">
|
||||
<string>Dimensions</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="15" column="1">
|
||||
<item row="17" column="1">
|
||||
<widget class="QLineEdit" name="mTxtQuality">
|
||||
<property name="toolTip">
|
||||
<string>quality of the position fix: Differential, Non-differential or No position</string>
|
||||
@ -566,14 +566,14 @@ gray = no data
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="15" column="0">
|
||||
<item row="17" column="0">
|
||||
<widget class="QLabel" name="mLblQuality">
|
||||
<property name="text">
|
||||
<string>Quality</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="16" column="1">
|
||||
<item row="18" column="1">
|
||||
<widget class="QLineEdit" name="mTxtStatus">
|
||||
<property name="toolTip">
|
||||
<string>position fix status: Valid or Invalid</string>
|
||||
@ -583,14 +583,14 @@ gray = no data
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="16" column="0">
|
||||
<item row="18" column="0">
|
||||
<widget class="QLabel" name="mLblStatus">
|
||||
<property name="text">
|
||||
<string>Status</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="17" column="1">
|
||||
<item row="19" column="1">
|
||||
<widget class="QLineEdit" name="mTxtSatellitesUsed">
|
||||
<property name="toolTip">
|
||||
<string>number of satellites used in the position fix</string>
|
||||
@ -600,13 +600,33 @@ gray = no data
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="17" column="0">
|
||||
<item row="19" column="0">
|
||||
<widget class="QLabel" name="mLblSatellitesUsed">
|
||||
<property name="text">
|
||||
<string>Satellites</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="12" column="1">
|
||||
<widget class="QLineEdit" name="mTxtHacc"/>
|
||||
</item>
|
||||
<item row="13" column="1">
|
||||
<widget class="QLineEdit" name="mTxtVacc"/>
|
||||
</item>
|
||||
<item row="12" column="0">
|
||||
<widget class="QLabel" name="mLblHacc">
|
||||
<property name="text">
|
||||
<string>H accurancy</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="13" column="0">
|
||||
<widget class="QLabel" name="mLblVacc">
|
||||
<property name="text">
|
||||
<string>V accurancy</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
@ -635,8 +655,8 @@ gray = no data
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>209</width>
|
||||
<height>501</height>
|
||||
<width>287</width>
|
||||
<height>638</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_7">
|
||||
@ -691,9 +711,6 @@ gray = no data
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="editable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
@ -807,6 +824,13 @@ gray = no data
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QRadioButton" name="mRadInternal">
|
||||
<property name="text">
|
||||
<string>Internal</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
@ -1214,12 +1238,12 @@ gray = no data
|
||||
<slot>setDisabled(bool)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>167</x>
|
||||
<y>65</y>
|
||||
<x>186</x>
|
||||
<y>140</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>157</x>
|
||||
<y>147</y>
|
||||
<x>196</x>
|
||||
<y>218</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
@ -1230,12 +1254,12 @@ gray = no data
|
||||
<slot>setEnabled(bool)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>231</x>
|
||||
<y>93</y>
|
||||
<x>250</x>
|
||||
<y>188</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>203</x>
|
||||
<y>147</y>
|
||||
<x>242</x>
|
||||
<y>218</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
@ -1246,8 +1270,8 @@ gray = no data
|
||||
<slot>setDisabled(bool)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>172</x>
|
||||
<y>79</y>
|
||||
<x>191</x>
|
||||
<y>140</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>264</x>
|
||||
@ -1262,8 +1286,8 @@ gray = no data
|
||||
<slot>setDisabled(bool)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>265</x>
|
||||
<y>86</y>
|
||||
<x>278</x>
|
||||
<y>140</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>264</x>
|
||||
@ -1278,8 +1302,8 @@ gray = no data
|
||||
<slot>setDisabled(bool)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>265</x>
|
||||
<y>86</y>
|
||||
<x>278</x>
|
||||
<y>140</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>264</x>
|
||||
@ -1294,8 +1318,8 @@ gray = no data
|
||||
<slot>setDisabled(bool)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>60</x>
|
||||
<y>104</y>
|
||||
<x>79</x>
|
||||
<y>188</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>142</x>
|
||||
@ -1310,8 +1334,8 @@ gray = no data
|
||||
<slot>setDisabled(bool)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>265</x>
|
||||
<y>114</y>
|
||||
<x>278</x>
|
||||
<y>188</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>264</x>
|
||||
@ -1326,8 +1350,8 @@ gray = no data
|
||||
<slot>setDisabled(bool)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>265</x>
|
||||
<y>114</y>
|
||||
<x>278</x>
|
||||
<y>188</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>264</x>
|
||||
@ -1342,12 +1366,12 @@ gray = no data
|
||||
<slot>setEnabled(bool)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>265</x>
|
||||
<y>114</y>
|
||||
<x>278</x>
|
||||
<y>188</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>235</x>
|
||||
<y>169</y>
|
||||
<x>253</x>
|
||||
<y>218</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
@ -1358,12 +1382,12 @@ gray = no data
|
||||
<slot>setEnabled(bool)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>265</x>
|
||||
<y>114</y>
|
||||
<x>278</x>
|
||||
<y>188</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>264</x>
|
||||
<y>168</y>
|
||||
<x>277</x>
|
||||
<y>216</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
@ -1374,12 +1398,12 @@ gray = no data
|
||||
<slot>setDisabled(bool)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>265</x>
|
||||
<y>86</y>
|
||||
<x>278</x>
|
||||
<y>140</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>264</x>
|
||||
<y>168</y>
|
||||
<x>277</x>
|
||||
<y>216</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
@ -1390,8 +1414,8 @@ gray = no data
|
||||
<slot>setEnabled(bool)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>56</x>
|
||||
<y>190</y>
|
||||
<x>75</x>
|
||||
<y>243</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>196</x>
|
||||
@ -1406,8 +1430,8 @@ gray = no data
|
||||
<slot>setEnabled(bool)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>265</x>
|
||||
<y>198</y>
|
||||
<x>278</x>
|
||||
<y>243</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>264</x>
|
||||
@ -1422,8 +1446,8 @@ gray = no data
|
||||
<slot>setEnabled(bool)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>265</x>
|
||||
<y>198</y>
|
||||
<x>278</x>
|
||||
<y>243</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>264</x>
|
||||
@ -1438,12 +1462,12 @@ gray = no data
|
||||
<slot>setDisabled(bool)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>265</x>
|
||||
<y>198</y>
|
||||
<x>278</x>
|
||||
<y>243</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>235</x>
|
||||
<y>169</y>
|
||||
<x>253</x>
|
||||
<y>218</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
@ -1454,12 +1478,12 @@ gray = no data
|
||||
<slot>setDisabled(bool)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>265</x>
|
||||
<y>198</y>
|
||||
<x>278</x>
|
||||
<y>243</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>264</x>
|
||||
<y>168</y>
|
||||
<x>277</x>
|
||||
<y>216</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
@ -1470,12 +1494,12 @@ gray = no data
|
||||
<slot>setEnabled(bool)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>132</x>
|
||||
<y>339</y>
|
||||
<x>151</x>
|
||||
<y>597</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>141</x>
|
||||
<y>360</y>
|
||||
<x>180</x>
|
||||
<y>622</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
@ -1486,12 +1510,12 @@ gray = no data
|
||||
<slot>setDisabled(bool)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>132</x>
|
||||
<y>320</y>
|
||||
<x>151</x>
|
||||
<y>573</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>141</x>
|
||||
<y>360</y>
|
||||
<x>180</x>
|
||||
<y>622</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
@ -1502,12 +1526,12 @@ gray = no data
|
||||
<slot>setDisabled(bool)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>132</x>
|
||||
<y>382</y>
|
||||
<x>151</x>
|
||||
<y>652</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>141</x>
|
||||
<y>360</y>
|
||||
<x>180</x>
|
||||
<y>622</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
@ -1518,8 +1542,8 @@ gray = no data
|
||||
<slot>setDisabled(bool)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>94</x>
|
||||
<y>348</y>
|
||||
<x>130</x>
|
||||
<y>424</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>122</x>
|
||||
@ -1553,9 +1577,89 @@ gray = no data
|
||||
<x>191</x>
|
||||
<y>71</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>109</x>
|
||||
<y>684</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>mRadInternal</sender>
|
||||
<signal>toggled(bool)</signal>
|
||||
<receiver>mGpsdHost</receiver>
|
||||
<slot>setDisabled(bool)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>54</x>
|
||||
<y>154</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>99</x>
|
||||
<y>261</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>mRadInternal</sender>
|
||||
<signal>toggled(bool)</signal>
|
||||
<receiver>mGpsdPort</receiver>
|
||||
<slot>setDisabled(bool)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>40</x>
|
||||
<y>160</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>100</x>
|
||||
<y>288</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>mRadInternal</sender>
|
||||
<signal>toggled(bool)</signal>
|
||||
<receiver>mGpsdDevice</receiver>
|
||||
<slot>setDisabled(bool)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>27</x>
|
||||
<y>159</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>107</x>
|
||||
<y>563</y>
|
||||
<y>319</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>mRadInternal</sender>
|
||||
<signal>toggled(bool)</signal>
|
||||
<receiver>mCboDevices</receiver>
|
||||
<slot>setDisabled(bool)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>140</x>
|
||||
<y>152</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>129</x>
|
||||
<y>211</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>mRadInternal</sender>
|
||||
<signal>toggled(bool)</signal>
|
||||
<receiver>mBtnRefreshDevices</receiver>
|
||||
<slot>setDisabled(bool)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>150</x>
|
||||
<y>153</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>172</x>
|
||||
<y>204</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
|
@ -25,7 +25,7 @@
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0" colspan="4">
|
||||
<item row="1" column="0" colspan="4">
|
||||
<widget class="QTabWidget" name="tabBar">
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
@ -1801,14 +1801,15 @@
|
||||
<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:'Ubuntu'; font-size:9pt; font-weight:400; font-style:normal;">
|
||||
</style></head><body style=" font-family:'Ubuntu'; font-size:11pt; font-weight:400; font-style:normal;">
|
||||
<table border="0" style="-qt-table-type: root; margin-top:4px; margin-bottom:4px; margin-left:4px; margin-right:4px;">
|
||||
<tr>
|
||||
<td style="border: none;">
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:9pt;"></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:9pt;"></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans'; font-size:10pt;"></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:11pt;"></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans'; font-size:10pt;"></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans'; font-size:10pt;"></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans'; font-size:10pt;"></p>
|
||||
@ -1818,7 +1819,7 @@ p, li { white-space: pre-wrap; }
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans'; font-size:10pt;"></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans'; font-size:10pt;"></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans'; font-size:10pt;"></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans Serif';"></p></td></tr></table></body></html></string>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans Serif'; font-size:9pt;"></p></td></tr></table></body></html></string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@ -1922,35 +1923,35 @@ p, li { white-space: pre-wrap; }
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<item row="2" column="0">
|
||||
<widget class="QPushButton" name="pbnLoadDefaultStyle">
|
||||
<property name="text">
|
||||
<string>Restore Default Style</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<item row="2" column="1">
|
||||
<widget class="QPushButton" name="pbnSaveDefaultStyle">
|
||||
<property name="text">
|
||||
<string>Save As Default</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<item row="2" column="2">
|
||||
<widget class="QPushButton" name="pbnLoadStyle">
|
||||
<property name="text">
|
||||
<string>Load Style ...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3">
|
||||
<item row="2" column="3">
|
||||
<widget class="QPushButton" name="pbnSaveStyleAs">
|
||||
<property name="text">
|
||||
<string>Save Style ...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" colspan="4">
|
||||
<item row="0" column="0" colspan="4">
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
@ -1982,7 +1983,6 @@ p, li { white-space: pre-wrap; }
|
||||
<tabstop>leBlueMin</tabstop>
|
||||
<tabstop>leBlueMax</tabstop>
|
||||
<tabstop>sboxThreeBandStdDev</tabstop>
|
||||
<tabstop>buttonBox</tabstop>
|
||||
<tabstop>leNoDataValue</tabstop>
|
||||
<tabstop>tableTransparency</tabstop>
|
||||
<tabstop>leDisplayName</tabstop>
|
||||
|
@ -21,7 +21,7 @@
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_8">
|
||||
<item row="0" column="0">
|
||||
<item row="1" column="0">
|
||||
<widget class="QTabWidget" name="tabWidget">
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
@ -330,8 +330,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>736</width>
|
||||
<height>542</height>
|
||||
<width>446</width>
|
||||
<height>481</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
@ -1207,7 +1207,7 @@
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<item row="2" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QPushButton" name="pbnLoadDefaultStyle">
|
||||
@ -1239,7 +1239,7 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<item row="0" column="0">
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
@ -1268,7 +1268,6 @@
|
||||
<tabstop>leMaximumScale</tabstop>
|
||||
<tabstop>txtSubsetSQL</tabstop>
|
||||
<tabstop>pbnQueryBuilder</tabstop>
|
||||
<tabstop>buttonBox</tabstop>
|
||||
</tabstops>
|
||||
<resources>
|
||||
<include location="../../images/images.qrc"/>
|
||||
|
Loading…
x
Reference in New Issue
Block a user