1 /*************************************************************************** 2 qgsvectorlayerdigitizingproperties.h 3 ------------------------------------ 4 copyright : (C) 2018 by Matthias Kuhn 5 email : matthias@opengis.ch 6 ***************************************************************************/ 7 8 /*************************************************************************** 9 * * 10 * This program is free software; you can redistribute it and/or modify * 11 * it under the terms of the GNU General Public License as published by * 12 * the Free Software Foundation; either version 2 of the License, or * 13 * (at your option) any later version. * 14 * * 15 ***************************************************************************/ 16 17 #ifndef QGSVECTORLAYERDIGITIZINGPROPERTIES_H 18 #define QGSVECTORLAYERDIGITIZINGPROPERTIES_H 19 20 #include "qgsmaplayerconfigwidget.h" 21 #include "qgsmaplayerconfigwidgetfactory.h" 22 #include "ui_qgsvectorlayerdigitizingproperties.h" 23 24 class QgsCollapsibleGroupBox; 25 class QgsMapLayerComboBox; 26 class QgsDoubleSpinBox; 27 28 29 class QgsVectorLayerDigitizingPropertiesPage : public QgsMapLayerConfigWidget, private Ui::QgsVectorLayerDigitizingPropertiesPage 30 { 31 Q_OBJECT 32 33 public: 34 explicit QgsVectorLayerDigitizingPropertiesPage( QgsMapLayer *layer, QgsMapCanvas *canvas, QWidget *parent = nullptr ); 35 36 public slots: 37 virtual void apply(); 38 39 private: 40 bool mRemoveDuplicateNodesManuallyActivated = false; 41 QHash<QCheckBox *, QString> mGeometryCheckFactoriesGroupBoxes; 42 QgsCollapsibleGroupBox *mGapCheckAllowExceptionsActivatedCheckBox = nullptr; 43 QgsMapLayerComboBox *mGapCheckAllowExceptionsLayerComboBox = nullptr; 44 QgsDoubleSpinBox *mGapCheckAllowExceptionsBufferSpinBox = nullptr; 45 }; 46 47 48 class QgsVectorLayerDigitizingPropertiesFactory : public QObject, public QgsMapLayerConfigWidgetFactory 49 { 50 Q_OBJECT 51 public: 52 explicit QgsVectorLayerDigitizingPropertiesFactory( QObject *parent = nullptr ); 53 QgsMapLayerConfigWidget *createWidget( QgsMapLayer *layer, QgsMapCanvas *canvas, bool dockWidget, QWidget *parent ) const override; 54 supportLayerPropertiesDialog()55 bool supportLayerPropertiesDialog() const override { return true; } 56 57 bool supportsLayer( QgsMapLayer *layer ) const override; 58 }; 59 60 #endif // QGSVECTORLAYERDIGITIZINGPROPERTIES_H 61