|
20 | 20 | #include "qgsowsconnection.h"
|
21 | 21 | #include "qgsdataitemprovider.h"
|
22 | 22 |
|
23 |
| -#ifdef HAVE_GUI |
24 |
| -#include "qgsnewhttpconnection.h" |
25 |
| -#endif |
26 |
| - |
27 | 23 | #include "qgsapplication.h"
|
28 | 24 |
|
29 | 25 | #include <QFileInfo>
|
@@ -141,45 +137,6 @@ bool QgsOWSConnectionItem::equal( const QgsDataItem *other )
|
141 | 137 | return ( o && mPath == o->mPath && mName == o->mName );
|
142 | 138 | }
|
143 | 139 |
|
144 |
| -#ifdef HAVE_GUI |
145 |
| -QList<QAction *> QgsOWSConnectionItem::actions( QWidget *parent ) |
146 |
| -{ |
147 |
| - QList<QAction *> lst; |
148 |
| - |
149 |
| - QAction *actionEdit = new QAction( tr( "Edit…" ), parent ); |
150 |
| - connect( actionEdit, &QAction::triggered, this, &QgsOWSConnectionItem::editConnection ); |
151 |
| - lst.append( actionEdit ); |
152 |
| - |
153 |
| - QAction *actionDelete = new QAction( tr( "Delete" ), parent ); |
154 |
| - connect( actionDelete, &QAction::triggered, this, &QgsOWSConnectionItem::deleteConnection ); |
155 |
| - lst.append( actionDelete ); |
156 |
| - |
157 |
| - return lst; |
158 |
| -} |
159 |
| - |
160 |
| -void QgsOWSConnectionItem::editConnection() |
161 |
| -{ |
162 |
| -#if 0 |
163 |
| - QgsNewHttpConnection nc( 0, "qgis/connections-ows/", mName ); |
164 |
| - |
165 |
| - if ( nc.exec() ) |
166 |
| - { |
167 |
| - // the parent should be updated |
168 |
| - mParent->refreshConnections(); |
169 |
| - } |
170 |
| -#endif |
171 |
| -} |
172 |
| - |
173 |
| -void QgsOWSConnectionItem::deleteConnection() |
174 |
| -{ |
175 |
| -#if 0 |
176 |
| - QgsOWSConnection::deleteConnection( "OWS", mName ); |
177 |
| - // the parent should be updated |
178 |
| - mParent->refreshConnections(); |
179 |
| -#endif |
180 |
| -} |
181 |
| -#endif |
182 |
| - |
183 | 140 |
|
184 | 141 | // ---------------------------------------------------------------------------
|
185 | 142 |
|
@@ -216,49 +173,6 @@ QVector<QgsDataItem *> QgsOWSRootItem::createChildren()
|
216 | 173 | return connections;
|
217 | 174 | }
|
218 | 175 |
|
219 |
| -#ifdef HAVE_GUI |
220 |
| -QList<QAction *> QgsOWSRootItem::actions( QWidget *parent ) |
221 |
| -{ |
222 |
| - Q_UNUSED( parent ) |
223 |
| - QList<QAction *> lst; |
224 |
| - |
225 |
| -#if 0 |
226 |
| - QAction *actionNew = new QAction( tr( "New Connection…" ), parent ); |
227 |
| - connect( actionNew, SIGNAL( triggered() ), this, SLOT( newConnection() ) ); |
228 |
| - lst.append( actionNew ); |
229 |
| -#endif |
230 |
| - |
231 |
| - return lst; |
232 |
| -} |
233 |
| - |
234 |
| - |
235 |
| -QWidget *QgsOWSRootItem::paramWidget() |
236 |
| -{ |
237 |
| -#if 0 |
238 |
| - QgsOWSSourceSelect *select = new QgsOWSSourceSelect( 0, 0, true, true ); |
239 |
| - connect( select, SIGNAL( connectionsChanged() ), this, SLOT( connectionsChanged() ) ); |
240 |
| - return select; |
241 |
| -#endif |
242 |
| - return nullptr; |
243 |
| -} |
244 |
| -void QgsOWSRootItem::onConnectionsChanged() |
245 |
| -{ |
246 |
| - refresh(); |
247 |
| -} |
248 |
| - |
249 |
| -void QgsOWSRootItem::newConnection() |
250 |
| -{ |
251 |
| -#if 0 |
252 |
| - QgsNewHttpConnection nc( 0, "qgis/connections-ows/" ); |
253 |
| - |
254 |
| - if ( nc.exec() ) |
255 |
| - { |
256 |
| - refreshConnections(); |
257 |
| - } |
258 |
| -#endif |
259 |
| -} |
260 |
| -#endif |
261 |
| - |
262 | 176 |
|
263 | 177 | // ---------------------------------------------------------------------------
|
264 | 178 |
|
|
0 commit comments