Skip to content
Permalink
Browse files

Merge pull request #593 from mach0/topocheck

modified topology checker mostly GUI overhaul
  • Loading branch information
vinayan committed May 17, 2013
2 parents 7962361 + cfaa71c commit 957c4f14331eb59ca50584f0bb28055d51acdce5
@@ -87,7 +87,7 @@ checkDock::checkDock( QgisInterface* qIface, QWidget* parent )
connect( mValidateAllButton, SIGNAL( clicked() ), this, SLOT( validateAll() ) );
//connect( mValidateSelectedButton, SIGNAL( clicked() ), this, SLOT( validateSelected() ) );
connect( mValidateExtentButton, SIGNAL( clicked() ), this, SLOT( validateExtent() ) );
connect( mToggleRubberbands, SIGNAL( clicked() ), this, SLOT( toggleErrorMarkers() ) );
connect( mToggleRubberband, SIGNAL( clicked() ), this, SLOT( toggleErrorMarker() ) );

connect( mFixButton, SIGNAL( clicked() ), this, SLOT( fix() ) );
connect( mErrorTableView, SIGNAL( clicked( const QModelIndex & ) ), this, SLOT( errorListClicked( const QModelIndex & ) ) );
@@ -380,6 +380,7 @@ void checkDock::runTests( ValidateType type )
mErrorList << errors;
}
mMarkersVisible = true;
mToggleRubberband->setChecked( true );
mErrorListModel->resetModel();
}

@@ -406,6 +407,7 @@ void checkDock::validate( ValidateType type )
clearVertexMarkers();

mErrorTableView->resizeColumnsToContents();
mToggleRubberband->setChecked( true );
}

void checkDock::validateExtent()
@@ -423,21 +425,19 @@ void checkDock::validateSelected()
validate( ValidateSelected );
}

void checkDock::toggleErrorMarkers()
void checkDock::toggleErrorMarker()
{
QList<QgsRubberBand*>::const_iterator it;
for ( it = mRbErrorMarkers.begin(); it != mRbErrorMarkers.end(); ++it )
{
QgsRubberBand* rb = *it;
if ( mMarkersVisible == true )
{
rb->hide();
}
else
QList<QgsRubberBand*>::const_iterator it;
for ( it = mRbErrorMarkers.begin(); it != mRbErrorMarkers.end(); ++it )
{
rb->show();
QgsRubberBand* rb = *it;
if ( mToggleRubberband->isChecked() )
{
rb->show();
}
else
{
rb->hide();
}
}
}
mMarkersVisible = !mMarkersVisible;

}
@@ -76,7 +76,7 @@ class checkDock : public QDockWidget, public Ui::checkDock
/**
* toggles the visibility of rubber band error markers
*/
void toggleErrorMarkers();
void toggleErrorMarker();
/**
* Handles error selection
* @param index clicked index in the table
@@ -6,44 +6,65 @@
<rect>
<x>0</x>
<y>0</y>
<width>436</width>
<height>439</height>
<width>307</width>
<height>280</height>
</rect>
</property>
<property name="windowTitle">
<string>Topology Checker</string>
</property>
<widget class="QWidget" name="dockWidgetContents">
<layout class="QGridLayout" name="gridLayout">
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0">
<layout class="QVBoxLayout" name="verticalLayout">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QPushButton" name="mValidateAllButton">
<property name="text">
<string>Validate All</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="mValidateExtentButton">
<property name="text">
<string>Validate Extent</string>
</property>
</widget>
</item>
</layout>
<widget class="QTableView" name="mErrorTableView"/>
</item>
</layout>
</item>
<item row="1" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_4">
<item>
<widget class="QPushButton" name="mToggleRubberbands">
<widget class="QPushButton" name="mConfigureButton">
<property name="text">
<string>Toggle Error Markers</string>
<string>Configure</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="2" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<widget class="QTableView" name="mErrorTableView"/>
<widget class="QPushButton" name="mValidateAllButton">
<property name="text">
<string>Validate All</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="mValidateExtentButton">
<property name="text">
<string>Validate Extent</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="3" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_5">
<item>
<widget class="QCheckBox" name="mToggleRubberband">
<property name="toolTip">
<string>Show topology errors</string>
</property>
<property name="text">
<string>Show errors</string>
</property>
<property name="checked">
<bool>false</bool>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="mComment">
@@ -52,32 +73,25 @@
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QPushButton" name="mConfigureButton">
<property name="text">
<string>Configure</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="mFixBox">
<item>
<property name="text">
<string>Select automatic fix</string>
</property>
</item>
</widget>
</item>
</layout>
</item>
<item row="4" column="0">
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QComboBox" name="mFixBox">
<item>
<widget class="QPushButton" name="mFixButton">
<property name="text">
<string>Fix!</string>
</property>
</widget>
<property name="text">
<string>Select automatic fix</string>
</property>
</item>
</layout>
</widget>
</item>
<item row="0" column="1">
<widget class="QPushButton" name="mFixButton">
<property name="text">
<string>Fix!</string>
</property>
</widget>
</item>
</layout>
</item>

0 comments on commit 957c4f1

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