15
15
* (at your option) any later version. *
16
16
* *
17
17
***************************************************************************/
18
- /* $Id$ */
18
+ /* $Id: qgsspatialquerydialog.h 15141 2011-02-08 13:34:43Z 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
-
42
29
/* *
43
30
* \class QgsSpatialQueryDialog
44
31
* \brief Spatial Query dialog
@@ -68,20 +55,23 @@ class QgsSpatialQueryDialog : public QDialog, private Ui::QgsSpatialQueryDialogB
68
55
69
56
private slots:
70
57
// ! Slots for signs of Dialog
71
- void on_buttonBoxMain_accepted ();
72
- void on_buttonBoxMain_rejected ();
73
- void on_targetLayerComboBox_currentIndexChanged ( int index );
74
- void on_referenceLayerComboBox_currentIndexChanged ( int index );
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 ();
58
+ void on_bbMain_accepted ();
59
+ void on_bbMain_rejected ();
60
+ void on_cbTargetLayer_currentIndexChanged ( int index );
61
+ void on_cbReferenceLayer_currentIndexChanged ( int index );
62
+ void on_lwResultFeatureTarget_currentItemChanged ( QListWidgetItem * item );
63
+ void on_twResultInvalid_currentChanged ( int index );
64
+ void on_twInvalid_currentChanged ( int index );
65
+ void on_lwInvalidFeatureTarget_currentItemChanged ( QListWidgetItem * item );
66
+ void on_lwInvalidFeatureReference_currentItemChanged ( QListWidgetItem * item );
67
+ void on_ckbLogProcessing_clicked ( bool checked );
68
+ void on_ckbZoomItem_clicked ( bool checked );
69
+ void on_pbSelectResultTarget_clicked ();
70
+ void on_pbSelectResultTargetAdd_clicked ();
71
+ void on_pbSelectResultTargetRemove_clicked ();
72
+ void on_pbSelectedSubsetLayer_clicked ();
73
+ void on_pbSelectInvalidTarget_clicked ();
74
+ void on_pbSelectInvalidReference_clicked ();
85
75
86
76
// ! Slots for signs of QGIS
87
77
void signal_qgis_layerWasAdded ( QgsMapLayer* mapLayer );
@@ -101,13 +91,21 @@ class QgsSpatialQueryDialog : public QDialog, private Ui::QgsSpatialQueryDialogB
101
91
// ! Evaluate status of selected features from layer (Target or Reference)
102
92
void evaluateCheckBox ( bool isTarget );
103
93
// ! Run Query
94
+ // ! Evaluate button selected add and remove
95
+ void evaluateButtonSelected ();
104
96
void runQuery ();
105
97
// ! Show Log Processing
106
98
void showLogProcessing ( bool hasShow );
107
99
// ! Show result of query
108
100
void showResultQuery ( QDateTime *datetimeStart, QDateTime *datetimeEnd );
101
+ // ! Set label with number's selected features of layer
102
+ void setLabelButtonSelected ( QLabel *lb, QgsVectorLayer* layer, QPushButton *pb);
103
+ // ! Get string subset with selected FID
104
+ QString getSubsetSelected ( QgsVectorLayer* layer );
109
105
// ! Get Description Layer to show result
110
106
QString getDescriptionLayerShow ( bool isTarget );
107
+ // ! Get Description Layer to show result
108
+ QString getDescriptionInvalidFeaturesShow ( bool isTarget );
111
109
// ! Connect all slots
112
110
void connectAll ();
113
111
// ! Disconnect all slots
@@ -119,23 +117,25 @@ class QgsSpatialQueryDialog : public QDialog, private Ui::QgsSpatialQueryDialogB
119
117
// ! Get Icon for vector layer
120
118
QIcon getIconTypeGeometry ( QGis::GeometryType geomType );
121
119
// ! Add layer in combobox (text, data and tooltips)
122
- void addLayerCombobox ( bool isTarget, QgsVectorLayer* vectorLayer );
120
+ void addCbLayer ( bool isTarget, QgsVectorLayer* vectorLayer );
123
121
// ! Find Layer in combobox
124
- int getIndexLayerCombobox ( bool isTarget, QgsVectorLayer* vectorLayer );
122
+ int getCbIndexLayer ( bool isTarget, QgsVectorLayer* vectorLayer );
125
123
// ! Remove layer in combobox and setting GUI
126
124
void removeLayer ( bool isTarget, QgsVectorLayer* lyrRemove );
127
- // ! Populates targetLayerComboBox with all layers
128
- void populateTargetLayerComboBox ();
129
- // ! Populates referenceLayerComboBox with all layers except the current target layer
130
- void populateReferenceLayerComboBox ();
125
+ // ! Populates cbTargetLayer with all layers
126
+ void populateCbTargetLayer ();
127
+ // ! Populates cbReferenceLayer with all layers except the current target layer
128
+ void populateCbReferenceLayer ();
131
129
// ! Populates operationComboBox with the topological operations
132
- void populateOperationComboBox ();
130
+ void populateCbOperation ();
133
131
// ! Populates the features in QListWidget (use by result, invalid target and reference)
134
- void populateFeatureListWidget ( QListWidget *listWidget , QSet<int > & setFeatures, bool hasSetRow = true );
132
+ void populateLwFeature ( QListWidget *lw , QSet<int > & setFeatures );
135
133
// ! Clear the features of QListWidget (use by result, invalid target and reference)
136
- void clearFeatureListWidget ( QListWidget *listWidget );
134
+ void clearLwFeature ( QListWidget *listWidget );
137
135
// ! Make action when change item in ListWidget
138
- void changeFeatureListWidget ( QListWidget *listWidget, QgsVectorLayer* vectorLayer, const QString& currentText );
136
+ void changeLwFeature ( QListWidget *listWidget, QgsVectorLayer* vectorLayer, int fid );
137
+ // ! Zoom mapcanvas to current feature in listbox target
138
+ void zoomFeatureTarget (QgsVectorLayer* vectorLayer, int fid);
139
139
// ! Show rubber from feature
140
140
void showRubberFeature ( QgsVectorLayer* vectorLayer, int id );
141
141
@@ -157,8 +157,6 @@ class QgsSpatialQueryDialog : public QDialog, private Ui::QgsSpatialQueryDialogB
157
157
QgsRubberSelectId* mRubberSelectId ;
158
158
// ! RGB select feature result
159
159
int mRGBRubberSelect [3 ];
160
- // ! Current Feature Widget
161
- Feature_Widget mCurrentFeatureWidget ;
162
160
163
161
// Message
164
162
QString mMsgLayersLessTwo ;
0 commit comments