QGIS API Documentation
4.3.0-Master (16eddb2670e)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
gui
mesh
qgsmeshlabelingwidget.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgsmeshlabelingwidget.h
3
---------------------
4
begin : November 2023
5
copyright : (C) 2023 by Alexander Bruy
6
email : alexander dot bruy 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 QGSMESHLABELINGWIDGET_H
16
#define QGSMESHLABELINGWIDGET_H
17
18
// We don't want to expose this in the public API
19
20
#include "ui_qgsmeshlabelingwidget.h"
21
22
#include "qgis_gui.h"
23
#include "
qgsmaplayerconfigwidget.h
"
24
#include "
qgsmeshlayerlabeling.h
"
25
#include "
qgspallabeling.h
"
26
27
#include <QWidget>
28
29
#define SIP_NO_FILE
30
31
class
QgsLabelingGui;
32
class
QgsMapCanvas
;
33
class
QgsMeshLayer
;
34
class
QgsMapLayer
;
35
class
QgsMessageBar
;
36
44
class
GUI_EXPORT
QgsMeshLabelingWidget
:
public
QgsMapLayerConfigWidget
,
private
Ui::QgsMeshLabelingWidget
45
{
46
Q_OBJECT
47
public
:
49
QgsMeshLabelingWidget
(
QgsMeshLayer
*
layer
,
QgsMapCanvas
*canvas, QWidget *parent =
nullptr
,
QgsMessageBar
*messageBar =
nullptr
);
50
51
void
setDockMode
(
bool
dockMode
)
override
;
52
56
QgsLabelingGui *
labelingGui
();
57
58
public
slots:
60
void
setLayer
(
QgsMapLayer
*
layer
);
62
void
writeSettingsToLayer
();
63
65
void
apply
()
override
;
66
68
void
adaptToLayer
();
69
71
void
resetSettings
();
72
73
signals:
75
void
auxiliaryFieldCreated
();
76
77
private
slots:
78
void
labelModeChanged(
int
index );
79
80
private
:
81
enum
Mode
82
{
83
ModeNone,
84
ModeVertices,
85
ModeFaces
86
};
87
88
QgsMeshLayer
*mLayer =
nullptr
;
89
QgsMapCanvas
*mCanvas =
nullptr
;
90
QgsMessageBar
*mMessageBar =
nullptr
;
91
92
QWidget *mWidget =
nullptr
;
93
std::unique_ptr<QgsPalLayerSettings> mSettings;
94
std::unique_ptr<QgsAbstractMeshLayerLabeling> mOldSettings;
95
bool
mOldLabelsEnabled =
false
;
96
};
97
98
#endif
// QGSMESHLABELINGWIDGET_H
QgsMapCanvas
Map canvas is a class for displaying all GIS data types on a canvas.
Definition
qgsmapcanvas.h:96
QgsMapLayerConfigWidget::QgsMapLayerConfigWidget
QgsMapLayerConfigWidget(QgsMapLayer *layer, QgsMapCanvas *canvas, QWidget *parent=nullptr)
A panel widget that can be shown in the map style dock.
Definition
qgsmaplayerconfigwidget.cpp:40
QgsMapLayerConfigWidget::apply
virtual void apply()=0
Called when changes to the layer need to be made.
QgsMapLayerConfigWidget::layer
QgsMapLayer * layer()
Returns the layer the widget is associated with.
Definition
qgsmaplayerconfigwidget.cpp:46
QgsMapLayer
Base class for all map layer types.
Definition
qgsmaplayer.h:83
QgsMeshLabelingWidget::writeSettingsToLayer
void writeSettingsToLayer()
save config to layer
Definition
qgsmeshlabelingwidget.cpp:126
QgsMeshLabelingWidget::labelingGui
QgsLabelingGui * labelingGui()
Returns the labeling gui widget or nullptr if none.
Definition
qgsmeshlabelingwidget.cpp:60
QgsMeshLabelingWidget::auxiliaryFieldCreated
void auxiliaryFieldCreated()
Emitted when an auxiliary field is created.
QgsMeshLabelingWidget::setLayer
void setLayer(QgsMapLayer *layer)
Sets the layer to configure.
Definition
qgsmeshlabelingwidget.cpp:75
QgsMeshLabelingWidget::QgsMeshLabelingWidget
QgsMeshLabelingWidget(QgsMeshLayer *layer, QgsMapCanvas *canvas, QWidget *parent=nullptr, QgsMessageBar *messageBar=nullptr)
constructor
Definition
qgsmeshlabelingwidget.cpp:35
QgsMeshLabelingWidget::resetSettings
void resetSettings()
Reset the settings.
Definition
qgsmeshlabelingwidget.cpp:65
QgsMeshLabelingWidget::adaptToLayer
void adaptToLayer()
reload the settings shown in the dialog from the current layer
Definition
qgsmeshlabelingwidget.cpp:102
QgsMeshLayer
Represents a mesh layer supporting display of data on structured or unstructured meshes.
Definition
qgsmeshlayer.h:105
QgsMessageBar
A bar for displaying non-blocking messages to the user.
Definition
qgsmessagebar.h:61
QgsPanelWidget::dockMode
bool dockMode() const
Returns the dock mode state.
Definition
qgspanelwidget.h:94
QgsPanelWidget::setDockMode
virtual void setDockMode(bool dockMode)
Set the widget in dock mode which tells the widget to emit panel widgets and not open dialogs.
Definition
qgspanelwidget.cpp:74
qgsmaplayerconfigwidget.h
qgsmeshlayerlabeling.h
qgspallabeling.h
Generated on
for QGIS API Documentation by
1.17.0