QGIS API Documentation 3.41.0-Master (af5edcb665c)
Loading...
Searching...
No Matches
qgsrasterlabelingwidget.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsrasterlabelingwidget.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 QGSRASTERLABELINGWIDGET_H
16#define QGSRASTERLABELINGWIDGET_H
17
18// We don't want to expose this in the public API
19#define SIP_NO_FILE
20
21#include <QWidget>
22
23#include "ui_qgsrasterlabelingwidgetbase.h"
24#include "qgsrasterlabeling.h"
25#include "qgis_gui.h"
26
28
29class QgsLabelingGui;
30class QgsMapCanvas;
31class QgsRasterLayer;
32class QgsMapLayer;
33class QgsMessageBar;
34
41class GUI_EXPORT QgsRasterLabelingWidget : public QgsMapLayerConfigWidget, private Ui::QgsRasterLabelingWidgetBase
42{
43 Q_OBJECT
44 public:
46 QgsRasterLabelingWidget( QgsRasterLayer *layer, QgsMapCanvas *canvas, QWidget *parent = nullptr, QgsMessageBar *messageBar = nullptr );
47
48 void setDockMode( bool dockMode ) override;
49
50 public slots:
52 void setLayer( QgsMapLayer *layer );
53
57 void writeSettingsToLayer();
58
60 void apply() override;
61
63 void adaptToLayer();
64
65 signals:
68
69 private slots:
70 void labelModeChanged( int index );
71 void showLabelingEngineRulesPrivate();
72 void showEngineConfigDialogPrivate();
73
74 private:
75 QgsRasterLayer *mLayer = nullptr;
76 QgsMapCanvas *mCanvas = nullptr;
77 QgsMessageBar *mMessageBar = nullptr;
78
79 QWidget *mWidget = nullptr;
80};
81
82#endif // QGSRASTERLABELINGWIDGET_H
Map canvas is a class for displaying all GIS data types on a canvas.
A panel widget that can be shown in the map style dock.
virtual void apply()=0
Called when changes to the layer need to be made.
Base class for all map layer types.
Definition qgsmaplayer.h:76
A bar for displaying non-blocking messages to the user.
virtual void setDockMode(bool dockMode)
Set the widget in dock mode which tells the widget to emit panel widgets and not open dialogs.
Master widget for configuration of labeling of a raster layer.
void auxiliaryFieldCreated()
Emitted when an auxiliary field is created.
Represents a raster layer.