-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaddservicedialog.cpp
More file actions
74 lines (64 loc) · 1.49 KB
/
addservicedialog.cpp
File metadata and controls
74 lines (64 loc) · 1.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#include "addservicedialog.h"
AddServiceDialog::AddServiceDialog( QWidget* parent, Qt::WindowFlags f ): QDialog( parent, f )
{
setupUi( this );
//todo: select the last service type
mWFSRadioButton->setChecked( true );
}
AddServiceDialog::~AddServiceDialog()
{
}
void AddServiceDialog::setName( const QString& name )
{
mNameLineEdit->setText( name );
}
QString AddServiceDialog::name() const
{
return mNameLineEdit->text();
}
void AddServiceDialog::setService( const QString& service )
{
if ( service.compare( "WMS", Qt::CaseInsensitive ) == 0 )
{
mWMSRadioButton->setChecked( true );
}
else if ( service.compare( "WFS", Qt::CaseInsensitive ) == 0 )
{
mWFSRadioButton->setChecked( true );
}
else if ( service.compare( "WCS", Qt::CaseInsensitive ) == 0 )
{
mWCSRadioButton->setChecked( true );
}
}
QString AddServiceDialog::service() const
{
QString serviceString;
if ( mWMSRadioButton->isChecked() )
{
serviceString = "WMS";
}
else if ( mWFSRadioButton->isChecked() )
{
serviceString = "WFS";
}
else if ( mWCSRadioButton->isChecked() )
{
serviceString = "WCS";
}
return serviceString;
}
void AddServiceDialog::setUrl( const QString& url )
{
mUrlLineEdit->setText( url );
}
QString AddServiceDialog::url() const
{
return mUrlLineEdit->text();
}
void AddServiceDialog::enableServiceTypeSelection( bool enable )
{
mWMSRadioButton->setEnabled( enable );
mWFSRadioButton->setEnabled( enable );
mWCSRadioButton->setEnabled( enable );
}