Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[ows] Remove dead GUI-related data items code
  • Loading branch information
wonder-sk committed Jun 29, 2019
1 parent 58a01ba commit b1794ee
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 107 deletions.
86 changes: 0 additions & 86 deletions src/providers/ows/qgsowsdataitems.cpp
Expand Up @@ -20,10 +20,6 @@
#include "qgsowsconnection.h"
#include "qgsdataitemprovider.h"

#ifdef HAVE_GUI
#include "qgsnewhttpconnection.h"
#endif

#include "qgsapplication.h"

#include <QFileInfo>
Expand Down Expand Up @@ -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


// ---------------------------------------------------------------------------

Expand Down Expand Up @@ -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


// ---------------------------------------------------------------------------

Expand Down
21 changes: 0 additions & 21 deletions src/providers/ows/qgsowsdataitems.h
Expand Up @@ -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 );
};
Expand All @@ -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
Expand Down

0 comments on commit b1794ee

Please sign in to comment.