QGIS API Documentation  2.18.21-Las Palmas (9fba24a)
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 
24 class GUI_EXPORT QgsSmartGroupCondition : public QWidget, private Ui::QgsSmartGroupConditionWidget
25 {
26  Q_OBJECT
27 
28  public:
29  QgsSmartGroupCondition( int id, QWidget *parent = nullptr );
30 
32  QString constraint();
33 
35  QString parameter();
36 
38  void setConstraint( const QString& constraint );
39 
41  void setParameter( const QString& param );
42 
44  void hideRemoveButton( bool hide );
45 
46  public slots:
47  void destruct();
48 
49  signals:
50  void removed( int );
51 
52  protected:
54 
55 };
56 
57 
58 #include <QDialog>
59 
60 #include "ui_qgssmartgroupeditordialogbase.h"
61 //#include "qgscontexthelp.h"
62 
63 #include "qgsstylev2.h" //for QgsSmartConditionMap
64 
68 class GUI_EXPORT QgsSmartGroupEditorDialog : public QDialog, private Ui::QgsSmartGroupEditorDialogBase
69 {
70  Q_OBJECT
71 
72  public:
73  QgsSmartGroupEditorDialog( QgsStyleV2* style, QWidget* parent = nullptr );
75 
77  QString smartgroupName();
78 
81  QgsSmartConditionMap conditionMap();
82 
84  QString conditionOperator();
85 
88  void setConditionMap( const QgsSmartConditionMap& );
89 
91  void setOperator( const QString& );
92 
94  void setSmartgroupName( const QString& );
95 
96  public slots:
97 
99  void addCondition();
100 
102  void removeCondition( int );
103 
104  void on_buttonBox_accepted();
105 
106  protected:
108  // layout of the mConditionsBox
110  // counter for the number of conditions
112  // map tracking the condition widget and the ids
114 };
115 
116 #endif // QGSSMARTGROUPEDITORDIALOG_H
QMap< int, QgsSmartGroupCondition * > mConditionMap