Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #4250 from ismailsunni/XYZ_connection_dialog
Update UI for XYZ Connection Dialog
  • Loading branch information
nyalldawson committed Mar 12, 2017
2 parents d10d677 + 18851e4 commit 0798faa
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 16 deletions.
4 changes: 4 additions & 0 deletions src/providers/wms/qgsxyzconnectiondialog.cpp
Expand Up @@ -21,6 +21,10 @@ QgsXyzConnectionDialog::QgsXyzConnectionDialog( QWidget *parent )
: QDialog( parent )
{
setupUi( this );

// Behavior for min and max zoom check box
connect( mCheckBoxZMin, &QCheckBox::toggled, mSpinZMin, &QSpinBox::setEnabled );
connect( mCheckBoxZMax, &QCheckBox::toggled, mSpinZMax, &QSpinBox::setEnabled );
}

void QgsXyzConnectionDialog::setConnection( const QgsXyzConnection &conn )
Expand Down
64 changes: 48 additions & 16 deletions src/ui/qgsxyzconnectiondialog.ui
Expand Up @@ -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">
Expand Down

0 comments on commit 0798faa

Please sign in to comment.