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

« back to all changes in this revision

Viewing changes to src/qgsgeomtypedialog.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Steve Halasz
  • Date: 2004-12-21 09:46:27 UTC
  • Revision ID: james.westby@ubuntu.com-20041221094627-r9lb6mlz2o3yp8gn
Tags: upstream-0.6.0
ImportĀ upstreamĀ versionĀ 0.6.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/***************************************************************************
 
2
                         qgsgeomtypedialog.cpp  -  description
 
3
                             -------------------
 
4
    begin                : October 2004
 
5
    copyright            : (C) 2004 by Marco Hugentobler
 
6
    email                : marco.hugentobler@autoform.ch
 
7
 ***************************************************************************/
 
8
 
 
9
/***************************************************************************
 
10
 *                                                                         *
 
11
 *   This program is free software; you can redistribute it and/or modify  *
 
12
 *   it under the terms of the GNU General Public License as published by  *
 
13
 *   the Free Software Foundation; either version 2 of the License, or     *
 
14
 *   (at your option) any later version.                                   *
 
15
 *                                                                         *
 
16
 ***************************************************************************/
 
17
/* $Id: qgsgeomtypedialog.cpp,v 1.3 2004/10/26 17:28:02 mcoletti Exp $ */
 
18
#include "qgsgeomtypedialog.h"
 
19
#include <qradiobutton.h>
 
20
 
 
21
QgsGeomTypeDialog::QgsGeomTypeDialog(): QgsGeomTypeDialogBase()
 
22
{
 
23
    QObject::connect((QObject*)mOkButton, SIGNAL(clicked()), this, SLOT(accept()));//why is this cast necessary????
 
24
    QObject::connect((QObject*)mCancelButton, SIGNAL(clicked()), this, SLOT(reject()));//why is this cast necessary????
 
25
    mPointRadioButton->setChecked(true);
 
26
}
 
27
 
 
28
QgsGeomTypeDialog::~QgsGeomTypeDialog()
 
29
{
 
30
 
 
31
}
 
32
 
 
33
QGis::WKBTYPE QgsGeomTypeDialog::selectedType()
 
34
{
 
35
    if(mPointRadioButton->isChecked())
 
36
    {
 
37
        return QGis::WKBPoint;
 
38
    }
 
39
    else if(mLineRadioButton->isChecked())
 
40
    {
 
41
        return QGis::WKBLineString;
 
42
    }
 
43
    else if(mPolygonRadioButton->isChecked())
 
44
    {
 
45
        return QGis::WKBPolygon;
 
46
    }
 
47
 
 
48
    return QGis::WKBUnknown;
 
49
}