199 changes: 95 additions & 104 deletions src/plugins/topology/rulesDialog.ui
Original file line number Diff line number Diff line change
Expand Up @@ -6,103 +6,60 @@
<rect>
<x>0</x>
<y>0</y>
<width>739</width>
<height>545</height>
<width>620</width>
<height>416</height>
</rect>
</property>
<property name="windowTitle">
<string>Topology Rule Settings</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<layout class="QVBoxLayout" name="verticalLayout">
<widget class="QLabel" name="label">
<property name="text">
<string>Current Rules</string>
</property>
</widget>
</item>
<item row="1" column="0" colspan="2">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLabel" name="label">
<property name="text">
<string>Current Rules</string>
<widget class="QComboBox" name="mLayer1Box">
<property name="sizeAdjustPolicy">
<enum>QComboBox::AdjustToContents</enum>
</property>
<item>
<property name="text">
<string>No layer</string>
</property>
</item>
</widget>
</item>
<item>
<widget class="QTableWidget" name="mRulesTable">
<column>
<property name="text">
<string>Rule</string>
</property>
</column>
<column>
<property name="text">
<string>Layer #1</string>
</property>
</column>
<column>
<property name="text">
<string>Layer #2</string>
</property>
</column>
<column>
<property name="text">
<string>Tolerance</string>
</property>
</column>
<column>
<property name="text">
<string>Layer1ID</string>
</property>
</column>
<column>
<property name="text">
<string>Layer2ID</string>
</property>
</column>
<widget class="QComboBox" name="mRuleBox">
<property name="sizeAdjustPolicy">
<enum>QComboBox::AdjustToContents</enum>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QComboBox" name="mLayer1Box">
<property name="sizeAdjustPolicy">
<enum>QComboBox::AdjustToContents</enum>
</property>
<item>
<property name="text">
<string>No layer</string>
</property>
</item>
</widget>
</item>
<item>
<widget class="QComboBox" name="mRuleBox">
<property name="sizeAdjustPolicy">
<enum>QComboBox::AdjustToContents</enum>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="mLayer2Box">
<property name="sizeAdjustPolicy">
<enum>QComboBox::AdjustToContents</enum>
</property>
<item>
<property name="text">
<string>No layer</string>
</property>
</item>
</widget>
</item>
<widget class="QComboBox" name="mLayer2Box">
<property name="sizeAdjustPolicy">
<enum>QComboBox::AdjustToContents</enum>
</property>
<item>
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
<property name="text">
<string>No layer</string>
</property>
</item>
</widget>
</item>
</layout>
</item>
<item row="2" column="0" colspan="2">
<layout class="QHBoxLayout" name="horizontalLayout_5">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<widget class="QLabel" name="mToleranceLabel">
<property name="text">
Expand All @@ -116,7 +73,20 @@
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_4">
<item>
<widget class="QPushButton" name="mAddTestButton">
<property name="text">
Expand All @@ -131,33 +101,54 @@
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>198</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</item>
<item row="3" column="0" colspan="2">
<widget class="QTableWidget" name="mRulesTable">
<column>
<property name="text">
<string>Rule</string>
</property>
</column>
<column>
<property name="text">
<string>Layer #1</string>
</property>
</column>
<column>
<property name="text">
<string>Layer #2</string>
</property>
</column>
<column>
<property name="text">
<string>Tolerance</string>
</property>
</column>
<column>
<property name="text">
<string>Layer1ID</string>
</property>
</column>
<column>
<property name="text">
<string>Layer2ID</string>
</property>
</column>
</widget>
</item>
<item row="4" column="0" colspan="2">
<widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Help|QDialogButtonBox::Ok</set>
</property>
</widget>
</item>
</layout>
</widget>
<resources/>
Expand Down
10 changes: 5 additions & 5 deletions src/plugins/topology/topolTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,11 @@ topolTest::topolTest( QgisInterface* qgsIface )
mTopologyRuleMap[QObject::tr( "must not have gaps" )].useSpatialIndex = false;
mTopologyRuleMap[QObject::tr( "must not have gaps" )].layer1SupportedTypes << QGis::Polygon;

mTopologyRuleMap[QObject::tr( "Must not have multi-part geometries" )].f = &topolTest::checkMultipart;
mTopologyRuleMap[QObject::tr( "Must not have multi-part geometries" )].useSecondLayer = false;
mTopologyRuleMap[QObject::tr( "Must not have multi-part geometries" )].useTolerance = false;
mTopologyRuleMap[QObject::tr( "Must not have multi-part geometries" )].useSpatialIndex = false;
mTopologyRuleMap[QObject::tr( "Must not have multi-part geometries" )].layer1SupportedTypes << QGis::Point << QGis::Polygon << QGis::Line;
mTopologyRuleMap[QObject::tr( "must not have multi-part geometries" )].f = &topolTest::checkMultipart;
mTopologyRuleMap[QObject::tr( "must not have multi-part geometries" )].useSecondLayer = false;
mTopologyRuleMap[QObject::tr( "must not have multi-part geometries" )].useTolerance = false;
mTopologyRuleMap[QObject::tr( "must not have multi-part geometries" )].useSpatialIndex = false;
mTopologyRuleMap[QObject::tr( "must not have multi-part geometries" )].layer1SupportedTypes << QGis::Point << QGis::Polygon << QGis::Line;

// two layer tests
mTopologyRuleMap[QObject::tr( "must not overlap with" )].f = &topolTest::checkOverlapWithLayer;
Expand Down