mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
enableAutoGeometryRestore dialog updates
This commit is contained in:
parent
ea5f3c6913
commit
8ca5b2a2d1
@ -22,6 +22,7 @@
|
||||
#include "qgsmessagelog.h"
|
||||
#include "qgslogger.h"
|
||||
#include "qgssettings.h"
|
||||
#include "qgsgui.h"
|
||||
|
||||
#include <QFileDialog>
|
||||
#include <QFileInfo>
|
||||
@ -42,8 +43,9 @@ QgsBookmarks::QgsBookmarks( QWidget *parent )
|
||||
|
||||
{
|
||||
setupUi( this );
|
||||
QgsGui::enableAutoGeometryRestore( this );
|
||||
|
||||
connect( lstBookmarks, &QTreeView::doubleClicked, this, &QgsBookmarks::lstBookmarks_doubleClicked );
|
||||
restorePosition();
|
||||
|
||||
bookmarksDockContents->layout()->setMargin( 0 );
|
||||
bookmarksDockContents->layout()->setContentsMargins( 0, 0, 0, 0 );
|
||||
@ -137,16 +139,9 @@ QgsBookmarks::~QgsBookmarks()
|
||||
saveWindowLocation();
|
||||
}
|
||||
|
||||
void QgsBookmarks::restorePosition()
|
||||
{
|
||||
QgsSettings settings;
|
||||
restoreGeometry( settings.value( QStringLiteral( "Windows/Bookmarks/geometry" ) ).toByteArray() );
|
||||
}
|
||||
|
||||
void QgsBookmarks::saveWindowLocation()
|
||||
{
|
||||
QgsSettings settings;
|
||||
settings.setValue( QStringLiteral( "Windows/Bookmarks/geometry" ), saveGeometry() );
|
||||
settings.setValue( QStringLiteral( "Windows/Bookmarks/headerstate" ), lstBookmarks->header()->saveState() );
|
||||
}
|
||||
|
||||
|
@ -164,7 +164,6 @@ class APP_EXPORT QgsBookmarks : public QgsDockWidget, private Ui::QgsBookmarksBa
|
||||
QgsBookmarksProxyModel *mProxyModel = nullptr;
|
||||
|
||||
void saveWindowLocation();
|
||||
void restorePosition();
|
||||
|
||||
};
|
||||
|
||||
|
@ -19,6 +19,7 @@
|
||||
#include "qgsapplication.h"
|
||||
#include "qgslogger.h"
|
||||
#include "qgsstatusbar.h"
|
||||
#include "qgsgui.h"
|
||||
|
||||
#include <QAction>
|
||||
#include <QDir>
|
||||
@ -47,6 +48,8 @@ QgsCustomizationDialog::QgsCustomizationDialog( QWidget * parent, QSettings * se
|
||||
{
|
||||
mSettings = settings;
|
||||
setupUi( this );
|
||||
QgsGui::enableAutoGeometryRestore( this );
|
||||
|
||||
connect( actionSave, &QAction::triggered, this, &QgsCustomizationDialog::actionSave_triggered );
|
||||
connect( actionLoad, &QAction::triggered, this, &QgsCustomizationDialog::actionLoad_triggered );
|
||||
connect( actionExpandAll, &QAction::triggered, this, &QgsCustomizationDialog::actionExpandAll_triggered );
|
||||
@ -54,9 +57,6 @@ QgsCustomizationDialog::QgsCustomizationDialog( QWidget * parent, QSettings * se
|
||||
connect( actionSelectAll, &QAction::triggered, this, &QgsCustomizationDialog::actionSelectAll_triggered );
|
||||
connect( mCustomizationEnabledCheckBox, &QCheckBox::toggled, this, &QgsCustomizationDialog::mCustomizationEnabledCheckBox_toggled );
|
||||
|
||||
QSettings appSettings;
|
||||
restoreGeometry( appSettings.value( QStringLiteral( "Windows/Customization/geometry" ) ).toByteArray() );
|
||||
|
||||
init();
|
||||
QStringList myHeaders;
|
||||
myHeaders << tr( "Object name" ) << tr( "Label" );
|
||||
@ -74,8 +74,6 @@ QgsCustomizationDialog::QgsCustomizationDialog( QWidget * parent, QSettings * se
|
||||
|
||||
QgsCustomizationDialog::~QgsCustomizationDialog()
|
||||
{
|
||||
QSettings settings;
|
||||
settings.setValue( QStringLiteral( "Windows/Customization/geometry" ), saveGeometry() );
|
||||
}
|
||||
|
||||
QTreeWidgetItem *QgsCustomizationDialog::item( const QString &path, QTreeWidgetItem *widgetItem )
|
||||
|
@ -26,6 +26,7 @@
|
||||
#include "qgsprojectionselectiondialog.h"
|
||||
#include "qgssettings.h"
|
||||
#include "qgssqliteutils.h"
|
||||
#include "qgsgui.h"
|
||||
|
||||
//qt includes
|
||||
#include <QFileInfo>
|
||||
@ -47,6 +48,8 @@ QgsCustomProjectionDialog::QgsCustomProjectionDialog( QWidget *parent, Qt::Windo
|
||||
: QDialog( parent, fl )
|
||||
{
|
||||
setupUi( this );
|
||||
QgsGui::enableAutoGeometryRestore( this );
|
||||
|
||||
connect( pbnCalculate, &QPushButton::clicked, this, &QgsCustomProjectionDialog::pbnCalculate_clicked );
|
||||
connect( pbnAdd, &QPushButton::clicked, this, &QgsCustomProjectionDialog::pbnAdd_clicked );
|
||||
connect( pbnRemove, &QPushButton::clicked, this, &QgsCustomProjectionDialog::pbnRemove_clicked );
|
||||
@ -55,8 +58,6 @@ QgsCustomProjectionDialog::QgsCustomProjectionDialog( QWidget *parent, Qt::Windo
|
||||
connect( buttonBox, &QDialogButtonBox::accepted, this, &QgsCustomProjectionDialog::buttonBox_accepted );
|
||||
connect( buttonBox, &QDialogButtonBox::helpRequested, this, &QgsCustomProjectionDialog::showHelp );
|
||||
|
||||
QgsSettings settings;
|
||||
restoreGeometry( settings.value( QStringLiteral( "Windows/CustomProjection/geometry" ) ).toByteArray() );
|
||||
|
||||
// user database is created at QGIS startup in QgisApp::createDB
|
||||
// we just check whether there is our database [MD]
|
||||
@ -83,8 +84,6 @@ QgsCustomProjectionDialog::QgsCustomProjectionDialog( QWidget *parent, Qt::Windo
|
||||
|
||||
QgsCustomProjectionDialog::~QgsCustomProjectionDialog()
|
||||
{
|
||||
QgsSettings settings;
|
||||
settings.setValue( QStringLiteral( "Windows/CustomProjection/geometry" ), saveGeometry() );
|
||||
}
|
||||
|
||||
|
||||
|
@ -21,17 +21,16 @@
|
||||
#include "qgsprojectionselectiondialog.h"
|
||||
#include "qgshelp.h"
|
||||
#include <QApplication>
|
||||
#include "qgsgui.h"
|
||||
|
||||
QgsProjectionSelectionDialog::QgsProjectionSelectionDialog( QWidget *parent,
|
||||
Qt::WindowFlags fl )
|
||||
: QDialog( parent, fl )
|
||||
{
|
||||
setupUi( this );
|
||||
QgsGui::enableAutoGeometryRestore( this );
|
||||
connect( mButtonBox, &QDialogButtonBox::helpRequested, this, &QgsProjectionSelectionDialog::showHelp );
|
||||
|
||||
QgsSettings settings;
|
||||
restoreGeometry( settings.value( QStringLiteral( "Windows/ProjectionSelector/geometry" ) ).toByteArray() );
|
||||
|
||||
//we will show this only when a message is set
|
||||
textEdit->hide();
|
||||
|
||||
@ -73,8 +72,6 @@ bool QgsProjectionSelectionDialog::showNoProjection() const
|
||||
|
||||
QgsProjectionSelectionDialog::~QgsProjectionSelectionDialog()
|
||||
{
|
||||
QSettings settings;
|
||||
settings.setValue( QStringLiteral( "Windows/ProjectionSelector/geometry" ), saveGeometry() );
|
||||
}
|
||||
|
||||
QgsCoordinateReferenceSystem QgsProjectionSelectionDialog::crs() const
|
||||
|
Loading…
x
Reference in New Issue
Block a user