QGIS API Documentation 3.43.0-Master (c67cf405802)
qgssmartgroupeditordialog.h
Go to the documentation of this file.
1/***************************************************************************
2 qgssmartgroupeditordialog.h
3 ---------------------------
4 begin : July 2012
5 copyright : (C) 2012 by Arunmozhi
6 email : aruntheguy at gmail.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 QGSSMARTGROUPEDITORDIALOG_H
17#define QGSSMARTGROUPEDITORDIALOG_H
18
19#include "ui_qgssmartgroupconditionwidget.h"
20#include "qgis_sip.h"
21#include "qgis_gui.h"
22
28class GUI_EXPORT QgsSmartGroupCondition : public QWidget, private Ui::QgsSmartGroupConditionWidget
29{
30 Q_OBJECT
31
32 public:
33 QgsSmartGroupCondition( int id, QWidget *parent SIP_TRANSFERTHIS = nullptr );
34
36 QString constraint();
37
39 QString parameter();
40
42 void setConstraint( const QString &constraint );
43
45 void setParameter( const QString &param );
46
48 void hideRemoveButton( bool hide );
49
50 public slots:
51 void destruct();
52
53 signals:
54
58 void removed( int id );
59
60 protected:
62};
63
64
65#include <QDialog>
66
67#include "ui_qgssmartgroupeditordialogbase.h"
68
69#include "qgsstyle.h" //for QgsSmartConditionMap
70
76class GUI_EXPORT QgsSmartGroupEditorDialog : public QDialog, private Ui::QgsSmartGroupEditorDialogBase
77{
78 Q_OBJECT
79
80 public:
81 QgsSmartGroupEditorDialog( QgsStyle *style, QWidget *parent SIP_TRANSFERTHIS = nullptr );
82
84 QString smartgroupName();
85
90 QgsSmartConditionMap conditionMap() SIP_SKIP;
91
93 QString conditionOperator();
94
99 void setConditionMap( const QgsSmartConditionMap & ) SIP_SKIP;
100
102 void setOperator( const QString & );
103
105 void setSmartgroupName( const QString & );
106
107 public slots:
108
110 void addCondition();
111
113 void removeCondition( int );
114
115 protected:
116 QgsStyle *mStyle = nullptr;
117 // layout of the mConditionsBox
118 QGridLayout *mLayout = nullptr;
119 // counter for the number of conditions
121 // map tracking the condition widget and the ids
122 QMap<int, QgsSmartGroupCondition *> mConditionMap;
123
124 private slots:
125
126 void buttonBox_accepted();
127};
128
129#endif // QGSSMARTGROUPEDITORDIALOG_H
A widget for configuring the conditions attached to a style smart group.
void removed(int id)
Emitted when the group with the specified id is removed.
A dialog for configuring a style smart group.
QMap< int, QgsSmartGroupCondition * > mConditionMap
A database of saved style entities, including symbols, color ramps, text formats and others.
Definition qgsstyle.h:88
QMultiMap< QString, QString > QgsSmartConditionMap
A multimap to hold the smart group conditions as constraint and parameter pairs.
Definition qgsstyle.h:79
#define SIP_TRANSFERTHIS
Definition qgis_sip.h:53
#define SIP_SKIP
Definition qgis_sip.h:126