QGIS API Documentation  3.14.0-Pi (9f7028fd23)
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 
27 class 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  void removed( int );
54 
55  protected:
57 
58 };
59 
60 
61 #include <QDialog>
62 
63 #include "ui_qgssmartgroupeditordialogbase.h"
64 
65 #include "qgsstyle.h" //for QgsSmartConditionMap
66 
71 class GUI_EXPORT QgsSmartGroupEditorDialog : public QDialog, private Ui::QgsSmartGroupEditorDialogBase
72 {
73  Q_OBJECT
74 
75  public:
76  QgsSmartGroupEditorDialog( QgsStyle *style, QWidget *parent SIP_TRANSFERTHIS = nullptr );
77 
79  QString smartgroupName();
80 
85  QgsSmartConditionMap conditionMap() SIP_SKIP;
86 
88  QString conditionOperator();
89 
94  void setConditionMap( const QgsSmartConditionMap & ) SIP_SKIP;
95 
97  void setOperator( const QString & );
98 
100  void setSmartgroupName( const QString & );
101 
102  public slots:
103 
105  void addCondition();
106 
108  void removeCondition( int );
109 
110  protected:
111  QgsStyle *mStyle = nullptr;
112  // layout of the mConditionsBox
113  QGridLayout *mLayout = nullptr;
114  // counter for the number of conditions
116  // map tracking the condition widget and the ids
117  QMap<int, QgsSmartGroupCondition *> mConditionMap;
118 
119  private slots:
120 
121  void buttonBox_accepted();
122 };
123 
124 #endif // QGSSMARTGROUPEDITORDIALOG_H
QgsSmartGroupCondition::mConditionId
int mConditionId
Definition: qgssmartgroupeditordialog.h:56
SIP_SKIP
#define SIP_SKIP
Definition: qgis_sip.h:126
QgsSmartGroupEditorDialog::mConditionMap
QMap< int, QgsSmartGroupCondition * > mConditionMap
Definition: qgssmartgroupeditordialog.h:117
qgis_sip.h
qgsstyle.h
QgsSmartGroupCondition
Definition: qgssmartgroupeditordialog.h:27
QgsStyle
Definition: qgsstyle.h:159
QgsSmartGroupEditorDialog::mCondCount
int mCondCount
Definition: qgssmartgroupeditordialog.h:115
SIP_TRANSFERTHIS
#define SIP_TRANSFERTHIS
Definition: qgis_sip.h:53
QgsSmartConditionMap
QMultiMap< QString, QString > QgsSmartConditionMap
Definition: qgsstyle.h:79
QgsSmartGroupEditorDialog
Definition: qgssmartgroupeditordialog.h:71