|
Quantum GIS API Documentation
master-693a1fe
|
00001 /*************************************************************************** 00002 qgssmartgroupeditordialog.h 00003 --------------------------- 00004 begin : July 2012 00005 copyright : (C) 2012 by Arunmozhi 00006 email : aruntheguy at gmail.com 00007 *************************************************************************** 00008 * * 00009 * This program is free software; you can redistribute it and/or modify * 00010 * it under the terms of the GNU General Public License as published by * 00011 * the Free Software Foundation; either version 2 of the License, or * 00012 * (at your option) any later version. * 00013 * * 00014 ***************************************************************************/ 00015 00016 #ifndef QGSSMARTGROUPCONDITION_H 00017 #define QGSSMARTGROUPCONDITION_H 00018 00019 #include "ui_qgssmartgroupconditionwidget.h" 00020 00021 class GUI_EXPORT QgsSmartGroupCondition : public QWidget, private Ui::QgsSmartGroupConditionWidget 00022 { 00023 Q_OBJECT 00024 00025 public: 00026 QgsSmartGroupCondition( int id, QWidget *parent = NULL ); 00027 00029 QString constraint(); 00030 00032 QString parameter(); 00033 00035 void setConstraint( QString constraint ); 00036 00038 void setParameter( QString param ); 00039 00041 void hideRemoveButton( bool hide ); 00042 00043 public slots: 00044 void destruct(); 00045 00046 signals: 00047 void removed( int ); 00048 00049 protected: 00050 int mConditionId; 00051 00052 }; 00053 00054 #endif //QGSSMARTGROUPCONDITION 00055 00056 00057 #ifndef QGSSMARTGROUPEDITORDIALOG_H 00058 #define QGSSMARTGROUPEDITORDIALOG_H 00059 00060 #include <QDialog> 00061 00062 #include "ui_qgssmartgroupeditordialogbase.h" 00063 //#include "qgscontexthelp.h" 00064 00065 #include "qgsstylev2.h" //for QgsSmartConditionMap 00066 00067 class GUI_EXPORT QgsSmartGroupEditorDialog : public QDialog, private Ui::QgsSmartGroupEditorDialogBase 00068 { 00069 Q_OBJECT 00070 00071 public: 00072 QgsSmartGroupEditorDialog( QgsStyleV2* style, QWidget* parent = NULL ); 00073 ~QgsSmartGroupEditorDialog(); 00074 00076 QString smartgroupName(); 00077 00080 QgsSmartConditionMap conditionMap(); 00081 00083 QString conditionOperator(); 00084 00087 void setConditionMap( QgsSmartConditionMap ); 00088 00090 void setOperator( QString ); 00091 00093 void setSmartgroupName( QString ); 00094 00095 public slots: 00096 00098 void addCondition(); 00099 00101 void removeCondition( int ); 00102 00103 void on_buttonBox_accepted(); 00104 00105 protected: 00106 QgsStyleV2* mStyle; 00107 // layout of the mConditionsBox 00108 QGridLayout *mLayout; 00109 // counter for the number of conditions 00110 int mCondCount; 00111 // map tracking the condition widget and the ids 00112 QMap<int, QgsSmartGroupCondition*> mConditionMap; 00113 }; 00114 00115 #endif // QGSSMARTGROUPEDITORDIALOG_H 00116