QGIS API Documentation 3.99.0-Master (26c88405ac0)
Loading...
Searching...
No Matches
qgsrasterlabelsettingswidget.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsrasterlabelsettingswidget.h
3 -------------------------
4 begin : December 2024
5 copyright : (C) 2024 by Nyall Dawson
6 email : nyall dot dawson at gmail dot com
7 ***************************************************************************
8 * *
9 * This program is free software; you can redistribute it and/or modify *
10 * it under the terms of the GNU General Public License as published by *
11 * the Free Software Foundation; either version 2 of the License, or *
12 * (at your option) any later version. *
13 * *
14 ***************************************************************************/
15#ifndef QGSRASTERLABELSETTINGSWIDGET_H
16#define QGSRASTERLABELSETTINGSWIDGET_H
17
18#include "qgis_gui.h"
19#include "qgslabelinggui.h"
20
21class QgsRasterLayer;
25
26// We don't want to expose this in the public API
27#define SIP_NO_FILE
28
36class GUI_EXPORT QgsRasterLabelSettingsWidget : public QgsLabelingGui
37{
38 Q_OBJECT
39 public:
40
44 QgsRasterLabelSettingsWidget( QgsRasterLayer *layer, QgsMapCanvas *mapCanvas, QWidget *parent = nullptr );
46
51
56
57 void setLayer( QgsMapLayer *layer ) final;
58
59 private slots:
60 void changeNumberFormat();
61
62 private:
63 QgsRasterBandComboBox *mBandCombo = nullptr;
64 std::unique_ptr<QgsNumericFormat> mNumberFormat;
65 int mBlockChangesSignal = 0;
66
67 QgsSpinBox *mResampleOverSpin = nullptr;
68 QComboBox *mResampleMethodComboBox = nullptr;
69};
70
71#endif // QGSRASTERLABELSETTINGSWIDGET_H
Abstract base class for labeling settings for raster layers.
Map canvas is a class for displaying all GIS data types on a canvas.
Base class for all map layer types.
Definition qgsmaplayer.h:80
Abstract base class for numeric formatters, which allow for formatting a numeric value for display.
A combobox widget which displays the bands present in a raster layer.
void setLayer(QgsMapLayer *layer) final
~QgsRasterLabelSettingsWidget() override
QgsRasterLabelSettingsWidget(QgsRasterLayer *layer, QgsMapCanvas *mapCanvas, QWidget *parent=nullptr)
Constructor for QgsRasterLabelSettingsWidget, for configuring a raster layer labeling.
void updateLabeling(QgsAbstractRasterLayerLabeling *labeling)
Updates labeling by setting properties to match the current state of the widget.
void setLabeling(QgsAbstractRasterLayerLabeling *labeling)
Sets the labeling settings to show in the widget.
Represents a raster layer.
A spin box with a clear button that will set the value to the defined clear value.
Definition qgsspinbox.h:45