QGIS API Documentation  2.6.0-Brighton
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups 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 QGSSMARTGROUPCONDITION_H
17 #define QGSSMARTGROUPCONDITION_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 #endif //QGSSMARTGROUPCONDITION
55 
56 
57 #ifndef QGSSMARTGROUPEDITORDIALOG_H
58 #define QGSSMARTGROUPEDITORDIALOG_H
59 
60 #include <QDialog>
61 
62 #include "ui_qgssmartgroupeditordialogbase.h"
63 //#include "qgscontexthelp.h"
64 
65 #include "qgsstylev2.h" //for QgsSmartConditionMap
66 
67 class GUI_EXPORT QgsSmartGroupEditorDialog : public QDialog, private Ui::QgsSmartGroupEditorDialogBase
68 {
69  Q_OBJECT
70 
71  public:
72  QgsSmartGroupEditorDialog( QgsStyleV2* style, QWidget* parent = NULL );
74 
76  QString smartgroupName();
77 
80  QgsSmartConditionMap conditionMap();
81 
83  QString conditionOperator();
84 
87  void setConditionMap( QgsSmartConditionMap );
88 
90  void setOperator( QString );
91 
93  void setSmartgroupName( QString );
94 
95  public slots:
96 
98  void addCondition();
99 
101  void removeCondition( int );
102 
103  void on_buttonBox_accepted();
104 
105  protected:
107  // layout of the mConditionsBox
108  QGridLayout *mLayout;
109  // counter for the number of conditions
111  // map tracking the condition widget and the ids
112  QMap<int, QgsSmartGroupCondition*> mConditionMap;
113 };
114 
115 #endif // QGSSMARTGROUPEDITORDIALOG_H
116