1
/****************************************************************************
2
** Form implementation generated from reading ui file 'qgsgpsdevicedialogbase.ui'
4
** Created: Sat Dec 4 08:59:06 2004
5
** by: The User Interface Compiler ($Id: qt/main.cpp 3.3.3 edited Nov 24 2003 $)
7
** WARNING! All changes made in this file will be lost!
8
****************************************************************************/
10
#include "qgsgpsdevicedialogbase.h"
15
#include <qlineedit.h>
16
#include <qpushbutton.h>
20
#include <qwhatsthis.h>
23
* Constructs a QgsGPSDeviceDialogBase as a child of 'parent', with the
24
* name 'name' and widget flags set to 'f'.
26
* The dialog will by default be modeless, unless you set 'modal' to
27
* TRUE to construct a modal dialog.
29
QgsGPSDeviceDialogBase::QgsGPSDeviceDialogBase( QWidget* parent, const char* name, bool modal, WFlags fl )
30
: QDialog( parent, name, modal, fl )
33
setName( "QgsGPSDeviceDialogBase" );
34
setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)1, 0, 0, sizePolicy().hasHeightForWidth() ) );
35
setProperty( "modal", QVariant( TRUE, 0 ) );
36
QgsGPSDeviceDialogBaseLayout = new QGridLayout( this, 1, 1, 11, 6, "QgsGPSDeviceDialogBaseLayout");
38
line2 = new QFrame( this, "line2" );
39
line2->setFrameShape( QFrame::VLine );
40
line2->setFrameShadow( QFrame::Sunken );
41
line2->setFrameShape( QFrame::VLine );
43
QgsGPSDeviceDialogBaseLayout->addMultiCellWidget( line2, 0, 6, 1, 1 );
45
textLabel3 = new QLabel( this, "textLabel3" );
46
textLabel3->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)5, 0, 0, textLabel3->sizePolicy().hasHeightForWidth() ) );
48
QgsGPSDeviceDialogBaseLayout->addMultiCellWidget( textLabel3, 0, 0, 2, 3 );
50
textLabel4 = new QLabel( this, "textLabel4" );
52
QgsGPSDeviceDialogBaseLayout->addMultiCellWidget( textLabel4, 1, 1, 2, 3 );
54
leDownloadCmd = new QLineEdit( this, "leDownloadCmd" );
55
leDownloadCmd->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 2, 0, leDownloadCmd->sizePolicy().hasHeightForWidth() ) );
57
QgsGPSDeviceDialogBaseLayout->addMultiCellWidget( leDownloadCmd, 1, 1, 4, 5 );
59
leDeviceName = new QLineEdit( this, "leDeviceName" );
60
leDeviceName->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 2, 0, leDeviceName->sizePolicy().hasHeightForWidth() ) );
62
QgsGPSDeviceDialogBaseLayout->addMultiCellWidget( leDeviceName, 0, 0, 4, 5 );
64
leUploadCmd = new QLineEdit( this, "leUploadCmd" );
65
leUploadCmd->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 2, 0, leUploadCmd->sizePolicy().hasHeightForWidth() ) );
67
QgsGPSDeviceDialogBaseLayout->addMultiCellWidget( leUploadCmd, 2, 2, 4, 5 );
69
textLabel5 = new QLabel( this, "textLabel5" );
71
QgsGPSDeviceDialogBaseLayout->addMultiCellWidget( textLabel5, 2, 2, 2, 3 );
73
textLabel1 = new QLabel( this, "textLabel1" );
74
textLabel1->setTextFormat( QLabel::RichText );
75
textLabel1->setAlignment( int( QLabel::WordBreak | QLabel::AlignVCenter ) );
77
QgsGPSDeviceDialogBaseLayout->addMultiCellWidget( textLabel1, 3, 6, 3, 5 );
79
pbUpdateDevice = new QPushButton( this, "pbUpdateDevice" );
81
QgsGPSDeviceDialogBaseLayout->addWidget( pbUpdateDevice, 6, 0 );
83
pbDeleteDevice = new QPushButton( this, "pbDeleteDevice" );
85
QgsGPSDeviceDialogBaseLayout->addWidget( pbDeleteDevice, 5, 0 );
87
pbNewDevice = new QPushButton( this, "pbNewDevice" );
89
QgsGPSDeviceDialogBaseLayout->addWidget( pbNewDevice, 4, 0 );
91
lbDeviceList = new QListBox( this, "lbDeviceList" );
92
lbDeviceList->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)7, 0, 0, lbDeviceList->sizePolicy().hasHeightForWidth() ) );
94
QgsGPSDeviceDialogBaseLayout->addMultiCellWidget( lbDeviceList, 0, 3, 0, 0 );
96
pbClose = new QPushButton( this, "pbClose" );
97
pbClose->setDefault( TRUE );
99
QgsGPSDeviceDialogBaseLayout->addWidget( pbClose, 7, 5 );
100
spacer2 = new QSpacerItem( 370, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
101
QgsGPSDeviceDialogBaseLayout->addMultiCell( spacer2, 7, 7, 0, 4 );
103
resize( QSize(488, 405).expandedTo(minimumSizeHint()) );
104
clearWState( WState_Polished );
106
// signals and slots connections
107
connect( pbNewDevice, SIGNAL( clicked() ), this, SLOT( slotNewDevice() ) );
108
connect( pbDeleteDevice, SIGNAL( clicked() ), this, SLOT( slotDeleteDevice() ) );
109
connect( pbUpdateDevice, SIGNAL( clicked() ), this, SLOT( slotUpdateDevice() ) );
110
connect( pbClose, SIGNAL( clicked() ), this, SLOT( close() ) );
111
connect( lbDeviceList, SIGNAL( selectionChanged() ), this, SLOT( slotSelectionChanged() ) );
115
* Destroys the object and frees any allocated resources
117
QgsGPSDeviceDialogBase::~QgsGPSDeviceDialogBase()
119
// no need to delete child widgets, Qt does it all for us
123
* Sets the strings of the subwidgets using the current
126
void QgsGPSDeviceDialogBase::languageChange()
128
setCaption( tr( "GPS Device Editor" ) );
129
textLabel3->setText( tr( "Device name:" ) );
130
textLabel4->setText( tr( "Download command:" ) );
131
QToolTip::add( leDownloadCmd, tr( "This is the command that will be used to download GPS data from the device. %in and %out will be replaced by the port and the GPX filename, respectively." ) );
132
QToolTip::add( leDeviceName, tr( "This is the name of the device as it will appear in the lists" ) );
133
QToolTip::add( leUploadCmd, tr( "This is the command that will be used to upload GPS data to the device. %in and %out will be replaced by the GPX filename and the port, respectively." ) );
134
textLabel5->setText( tr( "Upload command:" ) );
135
textLabel1->setText( tr( "<p>In the download and upload commands there can be special words that will be replaced by QGIS when the commands are used. These words are:</p>\n"
136
"<i>%babel</i> - the path to GPSBabel<br>\n"
137
"<i>%type</i> - the flag for the feature type that is being transferred (-w, -r or -t)<br>\n"
138
"<i>%in</i> - the GPX filename when uploading or the port when downloading<br>\n"
139
"<i>%out</i> - the port when uploading or the GPX filename when downloading" ) );
140
pbUpdateDevice->setText( tr( "Update device" ) );
141
pbDeleteDevice->setText( tr( "Delete device" ) );
142
pbNewDevice->setText( tr( "New device" ) );
143
pbClose->setText( tr( "Close" ) );
146
void QgsGPSDeviceDialogBase::slotProtocolChanged(const QString&)
148
qWarning( "QgsGPSDeviceDialogBase::slotProtocolChanged(const QString&): Not implemented yet" );
151
void QgsGPSDeviceDialogBase::slotNewDevice()
153
qWarning( "QgsGPSDeviceDialogBase::slotNewDevice(): Not implemented yet" );
156
void QgsGPSDeviceDialogBase::slotDeleteDevice()
158
qWarning( "QgsGPSDeviceDialogBase::slotDeleteDevice(): Not implemented yet" );
161
void QgsGPSDeviceDialogBase::slotUpdateDevice()
163
qWarning( "QgsGPSDeviceDialogBase::slotUpdateDevice(): Not implemented yet" );
166
void QgsGPSDeviceDialogBase::slotSelectionChanged()
168
qWarning( "QgsGPSDeviceDialogBase::slotSelectionChanged(): Not implemented yet" );