QgsGrassEdit::~QgsGrassEdit() { QgsDebugMsg( "entered." ); // we can only call some methods if init was complete, // note that we cannot use mValid because it is disabled before // destructor is called if ( mInited ) { // delete tool if exists delete mMapTool; eraseDynamic(); mRubberBandLine->hide(); mRubberBandIcon->hide(); mRubberBandLine->reset(); delete mRubberBandLine; delete mRubberBandIcon; delete mCanvasEdit; mCanvas->refresh(); saveWindowLocation(); } mRunning = false; }
QgsBookmarks::~QgsBookmarks() { delete mQgisModel; delete mProjectModel; QSqlDatabase::removeDatabase( QStringLiteral( "bookmarks" ) ); saveWindowLocation(); }
void QgsGrassRegion::accept() { // TODO: better repaint region QSettings settings; bool on = settings.value( "/GRASS/region/on", true ).toBool(); if ( on ) { mPlugin->switchRegion( false ); // delete } QgsGrass::setLocation( QgsGrass::getDefaultGisdbase(), QgsGrass::getDefaultLocation() ); G__setenv(( char * ) "MAPSET", QgsGrass::getDefaultMapset().toLatin1().data() ); if ( G_put_window( &mWindow ) == -1 ) { QMessageBox::warning( 0, tr( "Warning" ), tr( "Cannot write region" ) ); return; } if ( on ) { mPlugin->switchRegion( on ); // draw new } saveWindowLocation(); mCanvas->setMapTool( NULL ); QDialog::accept(); }
void QgsGrassTools::closeEvent( QCloseEvent *e ) { saveWindowLocation(); e->accept(); }
void QgsGrassTools::close( void ) { saveWindowLocation(); hide(); }
QgsGrassTools::~QgsGrassTools() { QgsDebugMsg( "entered." ); saveWindowLocation(); }
void QgsMeasureDialog::closeEvent( QCloseEvent *e ) { saveWindowLocation(); e->accept(); }
/* * Window geometry is saved during move and resize events rather then when * the window is closed because HelpViewer is a subprocess which could be * closed by the parent process invoking QProcess::terminate(). When this * happens, the HelpViewer process receives the signal WM_CLOSE on Windows * and SIGTERM on Mac and Unix. There is no way to catch these using Qt; * OS specific code must be written. To avoid OS specific code, the window * geometry is saved as it changes. */ void QgsHelpViewer::moveEvent( QMoveEvent *event ) { Q_UNUSED( event ); saveWindowLocation(); }
void QgsHelpViewer::resizeEvent( QResizeEvent *event ) { Q_UNUSED( event ); saveWindowLocation(); }
void QgsMeasureDialog::reject() { saveWindowLocation(); restart(); QDialog::close(); }
QgsBookmarks::~QgsBookmarks() { saveWindowLocation(); }
void QgsGrassRegion::reject() { saveWindowLocation(); mCanvas->setMapTool( NULL ); QDialog::reject(); }
void QgsHelpViewer::resizeEvent( QResizeEvent *event ) { saveWindowLocation(); }
/* * Window geometry is saved during move and resize events rather then when * the window is closed because HelpViewer is a subprocess which could be * closed by the parent process invoking QProcess::terminate(). When this * happens, the HelpViewer process receives the signal WM_CLOSE on Windows * and SIGTERM on Mac and Unix. There is no way to catch these using Qt; * OS specific code must be written. To avoid OS specific code, the window * geometry is saved as it changes. */ void QgsHelpViewer::moveEvent( QMoveEvent *event ) { saveWindowLocation(); }
QgsBookmarks::~QgsBookmarks() { saveWindowLocation(); sInstance = 0; }