Skip to content
Permalink
Browse files

Update UI for XYZ Connection.

  • Loading branch information
ismailsunni committed Mar 12, 2017
1 parent 7293c05 commit 43b5ea12302a2fe11861b603ab48aba854594c39
@@ -44,3 +44,27 @@ QgsXyzConnection QgsXyzConnectionDialog::connection() const
conn.zMax = mSpinZMax->value();
return conn;
}

void QgsXyzConnectionDialog::on_mCheckBoxZMin_stateChanged( int state )
{
if ( state == Qt::Checked )
{
mSpinZMin->setEnabled( true );
}
else
{
mSpinZMin->setEnabled( false );
}
}

void QgsXyzConnectionDialog::on_mCheckBoxZMax_stateChanged( int state )
{
if ( state == Qt::Checked )
{
mSpinZMax->setEnabled( true );
}
else
{
mSpinZMax->setEnabled( false );
}
}
@@ -33,6 +33,10 @@ class QgsXyzConnectionDialog : public QDialog, public Ui::QgsXyzConnectionDialog

QgsXyzConnection connection() const;

public slots:
void on_mCheckBoxZMin_stateChanged( int state );
void on_mCheckBoxZMax_stateChanged( int state );

};

#endif // QGSXYZCONNECTIONDIALOG_H
@@ -15,57 +15,89 @@
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<layout class="QFormLayout" name="formLayout">
<item row="0" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Name</string>
<layout class="QGridLayout" name="gridLayout">
<item row="1" column="1">
<widget class="QLineEdit" name="mEditUrl">
<property name="placeholderText">
<string>http://example.com/{z}/{x}/{y}.png</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="mEditName"/>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>URL</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLineEdit" name="mEditUrl">
<property name="placeholderText">
<string>http://example.com/{z}/{x}/{y}.png</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QCheckBox" name="mCheckBoxZMin">
<property name="text">
<string>Min. Zoom Level</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Name</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QSpinBox" name="mSpinZMin"/>
<widget class="QSpinBox" name="mSpinZMin">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QCheckBox" name="mCheckBoxZMax">
<property name="text">
<string>Max. Zoom Level</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QSpinBox" name="mSpinZMax">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="value">
<number>18</number>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="mEditName"/>
</item>
</layout>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation">

0 comments on commit 43b5ea1

Please sign in to comment.
You can’t perform that action at this time.