connected help button on the buffer dialog to display help stored in <prefix>/share/doc/plugins/geoprocessing/buffer

git-svn-id: http://svn.osgeo.org/qgis/trunk@743 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
gsherman 2004-02-07 23:33:50 +00:00
parent 2f8507509b
commit 5d0d76d0b7
5 changed files with 30 additions and 7 deletions

View File

@ -24,9 +24,10 @@
#include <qcombobox.h>
#include "qgsdlgpgbuffer.h"
#include <qspinbox.h>
#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);
}

View File

@ -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

View File

@ -1,4 +1,4 @@
<!DOCTYPE UI><UI version="3.1" stdsetdef="1">
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>QgsDlgPgBufferBase</class>
<widget class="QDialog">
<property name="name">
@ -9,7 +9,7 @@
<x>0</x>
<y>0</y>
<width>520</width>
<height>307</height>
<height>314</height>
</rect>
</property>
<property name="caption">
@ -363,6 +363,15 @@
<receiver>QgsDlgPgBufferBase</receiver>
<slot>reject()</slot>
</connection>
<connection>
<sender>buttonHelp</sender>
<signal>clicked()</signal>
<receiver>QgsDlgPgBufferBase</receiver>
<slot>help()</slot>
</connection>
</connections>
<slots>
<slot>help()</slot>
</slots>
<layoutdefaults spacing="6" margin="11"/>
</UI>

View File

@ -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

View File

@ -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;