2004-01-24 16:44:01 +00:00
|
|
|
/***************************************************************************
|
|
|
|
qgsdlgbuffer.cpp
|
|
|
|
Buffer dialog - Subclasses qgsdlgbufferbase
|
|
|
|
Part of the Geoprocessing plugin for PostgreSQL/PostGIS layers
|
|
|
|
-------------------
|
|
|
|
begin : Jan 21, 2004
|
|
|
|
copyright : (C) 2004 by Gary E.Sherman
|
|
|
|
email : sherman at mrcc.com
|
|
|
|
|
|
|
|
***************************************************************************/
|
2004-01-22 05:39:09 +00:00
|
|
|
|
2004-01-24 16:44:01 +00:00
|
|
|
/***************************************************************************
|
|
|
|
* *
|
|
|
|
* This program is free software; you can redistribute it and/or modify *
|
|
|
|
* it under the terms of the GNU General Public License as published by *
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or *
|
|
|
|
* (at your option) any later version. *
|
|
|
|
* *
|
|
|
|
***************************************************************************/
|
|
|
|
/* $Id$ */
|
2004-01-22 05:39:09 +00:00
|
|
|
#include <qlineedit.h>
|
|
|
|
#include <qlabel.h>
|
|
|
|
#include <qcheckbox.h>
|
|
|
|
#include <qcombobox.h>
|
|
|
|
#include "qgsdlgpgbuffer.h"
|
2004-01-29 01:10:07 +00:00
|
|
|
#include <qspinbox.h>
|
2004-01-22 05:39:09 +00:00
|
|
|
|
2004-01-24 16:44:01 +00:00
|
|
|
QgsDlgPgBuffer::QgsDlgPgBuffer(QWidget * parent, const char *name)
|
|
|
|
:QgsDlgPgBufferBase(parent, name)
|
|
|
|
{
|
2004-01-22 05:39:09 +00:00
|
|
|
}
|
2004-01-24 16:44:01 +00:00
|
|
|
|
|
|
|
QgsDlgPgBuffer::~QgsDlgPgBuffer()
|
|
|
|
{
|
2004-01-22 05:39:09 +00:00
|
|
|
}
|
2004-01-24 16:44:01 +00:00
|
|
|
void QgsDlgPgBuffer::setBufferLabel(QString & lbl)
|
|
|
|
{
|
2004-01-29 01:10:07 +00:00
|
|
|
lblBufferInfo->setText("<h2>"+lbl+"</h2>");
|
2004-01-22 05:39:09 +00:00
|
|
|
}
|
2004-01-24 16:44:01 +00:00
|
|
|
|
|
|
|
QString QgsDlgPgBuffer::bufferDistance()
|
|
|
|
{
|
2004-01-29 01:10:07 +00:00
|
|
|
return QString::number(spinBufferDistance->value());
|
2004-01-22 05:39:09 +00:00
|
|
|
}
|
2004-01-24 16:44:01 +00:00
|
|
|
|
|
|
|
QString QgsDlgPgBuffer::bufferLayerName()
|
|
|
|
{
|
|
|
|
return txtBufferedLayerName->text();
|
2004-01-23 07:37:32 +00:00
|
|
|
}
|
2004-01-24 16:44:01 +00:00
|
|
|
|
|
|
|
bool QgsDlgPgBuffer::addLayerToMap()
|
|
|
|
{
|
|
|
|
return chkAddToMap->isChecked();
|
2004-01-23 07:37:32 +00:00
|
|
|
}
|
2004-01-24 16:44:01 +00:00
|
|
|
|
|
|
|
QString QgsDlgPgBuffer::geometryColumn()
|
|
|
|
{
|
|
|
|
return txtGeometryColumn->text();
|
2004-01-23 07:37:32 +00:00
|
|
|
}
|
2004-01-24 16:44:01 +00:00
|
|
|
|
|
|
|
QString QgsDlgPgBuffer::srid()
|
|
|
|
{
|
|
|
|
return txtSrid->text();
|
2004-01-23 07:37:32 +00:00
|
|
|
}
|
2004-01-24 16:44:01 +00:00
|
|
|
|
|
|
|
QString QgsDlgPgBuffer::objectIdColumn()
|
|
|
|
{
|
|
|
|
return cmbFields->currentText();
|
2004-01-22 05:39:09 +00:00
|
|
|
}
|
2004-01-24 16:44:01 +00:00
|
|
|
|
|
|
|
QString QgsDlgPgBuffer::schema()
|
|
|
|
{
|
|
|
|
return cmbSchema->currentText();
|
2004-01-23 07:37:32 +00:00
|
|
|
}
|
2004-01-24 16:44:01 +00:00
|
|
|
|
|
|
|
void QgsDlgPgBuffer::addFieldItem(QString field)
|
|
|
|
{
|
|
|
|
cmbFields->insertItem(field);
|
2004-01-23 07:37:32 +00:00
|
|
|
}
|
2004-01-24 16:44:01 +00:00
|
|
|
|
|
|
|
void QgsDlgPgBuffer::addSchema(QString schema)
|
|
|
|
{
|
|
|
|
cmbSchema->insertItem(schema);
|
2004-01-23 07:37:32 +00:00
|
|
|
}
|
2004-01-24 16:44:01 +00:00
|
|
|
|
|
|
|
void QgsDlgPgBuffer::setSrid(QString srid)
|
|
|
|
{
|
|
|
|
txtSrid->setText(srid);
|
2004-01-23 07:37:32 +00:00
|
|
|
}
|
|
|
|
|
2004-01-24 16:44:01 +00:00
|
|
|
void QgsDlgPgBuffer::setBufferLayerName(QString name)
|
|
|
|
{
|
|
|
|
txtBufferedLayerName->setText(name);
|
|
|
|
}
|
2004-01-23 07:37:32 +00:00
|
|
|
|
2004-01-24 16:44:01 +00:00
|
|
|
void QgsDlgPgBuffer::setGeometryColumn(QString name)
|
|
|
|
{
|
|
|
|
txtGeometryColumn->setText(name);
|
|
|
|
}
|