QGIS API Documentation 3.41.0-Master (3440c17df1d)
Loading...
Searching...
No Matches
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
27class GUI_EXPORT QgsSmartGroupCondition : public QWidget, private Ui::QgsSmartGroupConditionWidget
28{
29 Q_OBJECT
30
31 public:
32 QgsSmartGroupCondition( int id, QWidget *parent SIP_TRANSFERTHIS = nullptr );
33
35 QString constraint();
36
38 QString parameter();
39
41 void setConstraint( const QString &constraint );
42
44 void setParameter( const QString &param );
45
47 void hideRemoveButton( bool hide );
48
49 public slots:
50 void destruct();
51
52 signals:
53
57 void removed( int id );
58
59 protected:
61
62};
63
64
65#include <QDialog>
66
67#include "ui_qgssmartgroupeditordialogbase.h"
68
69#include "qgsstyle.h" //for QgsSmartConditionMap
70
75class GUI_EXPORT QgsSmartGroupEditorDialog : public QDialog, private Ui::QgsSmartGroupEditorDialogBase
76{
77 Q_OBJECT
78
79 public:
80 QgsSmartGroupEditorDialog( QgsStyle *style, QWidget *parent SIP_TRANSFERTHIS = nullptr );
81
83 QString smartgroupName();
84
89 QgsSmartConditionMap conditionMap() SIP_SKIP;
90
92 QString conditionOperator();
93
98 void setConditionMap( const QgsSmartConditionMap & ) SIP_SKIP;
99
101 void setOperator( const QString & );
102
104 void setSmartgroupName( const QString & );
105
106 public slots:
107
109 void addCondition();
110
112 void removeCondition( int );
113
114 protected:
115 QgsStyle *mStyle = nullptr;
116 // layout of the mConditionsBox
117 QGridLayout *mLayout = nullptr;
118 // counter for the number of conditions
120 // map tracking the condition widget and the ids
121 QMap<int, QgsSmartGroupCondition *> mConditionMap;
122
123 private slots:
124
125 void buttonBox_accepted();
126};
127
128#endif // QGSSMARTGROUPEDITORDIALOG_H
void removed(int id)
Emitted when the group with the specified id is removed.
QMap< int, QgsSmartGroupCondition * > mConditionMap
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