~ubuntu-branches/ubuntu/quantal/qgis/quantal

« back to all changes in this revision

Viewing changes to src/plugins/geoprocessing/qgsdlgpgbuffer.cpp

  • Committer: Bazaar Package Importer
  • Author(s): William Grant
  • Date: 2007-05-06 13:42:32 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20070506134232-pyli6t388w5asd8x
Tags: 0.8.0-3ubuntu1
* Merge from Debian unstable. Remaining Ubuntu changes:
  - debian/rules, debian/qgis.install, debian/qgis.dirs debian/qgis.desktop:
    Add and install .desktop.
* debian/qgis.desktop: Remove Applications category; it's not real.
* Modify Maintainer value to match Debian-Maintainer-Field Spec

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/***************************************************************************
 
2
                          qgsdlgbuffer.cpp 
 
3
                          Buffer dialog - Subclasses qgsdlgbufferbase
 
4
 Part of the Geoprocessing plugin for PostgreSQL/PostGIS layers
 
5
                             -------------------
 
6
    begin                : Jan 21, 2004
 
7
    copyright            : (C) 2004 by Gary E.Sherman
 
8
    email                : sherman at mrcc.com
 
9
  
 
10
 ***************************************************************************/
 
11
 
 
12
/***************************************************************************
 
13
 *                                                                         *
 
14
 *   This program is free software; you can redistribute it and/or modify  *
 
15
 *   it under the terms of the GNU General Public License as published by  *
 
16
 *   the Free Software Foundation; either version 2 of the License, or     *
 
17
 *   (at your option) any later version.                                   *
 
18
 *                                                                         *
 
19
 ***************************************************************************/
 
20
 /*  $Id: qgsdlgpgbuffer.cpp 4778 2006-01-29 05:55:07Z g_j_m $ */
 
21
#include <QValidator>
 
22
 
 
23
#include "qgsdlgpgbuffer.h"
 
24
#include "qgscontexthelp.h"
 
25
#include "qgisiface.h"
 
26
 
 
27
QgsDlgPgBuffer::QgsDlgPgBuffer( QgisIface * _qI, QWidget * parent, Qt::WFlags fl)
 
28
:QDialog(parent, fl),qI(_qI)
 
29
{
 
30
  setupUi(this);
 
31
  // set the validator
 
32
  distanceValidator = new QDoubleValidator(0, 9e9, 6, this);
 
33
  txtBufferDistance->setValidator(distanceValidator);
 
34
}
 
35
 
 
36
QgsDlgPgBuffer::~QgsDlgPgBuffer()
 
37
{
 
38
}
 
39
void QgsDlgPgBuffer::setBufferLabel(QString & lbl)
 
40
{
 
41
    lblBufferInfo->setText("<h2>"+lbl+"</h2>");
 
42
}
 
43
 
 
44
QString QgsDlgPgBuffer::bufferDistance()
 
45
{
 
46
    return txtBufferDistance->text();
 
47
}
 
48
 
 
49
QString QgsDlgPgBuffer::bufferLayerName()
 
50
{
 
51
    return txtBufferedLayerName->text();
 
52
}
 
53
 
 
54
bool QgsDlgPgBuffer::addLayerToMap()
 
55
{
 
56
    return chkAddToMap->isChecked();
 
57
}
 
58
 
 
59
QString QgsDlgPgBuffer::geometryColumn()
 
60
{
 
61
    return txtGeometryColumn->text();
 
62
}
 
63
 
 
64
QString QgsDlgPgBuffer::srid()
 
65
{
 
66
    return txtSrid->text();
 
67
}
 
68
 
 
69
QString QgsDlgPgBuffer::objectIdColumn()
 
70
{
 
71
    return cmbFields->currentText();
 
72
}
 
73
 
 
74
QString QgsDlgPgBuffer::schema()
 
75
{
 
76
    return cmbSchema->currentText();
 
77
}
 
78
 
 
79
void QgsDlgPgBuffer::addFieldItem(QString field)
 
80
{
 
81
    cmbFields->insertItem(field);
 
82
}
 
83
 
 
84
void QgsDlgPgBuffer::addSchema(QString schema)
 
85
{
 
86
    cmbSchema->insertItem(schema);
 
87
}
 
88
 
 
89
void QgsDlgPgBuffer::setSrid(QString srid)
 
90
{
 
91
    txtSrid->setText(srid);
 
92
}
 
93
 
 
94
void QgsDlgPgBuffer::setBufferLayerName(QString name)
 
95
{
 
96
    txtBufferedLayerName->setText(name);
 
97
}
 
98
 
 
99
void QgsDlgPgBuffer::setGeometryColumn(QString name)
 
100
{
 
101
    txtGeometryColumn->setText(name);
 
102
}
 
103
void QgsDlgPgBuffer::on_btnHelp_clicked()
 
104
{
 
105
  QgsContextHelp::run(context_id);
 
106
// Old call to open help in browser  qI->openURL("plugins/geoprocessing/buffer/index.html",true);
 
107
}