QGIS API Documentation 3.99.0-Master (21b3aa880ba)
Loading...
Searching...
No Matches
qgsmeshrendereractivedatasetwidget.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsmeshrendereractivedatasetwidget.h
3 -------------------------------------
4 begin : June 2018
5 copyright : (C) 2018 by Peter Petrik
6 email : zilolv 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
16#ifndef QGSMESHRENDERERACTIVEDATASETWIDGET_H
17#define QGSMESHRENDERERACTIVEDATASETWIDGET_H
18
19#include "ui_qgsmeshrendereractivedatasetwidgetbase.h"
20
21#include "qgis_gui.h"
22#include "qgsmeshdataprovider.h"
23
24#include <QIcon>
25#include <QWidget>
26
28
29class QgsMeshLayer;
30
42class GUI_EXPORT QgsMeshRendererActiveDatasetWidget : public QWidget, private Ui::QgsMeshRendererActiveDatasetWidgetBase
43{
44 Q_OBJECT
45
46 public:
47
52 QgsMeshRendererActiveDatasetWidget( QWidget *parent = nullptr );
54
56 void setLayer( QgsMeshLayer *layer );
57
59 int activeScalarDatasetGroup() const;
60
62 int activeVectorDatasetGroup() const;
63
65 void syncToLayer();
66
67 signals:
68
70 void activeScalarGroupChanged( int groupIndex );
71
73 void activeVectorGroupChanged( int groupIndex );
74
77
78 private slots:
79 void onActiveScalarGroupChanged( int groupIndex );
80 void onActiveVectorGroupChanged( int groupIndex );
81 QString metadata( QgsMeshDatasetIndex datasetIndex );
82
83 private:
84 void updateMetadata();
85
86 QgsMeshLayer *mMeshLayer = nullptr; // not owned
87 int mActiveScalarDatasetGroup = -1;
88 int mActiveVectorDatasetGroup = -1;
89};
90
91#endif // QGSMESHRENDERERSCALARSETTINGSWIDGET_H
An index that identifies the dataset group (e.g.
Represents a mesh layer supporting display of data on structured or unstructured meshes.
QgsMeshRendererActiveDatasetWidget(QWidget *parent=nullptr)
A widget to hold the renderer scalar settings for a mesh layer.
int activeVectorDatasetGroup() const
Returns index of the active vector dataset group.
void syncToLayer()
Synchronizes widgets state with associated mesh layer.
void widgetChanged()
Emitted when any settings related to rendering changed.
int activeScalarDatasetGroup() const
Returns index of the active scalar dataset group.
void setLayer(QgsMeshLayer *layer)
Associates mesh layer with the widget.
void activeScalarGroupChanged(int groupIndex)
Emitted when the current scalar group gets changed.
void activeVectorGroupChanged(int groupIndex)
Emitted when the current vector group gets changed.
#define SIP_NO_FILE