QGIS API Documentation  2.11.0-Master
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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 
21 class GUI_EXPORT QgsSmartGroupCondition : public QWidget, private Ui::QgsSmartGroupConditionWidget
22 {
23  Q_OBJECT
24 
25  public:
26  QgsSmartGroupCondition( int id, QWidget *parent = NULL );
27 
29  QString constraint();
30 
32  QString parameter();
33 
35  void setConstraint( QString constraint );
36 
38  void setParameter( QString param );
39 
41  void hideRemoveButton( bool hide );
42 
43  public slots:
44  void destruct();
45 
46  signals:
47  void removed( int );
48 
49  protected:
51 
52 };
53 
54 
55 #include <QDialog>
56 
57 #include "ui_qgssmartgroupeditordialogbase.h"
58 //#include "qgscontexthelp.h"
59 
60 #include "qgsstylev2.h" //for QgsSmartConditionMap
61 
62 class GUI_EXPORT QgsSmartGroupEditorDialog : public QDialog, private Ui::QgsSmartGroupEditorDialogBase
63 {
64  Q_OBJECT
65 
66  public:
67  QgsSmartGroupEditorDialog( QgsStyleV2* style, QWidget* parent = NULL );
69 
71  QString smartgroupName();
72 
75  QgsSmartConditionMap conditionMap();
76 
78  QString conditionOperator();
79 
82  void setConditionMap( QgsSmartConditionMap );
83 
85  void setOperator( QString );
86 
88  void setSmartgroupName( QString );
89 
90  public slots:
91 
93  void addCondition();
94 
96  void removeCondition( int );
97 
98  void on_buttonBox_accepted();
99 
100  protected:
102  // layout of the mConditionsBox
104  // counter for the number of conditions
106  // map tracking the condition widget and the ids
108 };
109 
110 #endif // QGSSMARTGROUPEDITORDIALOG_H
QMap< int, QgsSmartGroupCondition * > mConditionMap