QGIS API Documentation 3.43.0-Master (c67cf405802)
qgsscalemethodwidget.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsscalemethodwidget.h
3 ------------------------
4 begin : March 2025
5 copyright : (C) 2025 by Nyall Dawson
6 email : nyall.dawson@gmail.com
7 ***************************************************************************/
8
9/***************************************************************************
10 * *
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. *
15 * *
16 ***************************************************************************/
17
18#ifndef QGSSCALEMETHODWIDGET_H
19#define QGSSCALEMETHODWIDGET_H
20
21#include "qgis.h"
22#include "qgis_sip.h"
23#include "qgis_gui.h"
24#include <QWidget>
25
26class QLabel;
27class QComboBox;
28
34class GUI_EXPORT QgsScaleMethodWidget : public QWidget
35{
36 Q_OBJECT
37 public:
38 Q_PROPERTY( Qgis::ScaleCalculationMethod scaleMethod READ scaleMethod WRITE setScaleMethod NOTIFY methodChanged )
39
40
41 QgsScaleMethodWidget( QWidget *parent SIP_TRANSFERTHIS = nullptr );
42
48 Qgis::ScaleCalculationMethod scaleMethod() const;
49
55 void setScaleMethod( Qgis::ScaleCalculationMethod method );
56
57 signals:
58
63
64 private:
65 QComboBox *mCombo = nullptr;
66 QWidget *mWarningLabelContainer = nullptr;
67 QLabel *mWarningLabel = nullptr;
68
69 private slots:
70 void updateWarning();
71};
72
73#endif // QGSSCALEMETHODWIDGET_H
ScaleCalculationMethod
Scale calculation logic.
Definition qgis.h:5080
A widget which lets the user select from scale calculation methods.
void methodChanged()
Emitted when the selected method is changed.
#define SIP_TRANSFERTHIS
Definition qgis_sip.h:53