mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-18 00:03:05 -04:00
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:
parent
2f8507509b
commit
5d0d76d0b7
@ -24,9 +24,10 @@
|
|||||||
#include <qcombobox.h>
|
#include <qcombobox.h>
|
||||||
#include "qgsdlgpgbuffer.h"
|
#include "qgsdlgpgbuffer.h"
|
||||||
#include <qspinbox.h>
|
#include <qspinbox.h>
|
||||||
|
#include "../../src/qgisiface.h"
|
||||||
|
|
||||||
QgsDlgPgBuffer::QgsDlgPgBuffer(QWidget * parent, const char *name)
|
QgsDlgPgBuffer::QgsDlgPgBuffer( QgisIface * _qI, QWidget * parent, const char *name)
|
||||||
:QgsDlgPgBufferBase(parent, name)
|
:QgsDlgPgBufferBase(parent, name),qI(_qI)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -97,3 +98,7 @@ void QgsDlgPgBuffer::setGeometryColumn(QString name)
|
|||||||
{
|
{
|
||||||
txtGeometryColumn->setText(name);
|
txtGeometryColumn->setText(name);
|
||||||
}
|
}
|
||||||
|
void QgsDlgPgBuffer::help()
|
||||||
|
{
|
||||||
|
qI->openURL("plugins/geoprocessing/buffer/index.html",true);
|
||||||
|
}
|
||||||
|
@ -21,11 +21,12 @@
|
|||||||
#ifndef QGSDLGPGBUFFER_H
|
#ifndef QGSDLGPGBUFFER_H
|
||||||
#define QGSDLGPGBUFFER_H
|
#define QGSDLGPGBUFFER_H
|
||||||
#include "qgsdlgpgbufferbase.h"
|
#include "qgsdlgpgbufferbase.h"
|
||||||
|
class QgisIface;
|
||||||
class QgsDlgPgBuffer:public QgsDlgPgBufferBase
|
class QgsDlgPgBuffer:public QgsDlgPgBufferBase
|
||||||
{
|
{
|
||||||
Q_OBJECT public:
|
Q_OBJECT public:
|
||||||
//! Constructor
|
//! Constructor
|
||||||
QgsDlgPgBuffer(QWidget * parent = 0, const char *name = 0);
|
QgsDlgPgBuffer( QgisIface * _qI = 0, QWidget * parent = 0, const char *name = 0);
|
||||||
//! Destructor
|
//! Destructor
|
||||||
QgsDlgPgBuffer::~QgsDlgPgBuffer();
|
QgsDlgPgBuffer::~QgsDlgPgBuffer();
|
||||||
//! Set the information label in the dialog
|
//! Set the information label in the dialog
|
||||||
@ -54,5 +55,10 @@ class QgsDlgPgBuffer:public QgsDlgPgBufferBase
|
|||||||
void setBufferLayerName(QString name);
|
void setBufferLayerName(QString name);
|
||||||
//! Set the geometry column on the dialog
|
//! Set the geometry column on the dialog
|
||||||
void setGeometryColumn(QString name);
|
void setGeometryColumn(QString name);
|
||||||
|
public slots:
|
||||||
|
void help();
|
||||||
|
private:
|
||||||
|
//! Pointer to the QGIS interface object
|
||||||
|
QgisIface *qI;
|
||||||
};
|
};
|
||||||
#endif // QGSDLGPGBUFFER_H
|
#endif // QGSDLGPGBUFFER_H
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<!DOCTYPE UI><UI version="3.1" stdsetdef="1">
|
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
|
||||||
<class>QgsDlgPgBufferBase</class>
|
<class>QgsDlgPgBufferBase</class>
|
||||||
<widget class="QDialog">
|
<widget class="QDialog">
|
||||||
<property name="name">
|
<property name="name">
|
||||||
@ -9,7 +9,7 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>520</width>
|
<width>520</width>
|
||||||
<height>307</height>
|
<height>314</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="caption">
|
<property name="caption">
|
||||||
@ -363,6 +363,15 @@
|
|||||||
<receiver>QgsDlgPgBufferBase</receiver>
|
<receiver>QgsDlgPgBufferBase</receiver>
|
||||||
<slot>reject()</slot>
|
<slot>reject()</slot>
|
||||||
</connection>
|
</connection>
|
||||||
|
<connection>
|
||||||
|
<sender>buttonHelp</sender>
|
||||||
|
<signal>clicked()</signal>
|
||||||
|
<receiver>QgsDlgPgBufferBase</receiver>
|
||||||
|
<slot>help()</slot>
|
||||||
|
</connection>
|
||||||
</connections>
|
</connections>
|
||||||
|
<slots>
|
||||||
|
<slot>help()</slot>
|
||||||
|
</slots>
|
||||||
<layoutdefaults spacing="6" margin="11"/>
|
<layoutdefaults spacing="6" margin="11"/>
|
||||||
</UI>
|
</UI>
|
||||||
|
@ -155,7 +155,8 @@ void QgsPgGeoprocessing::buffer()
|
|||||||
user = user.mid(user.find("=") + 1);
|
user = user.mid(user.find("=") + 1);
|
||||||
|
|
||||||
// show dialog to fetch buffer distrance, new layer name, and option to
|
// show dialog to fetch buffer distrance, new layer name, and option to
|
||||||
QgsDlgPgBuffer *bb = new QgsDlgPgBuffer();
|
QgsDlgPgBuffer *bb = new QgsDlgPgBuffer(qI);
|
||||||
|
|
||||||
// set the label
|
// set the label
|
||||||
QString lbl = tr("Buffer features in layer %1").arg(tableName);
|
QString lbl = tr("Buffer features in layer %1").arg(tableName);
|
||||||
bb->setBufferLabel(lbl);
|
bb->setBufferLabel(lbl);
|
||||||
@ -416,7 +417,6 @@ void QgsPgGeoprocessing::unload()
|
|||||||
menu->removeItem(menuId);
|
menu->removeItem(menuId);
|
||||||
delete toolBar;
|
delete toolBar;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Required extern functions needed for every plugin
|
* Required extern functions needed for every plugin
|
||||||
* These functions can be called prior to creating an instance
|
* These functions can be called prior to creating an instance
|
||||||
|
@ -77,6 +77,8 @@ class QgsPgGeoprocessing:public QObject, public QgisPlugin
|
|||||||
void buffer();
|
void buffer();
|
||||||
//! unload the plugin
|
//! unload the plugin
|
||||||
void unload();
|
void unload();
|
||||||
|
//! show the help document
|
||||||
|
void help();
|
||||||
private:
|
private:
|
||||||
//! get postgis version string
|
//! get postgis version string
|
||||||
QString postgisVersion(PGconn *);
|
QString postgisVersion(PGconn *);
|
||||||
@ -86,6 +88,7 @@ class QgsPgGeoprocessing:public QObject, public QgisPlugin
|
|||||||
bool hasGIST(PGconn *);
|
bool hasGIST(PGconn *);
|
||||||
//! get status of PROJ4 capability
|
//! get status of PROJ4 capability
|
||||||
bool hasPROJ(PGconn *);
|
bool hasPROJ(PGconn *);
|
||||||
|
|
||||||
QString postgisVersionInfo;
|
QString postgisVersionInfo;
|
||||||
bool geosAvailable;
|
bool geosAvailable;
|
||||||
bool gistAvailable;
|
bool gistAvailable;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user