diff --git a/plugins/geoprocessing/qgsdlgpgbuffer.cpp b/plugins/geoprocessing/qgsdlgpgbuffer.cpp index 9aeda8fac61..d2fc6558a71 100644 --- a/plugins/geoprocessing/qgsdlgpgbuffer.cpp +++ b/plugins/geoprocessing/qgsdlgpgbuffer.cpp @@ -24,9 +24,10 @@ #include #include "qgsdlgpgbuffer.h" #include +#include "../../src/qgisiface.h" -QgsDlgPgBuffer::QgsDlgPgBuffer(QWidget * parent, const char *name) -:QgsDlgPgBufferBase(parent, name) +QgsDlgPgBuffer::QgsDlgPgBuffer( QgisIface * _qI, QWidget * parent, const char *name) +:QgsDlgPgBufferBase(parent, name),qI(_qI) { } @@ -97,3 +98,7 @@ void QgsDlgPgBuffer::setGeometryColumn(QString name) { txtGeometryColumn->setText(name); } +void QgsDlgPgBuffer::help() +{ + qI->openURL("plugins/geoprocessing/buffer/index.html",true); +} diff --git a/plugins/geoprocessing/qgsdlgpgbuffer.h b/plugins/geoprocessing/qgsdlgpgbuffer.h index 6a090fac142..23cded11458 100644 --- a/plugins/geoprocessing/qgsdlgpgbuffer.h +++ b/plugins/geoprocessing/qgsdlgpgbuffer.h @@ -21,11 +21,12 @@ #ifndef QGSDLGPGBUFFER_H #define QGSDLGPGBUFFER_H #include "qgsdlgpgbufferbase.h" +class QgisIface; class QgsDlgPgBuffer:public QgsDlgPgBufferBase { Q_OBJECT public: //! Constructor - QgsDlgPgBuffer(QWidget * parent = 0, const char *name = 0); + QgsDlgPgBuffer( QgisIface * _qI = 0, QWidget * parent = 0, const char *name = 0); //! Destructor QgsDlgPgBuffer::~QgsDlgPgBuffer(); //! Set the information label in the dialog @@ -54,5 +55,10 @@ class QgsDlgPgBuffer:public QgsDlgPgBufferBase void setBufferLayerName(QString name); //! Set the geometry column on the dialog void setGeometryColumn(QString name); + public slots: + void help(); + private: + //! Pointer to the QGIS interface object + QgisIface *qI; }; #endif // QGSDLGPGBUFFER_H diff --git a/plugins/geoprocessing/qgsdlgpgbufferbase.ui b/plugins/geoprocessing/qgsdlgpgbufferbase.ui index 2ad52e67a9b..70e882ef175 100644 --- a/plugins/geoprocessing/qgsdlgpgbufferbase.ui +++ b/plugins/geoprocessing/qgsdlgpgbufferbase.ui @@ -1,4 +1,4 @@ - + QgsDlgPgBufferBase @@ -9,7 +9,7 @@ 0 0 520 - 307 + 314 @@ -363,6 +363,15 @@ QgsDlgPgBufferBase reject() + + buttonHelp + clicked() + QgsDlgPgBufferBase + help() + + + help() + diff --git a/plugins/geoprocessing/qgspggeoprocessing.cpp b/plugins/geoprocessing/qgspggeoprocessing.cpp index 91a1a73cdaa..517ef92ffe1 100644 --- a/plugins/geoprocessing/qgspggeoprocessing.cpp +++ b/plugins/geoprocessing/qgspggeoprocessing.cpp @@ -155,7 +155,8 @@ void QgsPgGeoprocessing::buffer() user = user.mid(user.find("=") + 1); // show dialog to fetch buffer distrance, new layer name, and option to - QgsDlgPgBuffer *bb = new QgsDlgPgBuffer(); + QgsDlgPgBuffer *bb = new QgsDlgPgBuffer(qI); + // set the label QString lbl = tr("Buffer features in layer %1").arg(tableName); bb->setBufferLabel(lbl); @@ -416,7 +417,6 @@ void QgsPgGeoprocessing::unload() menu->removeItem(menuId); delete toolBar; } - /** * Required extern functions needed for every plugin * These functions can be called prior to creating an instance diff --git a/plugins/geoprocessing/qgspggeoprocessing.h b/plugins/geoprocessing/qgspggeoprocessing.h index def471153e9..fd93b1216c9 100644 --- a/plugins/geoprocessing/qgspggeoprocessing.h +++ b/plugins/geoprocessing/qgspggeoprocessing.h @@ -77,6 +77,8 @@ class QgsPgGeoprocessing:public QObject, public QgisPlugin void buffer(); //! unload the plugin void unload(); + //! show the help document + void help(); private: //! get postgis version string QString postgisVersion(PGconn *); @@ -86,6 +88,7 @@ class QgsPgGeoprocessing:public QObject, public QgisPlugin bool hasGIST(PGconn *); //! get status of PROJ4 capability bool hasPROJ(PGconn *); + QString postgisVersionInfo; bool geosAvailable; bool gistAvailable;