コード例 #1
0
ファイル: qgsgrassedit.cpp プロジェクト: CSRedRat/QGIS
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;
}
コード例 #2
0
ファイル: qgsbookmarks.cpp プロジェクト: 3liz/Quantum-GIS
QgsBookmarks::~QgsBookmarks()
{
  delete mQgisModel;
  delete mProjectModel;
  QSqlDatabase::removeDatabase( QStringLiteral( "bookmarks" ) );
  saveWindowLocation();
}
コード例 #3
0
ファイル: qgsgrassregion.cpp プロジェクト: aaronr/Quantum-GIS
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();
}
コード例 #4
0
ファイル: qgsgrasstools.cpp プロジェクト: Br1ndavoine/QGIS
void QgsGrassTools::closeEvent( QCloseEvent *e )
{
  saveWindowLocation();
  e->accept();
}
コード例 #5
0
ファイル: qgsgrasstools.cpp プロジェクト: Br1ndavoine/QGIS
void QgsGrassTools::close( void )
{
  saveWindowLocation();
  hide();
}
コード例 #6
0
ファイル: qgsgrasstools.cpp プロジェクト: Br1ndavoine/QGIS
QgsGrassTools::~QgsGrassTools()
{
  QgsDebugMsg( "entered." );
  saveWindowLocation();
}
コード例 #7
0
ファイル: qgsmeasuredialog.cpp プロジェクト: Waferix/QGIS
void QgsMeasureDialog::closeEvent( QCloseEvent *e )
{
    saveWindowLocation();
    e->accept();
}
コード例 #8
0
ファイル: qgshelpviewer.cpp プロジェクト: ACorradini/QGIS
/*
 * 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();
}
コード例 #9
0
ファイル: qgshelpviewer.cpp プロジェクト: ACorradini/QGIS
void QgsHelpViewer::resizeEvent( QResizeEvent *event )
{
  Q_UNUSED( event );
  saveWindowLocation();
}
コード例 #10
0
ファイル: qgsmeasuredialog.cpp プロジェクト: landryb/QGIS
void QgsMeasureDialog::reject()
{
  saveWindowLocation();
  restart();
  QDialog::close();
}
コード例 #11
0
ファイル: qgsbookmarks.cpp プロジェクト: paulfab/QGIS
QgsBookmarks::~QgsBookmarks()
{
    saveWindowLocation();
}
コード例 #12
0
ファイル: qgsgrassregion.cpp プロジェクト: aaronr/Quantum-GIS
void QgsGrassRegion::reject()
{
  saveWindowLocation();
  mCanvas->setMapTool( NULL );
  QDialog::reject();
}
コード例 #13
0
void QgsHelpViewer::resizeEvent( QResizeEvent *event )
{
  saveWindowLocation();
}
コード例 #14
0
/*
 * 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();
}
コード例 #15
0
ファイル: qgsbookmarks.cpp プロジェクト: Br1ndavoine/QGIS
QgsBookmarks::~QgsBookmarks()
{
  saveWindowLocation();
  sInstance = 0;
}