diff --git a/CMakeLists.txt b/CMakeLists.txt index 3a8f57f381fc..f387c9443b71 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -46,6 +46,9 @@ IF(WITH_MAPSERVER) SET (MAPSERVER_SKIP_ECW FALSE CACHE BOOL "Determines whether QGIS mapserver should disable ECW (ECW in server apps requires a special license)") ENDIF(WITH_MAPSERVER) +# Custom widgets +SET (WITH_CUSTOM_WIDGETS TRUE CACHE BOOL "Determines whether QGIS custom widgets for Qt Designer should be built") + # build our version of astyle SET (WITH_ASTYLE FALSE CACHE BOOL "If you plan to contribute you should reindent with scripts/prepare-commit.sh (using 'our' astyle)") @@ -229,10 +232,13 @@ SET(QT_USE_QTNETWORK 1) SET(QT_USE_QTSVG 1) SET(QT_USE_QTSQL 1) SET(QT_USE_QTWEBKIT 1) +IF (WITH_CUSTOM_WIDGETS) + SET(QT_USE_QTDESIGNER 1) +ENDIF (WITH_CUSTOM_WIDGETS) -IF (NOT QT_QTXML_FOUND OR NOT QT_QTNETWORK_FOUND OR NOT QT_QTSVG_FOUND OR NOT QT_QTSQL_FOUND OR NOT QT_QTWEBKIT_FOUND) +IF (NOT QT_QTXML_FOUND OR NOT QT_QTNETWORK_FOUND OR NOT QT_QTSVG_FOUND OR NOT QT_QTSQL_FOUND OR NOT QT_QTWEBKIT_FOUND OR (WITH_CUSTOM_WIDGETS AND NOT QT_QTDESIGNER_FOUND)) MESSAGE(SEND_ERROR "Some Qt4 modules haven't been found!") -ENDIF (NOT QT_QTXML_FOUND OR NOT QT_QTNETWORK_FOUND OR NOT QT_QTSVG_FOUND OR NOT QT_QTSQL_FOUND OR NOT QT_QTWEBKIT_FOUND) +ENDIF (NOT QT_QTXML_FOUND OR NOT QT_QTNETWORK_FOUND OR NOT QT_QTSVG_FOUND OR NOT QT_QTSQL_FOUND OR NOT QT_QTWEBKIT_FOUND OR (WITH_CUSTOM_WIDGETS AND NOT QT_QTDESIGNER_FOUND)) IF (WITH_QTMOBILITY) FIND_PACKAGE(QtMobility 1.1.0) @@ -282,7 +288,6 @@ IF (ENABLE_TESTS) add_custom_target(check-no-x COMMAND xvfb-run --server-args="-screen 10,1024x768x24" ctest --output-on-failure) ENDIF (ENABLE_TESTS) - INCLUDE( ${QT_USE_FILE} ) # Disable automatic conversion from QString to ASCII 8-bit strings (char *) @@ -533,6 +538,7 @@ SET (QGIS_LIBEXEC_DIR ${QGIS_LIBEXEC_SUBDIR}) SET (QGIS_DATA_DIR ${QGIS_DATA_SUBDIR}) SET (QGIS_PLUGIN_DIR ${QGIS_PLUGIN_SUBDIR}) SET (QGIS_INCLUDE_DIR ${QGIS_INCLUDE_SUBDIR}) +SET (QGIS_CUSTOMWIDGETS_DIR ${QT_PLUGINS_DIR}/designer) # set the default locations where the targets (executables, libraries) will land when compiled # this is to allow running qgis from the source tree without having to actually do a "make install" @@ -552,6 +558,7 @@ IF (UNIX AND NOT APPLE) SET (QGIS_MANUAL_DIR ${CMAKE_INSTALL_PREFIX}/${QGIS_MANUAL_SUBDIR}) ENDIF (UNIX AND NOT APPLE) + ############################################################# # Python bindings @@ -577,6 +584,10 @@ IF (WITH_BINDINGS) SET(PYTHON_SITE_PACKAGES_DIR ${QGIS_DATA_DIR}/python) ENDIF (NOT BINDINGS_GLOBAL_INSTALL) + IF (WITH_CUSTOM_WIDGETS) + SET(PYUIC_WIDGET_PLUGIN_DIRECTORY ${PYQT4_MOD_DIR}/uic/widget-plugins/) + ENDIF (WITH_CUSTOM_WIDGETS) + ENDIF (WITH_BINDINGS) # Set QSCINTILLA_VERSION_STR to that of module, if no headers found diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt index 158e4faad97a..9b079b061d96 100644 --- a/python/CMakeLists.txt +++ b/python/CMakeLists.txt @@ -180,6 +180,9 @@ SET(PY_FILES __init__.py utils.py ) +IF(WITH_CUSTOM_WIDGETS) + INSTALL(FILES custom_widgets/qgis_customwidgets.py DESTINATION "${PYUIC_WIDGET_PLUGIN_DIRECTORY}") +ENDIF(WITH_CUSTOM_WIDGETS) ADD_CUSTOM_TARGET(pyutils ALL) INSTALL(FILES ${PY_FILES} DESTINATION "${QGIS_PYTHON_DIR}") diff --git a/python/__init__.py b/python/__init__.py index 31207a67ec36..d89d7aead341 100755 --- a/python/__init__.py +++ b/python/__init__.py @@ -24,6 +24,7 @@ __revision__ = '$Format:%H$' import sip + try: apis = ["QDate", "QDateTime", "QString", "QTextStream", "QTime", "QUrl", "QVariant"] for api in apis: diff --git a/python/custom_widgets/qgis_customwidgets.py b/python/custom_widgets/qgis_customwidgets.py new file mode 100644 index 000000000000..af0e3195cfb1 --- /dev/null +++ b/python/custom_widgets/qgis_customwidgets.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- + +""" +*************************************************************************** + customwidgets.py + --------------------- + Date : May 2014 + Copyright : (C) 2014 by Denis Rouzaud + Email : denis.rouzaud@gmail.com +*************************************************************************** +* * +* 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. * +* * +*************************************************************************** +""" + +""" +This file is used by pyuic to redirect includes +in custom widgets to the correct QGIS python packages. +It is copied on installation in /pythonX/dist-packages/PyQt4/uic/widget-plugins/ +""" + +#pluginType = CW_FILTER +#def getFilter(): +# import qgis.gui +# +# QGIS_widgets = {} +# for pyClass in dir(qgis.gui): +# QGIS_widgets[pyClass] = 'qgis.gui' +# +# def _QGISfilter(widgetname, baseclassname, module): +# print widgetname, baseclassname, module +# if widgetname in QGIS_widgets: +# return (MATCH, (widgetname, baseclassname, QGIS_widgets[widgetname])) +# else: +# return (NO_MATCH, None) +# +# return _QGISfilter + + + +pluginType = MODULE +def moduleInformation(): + import qgis.gui + return "qgis.gui", dir(qgis.gui) + diff --git a/python/gui/qgsmaplayercombobox.sip b/python/gui/qgsmaplayercombobox.sip index 2ede4e94cbc6..5a79f59242bd 100644 --- a/python/gui/qgsmaplayercombobox.sip +++ b/python/gui/qgsmaplayercombobox.sip @@ -16,25 +16,20 @@ class QgsMapLayerComboBox : QComboBox */ explicit QgsMapLayerComboBox( QWidget *parent /TransferThis/ = 0 ); - /** - * @brief setFilters allows fitering according to layer type and/or geometry type. - */ + //! setFilters allows fitering according to layer type and/or geometry type. void setFilters( QgsMapLayerProxyModel::Filters filters ); - /** - * @brief currentLayer returns the current layer selected in the combo box - */ + //! currently used filter on list layers + QgsMapLayerProxyModel::Filters filters(); + + ///! currentLayer returns the current layer selected in the combo box QgsMapLayer* currentLayer(); public slots: - /** - * @brief setLayer set the current layer selected in the combo - */ + //! setLayer set the current layer selected in the combo void setLayer( QgsMapLayer* layer ); signals: - /** - * @brief layerChanged this signal is emitted whenever the currently selected layer changes - */ + //! layerChanged this signal is emitted whenever the currently selected layer changes void layerChanged( QgsMapLayer* layer ); }; diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index fd8bb737c100..49f8bb5850d7 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -20,6 +20,10 @@ IF (WITH_MAPSERVER) ADD_SUBDIRECTORY(mapserver) # TODO: enable again once compilation is fixed ENDIF (WITH_MAPSERVER) +IF (WITH_CUSTOM_WIDGETS) + ADD_SUBDIRECTORY(customwidgets) +ENDIF (WITH_CUSTOM_WIDGETS) + IF (WITH_ASTYLE) ADD_SUBDIRECTORY(astyle) ENDIF(WITH_ASTYLE) diff --git a/src/app/qgsrasterlayerproperties.cpp b/src/app/qgsrasterlayerproperties.cpp index daef408b3123..501022ed75dd 100644 --- a/src/app/qgsrasterlayerproperties.cpp +++ b/src/app/qgsrasterlayerproperties.cpp @@ -67,10 +67,11 @@ #include QgsRasterLayerProperties::QgsRasterLayerProperties( QgsMapLayer* lyr, QgsMapCanvas* theCanvas, QWidget *parent, Qt::WindowFlags fl ) - : QgsOptionsDialogBase( "RasterLayerProperties", parent, fl ), + : QgsOptionsDialogBase( "RasterLayerProperties", parent, fl ) // Constant that signals property not used. - TRSTRING_NOT_SET( tr( "Not Set" ) ), - mRasterLayer( qobject_cast( lyr ) ), mRendererWidget( 0 ) + , TRSTRING_NOT_SET( tr( "Not Set" ) ) + , mRasterLayer( qobject_cast( lyr ) ), mRendererWidget( 0 ) + , mMapCanvas( theCanvas ) { mGrayMinimumMaximumEstimated = true; mRGBMinimumMaximumEstimated = true; @@ -81,9 +82,6 @@ QgsRasterLayerProperties::QgsRasterLayerProperties( QgsMapLayer* lyr, QgsMapCanv // and connecting QDialogButtonBox's accepted/rejected signals to dialog's accept/reject slots initOptionsBase( false ); - mMaximumScaleIconLabel->setPixmap( QgsApplication::getThemePixmap( "/mActionZoomIn.svg" ) ); - mMinimumScaleIconLabel->setPixmap( QgsApplication::getThemePixmap( "/mActionZoomOut.svg" ) ); - connect( this, SIGNAL( accepted() ), this, SLOT( apply() ) ); connect( buttonBox->button( QDialogButtonBox::Apply ), SIGNAL( clicked() ), this, SLOT( apply() ) ); @@ -116,17 +114,9 @@ QgsRasterLayerProperties::QgsRasterLayerProperties( QgsMapLayer* lyr, QgsMapCanv connect( lbxPyramidResolutions, SIGNAL( itemSelectionChanged() ), this, SLOT( toggleBuildPyramidsButton() ) ); // set up the scale based layer visibility stuff.... + mScaleRangeWidget->setMapCanvas( mMapCanvas ); chkUseScaleDependentRendering->setChecked( lyr->hasScaleBasedVisibility() ); - bool projectScales = QgsProject::instance()->readBoolEntry( "Scales", "/useProjectScales" ); - if ( projectScales ) - { - QStringList scalesList = QgsProject::instance()->readListEntry( "Scales", "/ScalesList" ); - cbMinimumScale->updateScales( scalesList ); - cbMaximumScale->updateScales( scalesList ); - } - cbMinimumScale->setScale( 1.0 / lyr->minimumScale() ); - cbMaximumScale->setScale( 1.0 / lyr->maximumScale() ); - + mScaleRangeWidget->setScaleRange( 1.0 / lyr->maximumScale(), 1.0 / lyr->minimumScale() ); // caution: layer uses scale denoms, widget uses true scales leNoDataValue->setValidator( new QDoubleValidator( -std::numeric_limits::max(), std::numeric_limits::max(), 1000, this ) ); @@ -141,7 +131,6 @@ QgsRasterLayerProperties::QgsRasterLayerProperties( QgsMapLayer* lyr, QgsMapCanv pbnImportTransparentPixelValues->setIcon( QgsApplication::getThemeIcon( "/mActionFileOpen.svg" ) ); pbnExportTransparentPixelValues->setIcon( QgsApplication::getThemeIcon( "/mActionFileSave.svg" ) ); - mMapCanvas = theCanvas; mPixelSelectorTool = 0; if ( mMapCanvas ) { @@ -856,8 +845,9 @@ void QgsRasterLayerProperties::apply() // set up the scale based layer visibility stuff.... mRasterLayer->toggleScaleBasedVisibility( chkUseScaleDependentRendering->isChecked() ); - mRasterLayer->setMinimumScale( 1.0 / cbMinimumScale->scale() ); - mRasterLayer->setMaximumScale( 1.0 / cbMaximumScale->scale() ); + // caution: layer uses scale denoms, widget uses true scales + mRasterLayer->setMaximumScale( 1.0 / mScaleRangeWidget->minimumScale() ); + mRasterLayer->setMinimumScale( 1.0 / mScaleRangeWidget->maximumScale() ); //update the legend pixmap // pixmapLegend->setPixmap( mRasterLayer->legendAsPixmap() ); @@ -1717,16 +1707,6 @@ void QgsRasterLayerProperties::toggleBuildPyramidsButton() } } -void QgsRasterLayerProperties::on_mMinimumScaleSetCurrentPushButton_clicked() -{ - cbMinimumScale->setScale( 1.0 / QgisApp::instance()->mapCanvas()->mapSettings().scale() ); -} - -void QgsRasterLayerProperties::on_mMaximumScaleSetCurrentPushButton_clicked() -{ - cbMaximumScale->setScale( 1.0 / QgisApp::instance()->mapCanvas()->mapSettings().scale() ); -} - void QgsRasterLayerProperties::on_mResetColorRenderingBtn_clicked() { mBlendModeComboBox->setBlendMode( QPainter::CompositionMode_SourceOver ); diff --git a/src/app/qgsrasterlayerproperties.h b/src/app/qgsrasterlayerproperties.h index 2e55b351efb1..9de1aabb6072 100644 --- a/src/app/qgsrasterlayerproperties.h +++ b/src/app/qgsrasterlayerproperties.h @@ -98,8 +98,6 @@ class APP_EXPORT QgsRasterLayerProperties : public QgsOptionsDialogBase, private void on_pbnSaveStyleAs_clicked(); /** Help button */ void on_buttonBox_helpRequested() { QgsContextHelp::run( metaObject()->className() ); } - void on_mMinimumScaleSetCurrentPushButton_clicked(); - void on_mMaximumScaleSetCurrentPushButton_clicked(); /** Slot to reset all color rendering options to default * @note added in 1.9 diff --git a/src/app/qgsvectorlayerproperties.cpp b/src/app/qgsvectorlayerproperties.cpp index 164549ee7cbc..4a13bb217610 100644 --- a/src/app/qgsvectorlayerproperties.cpp +++ b/src/app/qgsvectorlayerproperties.cpp @@ -81,8 +81,7 @@ QgsVectorLayerProperties::QgsVectorLayerProperties( // and connecting QDialogButtonBox's accepted/rejected signals to dialog's accept/reject slots initOptionsBase( false ); - mMaximumScaleIconLabel->setPixmap( QgsApplication::getThemePixmap( "/mActionZoomIn.svg" ) ); - mMinimumScaleIconLabel->setPixmap( QgsApplication::getThemePixmap( "/mActionZoomOut.svg" ) ); + connect( buttonBox->button( QDialogButtonBox::Apply ), SIGNAL( clicked() ), this, SLOT( apply() ) ); connect( this, SIGNAL( accepted() ), this, SLOT( apply() ) ); @@ -360,7 +359,7 @@ void QgsVectorLayerProperties::syncToLayer( void ) "layer is shown here. To enter or modify the query, click on the Query Builder button" ) ); //see if we are dealing with a pg layer here - grpSubset->setEnabled( true ); + mSubsetGroupBox->setEnabled( true ); txtSubsetSQL->setText( layer->subsetString() ); // if the user is allowed to type an adhoc query, the app will crash if the query // is bad. For this reason, the sql box is disabled and the query must be built @@ -386,16 +385,9 @@ void QgsVectorLayerProperties::syncToLayer( void ) setDisplayField( layer-> displayField() ); // set up the scale based layer visibility stuff.... - chkUseScaleDependentRendering->setChecked( layer->hasScaleBasedVisibility() ); - bool projectScales = QgsProject::instance()->readBoolEntry( "Scales", "/useProjectScales" ); - if ( projectScales ) - { - QStringList scalesList = QgsProject::instance()->readListEntry( "Scales", "/ScalesList" ); - cbMinimumScale->updateScales( scalesList ); - cbMaximumScale->updateScales( scalesList ); - } - cbMinimumScale->setScale( 1.0 / layer->minimumScale() ); - cbMaximumScale->setScale( 1.0 / layer->maximumScale() ); + mScaleRangeWidget->setScaleRange( 1.0 / layer->maximumScale(), 1.0 / layer->minimumScale() ); // caution: layer uses scale denoms, widget uses true scales + mScaleVisibilityGroupBox->setChecked( layer->hasScaleBasedVisibility() ); + mScaleRangeWidget->setMapCanvas( QgisApp::instance()->mapCanvas() ); // get simplify drawing configuration const QgsVectorSimplifyMethod& simplifyMethod = layer->simplifyMethod(); @@ -491,7 +483,7 @@ void QgsVectorLayerProperties::apply() // // Set up sql subset query if applicable // - grpSubset->setEnabled( true ); + mSubsetGroupBox->setEnabled( true ); if ( txtSubsetSQL->toPlainText() != layer->subsetString() ) { @@ -501,9 +493,10 @@ void QgsVectorLayerProperties::apply() } // set up the scale based layer visibility stuff.... - layer->toggleScaleBasedVisibility( chkUseScaleDependentRendering->isChecked() ); - layer->setMinimumScale( 1.0 / cbMinimumScale->scale() ); - layer->setMaximumScale( 1.0 / cbMaximumScale->scale() ); + layer->toggleScaleBasedVisibility( mScaleVisibilityGroupBox->isChecked() ); + // caution: layer uses scale denoms, widget uses true scales + layer->setMaximumScale( 1.0 / mScaleRangeWidget->minimumScale() ); + layer->setMinimumScale( 1.0 / mScaleRangeWidget->maximumScale() ); // provider-specific options if ( layer->dataProvider() ) @@ -1110,16 +1103,6 @@ void QgsVectorLayerProperties::enableLabelOptions( bool theFlag ) labelOptionsFrame->setEnabled( theFlag ); } -void QgsVectorLayerProperties::on_mMinimumScaleSetCurrentPushButton_clicked() -{ - cbMinimumScale->setScale( 1.0 / QgisApp::instance()->mapCanvas()->mapSettings().scale() ); -} - -void QgsVectorLayerProperties::on_mMaximumScaleSetCurrentPushButton_clicked() -{ - cbMaximumScale->setScale( 1.0 / QgisApp::instance()->mapCanvas()->mapSettings().scale() ); -} - void QgsVectorLayerProperties::on_mSimplifyDrawingGroupBox_toggled( bool checked ) { if ( !( layer->dataProvider()->capabilities() & QgsVectorDataProvider::SimplifyGeometries ) ) diff --git a/src/app/qgsvectorlayerproperties.h b/src/app/qgsvectorlayerproperties.h index 1481ac9dd429..1b50a6be0cc3 100644 --- a/src/app/qgsvectorlayerproperties.h +++ b/src/app/qgsvectorlayerproperties.h @@ -20,6 +20,7 @@ #define QGSVECTORLAYERPROPERTIES #include "qgsoptionsdialogbase.h" +#include "qgsscalerangewidget.h" #include "ui_qgsvectorlayerpropertiesbase.h" #include "qgisgui.h" #include "qgsaddattrdialog.h" @@ -116,9 +117,6 @@ class APP_EXPORT QgsVectorLayerProperties : public QgsOptionsDialogBase, private void on_mButtonAddJoin_clicked(); void on_mButtonRemoveJoin_clicked(); - void on_mMinimumScaleSetCurrentPushButton_clicked(); - void on_mMaximumScaleSetCurrentPushButton_clicked(); - void on_mSimplifyDrawingGroupBox_toggled( bool checked ); signals: diff --git a/src/customwidgets/CMakeLists.txt b/src/customwidgets/CMakeLists.txt new file mode 100644 index 000000000000..9bc63cb1b714 --- /dev/null +++ b/src/customwidgets/CMakeLists.txt @@ -0,0 +1,77 @@ +ADD_DEFINITIONS(-DQT_PLUGIN) +ADD_DEFINITIONS(-DQT_NO_DEBUG) +ADD_DEFINITIONS(-DQT_SHARED) + + +######################################################## +# Files + +SET (QGIS_CUSTOMWIDGETS_SRCS + qgiscustomwidgets.cpp + qgscollapsiblegroupboxplugin.cpp + qgsfieldcomboboxplugin.cpp + qgsfieldexpressionwidgetplugin.cpp + qgsmaplayercomboboxplugin.cpp + qgsscalerangewidgetplugin.cpp +) + +SET (QGIS_CUSTOMWIDGETS_MOC_HDRS + qgiscustomwidgets.h + qgscollapsiblegroupboxplugin.h + qgsfieldcomboboxplugin.h + qgsfieldexpressionwidgetplugin.h + qgsmaplayercomboboxplugin.h + qgsscalerangewidgetplugin.h +) + +QT4_WRAP_CPP(QGIS_CUSTOMWIDGETS_MOC_SRCS ${QGIS_CUSTOMWIDGETS_MOC_HDRS}) + +IF(UNIX) + SET_SOURCE_FILES_PROPERTIES(${QGIS_CUSTOMWIDGETS_MOC_SRCS} PROPERTIES COMPILE_FLAGS "-Wno-deprecated-declarations" ) +ENDIF(UNIX) + +SET(QGIS_CUSTOMWIDGETS_HDRS + qgiscustomwidgets.h + qgscollapsiblegroupboxplugin.h + qgsfieldcomboboxplugin.h + qgsfieldexpressionwidgetplugin.h + qgsmaplayercomboboxplugin.h + qgsscalerangewidgetplugin.h +) + +# left commented as there is no UI file yet +# SET(QGIS_CUSTOMWIDGETS_UI_HDRS +# ${CMAKE_CURRENT_BINARY_DIR}/../ui/ui_qgsXXXwidget.h +# ) + +INCLUDE_DIRECTORIES( + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/../core/ + ${CMAKE_CURRENT_SOURCE_DIR}/../gui/ + # ${CMAKE_CURRENT_BINARY_DIR}/../ui (no UI file yet) +) + +############################################################# +# qgis_customwidgets library + +ADD_LIBRARY(qgis_customwidgets SHARED ${QGIS_CUSTOMWIDGETS_SRCS} ${QGIS_CUSTOMWIDGETS_MOC_SRCS} ${QGIS_CUSTOMWIDGETS_HDRS}) + +# TODO: apple +INSTALL(FILES ${QGIS_CUSTOMWIDGETS_HDRS} DESTINATION ${QGIS_INCLUDE_DIR}) + +SET_TARGET_PROPERTIES(qgis_customwidgets PROPERTIES + VERSION ${COMPLETE_VERSION} + SOVERSION ${COMPLETE_VERSION} + ) + +# make sure that UI files will be processed first +# left commented as there is no UI file yet +# ADD_DEPENDENCIES(qgis_customwidgets ui) + +TARGET_LINK_LIBRARIES(qgis_customwidgets qgis_gui) + +# install +INSTALL(TARGETS qgis_customwidgets + LIBRARY DESTINATION ${QGIS_CUSTOMWIDGETS_DIR}) + + diff --git a/src/customwidgets/qgiscustomwidgets.cpp b/src/customwidgets/qgiscustomwidgets.cpp new file mode 100644 index 000000000000..becaf56a35ce --- /dev/null +++ b/src/customwidgets/qgiscustomwidgets.cpp @@ -0,0 +1,48 @@ +/*************************************************************************** + qgscustomwidgets.cpp + -------------------------------------- + Date : 25.04.2014 + Copyright : (C) 2014 Denis Rouzaud + Email : denis.rouzaud@gmail.com +*************************************************************************** +* * +* 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 "qplugin.h" + +#include "qgiscustomwidgets.h" + +#include "qgscollapsiblegroupboxplugin.h" +#include "qgsfieldcomboboxplugin.h" +#include "qgsfieldexpressionwidgetplugin.h" +#include "qgsmaplayercomboboxplugin.h" +#include "qgsscalerangewidgetplugin.h" + + +QgisCustomWidgets::QgisCustomWidgets( QObject *parent ) + : QObject( parent ) +{ + + // !!!!!!!!!!!!!!!!!!!!! + // do not forget to add the corresponding line in python/customwidgets.py + // to make the custom widget available from python + // !!!!!!!!!!!!!!!!!!!!! + + mWidgets.append( new QgsCollapsibleGroupBoxPlugin ); + mWidgets.append( new QgsFieldComboBoxPlugin ); + mWidgets.append( new QgsFieldExpressionWidgetPlugin ); + mWidgets.append( new QgsMapLayerComboBoxPlugin ); + mWidgets.append( new QgsScaleRangeWidgetPlugin ); +} + +QList QgisCustomWidgets::customWidgets() const +{ + return mWidgets; +} + +Q_EXPORT_PLUGIN2( customwidgetsplugin, QgisCustomWidgets ) diff --git a/src/customwidgets/qgiscustomwidgets.h b/src/customwidgets/qgiscustomwidgets.h new file mode 100644 index 000000000000..22b4b4fc3e90 --- /dev/null +++ b/src/customwidgets/qgiscustomwidgets.h @@ -0,0 +1,38 @@ +/*************************************************************************** + qgscustomwidgets.h + -------------------------------------- + Date : 25.04.2014 + Copyright : (C) 2014 Denis Rouzaud + Email : denis.rouzaud@gmail.com +*************************************************************************** +* * +* 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 QGISCUSTOMWIDGETS_H +#define QGISCUSTOMWIDGETS_H + +#include +#include + +class QgisCustomWidgets : public QObject, public QDesignerCustomWidgetCollectionInterface +{ + Q_OBJECT + Q_INTERFACES( QDesignerCustomWidgetCollectionInterface ) + + public: + explicit QgisCustomWidgets( QObject *parent = 0 ); + + virtual QList customWidgets() const; + + static QString groupName() {return "QGIS custom widgets";} + + private: + QList mWidgets; +}; + +#endif // QGISCUSTOMWIDGETS_H diff --git a/src/customwidgets/qgscollapsiblegroupboxplugin.cpp b/src/customwidgets/qgscollapsiblegroupboxplugin.cpp new file mode 100644 index 000000000000..559c246d0d34 --- /dev/null +++ b/src/customwidgets/qgscollapsiblegroupboxplugin.cpp @@ -0,0 +1,97 @@ +/*************************************************************************** + qgscollapsiblegroupboxplugin.cpp + -------------------------------------- + Date : 25.04.2014 + Copyright : (C) 2014 Denis Rouzaud + Email : denis.rouzaud@gmail.com +*************************************************************************** +* * +* 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 "qgiscustomwidgets.h" +#include "qgscollapsiblegroupbox.h" +#include "qgscollapsiblegroupboxplugin.h" + + +QgsCollapsibleGroupBoxPlugin::QgsCollapsibleGroupBoxPlugin( QObject *parent ) + : QObject( parent ) + , mInitialized( false ) +{ +} + + +QString QgsCollapsibleGroupBoxPlugin::name() const +{ + return "QgsCollapsibleGroupBox"; +} + +QString QgsCollapsibleGroupBoxPlugin::group() const +{ + return QgisCustomWidgets::groupName(); +} + +QString QgsCollapsibleGroupBoxPlugin::includeFile() const +{ + return "qgscollapsiblegroupbox.h"; +} + +QIcon QgsCollapsibleGroupBoxPlugin::icon() const +{ + return QIcon(); +} + +bool QgsCollapsibleGroupBoxPlugin::isContainer() const +{ + return true; +} + +QWidget *QgsCollapsibleGroupBoxPlugin::createWidget( QWidget *parent ) +{ + return new QgsCollapsibleGroupBox( parent ); +} + +bool QgsCollapsibleGroupBoxPlugin::isInitialized() const +{ + return mInitialized; +} + +void QgsCollapsibleGroupBoxPlugin::initialize( QDesignerFormEditorInterface *core ) +{ + Q_UNUSED( core ); + if ( mInitialized ) + return; + mInitialized = true; +} + + +QString QgsCollapsibleGroupBoxPlugin::toolTip() const +{ + return "A collapsible group box"; +} + +QString QgsCollapsibleGroupBoxPlugin::whatsThis() const +{ + return "A collapsible group box with save state capability"; +} + +QString QgsCollapsibleGroupBoxPlugin::domXml() const +{ + return QString( "\n" + " \n" + " \n" + " \n" + " 0\n" + " 0\n" + " 300\n" + " 100\n" + " \n" + " \n" + " \n" + "\n" ) + .arg( name() ); +} diff --git a/src/customwidgets/qgscollapsiblegroupboxplugin.h b/src/customwidgets/qgscollapsiblegroupboxplugin.h new file mode 100644 index 000000000000..ba5faa9f80a4 --- /dev/null +++ b/src/customwidgets/qgscollapsiblegroupboxplugin.h @@ -0,0 +1,48 @@ +/*************************************************************************** + qgscollapsiblegroupboxplugin.h + -------------------------------------- + Date : 25.04.2014 + Copyright : (C) 2014 Denis Rouzaud + Email : denis.rouzaud@gmail.com +*************************************************************************** +* * +* 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 QGSCOLLAPSIBLEGROUPBOXPLUGIN_H +#define QGSCOLLAPSIBLEGROUPBOXPLUGIN_H + +#include +#include + + +class QDESIGNER_WIDGET_EXPORT QgsCollapsibleGroupBoxPlugin : public QObject, public QDesignerCustomWidgetInterface +{ + Q_OBJECT + Q_INTERFACES( QDesignerCustomWidgetInterface ) + + public: + explicit QgsCollapsibleGroupBoxPlugin( QObject *parent = 0 ); + + private: + bool mInitialized; + + // QDesignerCustomWidgetInterface interface + public: + QString name() const; + QString group() const; + QString includeFile() const; + QIcon icon() const; + bool isContainer() const; + QWidget *createWidget( QWidget *parent ); + bool isInitialized() const; + void initialize( QDesignerFormEditorInterface *core ); + QString toolTip() const; + QString whatsThis() const; + QString domXml() const; +}; +#endif // QGSCOLLAPSIBLEGROUPBOXPLUGIN_H diff --git a/src/customwidgets/qgsfieldcomboboxplugin.cpp b/src/customwidgets/qgsfieldcomboboxplugin.cpp new file mode 100644 index 000000000000..4d94c582358b --- /dev/null +++ b/src/customwidgets/qgsfieldcomboboxplugin.cpp @@ -0,0 +1,97 @@ +/*************************************************************************** + qgsfieldcomboboxplugin.cpp + -------------------------------------- + Date : 25.04.2014 + Copyright : (C) 2014 Denis Rouzaud + Email : denis.rouzaud@gmail.com +*************************************************************************** +* * +* 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 "qgiscustomwidgets.h" +#include "qgsfieldcombobox.h" +#include "qgsfieldcomboboxplugin.h" + + +QgsFieldComboBoxPlugin::QgsFieldComboBoxPlugin( QObject *parent ) + : QObject( parent ) + , mInitialized( false ) +{ +} + + +QString QgsFieldComboBoxPlugin::name() const +{ + return "QgsFieldComboBox"; +} + +QString QgsFieldComboBoxPlugin::group() const +{ + return QgisCustomWidgets::groupName(); +} + +QString QgsFieldComboBoxPlugin::includeFile() const +{ + return "qgsfieldcombobox.h"; +} + +QIcon QgsFieldComboBoxPlugin::icon() const +{ + return QIcon(); +} + +bool QgsFieldComboBoxPlugin::isContainer() const +{ + return false; +} + +QWidget *QgsFieldComboBoxPlugin::createWidget( QWidget *parent ) +{ + return new QgsFieldComboBox( parent ); +} + +bool QgsFieldComboBoxPlugin::isInitialized() const +{ + return mInitialized; +} + +void QgsFieldComboBoxPlugin::initialize( QDesignerFormEditorInterface *core ) +{ + Q_UNUSED( core ); + if ( mInitialized ) + return; + mInitialized = true; +} + + +QString QgsFieldComboBoxPlugin::toolTip() const +{ + return "A combo box to list the fields of a layer"; +} + +QString QgsFieldComboBoxPlugin::whatsThis() const +{ + return "A combo box to list the field of a layer."; +} + +QString QgsFieldComboBoxPlugin::domXml() const +{ + return QString( "\n" + " \n" + " \n" + " \n" + " 0\n" + " 0\n" + " 160\n" + " 27\n" + " \n" + " \n" + " \n" + "\n" ) + .arg( name() ); +} diff --git a/src/customwidgets/qgsfieldcomboboxplugin.h b/src/customwidgets/qgsfieldcomboboxplugin.h new file mode 100644 index 000000000000..114fefd2fc81 --- /dev/null +++ b/src/customwidgets/qgsfieldcomboboxplugin.h @@ -0,0 +1,48 @@ +/*************************************************************************** + qgsfieldcomboboxplugin.h + -------------------------------------- + Date : 25.04.2014 + Copyright : (C) 2014 Denis Rouzaud + Email : denis.rouzaud@gmail.com +*************************************************************************** +* * +* 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 QGSFIELDCOMBOBOXPLUGIN_H +#define QGSFIELDCOMBOBOXPLUGIN_H + +#include +#include + + +class QDESIGNER_WIDGET_EXPORT QgsFieldComboBoxPlugin : public QObject, public QDesignerCustomWidgetInterface +{ + Q_OBJECT + Q_INTERFACES( QDesignerCustomWidgetInterface ) + + public: + explicit QgsFieldComboBoxPlugin( QObject *parent = 0 ); + + private: + bool mInitialized; + + // QDesignerCustomWidgetInterface interface + public: + QString name() const; + QString group() const; + QString includeFile() const; + QIcon icon() const; + bool isContainer() const; + QWidget *createWidget( QWidget *parent ); + bool isInitialized() const; + void initialize( QDesignerFormEditorInterface *core ); + QString toolTip() const; + QString whatsThis() const; + QString domXml() const; +}; +#endif // QGSFIELDCOMBOBOXPLUGIN_H diff --git a/src/customwidgets/qgsfieldexpressionwidgetplugin.cpp b/src/customwidgets/qgsfieldexpressionwidgetplugin.cpp new file mode 100644 index 000000000000..c12684899fb4 --- /dev/null +++ b/src/customwidgets/qgsfieldexpressionwidgetplugin.cpp @@ -0,0 +1,97 @@ +/*************************************************************************** + qgsfieldexpressionwidgetplugin.cpp + -------------------------------------- + Date : 25.04.2014 + Copyright : (C) 2014 Denis Rouzaud + Email : denis.rouzaud@gmail.com +*************************************************************************** +* * +* 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 "qgiscustomwidgets.h" +#include "qgsfieldexpressionwidgetplugin.h" +#include "qgsfieldexpressionwidget.h" + + +QgsFieldExpressionWidgetPlugin::QgsFieldExpressionWidgetPlugin( QObject *parent ) + : QObject( parent ) + , mInitialized( false ) +{ +} + + +QString QgsFieldExpressionWidgetPlugin::name() const +{ + return "QgsFieldExpressionWidget"; +} + +QString QgsFieldExpressionWidgetPlugin::group() const +{ + return QgisCustomWidgets::groupName(); +} + +QString QgsFieldExpressionWidgetPlugin::includeFile() const +{ + return "qgsfieldexpressionwidget.h"; +} + +QIcon QgsFieldExpressionWidgetPlugin::icon() const +{ + return QIcon(); +} + +bool QgsFieldExpressionWidgetPlugin::isContainer() const +{ + return false; +} + +QWidget *QgsFieldExpressionWidgetPlugin::createWidget( QWidget *parent ) +{ + return new QgsFieldExpressionWidget( parent ); +} + +bool QgsFieldExpressionWidgetPlugin::isInitialized() const +{ + return mInitialized; +} + +void QgsFieldExpressionWidgetPlugin::initialize( QDesignerFormEditorInterface *core ) +{ + Q_UNUSED( core ); + if ( mInitialized ) + return; + mInitialized = true; +} + + +QString QgsFieldExpressionWidgetPlugin::toolTip() const +{ + return "An editable combo box to enter an expression"; +} + +QString QgsFieldExpressionWidgetPlugin::whatsThis() const +{ + return "An editable combo box to enter an expression. A button allows opening the expression dialog. Expression are evaluated to detect errors."; +} + +QString QgsFieldExpressionWidgetPlugin::domXml() const +{ + return QString( "\n" + " \n" + " \n" + " \n" + " 0\n" + " 0\n" + " 200\n" + " 27\n" + " \n" + " \n" + " \n" + "\n" ) + .arg( name() ); +} diff --git a/src/customwidgets/qgsfieldexpressionwidgetplugin.h b/src/customwidgets/qgsfieldexpressionwidgetplugin.h new file mode 100644 index 000000000000..0ecf23d7ec05 --- /dev/null +++ b/src/customwidgets/qgsfieldexpressionwidgetplugin.h @@ -0,0 +1,48 @@ +/*************************************************************************** + qgsfieldexpressionwidgetplugin.h + -------------------------------------- + Date : 25.04.2014 + Copyright : (C) 2014 Denis Rouzaud + Email : denis.rouzaud@gmail.com +*************************************************************************** +* * +* 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 QGSFIELDEXPRESSIONWIDGETPLUGIN_H +#define QGSFIELDEXPRESSIONWIDGETPLUGIN_H + +#include +#include + + +class QDESIGNER_WIDGET_EXPORT QgsFieldExpressionWidgetPlugin : public QObject, public QDesignerCustomWidgetInterface +{ + Q_OBJECT + Q_INTERFACES( QDesignerCustomWidgetInterface ) + + public: + explicit QgsFieldExpressionWidgetPlugin( QObject *parent = 0 ); + + private: + bool mInitialized; + + // QDesignerCustomWidgetInterface interface + public: + QString name() const; + QString group() const; + QString includeFile() const; + QIcon icon() const; + bool isContainer() const; + QWidget *createWidget( QWidget *parent ); + bool isInitialized() const; + void initialize( QDesignerFormEditorInterface *core ); + QString toolTip() const; + QString whatsThis() const; + QString domXml() const; +}; +#endif // QGSFIELDEXPRESSIONWIDGETPLUGIN_H diff --git a/src/customwidgets/qgsmaplayercomboboxplugin.cpp b/src/customwidgets/qgsmaplayercomboboxplugin.cpp new file mode 100644 index 000000000000..0404e78fee91 --- /dev/null +++ b/src/customwidgets/qgsmaplayercomboboxplugin.cpp @@ -0,0 +1,97 @@ +/*************************************************************************** + qgsmaplayercomboboxplugin.cpp + -------------------------------------- + Date : 25.04.2014 + Copyright : (C) 2014 Denis Rouzaud + Email : denis.rouzaud@gmail.com +*************************************************************************** +* * +* 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 "qgiscustomwidgets.h" +#include "qgsmaplayercombobox.h" +#include "qgsmaplayercomboboxplugin.h" + + +QgsMapLayerComboBoxPlugin::QgsMapLayerComboBoxPlugin( QObject *parent ) + : QObject( parent ) + , mInitialized( false ) +{ +} + + +QString QgsMapLayerComboBoxPlugin::name() const +{ + return "QgsMapLayerComboBox"; +} + +QString QgsMapLayerComboBoxPlugin::group() const +{ + return QgisCustomWidgets::groupName(); +} + +QString QgsMapLayerComboBoxPlugin::includeFile() const +{ + return "qgsmaplayercombobox.h"; +} + +QIcon QgsMapLayerComboBoxPlugin::icon() const +{ + return QIcon(); +} + +bool QgsMapLayerComboBoxPlugin::isContainer() const +{ + return false; +} + +QWidget *QgsMapLayerComboBoxPlugin::createWidget( QWidget *parent ) +{ + return new QgsMapLayerComboBox( parent ); +} + +bool QgsMapLayerComboBoxPlugin::isInitialized() const +{ + return mInitialized; +} + +void QgsMapLayerComboBoxPlugin::initialize( QDesignerFormEditorInterface *core ) +{ + Q_UNUSED( core ); + if ( mInitialized ) + return; + mInitialized = true; +} + + +QString QgsMapLayerComboBoxPlugin::toolTip() const +{ + return "A combo box to list the layers"; +} + +QString QgsMapLayerComboBoxPlugin::whatsThis() const +{ + return "A combo box to list the layers registered in QGIS. Layers might be filtered according to their type."; +} + +QString QgsMapLayerComboBoxPlugin::domXml() const +{ + return QString( "\n" + " \n" + " \n" + " \n" + " 0\n" + " 0\n" + " 160\n" + " 27\n" + " \n" + " \n" + " \n" + "\n" ) + .arg( name() ); +} diff --git a/src/customwidgets/qgsmaplayercomboboxplugin.h b/src/customwidgets/qgsmaplayercomboboxplugin.h new file mode 100644 index 000000000000..5e99babd6216 --- /dev/null +++ b/src/customwidgets/qgsmaplayercomboboxplugin.h @@ -0,0 +1,49 @@ +/*************************************************************************** + qgsmaplayercomboboxplugin.h + -------------------------------------- + Date : 25.04.2014 + Copyright : (C) 2014 Denis Rouzaud + Email : denis.rouzaud@gmail.com +*************************************************************************** +* * +* 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 QGSMAPLAYERCOMBOBOXPLUGIN_H +#define QGSMAPLAYERCOMBOBOXPLUGIN_H + +#include +#include + + +class QDESIGNER_WIDGET_EXPORT QgsMapLayerComboBoxPlugin : public QObject, public QDesignerCustomWidgetInterface +{ + Q_OBJECT + Q_INTERFACES( QDesignerCustomWidgetInterface ) + + public: + explicit QgsMapLayerComboBoxPlugin( QObject *parent = 0 ); + + private: + bool mInitialized; + + // QDesignerCustomWidgetInterface interface + public: + QString name() const; + QString group() const; + QString includeFile() const; + QIcon icon() const; + bool isContainer() const; + QWidget *createWidget( QWidget *parent ); + bool isInitialized() const; + void initialize( QDesignerFormEditorInterface *core ); + QString toolTip() const; + QString whatsThis() const; + QString domXml() const; +}; + +#endif // QGSMAPLAYERCOMBOBOXPLUGIN_H diff --git a/src/customwidgets/qgsscalerangewidgetplugin.cpp b/src/customwidgets/qgsscalerangewidgetplugin.cpp new file mode 100644 index 000000000000..8ba415245dd1 --- /dev/null +++ b/src/customwidgets/qgsscalerangewidgetplugin.cpp @@ -0,0 +1,97 @@ +/*************************************************************************** + qgsscalerangewidgetplugin.cpp + -------------------------------------- + Date : 25.04.2014 + Copyright : (C) 2014 Denis Rouzaud + Email : denis.rouzaud@gmail.com +*************************************************************************** +* * +* 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 "qgiscustomwidgets.h" +#include "qgsscalerangewidgetplugin.h" +#include "qgsscalerangewidget.h" + + +QgsScaleRangeWidgetPlugin::QgsScaleRangeWidgetPlugin( QObject *parent ) + : QObject( parent ) + , mInitialized( false ) +{ +} + + +QString QgsScaleRangeWidgetPlugin::name() const +{ + return "QgsScaleRangeWidget"; +} + +QString QgsScaleRangeWidgetPlugin::group() const +{ + return QgisCustomWidgets::groupName(); +} + +QString QgsScaleRangeWidgetPlugin::includeFile() const +{ + return "qgsscalerangewidget.h"; +} + +QIcon QgsScaleRangeWidgetPlugin::icon() const +{ + return QIcon(); +} + +bool QgsScaleRangeWidgetPlugin::isContainer() const +{ + return false; +} + +QWidget *QgsScaleRangeWidgetPlugin::createWidget( QWidget *parent ) +{ + return new QgsScaleRangeWidget( parent ); +} + +bool QgsScaleRangeWidgetPlugin::isInitialized() const +{ + return mInitialized; +} + +void QgsScaleRangeWidgetPlugin::initialize( QDesignerFormEditorInterface *core ) +{ + Q_UNUSED( core ); + if ( mInitialized ) + return; + mInitialized = true; +} + + +QString QgsScaleRangeWidgetPlugin::toolTip() const +{ + return "A widget to define the scale range"; +} + +QString QgsScaleRangeWidgetPlugin::whatsThis() const +{ + return "A widget to define the scale range."; +} + +QString QgsScaleRangeWidgetPlugin::domXml() const +{ + return QString( "\n" + " \n" + " \n" + " \n" + " 0\n" + " 0\n" + " 400\n" + " 100\n" + " \n" + " \n" + " \n" + "\n" ) + .arg( name() ); +} diff --git a/src/customwidgets/qgsscalerangewidgetplugin.h b/src/customwidgets/qgsscalerangewidgetplugin.h new file mode 100644 index 000000000000..f9a68e901956 --- /dev/null +++ b/src/customwidgets/qgsscalerangewidgetplugin.h @@ -0,0 +1,48 @@ +/*************************************************************************** + qgsscalerangewidgetplugin.h + -------------------------------------- + Date : 25.04.2014 + Copyright : (C) 2014 Denis Rouzaud + Email : denis.rouzaud@gmail.com +*************************************************************************** +* * +* 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 QGSSCALERANGEWIDGETPLUGIN_H +#define QGSSCALERANGEWIDGETPLUGIN_H + +#include +#include + + +class QDESIGNER_WIDGET_EXPORT QgsScaleRangeWidgetPlugin : public QObject, public QDesignerCustomWidgetInterface +{ + Q_OBJECT + Q_INTERFACES( QDesignerCustomWidgetInterface ) + + public: + explicit QgsScaleRangeWidgetPlugin( QObject *parent = 0 ); + + private: + bool mInitialized; + + // QDesignerCustomWidgetInterface interface + public: + QString name() const; + QString group() const; + QString includeFile() const; + QIcon icon() const; + bool isContainer() const; + QWidget *createWidget( QWidget *parent ); + bool isInitialized() const; + void initialize( QDesignerFormEditorInterface *core ); + QString toolTip() const; + QString whatsThis() const; + QString domXml() const; +}; +#endif // QGSSCALERANGEWIDGETPLUGIN_H diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt index 7ad4f44839d2..8b56081986f7 100644 --- a/src/gui/CMakeLists.txt +++ b/src/gui/CMakeLists.txt @@ -138,6 +138,7 @@ qgsrelationeditor.cpp qgsrelationmanagerdialog.cpp qgsrubberband.cpp qgsscalecombobox.cpp +qgsscalerangewidget.cpp qgssearchquerybuilder.cpp qgssublayersdialog.cpp qgssvgannotationitem.cpp @@ -276,6 +277,7 @@ qgsrelationadddlg.h qgsrelationeditor.h qgsrelationmanagerdialog.h qgsscalecombobox.h +qgsscalerangewidget.h qgssearchquerybuilder.h qgssublayersdialog.h qgsunitselectionwidget.h @@ -340,6 +342,7 @@ qgsprojectionselector.h qgsrelationeditor.h qgsrubberband.h qgsscalecombobox.h +qgsscalerangewidget.h qgssearchquerybuilder.h qgssublayersdialog.h qgsvectorlayertools.h diff --git a/src/gui/qgsmaplayercombobox.h b/src/gui/qgsmaplayercombobox.h index 7065f34cb1ba..b2b160b718fe 100644 --- a/src/gui/qgsmaplayercombobox.h +++ b/src/gui/qgsmaplayercombobox.h @@ -30,6 +30,9 @@ class QgsVectorLayer; class GUI_EXPORT QgsMapLayerComboBox : public QComboBox { Q_OBJECT + Q_FLAGS( QgsMapLayerProxyModel::Filters ) + Q_PROPERTY( QgsMapLayerProxyModel::Filters filters READ filters WRITE setFilters ) + public: /** * @brief QgsMapLayerComboBox creates a combo box to dislpay the list of layers (currently in the registry). @@ -37,26 +40,21 @@ class GUI_EXPORT QgsMapLayerComboBox : public QComboBox */ explicit QgsMapLayerComboBox( QWidget *parent = 0 ); - /** - * @brief setFilters allows fitering according to layer type and/or geometry type. - */ + //! setFilters allows fitering according to layer type and/or geometry type. void setFilters( QgsMapLayerProxyModel::Filters filters ); - /** - * @brief currentLayer returns the current layer selected in the combo box - */ + //! currently used filter on list layers + QgsMapLayerProxyModel::Filters filters() { return mProxyModel->filters(); } + + //! currentLayer returns the current layer selected in the combo box QgsMapLayer* currentLayer(); public slots: - /** - * @brief setLayer set the current layer selected in the combo - */ + //! setLayer set the current layer selected in the combo void setLayer( QgsMapLayer* layer ); signals: - /** - * @brief layerChanged this signal is emitted whenever the currently selected layer changes - */ + //! layerChanged this signal is emitted whenever the currently selected layer changes void layerChanged( QgsMapLayer* layer ); protected slots: @@ -64,7 +62,6 @@ class GUI_EXPORT QgsMapLayerComboBox : public QComboBox private: QgsMapLayerProxyModel* mProxyModel; - }; #endif // QGSMAPLAYERCOMBOBOX_H diff --git a/src/gui/qgsmaplayerproxymodel.h b/src/gui/qgsmaplayerproxymodel.h index 7181f68d7817..0aefd5d6d083 100644 --- a/src/gui/qgsmaplayerproxymodel.h +++ b/src/gui/qgsmaplayerproxymodel.h @@ -27,6 +27,7 @@ class QgsMapLayerModel; class GUI_EXPORT QgsMapLayerProxyModel : public QSortFilterProxyModel { Q_OBJECT + Q_FLAGS( Filters ) public: enum Filter { diff --git a/src/gui/qgsscalerangewidget.cpp b/src/gui/qgsscalerangewidget.cpp new file mode 100644 index 000000000000..84be69af72ea --- /dev/null +++ b/src/gui/qgsscalerangewidget.cpp @@ -0,0 +1,156 @@ +/*************************************************************************** + qgsscalerangewidget.cpp + -------------------------------------- + Date : 25.04.2014 + Copyright : (C) 2014 Denis Rouzaud + Email : denis.rouzaud@gmail.com +*************************************************************************** +* * +* 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 "qgsscalerangewidget.h" +#include "qgsapplication.h" +#include "qgsproject.h" + + +QgsScaleRangeWidget::QgsScaleRangeWidget( QWidget *parent ) + : QWidget( parent ) + , mCanvas( 0 ) + , mMaximumScaleSetCurrentPushButton( 0 ) + , mMinimumScaleSetCurrentPushButton( 0 ) +{ + mLayout = new QGridLayout( this ); + mLayout->setContentsMargins( 0, 0, 0, 0 ); + + QLabel* minLbl = new QLabel( tr( "Minimimum\n(exclusive)" ), this ); + minLbl->setWordWrap( true ); + minLbl->setAlignment( Qt::AlignTop ); + minLbl->setToolTip( tr( "Minimum scale, i.e. maximum scale denominator. " + "This limit is exclusive, that means the layer will not be displayed on this scale." ) ); + QLabel* maxLbl = new QLabel( tr( "Maximimum\n(inclusive)" ), this ); + maxLbl->setWordWrap( true ); + maxLbl->setAlignment( Qt::AlignTop ); + maxLbl->setToolTip( tr( "Maximum scale, i.e. minimum scale denominator. " + "This limit is inclusive, that means the layer will be displayed on this scale." ) ); + + mMinimumScaleIconLabel = new QLabel( this ); + mMinimumScaleIconLabel->setPixmap( QgsApplication::getThemePixmap( "/mActionZoomOut.svg" ) ); + mMaximumScaleIconLabel = new QLabel( this ); + mMaximumScaleIconLabel->setPixmap( QgsApplication::getThemePixmap( "/mActionZoomIn.svg" ) ); + + mMinimumScaleComboBox = new QgsScaleComboBox( this ); + mMaximumScaleComboBox = new QgsScaleComboBox( this ); + reloadProjectScales(); + // add start, add comprehension of scales by settings fake ordered values + mMinimumScaleComboBox->setCurrentIndex( 2 ); + mMaximumScaleComboBox->setCurrentIndex( mMinimumScaleComboBox->currentIndex() + 2 ); + + mLayout->addWidget( minLbl, 0, 0, 2, 1 ); + mLayout->addWidget( mMinimumScaleIconLabel, 0, 1 ); + mLayout->addWidget( mMinimumScaleComboBox, 0, 2 ); + mLayout->addWidget( maxLbl, 0, 3, 2, 1 ); + mLayout->addWidget( mMaximumScaleIconLabel, 0, 4 ); + mLayout->addWidget( mMaximumScaleComboBox, 0, 5 ); + + mLayout->setColumnStretch( 0, 0 ); + mLayout->setColumnStretch( 1, 0 ); + mLayout->setColumnStretch( 2, 3 ); + mLayout->setColumnStretch( 3, 0 ); + mLayout->setColumnStretch( 4, 0 ); + mLayout->setColumnStretch( 5, 3 ); +} + +QgsScaleRangeWidget::~QgsScaleRangeWidget() +{ +} + +void QgsScaleRangeWidget::reloadProjectScales() +{ + bool projectScales = QgsProject::instance()->readBoolEntry( "Scales", "/useProjectScales" ); + if ( projectScales ) + { + QStringList scalesList = QgsProject::instance()->readListEntry( "Scales", "/ScalesList" ); + mMinimumScaleComboBox->updateScales( scalesList ); + mMaximumScaleComboBox->updateScales( scalesList ); + } +} + +void QgsScaleRangeWidget::setMapCanvas( QgsMapCanvas *mapCanvas ) +{ + if ( mMinimumScaleSetCurrentPushButton ) + { + delete mMinimumScaleSetCurrentPushButton; + mMinimumScaleSetCurrentPushButton = 0; + } + if ( mMaximumScaleSetCurrentPushButton ) + { + delete mMaximumScaleSetCurrentPushButton; + mMaximumScaleSetCurrentPushButton = 0; + } + + if ( !mapCanvas ) + return; + + mCanvas = mapCanvas; + + mMinimumScaleSetCurrentPushButton = new QPushButton( tr( "current" ), this ); + connect( mMinimumScaleSetCurrentPushButton, SIGNAL( clicked() ), this, SLOT( setMinScaleFromCanvas() ) ); + mMaximumScaleSetCurrentPushButton = new QPushButton( tr( "current" ), this ); + connect( mMaximumScaleSetCurrentPushButton, SIGNAL( clicked() ), this, SLOT( setMaxScaleFromCanvas() ) ); + + mLayout->addWidget( mMinimumScaleSetCurrentPushButton, 1, 2 ); + mLayout->addWidget( mMaximumScaleSetCurrentPushButton, 1, 5 ); +} + +void QgsScaleRangeWidget::setMinimumScale( double scale ) +{ + mMinimumScaleComboBox->setScale( scale ); +} + +double QgsScaleRangeWidget::minimumScale() +{ + return mMinimumScaleComboBox->scale(); +} + +void QgsScaleRangeWidget::setMaximumScale( double scale ) +{ + mMaximumScaleComboBox->setScale( scale ); +} + +double QgsScaleRangeWidget::maximumScale() +{ + return mMaximumScaleComboBox->scale(); +} + +double QgsScaleRangeWidget::minimumScaleDenom() +{ + return qRound( 1.0 / maximumScale() ); +} + +double QgsScaleRangeWidget::maximumScaleDenom() +{ + return qRound( 1.0 / minimumScale() ); +} + +void QgsScaleRangeWidget::setScaleRange( double min, double max ) +{ + setMaximumScale( max ); + setMinimumScale( min ); +} + +void QgsScaleRangeWidget::setMinScaleFromCanvas() +{ + mMinimumScaleComboBox->setScale( 1.0 / mCanvas->mapSettings().scale() ); +} + +void QgsScaleRangeWidget::setMaxScaleFromCanvas() +{ + mMaximumScaleComboBox->setScale( 1.0 / mCanvas->mapSettings().scale() ); +} + + diff --git a/src/gui/qgsscalerangewidget.h b/src/gui/qgsscalerangewidget.h new file mode 100644 index 000000000000..64cdeed4f5b7 --- /dev/null +++ b/src/gui/qgsscalerangewidget.h @@ -0,0 +1,85 @@ +/*************************************************************************** + qgsscalerangewidget.h + -------------------------------------- + Date : 25.04.2014 + Copyright : (C) 2014 Denis Rouzaud + Email : denis.rouzaud@gmail.com +*************************************************************************** +* * +* 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 QGSSCALERANGEWIDGET_H +#define QGSSCALERANGEWIDGET_H + +#include +#include +#include + + +#include "qgscollapsiblegroupbox.h" +#include "qgsmaplayer.h" +#include "qgsmapcanvas.h" +#include "qgsscalecombobox.h" + + +class GUI_EXPORT QgsScaleRangeWidget : public QWidget +{ + Q_OBJECT + + public: + explicit QgsScaleRangeWidget( QWidget *parent = 0 ); + ~QgsScaleRangeWidget(); + + //! set the map canvas which will be used for the current scale buttons + /** + * @brief setMapCanvas set the map canvas which will be used for the current scale buttons + * if not set, the buttons are hidden. + */ + void setMapCanvas( QgsMapCanvas* mapCanvas ); + + //! return the minimum scale + double minimumScale(); + + //! return the maximum scale + double maximumScale(); + + //! return the minimum scale denominator ( = 1 / maximum scale ) + double minimumScaleDenom(); + + //! return the maximum scale denominator ( = 1 / minimum scale ) + double maximumScaleDenom(); + + //! call to reload the project scales and apply them to the 2 scales combo boxes + void reloadProjectScales(); + + public slots: + void setMinimumScale( double scale ); + + void setMaximumScale( double scale ); + + void setScaleRange( double min, double max ); + + private slots: + void setMaxScaleFromCanvas(); + void setMinScaleFromCanvas(); + + private: + //! pointer to the map canvas used for current buttons. + QgsMapCanvas* mCanvas; + + // ui + QGridLayout* mLayout; + QLabel* mMaximumScaleIconLabel; + QLabel* mMinimumScaleIconLabel; + QPushButton* mMaximumScaleSetCurrentPushButton; + QPushButton* mMinimumScaleSetCurrentPushButton; + QgsScaleComboBox* mMaximumScaleComboBox; + QgsScaleComboBox* mMinimumScaleComboBox; +}; + +#endif // QGSSCALERANGEWIDGET_H diff --git a/src/gui/symbology-ng/qgsrulebasedrendererv2widget.cpp b/src/gui/symbology-ng/qgsrulebasedrendererv2widget.cpp index 6c6ea63195a4..48ccd43a6e82 100644 --- a/src/gui/symbology-ng/qgsrulebasedrendererv2widget.cpp +++ b/src/gui/symbology-ng/qgsrulebasedrendererv2widget.cpp @@ -576,8 +576,9 @@ QgsRendererRulePropsDialog::QgsRendererRulePropsDialog( QgsRuleBasedRendererV2:: if ( mRule->dependsOnScale() ) { groupScale->setChecked( true ); - spinMinScale->setValue( rule->scaleMinDenom() ); - spinMaxScale->setValue( rule->scaleMaxDenom() ); + // caution: rule uses scale denom, scale widget uses true scales + mScaleRangeWidget->setMaximumScale( 1.0 / rule->scaleMinDenom() ); + mScaleRangeWidget->setMinimumScale( 1.0 / rule->scaleMaxDenom() ); } if ( mRule->symbol() ) @@ -655,8 +656,9 @@ void QgsRendererRulePropsDialog::accept() mRule->setFilterExpression( editFilter->text() ); mRule->setLabel( editLabel->text() ); mRule->setDescription( editDescription->text() ); - mRule->setScaleMinDenom( groupScale->isChecked() ? spinMinScale->value() : 0 ); - mRule->setScaleMaxDenom( groupScale->isChecked() ? spinMaxScale->value() : 0 ); + // caution: rule uses scale denom, scale widget uses true scales + mRule->setScaleMinDenom( groupScale->isChecked() ? mScaleRangeWidget->minimumScaleDenom() : 0 ); + mRule->setScaleMaxDenom( groupScale->isChecked() ? mScaleRangeWidget->maximumScaleDenom() : 0 ); mRule->setSymbol( groupSymbol->isChecked() ? mSymbol->clone() : NULL ); QDialog::accept(); @@ -723,8 +725,8 @@ QVariant QgsRuleBasedRendererV2Model::data( const QModelIndex &index, int role ) { return rule->filterExpression().isEmpty() ? tr( "(no filter)" ) : rule->filterExpression(); } - case 2: return rule->dependsOnScale() ? _formatScale( rule->scaleMinDenom() ) : QVariant(); - case 3: return rule->dependsOnScale() ? _formatScale( rule->scaleMaxDenom() ) : QVariant(); + case 2: return rule->dependsOnScale() ? _formatScale( rule->scaleMaxDenom() ) : QVariant(); + case 3: return rule->dependsOnScale() ? _formatScale( rule->scaleMinDenom() ) : QVariant(); case 4: if ( mFeatureCountMap.count( rule ) == 1 ) { diff --git a/src/ui/qgsrasterlayerpropertiesbase.ui b/src/ui/qgsrasterlayerpropertiesbase.ui index c27f9ee642e1..9aac7f5e8f61 100644 --- a/src/ui/qgsrasterlayerpropertiesbase.ui +++ b/src/ui/qgsrasterlayerpropertiesbase.ui @@ -6,8 +6,8 @@ 0 0 - 874 - 770 + 789 + 593 @@ -202,8 +202,8 @@ 0 0 - 713 - 705 + 615 + 509 @@ -218,7 +218,7 @@ Layer info - + rastergeneral @@ -324,7 +324,7 @@ Coordinate reference system - + rastergeneral @@ -365,139 +365,24 @@ false - + rastergeneral - - 6 - 11 - - - - Minimum scale, i.e. maximum scale denominator. This limit is exclusive, that means the layer will not be displayed on this scale. - - - Qt::LeftToRight - - - <html><head/><body><p align="center"><span style=" font-size:0.75em;">Minimum<br>(exclusive)</span></p></body></html> - - - - - - - - 0 - 0 - - - - - - - - Current - - - - - - - Current - - - - - - - - 0 - 0 - - - - - 100 - 0 - - - - - - + + 6 + + + - Maximum scale, i.e. minimum scale denominator. This limit is inclusive, that means the layer will be displayed on this scale. - - - <html><head/><body><p align="center"><span style=" font-size:0.75em;">Maximum<br>(inclusive)</span></p></body></html> - - - - - - - - 0 - 0 - - - - - 0 - 0 - - - - - 22 - 22 - - - - - :/images/themes/default/mActionZoomIn.svg - - - true - - - - - - - - 0 - 0 - - - - - 0 - 0 - - - - - 22 - 22 - - - + - - :/images/themes/default/mActionZoomOut.svg - - - true - @@ -663,8 +548,8 @@ 0 0 - 713 - 705 + 615 + 509 @@ -685,7 +570,7 @@ Band rendering - + rasterstyle @@ -773,13 +658,13 @@ Color rendering - + false - + true - + rasterstyle @@ -1075,13 +960,13 @@ false - + false - + true - + rasterstyle @@ -1168,8 +1053,8 @@ 0 0 - 713 - 705 + 615 + 509 @@ -1186,7 +1071,7 @@ Global transparency - + rastertransp @@ -1270,7 +1155,7 @@ No data value - + rastertransp @@ -1344,7 +1229,7 @@ Custom transparency options - + rastertransp @@ -1575,8 +1460,8 @@ 0 0 - 713 - 705 + 615 + 509 @@ -1639,8 +1524,8 @@ <!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;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Cantarell'; font-size:11pt;"><br /></span></p></body></html> +</style></head><body style=" font-family:'Ubuntu'; font-size:11pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Cantarell';"><br /></span></p></body></html> @@ -1736,8 +1621,8 @@ p, li { white-space: pre-wrap; } 0 0 - 713 - 705 + 615 + 509 @@ -1786,8 +1671,8 @@ p, li { white-space: pre-wrap; } 0 0 - 713 - 705 + 599 + 608 @@ -1796,7 +1681,7 @@ p, li { white-space: pre-wrap; } Description - + rastermeta @@ -1884,7 +1769,7 @@ p, li { white-space: pre-wrap; } Attribution - + vectormeta @@ -1916,7 +1801,7 @@ p, li { white-space: pre-wrap; } MetadataUrl - + vectormeta @@ -2071,7 +1956,7 @@ p, li { white-space: pre-wrap; } Properties - + rastermeta @@ -2168,11 +2053,6 @@ p, li { white-space: pre-wrap; } - - QgsScaleComboBox - QComboBox -
qgsscalecombobox.h
-
QgsCollapsibleGroupBox QGroupBox @@ -2180,15 +2060,20 @@ p, li { white-space: pre-wrap; } 1 - QgsBlendModeComboBox - QComboBox -
qgsblendmodecombobox.h
+ QgsScaleRangeWidget + QWidget +
qgsscalerangewidget.h
QgsColorButton QPushButton
qgscolorbutton.h
+ + QgsBlendModeComboBox + QComboBox +
qgsblendmodecombobox.h
+
diff --git a/src/ui/qgsrendererrulepropsdialogbase.ui b/src/ui/qgsrendererrulepropsdialogbase.ui index a51033cbc28d..8c4a224bb3ca 100644 --- a/src/ui/qgsrendererrulepropsdialogbase.ui +++ b/src/ui/qgsrendererrulepropsdialogbase.ui @@ -6,8 +6,8 @@ 0 0 - 558 - 298 + 489 + 261
@@ -88,60 +88,12 @@ - - - Min. scale + + + - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - 1 : - - - 0 - - - 1000000000 - - - 1000 - - - 1000 - - - - - - - Max. scale - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - 1 : - - - 0 - - - 1000000000 - - - 1000 - - - 1000 + + @@ -176,6 +128,13 @@ + + + QgsScaleRangeWidget + QWidget +
qgsscalerangewidget.h
+
+
editLabel editFilter @@ -183,8 +142,6 @@ btnTestFilter editDescription groupScale - spinMinScale - spinMaxScale buttonBox diff --git a/src/ui/qgsvectorlayerpropertiesbase.ui b/src/ui/qgsvectorlayerpropertiesbase.ui index 0871bd6496db..e4b7fde635b6 100644 --- a/src/ui/qgsvectorlayerpropertiesbase.ui +++ b/src/ui/qgsvectorlayerpropertiesbase.ui @@ -6,8 +6,8 @@ 0 0 - 929 - 573 + 904 + 588
@@ -246,7 +246,7 @@ - 7 + 0 @@ -266,8 +266,8 @@ 0 0 - 383 - 504 + 730 + 502
@@ -279,7 +279,7 @@ Layer info - + vectorgeneral @@ -374,7 +374,10 @@ Coordinate reference system - + + false + + vectorgeneral @@ -453,148 +456,21 @@ - + Scale dependent visibility true - - false - - - vectorgeneral - - - - 6 - - - 11 - - - - - Minimum scale, i.e. maximum scale denominator. This limit is exclusive, that means the layer will not be displayed on this scale. - - - Qt::LeftToRight - - - <html><head/><body><p align="center"><span style=" font-size:0.75em;">Minimum<br>(exclusive)</span></p></body></html> - - - - - - - - 0 - 0 - - - - - - - - Current - - - - - - - Current - - - - - - - - 0 - 0 - - - - - 100 - 0 - - - - + - + - Maximum scale, i.e. minimum scale denominator. This limit is inclusive, that means the layer will be displayed on this scale. - - - <html><head/><body><p align="center"><span style=" font-size:0.75em;">Maximum<br>(inclusive)</span></p></body></html> - - - - - - - - 0 - 0 - - - - - 0 - 0 - - - - - 22 - 22 - - - - - - - :/images/themes/default/mActionZoomIn.svg - - - true + A widget to define the scale visibility - - - - - - - 0 - 0 - - - - - 0 - 0 - - - - - 22 - 22 - - - - - - - :/images/themes/default/mActionZoomOut.svg - - - true + + A widget to define the scale visibility. @@ -602,7 +478,7 @@ - + 0 @@ -612,23 +488,11 @@ Feature subset - - vectorgeneral - - - - 11 - - - - - false - - - false - - - false + + + + + Query Builder @@ -648,14 +512,23 @@ - - - - Query Builder + + + + false + + + false + + + false + txtSubsetSQL + pbnQueryBuilder + collapseButton @@ -769,8 +642,8 @@ 0 0 - 101 - 35 + 121 + 38 @@ -875,8 +748,8 @@ 0 0 - 574 - 144 + 702 + 171 @@ -1018,8 +891,8 @@ 0 0 - 768 - 506 + 476 + 182
@@ -1179,8 +1052,8 @@ 0 0 - 768 - 506 + 100 + 30
@@ -1227,8 +1100,8 @@ 0 0 - 768 - 506 + 90 + 113
@@ -1325,8 +1198,8 @@ 0 0 - 768 - 506 + 100 + 30
@@ -1367,8 +1240,8 @@ 0 0 - 751 - 552 + 393 + 608
@@ -1377,7 +1250,7 @@ Description - + vectormeta @@ -1472,7 +1345,7 @@ Attribution - + vectormeta @@ -1504,7 +1377,7 @@ MetadataUrl - + vectormeta @@ -1659,7 +1532,7 @@ Properties - + vectormeta @@ -1767,17 +1640,22 @@ - - QgsScaleComboBox - QComboBox -
qgsscalecombobox.h
-
QgsCollapsibleGroupBox QGroupBox
qgscollapsiblegroupbox.h
1
+ + QgsScaleRangeWidget + QWidget +
qgsscalerangewidget.h
+
+ + QgsScaleComboBox + QComboBox +
qgsscalecombobox.h
+