Subversion Repositories public

Rev

Rev 232 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 232 Rev 283
Line 23... Line 23...
23
#include <kurlrequester.h>
23
#include <kurlrequester.h>
24
#include <klineedit.h>
24
#include <klineedit.h>
25
#include <qdir.h>
25
#include <qdir.h>
26
#include <qcheckbox.h>
26
#include <qcheckbox.h>
27
#include "wmsbase.h"
27
#include "wmsbase.h"
-
 
28
#include "wmsselectorwidget.h"
28
 
29
 
29
wmsbase::wmsbase ( QWidget* parent, Qt::WFlags fl )
30
wmsbase::wmsbase ( QWidget* parent, Qt::WFlags fl )
30
		: QDialog(parent, fl), Ui::wmsWidgetBase ()
31
		: QDialog(parent, fl), Ui::wmsWidgetBase ()
31
{
32
{
32
QDir dir = QDir::home();
33
QDir dir = QDir::home();
Line 35... Line 36...
35
	setupUi (this);
36
	setupUi (this);
36
	// Load the config parameters
37
	// Load the config parameters
37
	KConfig cfg (QString("sportwatcher.rc"), KConfig::SimpleConfig);
38
	KConfig cfg (QString("sportwatcher.rc"), KConfig::SimpleConfig);
38
	KConfigGroup ic (&cfg, "WMS");
39
	KConfigGroup ic (&cfg, "WMS");
39
	edServerURL->setUrl (ic.readEntry("ServerURL", "http://onearth.jpl.nasa.gov/wms.cgi"));
40
	edServerURL->setUrl (ic.readEntry("ServerURL", "http://onearth.jpl.nasa.gov/wms.cgi"));
40
	edLayer->setText (ic.readEntry("Layer", QString("")));
41
	edLayer->setText (ic.readEntry("Layer", QString("modis,global_mosaic")));
41
	cbSRS->setCurrentIndex (ic.readEntry("SRS", 0));
42
	cbSRS->setCurrentIndex (ic.readEntry("SRS", 0));
42
	cbCRS->setCurrentIndex (ic.readEntry("CRS", 0));
43
	cbCRS->setCurrentIndex (ic.readEntry("CRS", 0));
43
	edBands->setValue (ic.readEntry("Bands", 3));
44
	edBands->setValue (ic.readEntry("Bands", 3));
44
	cbImage->setCurrentIndex (ic.readEntry("Image", 2));
45
	cbImage->setCurrentIndex (ic.readEntry("Image", 2));
45
	cbVersion->setCurrentIndex (ic.readEntry("Version", 0));
46
	cbVersion->setCurrentIndex (ic.readEntry("Version", 0));
Line 47... Line 48...
47
	cbTile->setCurrentIndex (ic.readEntry("Tile", 2));
48
	cbTile->setCurrentIndex (ic.readEntry("Tile", 2));
48
	edDepth->setValue (ic.readEntry("Depth", 2));
49
	edDepth->setValue (ic.readEntry("Depth", 2));
49
	edOverview->setValue (ic.readEntry("Overview", 10));
50
	edOverview->setValue (ic.readEntry("Overview", 10));
50
	chSquare->setChecked (ic.readEntry("Square", false));
51
	chSquare->setChecked (ic.readEntry("Square", false));
51
	chOffline->setChecked (ic.readEntry("Offline", false));
52
	chOffline->setChecked (ic.readEntry("Offline", false));
52
	chAdvice->setChecked (ic.readEntry("Advice", false));
53
	chAdvice->setChecked (ic.readEntry("Advice", true));
53
	chVerify->setChecked (ic.readEntry("Verify", true));
54
	chVerify->setChecked (ic.readEntry("Verify", false));
54
	edCorrX->setValue (ic.readEntry("CorrX", 0));
55
	edCorrX->setValue (ic.readEntry("CorrX", 0));
55
	edCorrY->setValue (ic.readEntry("CorrY", 0));
56
	edCorrY->setValue (ic.readEntry("CorrY", 0));
56
}
57
}
57
 
58
 
58
wmsbase::~wmsbase()
59
wmsbase::~wmsbase()
59
{
60
{
60
}
61
}
61
 
62
 
62
/*$SPECIALIZATION$*/
63
/*$SPECIALIZATION$*/
-
 
64
void wmsbase::slotGetCapabilities()
-
 
65
{
-
 
66
wmsSelectorWidget *dlg = new wmsSelectorWidget(this);
-
 
67
 
-
 
68
	if (dlg->exec() == QDialog::Accepted)
-
 
69
	{
-
 
70
	}
-
 
71
}
-
 
72
 
63
void wmsbase::bpCancelSlot()
73
void wmsbase::bpCancelSlot()
64
{
74
{
65
	done(QDialog::Rejected);
75
	done(QDialog::Rejected);
66
}
76
}
67
 
77