~ubuntu-branches/ubuntu/hardy/qgis/hardy

« back to all changes in this revision

Viewing changes to plugins/community_reg_plugin/qgslocationcapturewidgetbase.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
 
** Form implementation generated from reading ui file 'qgslocationcapturewidgetbase.ui'
3
 
**
4
 
** Created: Sun Apr 24 15:11:25 2005
5
 
**      by: The User Interface Compiler ($Id: qgslocationcapturewidgetbase.cpp,v 1.3 2005/04/24 03:34:34 g_j_m Exp $)
6
 
**
7
 
** WARNING! All changes made in this file will be lost!
8
 
****************************************************************************/
9
 
 
10
 
#include "qgslocationcapturewidgetbase.h"
11
 
 
12
 
#include <qvariant.h>
13
 
#include <qpushbutton.h>
14
 
#include <qlabel.h>
15
 
#include <qlayout.h>
16
 
#include <qtooltip.h>
17
 
#include <qwhatsthis.h>
18
 
#include "qgslocationcapturewidgetbase.ui.h"
19
 
 
20
 
/*
21
 
 *  Constructs a QgsLocationCaptureWidgetBase as a child of 'parent', with the
22
 
 *  name 'name' and widget flags set to 'f'.
23
 
 */
24
 
QgsLocationCaptureWidgetBase::QgsLocationCaptureWidgetBase( QWidget* parent, const char* name, WFlags fl )
25
 
    : QWidget( parent, name, fl )
26
 
{
27
 
    if ( !name )
28
 
        setName( "QgsLocationCaptureWidgetBase" );
29
 
    QgsLocationCaptureWidgetBaseLayout = new QGridLayout( this, 1, 1, 11, 6, "QgsLocationCaptureWidgetBaseLayout"); 
30
 
 
31
 
    qgsMapCanvas = new QgsMapCanvas( this, "qgsMapCanvas" );
32
 
 
33
 
    QgsLocationCaptureWidgetBaseLayout->addMultiCellWidget( qgsMapCanvas, 0, 0, 0, 3 );
34
 
 
35
 
    pbnZoomIn = new QPushButton( this, "pbnZoomIn" );
36
 
 
37
 
    QgsLocationCaptureWidgetBaseLayout->addWidget( pbnZoomIn, 2, 0 );
38
 
 
39
 
    pbnPan = new QPushButton( this, "pbnPan" );
40
 
 
41
 
    QgsLocationCaptureWidgetBaseLayout->addWidget( pbnPan, 2, 2 );
42
 
 
43
 
    pbnZoomOut = new QPushButton( this, "pbnZoomOut" );
44
 
 
45
 
    QgsLocationCaptureWidgetBaseLayout->addWidget( pbnZoomOut, 2, 1 );
46
 
 
47
 
    pbnCapturePos = new QPushButton( this, "pbnCapturePos" );
48
 
 
49
 
    QgsLocationCaptureWidgetBaseLayout->addWidget( pbnCapturePos, 2, 3 );
50
 
 
51
 
    pushButton5 = new QPushButton( this, "pushButton5" );
52
 
 
53
 
    QgsLocationCaptureWidgetBaseLayout->addMultiCellWidget( pushButton5, 3, 3, 0, 3 );
54
 
 
55
 
    lblCapturePos = new QLabel( this, "lblCapturePos" );
56
 
    lblCapturePos->setMaximumSize( QSize( 32767, 20 ) );
57
 
 
58
 
    QgsLocationCaptureWidgetBaseLayout->addMultiCellWidget( lblCapturePos, 1, 1, 2, 3 );
59
 
 
60
 
    lblCurrentPos = new QLabel( this, "lblCurrentPos" );
61
 
 
62
 
    QgsLocationCaptureWidgetBaseLayout->addMultiCellWidget( lblCurrentPos, 1, 1, 0, 1 );
63
 
    languageChange();
64
 
    resize( QSize(451, 370).expandedTo(minimumSizeHint()) );
65
 
    clearWState( WState_Polished );
66
 
 
67
 
    // signals and slots connections
68
 
    connect( qgsMapCanvas, SIGNAL( xyClickCoordinates(QgsPoint&) ), this, SLOT( qgsMapCanvas_xyClickCoordinates(QgsPoint&) ) );
69
 
    connect( qgsMapCanvas, SIGNAL( xyCoordinates(QgsPoint&) ), this, SLOT( qgsMapCanvas_xyCoordinates(QgsPoint&) ) );
70
 
}
71
 
 
72
 
/*
73
 
 *  Destroys the object and frees any allocated resources
74
 
 */
75
 
QgsLocationCaptureWidgetBase::~QgsLocationCaptureWidgetBase()
76
 
{
77
 
    // no need to delete child widgets, Qt does it all for us
78
 
}
79
 
 
80
 
/*
81
 
 *  Sets the strings of the subwidgets using the current
82
 
 *  language.
83
 
 */
84
 
void QgsLocationCaptureWidgetBase::languageChange()
85
 
{
86
 
    setCaption( tr( "Form1" ) );
87
 
    pbnZoomIn->setText( tr( "ZoomIn" ) );
88
 
    pbnPan->setText( tr( "Pan" ) );
89
 
    pbnZoomOut->setText( tr( "Zoom Out" ) );
90
 
    pbnCapturePos->setText( tr( "Capture Pos" ) );
91
 
    pushButton5->setText( tr( "OK" ) );
92
 
    lblCapturePos->setText( tr( "Captured Pos:" ) );
93
 
    lblCurrentPos->setText( tr( "Current Pos:" ) );
94
 
}
95