Subversion Repositories public

Compare Revisions

Ignore whitespace Rev 284 → Rev 285

/sportwatcher/trunk/src/wmscapabilitieswidgetbase.ui
6,8 → 6,8
<rect>
<x>0</x>
<y>0</y>
<width>517</width>
<height>609</height>
<width>941</width>
<height>579</height>
</rect>
</property>
<property name="windowTitle">
17,58 → 17,234
<locale language="English" country="UnitedStates"/>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<item row="1" column="0" colspan="2">
<widget class="QGroupBox" name="groupBox_2">
<item row="0" column="0">
<widget class="QGroupBox" name="groupBox_4">
<property name="title">
<string>Get capabilities</string>
<string>Service</string>
</property>
<layout class="QGridLayout" name="gridLayout_3">
<layout class="QGridLayout" name="gridLayout_5">
<item row="0" column="0">
<widget class="QLabel" name="label_6">
<widget class="QLabel" name="label_12">
<property name="text">
<string>Get</string>
<string>Name</string>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="KLineEdit" name="edCapabilitiesGet">
<widget class="KLineEdit" name="edName">
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="1" colspan="2">
<widget class="KLineEdit" name="edTitle">
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_14">
<property name="text">
<string>Abstract</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
</widget>
</item>
<item row="2" column="1" colspan="2">
<widget class="KTextEdit" name="txAbstract">
<property name="textInteractionFlags">
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_7">
<widget class="QLabel" name="label_13">
<property name="text">
<string>Post</string>
<string>Title</string>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="KLineEdit" name="edCapabilitiesPost">
<item row="3" column="0">
<widget class="QLabel" name="label_15">
<property name="text">
<string>Online ressource</string>
</property>
</widget>
</item>
<item row="3" column="1" colspan="2">
<widget class="KLineEdit" name="edOnline">
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="2" column="2">
<widget class="KLineEdit" name="edFormat">
</layout>
</widget>
</item>
<item row="0" column="1" rowspan="2" colspan="2">
<widget class="Line" name="line">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
</widget>
</item>
<item row="0" column="3">
<widget class="QGroupBox" name="groupBox">
<property name="title">
<string>Contact person primary</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Contact person</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="KLineEdit" name="edPerson">
<property name="acceptDrops">
<bool>false</bool>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Contact organisation</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="KLineEdit" name="edOrg">
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_11">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Format</string>
<string>Voice telephone</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="KLineEdit" name="edPhone">
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_4">
<property name="text">
<string>Facsimile telephone</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="KLineEdit" name="edFax">
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="label_5">
<property name="text">
<string>Electronic mail address</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="KLineEdit" name="edMail">
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QLabel" name="label_16">
<property name="text">
<string>Address</string>
</property>
</widget>
</item>
<item row="6" column="0">
<widget class="QLabel" name="label_17">
<property name="text">
<string>City</string>
</property>
</widget>
</item>
<item row="7" column="0">
<widget class="QLabel" name="label_18">
<property name="text">
<string>State or province</string>
</property>
</widget>
</item>
<item row="8" column="0">
<widget class="QLabel" name="label_19">
<property name="text">
<string>Post code</string>
</property>
</widget>
</item>
<item row="9" column="0">
<widget class="QLabel" name="label_20">
<property name="text">
<string>Country</string>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="KLineEdit" name="edAddress">
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="6" column="1">
<widget class="KLineEdit" name="edCity">
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="7" column="1">
<widget class="KLineEdit" name="edState">
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="8" column="1">
<widget class="KLineEdit" name="edPostCode">
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="9" column="1">
<widget class="KLineEdit" name="edCountry">
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="2" column="0" colspan="2">
<item row="1" column="0">
<widget class="QGroupBox" name="groupBox_3">
<property name="title">
<string>Get map</string>
129,60 → 305,24
</property>
</spacer>
</item>
<item row="3" column="2">
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>177</width>
<height>78</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
<item row="3" column="0">
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>430</width>
<height>22</height>
</size>
</property>
</spacer>
</item>
<item row="3" column="1">
<widget class="KPushButton" name="pbCancel">
<property name="text">
<string>Cancel</string>
</property>
</widget>
</item>
<item row="0" column="0" colspan="2">
<widget class="QGroupBox" name="groupBox">
<item row="1" column="3">
<widget class="QGroupBox" name="groupBox_2">
<property name="title">
<string>Contact person primary</string>
<string>Get capabilities</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<layout class="QGridLayout" name="gridLayout_3">
<item row="0" column="0">
<widget class="QLabel" name="label">
<widget class="QLabel" name="label_6">
<property name="text">
<string>Contact person</string>
<string>Get</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="KLineEdit" name="edPerson">
<property name="acceptDrops">
<bool>false</bool>
</property>
<item row="0" column="2" colspan="2">
<widget class="KLineEdit" name="edCapabilitiesGet">
<property name="readOnly">
<bool>true</bool>
</property>
189,64 → 329,76
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_2">
<widget class="QLabel" name="label_7">
<property name="text">
<string>Contact organisation</string>
<string>Post</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="KLineEdit" name="edOrg">
<item row="1" column="2" colspan="2">
<widget class="KLineEdit" name="edCapabilitiesPost">
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Voice telephone</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="KLineEdit" name="edPhone">
<item row="2" column="2" colspan="2">
<widget class="KLineEdit" name="edFormat">
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_4">
<item row="2" column="0">
<widget class="QLabel" name="label_11">
<property name="text">
<string>Facsimile telephone</string>
<string>Format</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="KLineEdit" name="edFax">
<property name="readOnly">
<bool>true</bool>
<item row="3" column="2">
<widget class="KListWidget" name="liFeatures">
<property name="selectionMode">
<enum>QAbstractItemView::NoSelection</enum>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="label_5">
<item row="3" column="0">
<widget class="QLabel" name="label_21">
<property name="text">
<string>Electronic mail address</string>
<string>Features</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="KLineEdit" name="edMail">
<property name="readOnly">
<bool>true</bool>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
</widget>
</item>
<item row="3" column="3">
<widget class="KListWidget" name="liDate"/>
</item>
</layout>
</widget>
</item>
<item row="5" column="0" colspan="2">
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>430</width>
<height>22</height>
</size>
</property>
</spacer>
</item>
<item row="5" column="3">
<widget class="KPushButton" name="pbCancel">
<property name="text">
<string>Cancel</string>
</property>
</widget>
</item>
</layout>
</widget>
<customwidgets>
265,19 → 417,35
<extends>QLineEdit</extends>
<header>klineedit.h</header>
</customwidget>
<customwidget>
<class>KTextEdit</class>
<extends>QTextEdit</extends>
<header>ktextedit.h</header>
</customwidget>
</customwidgets>
<tabstops>
<tabstop>edName</tabstop>
<tabstop>edTitle</tabstop>
<tabstop>txAbstract</tabstop>
<tabstop>edOnline</tabstop>
<tabstop>edMapGet</tabstop>
<tabstop>edMapPost</tabstop>
<tabstop>liFormats</tabstop>
<tabstop>edPerson</tabstop>
<tabstop>edOrg</tabstop>
<tabstop>edPhone</tabstop>
<tabstop>edFax</tabstop>
<tabstop>edMail</tabstop>
<tabstop>edAddress</tabstop>
<tabstop>edCity</tabstop>
<tabstop>edState</tabstop>
<tabstop>edPostCode</tabstop>
<tabstop>edCountry</tabstop>
<tabstop>edCapabilitiesGet</tabstop>
<tabstop>edCapabilitiesPost</tabstop>
<tabstop>edFormat</tabstop>
<tabstop>edMapGet</tabstop>
<tabstop>edMapPost</tabstop>
<tabstop>liFormats</tabstop>
<tabstop>liFeatures</tabstop>
<tabstop>liDate</tabstop>
<tabstop>pbCancel</tabstop>
</tabstops>
<resources/>
/sportwatcher/trunk/src/wmsselectorwidget.cpp
206,12 → 206,26
 
void wmsSelectorWidget::slotDetails()
{
int i;
 
wmsCapabilitiesWidget *dlg = new wmsCapabilitiesWidget(this);
dlg->setName(Service.Name);
dlg->setTitle(Service.Title);
dlg->setAbstract(Service.Abstract);
dlg->setOnline(Service.OnlineResource);
 
dlg->setPerson(Service.ContactPerson);
dlg->setOrg(Service.ContactOrganisation);
dlg->setPhone(Service.ContactVoiceTelephone);
dlg->setFax(Service.ContactFacsimileTelephone);
dlg->setMail(Service.ContactElectronicMailAddress);
 
dlg->setAddress(Service.Address);
dlg->setCity(Service.City);
dlg->setState(Service.StateOrProvince);
dlg->setPostCode(Service.PostCode);
dlg->setCountry(Service.Country);
 
dlg->setCapabilitiesGet(Request.GetCapabilities.Get);
dlg->setCapabilitiesPost(Request.GetCapabilities.Post);
 
221,9 → 235,31
dlg->setMapGet(Request.GetMap.Get);
dlg->setMapPost(Request.GetMap.Post);
 
for (int i = 0; i < Request.GetMap.Format.size(); ++i)
for (i = 0; i < Request.GetMap.Format.size(); ++i)
dlg->addFormats(Request.GetMap.Format.at(i));
 
for (i = 0; i < Request.GetFeatureInfo.Format.size(); ++i)
dlg->addFeatures(Request.GetFeatureInfo.Format.at(i));
 
if (firstLayer)
{
LAYER *akt = firstLayer;
QStringList sl;
 
while (akt)
{
for (i = 0; i < akt->SRS.size(); ++i)
sl << akt->SRS.at(i);
 
akt = akt->next;
}
 
sl.removeDuplicates();
 
for (i = 0; i < sl.size(); ++i)
dlg->addDate(sl.at(i));
}
 
dlg->exec();
delete dlg;
}
646,7 → 682,7
{
if (element == el_Service)
{
if ((index = att.index(QString("href"))) != -1)
if ((index = att.index(QString("href"))) != -1 || (index = att.index(QString("xlink:href"))) != -1)
Service.OnlineResource = att.value(index);
 
if ((index = att.index(QString("type"))) != -1)
654,32 → 690,32
}
else if (element == el_GetCapabilities && el2 == el_Get)
{
if ((index = att.index(QString("href"))) != -1)
if ((index = att.index(QString("href"))) != -1 || (index = att.index(QString("xlink:href"))) != -1)
Request.GetCapabilities.Get = att.value(index);
}
else if (element == el_GetCapabilities && el2 == el_Post)
{
if ((index = att.index(QString("href"))) != -1)
if ((index = att.index(QString("href"))) != -1 || (index = att.index(QString("xlink:href"))) != -1)
Request.GetCapabilities.Post = att.value(index);
}
else if (element == el_GetMap && el2 == el_Get)
{
if ((index = att.index(QString("href"))) != -1)
if ((index = att.index(QString("href"))) != -1 || (index = att.index(QString("xlink:href"))) != -1)
Request.GetMap.Get = att.value(index);
}
else if (element == el_GetMap && el2 == el_Post)
{
if ((index = att.index(QString("href"))) != -1)
if ((index = att.index(QString("href"))) != -1 || (index = att.index(QString("xlink:href"))) != -1)
Request.GetMap.Post = att.value(index);
}
else if (element == el_GetFeatureInfo && el2 == el_Get)
{
if ((index = att.index(QString("href"))) != -1)
if ((index = att.index(QString("href"))) != -1 || (index = att.index(QString("xlink:href"))) != -1)
Request.GetFeatureInfo.Get = att.value(index);
}
else if (element == el_GetFeatureInfo && el2 == el_Post)
{
if ((index = att.index(QString("href"))) != -1)
if ((index = att.index(QString("href"))) != -1 || (index = att.index(QString("xlink:href"))) != -1)
Request.GetFeatureInfo.Post = att.value(index);
}
}
689,7 → 725,7
element = el_ContactPersonPrimary;
else if (qName.toLower() == QString("contactperson"))
attribute = at_ContactPerson;
else if (qName.toLower() == QString("contactorganisation"))
else if (qName.toLower() == QString("contactorganization"))
attribute = at_ContactOrganisation;
else if (qName.toLower() == QString("contactposition"))
attribute = at_ContactPosition;
1432,6 → 1468,7
QString xml, s, srs, crs, styles, bSize, ext;
QDir dir = QDir::home();
QString path = dir.absolutePath();
QStringList sl;
//int item;
double _llat, _llon, _rlat, _rlon;
 
1458,8 → 1495,25
_rlon = rlon;
_rlat = rlat;
 
if (firstLayer && firstLayer->SRS.size())
srs = firstLayer->SRS.at(0);
if (firstLayer)
{
LAYER *akt = firstLayer;
 
while (akt)
{
for (int i = 0; i < akt->SRS.size(); ++i)
sl << akt->SRS.at(i);
 
akt = akt->next;
}
 
sl.removeDuplicates();
 
if (sl.contains("EPSG:4326") || sl.contains("WGS:84"))
srs = QString("EPSG:4326");
else
srs = sl.at(0);
}
else
srs = QString("EPSG:4326");
 
1466,7 → 1520,26
xml += " <SRS>" + srs + "</SRS>\n";
 
if (firstLayer && firstLayer->CRS.size())
crs = firstLayer->CRS.at(0);
{
LAYER *akt = firstLayer;
 
sl.clear();
 
while (akt)
{
for (int i = 0; i < akt->CRS.size(); ++i)
sl << akt->CRS.at(i);
 
akt = akt->next;
}
 
sl.removeDuplicates();
 
if (sl.contains("EPSG:4326") || sl.contains("CRS:84"))
crs = QString("EPSG:4326");
else
crs = sl.at(0);
}
else
crs = QString("EPSG:4326");
 
/sportwatcher/trunk/src/wmscapabilitieswidget.h
27,17 → 27,32
wmsCapabilitiesWidget (QWidget* parent = 0, Qt::WFlags fl = 0);
~wmsCapabilitiesWidget();
/*$PUBLIC_FUNCTIONS$*/
void setName(QString s) { edName->setText(s); };
void setTitle(QString s) { edTitle->setText(s); };
void setAbstract(QString s) { txAbstract->setText(s); };
void setOnline(QString s) { edOnline->setText(s); };
 
void setPerson(QString s) { edPerson->setText(s); };
void setOrg(QString s) { edOrg->setText(s); };
void setPhone(QString s) { edPhone->setText(s); };
void setFax(QString s) { edFax->setText(s); };
void setMail(QString s) { edMail->setText(s); };
 
void setAddress(QString s) { edAddress->setText(s); };
void setCity(QString s) { edCity->setText(s); };
void setState(QString s) { edState->setText(s); };
void setPostCode(QString s) { edPostCode->setText(s); };
void setCountry(QString s) { edCountry->setText(s); };
 
void setCapabilitiesGet(QString s) { edCapabilitiesGet->setText(s); };
void setCapabilitiesPost(QString s) { edCapabilitiesPost->setText(s); };
void setFormat(QString s) { edFormat->setText(s); };
 
void setMapGet(QString s) { edMapGet->setText(s); };
void setMapPost(QString s) { edMapPost->setText(s); };
void addFormats(QString s) { liFormats->addItem(s); };
void addFeatures(QString s) { liFeatures->addItem(s); };
void addDate(QString s) { liDate->addItem(s); };
 
public slots:
/*$PUBLIC_SLOTS$*/