[ows] Remove dead GUI-related data items code

This commit is contained in:
Martin Dobias 2019-06-29 19:19:02 +02:00
parent 58a01ba62d
commit b1794ee88b
2 changed files with 0 additions and 107 deletions

View File

@ -20,10 +20,6 @@
#include "qgsowsconnection.h"
#include "qgsdataitemprovider.h"
#ifdef HAVE_GUI
#include "qgsnewhttpconnection.h"
#endif
#include "qgsapplication.h"
#include <QFileInfo>
@ -141,45 +137,6 @@ bool QgsOWSConnectionItem::equal( const QgsDataItem *other )
return ( o && mPath == o->mPath && mName == o->mName );
}
#ifdef HAVE_GUI
QList<QAction *> QgsOWSConnectionItem::actions( QWidget *parent )
{
QList<QAction *> lst;
QAction *actionEdit = new QAction( tr( "Edit…" ), parent );
connect( actionEdit, &QAction::triggered, this, &QgsOWSConnectionItem::editConnection );
lst.append( actionEdit );
QAction *actionDelete = new QAction( tr( "Delete" ), parent );
connect( actionDelete, &QAction::triggered, this, &QgsOWSConnectionItem::deleteConnection );
lst.append( actionDelete );
return lst;
}
void QgsOWSConnectionItem::editConnection()
{
#if 0
QgsNewHttpConnection nc( 0, "qgis/connections-ows/", mName );
if ( nc.exec() )
{
// the parent should be updated
mParent->refreshConnections();
}
#endif
}
void QgsOWSConnectionItem::deleteConnection()
{
#if 0
QgsOWSConnection::deleteConnection( "OWS", mName );
// the parent should be updated
mParent->refreshConnections();
#endif
}
#endif
// ---------------------------------------------------------------------------
@ -216,49 +173,6 @@ QVector<QgsDataItem *> QgsOWSRootItem::createChildren()
return connections;
}
#ifdef HAVE_GUI
QList<QAction *> QgsOWSRootItem::actions( QWidget *parent )
{
Q_UNUSED( parent )
QList<QAction *> lst;
#if 0
QAction *actionNew = new QAction( tr( "New Connection…" ), parent );
connect( actionNew, SIGNAL( triggered() ), this, SLOT( newConnection() ) );
lst.append( actionNew );
#endif
return lst;
}
QWidget *QgsOWSRootItem::paramWidget()
{
#if 0
QgsOWSSourceSelect *select = new QgsOWSSourceSelect( 0, 0, true, true );
connect( select, SIGNAL( connectionsChanged() ), this, SLOT( connectionsChanged() ) );
return select;
#endif
return nullptr;
}
void QgsOWSRootItem::onConnectionsChanged()
{
refresh();
}
void QgsOWSRootItem::newConnection()
{
#if 0
QgsNewHttpConnection nc( 0, "qgis/connections-ows/" );
if ( nc.exec() )
{
refreshConnections();
}
#endif
}
#endif
// ---------------------------------------------------------------------------

View File

@ -29,16 +29,6 @@ class QgsOWSConnectionItem : public QgsDataCollectionItem
QVector<QgsDataItem *> createChildren() override;
bool equal( const QgsDataItem *other ) override;
#ifdef HAVE_GUI
QList<QAction *> actions( QWidget *parent ) override;
#endif
public slots:
#ifdef HAVE_GUI
void editConnection();
void deleteConnection();
#endif
private:
void replacePath( QgsDataItem *item, QString before, QString after );
};
@ -53,17 +43,6 @@ class QgsOWSRootItem : public QgsDataCollectionItem
QVariant sortKey() const override { return 11; }
#ifdef HAVE_GUI
QList<QAction *> actions( QWidget *parent ) override;
QWidget *paramWidget() override;
#endif
public slots:
#ifdef HAVE_GUI
void onConnectionsChanged();
void newConnection();
#endif
};
//! Provider for OWS data item