Skip to content
Permalink
Browse files

[geometry-checker-gui] add scroll area and save geometry dialog to se…

…ttings
  • Loading branch information
slarosa committed Sep 28, 2015
1 parent 2fa916d commit 7e6161687c390387d582ee8ca63232ee26209073
@@ -20,6 +20,7 @@

#include <QCloseEvent>
#include <QVBoxLayout>
#include <QSettings>

QgsGeometryCheckerDialog::QgsGeometryCheckerDialog( QgisInterface *iface, QWidget *parent )
: QDialog( parent )
@@ -28,6 +29,9 @@ QgsGeometryCheckerDialog::QgsGeometryCheckerDialog( QgisInterface *iface, QWidge

setWindowTitle( tr( "Check Geometries" ) );

QSettings s;
restoreGeometry( s.value( "/Plugin-GeometryChecker/Window/geometry" ).toByteArray() );

mTabWidget = new QTabWidget();
mButtonBox = new QDialogButtonBox( QDialogButtonBox::Close, Qt::Horizontal );

@@ -44,6 +48,12 @@ QgsGeometryCheckerDialog::QgsGeometryCheckerDialog( QgisInterface *iface, QWidge
connect( mTabWidget->widget( 0 ), SIGNAL( checkerFinished( bool ) ), this, SLOT( onCheckerFinished( bool ) ) );
}

QgsGeometryCheckerDialog::~QgsGeometryCheckerDialog()
{
QSettings s;
s.setValue( "/Plugin-GeometryChecker/Window/geometry", saveGeometry() );
}

void QgsGeometryCheckerDialog::onCheckerStarted( QgsGeometryChecker *checker, QgsFeaturePool *featurePool )
{
delete mTabWidget->widget( 1 );
@@ -31,6 +31,7 @@ class QgsGeometryCheckerDialog : public QDialog
Q_OBJECT
public:
QgsGeometryCheckerDialog( QgisInterface* iface, QWidget* parent = 0 );
~QgsGeometryCheckerDialog();

private:
QgisInterface* mIface;
@@ -537,6 +537,8 @@ void QgsGeometryCheckerResultTab::setDefaultResolutionMethods()
QVBoxLayout* layout = new QVBoxLayout( &dialog );

QScrollArea* scrollArea = new QScrollArea( &dialog );
scrollArea->setFrameShape( QFrame::NoFrame );
layout->setContentsMargins( 0, 0, 0, 0 );
layout->addWidget( scrollArea );

QWidget* scrollAreaContents = new QWidget( scrollArea );

0 comments on commit 7e61616

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