15
15
* (at your option) any later version. *
16
16
* *
17
17
***************************************************************************/
18
- /* $Id$ */
18
+ /* $Id: qgsspatialquerydialog.h 13377 2010-04-25 01:07:36Z jef $ */
19
19
20
20
#ifndef SPATIALQUERYDIALOG_H
21
21
#define SPATIALQUERYDIALOG_H
26
26
#include " qgisinterface.h"
27
27
#include " qgsvectorlayer.h"
28
28
29
+ /* *
30
+ * \brief Enum with feature listwidget
31
+ * \enum Feature_Widget
32
+ *
33
+ */
34
+ enum Feature_Widget
35
+ {
36
+ FW_Result,
37
+ FW_InvalidTarget,
38
+ FW_InvalidRefence
39
+ };
40
+
41
+
29
42
/* *
30
43
* \class QgsSpatialQueryDialog
31
44
* \brief Spatial Query dialog
@@ -50,14 +63,25 @@ class QgsSpatialQueryDialog : public QDialog, private Ui::QgsSpatialQueryDialogB
50
63
// ! Unload plugins by QGIS - Disconnect signal from QGIS
51
64
void disconnectQGis ();
52
65
66
+ // ! Override show for ajust size
67
+ void show ();
68
+
53
69
private slots:
54
70
// ! Slots for signs of Dialog
55
- void on_buttonBox_accepted ();
56
- void on_buttonBox_rejected ();
71
+ void on_buttonBoxMain_accepted ();
72
+ void on_buttonBoxMain_rejected ();
57
73
void on_targetLayerComboBox_currentIndexChanged ( int index );
58
74
void on_referenceLayerComboBox_currentIndexChanged ( int index );
59
- void on_selectedFeatureListWidget_currentTextChanged ( const QString& currentText );
60
- void on_showLogProcessingCheckBox_clicked ( bool checked );
75
+ void on_resultFeatureTargetListWidget_itemClicked ( QListWidgetItem * item );
76
+ void on_resultFeatureTargetListWidget_currentItemChanged ( QListWidgetItem * item );
77
+ void on_invalidFeatureTargetListWidget_itemClicked ( QListWidgetItem * item );
78
+ void on_invalidFeatureTargetListWidget_currentItemChanged ( QListWidgetItem * item );
79
+ void on_invalidFeatureReferenceListWidget_itemClicked ( QListWidgetItem * item );
80
+ void on_invalidFeatureReferenceListWidget_currentItemChanged ( QListWidgetItem * item );
81
+ void on_ckboxLogProcessing_clicked ( bool checked );
82
+ void on_pushButtonSelectResultTarget_clicked ();
83
+ void on_pushButtonSelectInvalidTarget_clicked ();
84
+ void on_pushButtonSelectInvalidReference_clicked ();
61
85
62
86
// ! Slots for signs of QGIS
63
87
void signal_qgis_layerWasAdded ( QgsMapLayer* mapLayer );
@@ -70,8 +94,8 @@ class QgsSpatialQueryDialog : public QDialog, private Ui::QgsSpatialQueryDialogB
70
94
private:
71
95
// ! Initialize the Gui
72
96
void initGui ();
73
- // ! Set Color mRubberSelectId
74
- void setColorRubberSelectId ();
97
+ // ! Set Color RGB for select - mRGBRubberSelect
98
+ void setColorRubberSelect ();
75
99
// ! Set Layer (Target or Reference)
76
100
void setLayer ( bool isTarget, int index );
77
101
// ! Evaluate status of selected features from layer (Target or Reference)
@@ -106,8 +130,14 @@ class QgsSpatialQueryDialog : public QDialog, private Ui::QgsSpatialQueryDialogB
106
130
void populateReferenceLayerComboBox ();
107
131
// ! Populates operationComboBox with the topological operations
108
132
void populateOperationComboBox ();
109
- // ! Populates the result of Spatial Query (selectedFeatureListWidget and labels)
110
- void populateQueryResult ();
133
+ // ! Populates the features in QListWidget (use by result, invalid target and reference)
134
+ void populateFeatureListWidget ( QListWidget *listWidget, QSet<int > & setFeatures, bool hasSetRow = true );
135
+ // ! Clear the features of QListWidget (use by result, invalid target and reference)
136
+ void clearFeatureListWidget ( QListWidget *listWidget );
137
+ // ! Make action when change item in ListWidget
138
+ void changeFeatureListWidget ( QListWidget *listWidget, QgsVectorLayer* vectorLayer, const QString& currentText );
139
+ // ! Show rubber from feature
140
+ void showRubberFeature ( QgsVectorLayer* vectorLayer, int id );
111
141
112
142
// ! Pointer to Interface QGIS
113
143
QgisInterface* mIface ;
@@ -117,18 +147,28 @@ class QgsSpatialQueryDialog : public QDialog, private Ui::QgsSpatialQueryDialogB
117
147
QgsVectorLayer* mLayerReference ;
118
148
// ! Stores ID's from spatial query
119
149
QSet<int > mFeatureResult ;
150
+ // ! Stores ID's invalid of target layer
151
+ QSet<int > mFeatureInvalidTarget ;
152
+ // ! Stores ID's invalid of reference layer
153
+ QSet<int > mFeatureInvalidReference ;
120
154
// ! Map for Id name of vector layers (use in signal_qgis_layerWillBeRemoved)
121
155
QMap<QString, QgsVectorLayer *> mMapIdVectorLayers ;
122
156
// ! Rubber band for features result
123
157
QgsRubberSelectId* mRubberSelectId ;
158
+ // ! RGB select feature result
159
+ int mRGBRubberSelect [3 ];
160
+ // ! Current Feature Widget
161
+ Feature_Widget mCurrentFeatureWidget ;
124
162
125
163
// Message
126
164
QString mMsgLayersLessTwo ;
127
165
128
166
void MsgDEBUG ( QString sMSg );
129
167
130
- // ! show/hide target, reference and operation group box
131
- void setInputsVisible ( bool show );
168
+ // ! show/hide operation inputs: target, reference and operation group box
169
+ void setLayoutOperationVisible ( bool show );
170
+ // ! show/hide result of operation: result and invalid group box
171
+ void setLayoutResultInvalid ( bool show );
132
172
};
133
173
134
174
#endif // SPATIALQUERYDIALOG_H
0 commit comments