Skip to content
Permalink
Browse files

follow up 2e7867a

  • Loading branch information
alexbruy committed Jan 18, 2012
1 parent 7747d1f commit fbe2d99a9986fb5c96dde4bda3df40e57dc177a0
@@ -91,6 +91,8 @@ QgsDelimitedTextPluginGui::QgsDelimitedTextPluginGui( QgisInterface * _qI, QWidg

QgsDelimitedTextPluginGui::~QgsDelimitedTextPluginGui()
{
QSettings settings;
settings.setValue( "/Plugin-DelimitedText/geometry", saveGeometry() );
}

void QgsDelimitedTextPluginGui::on_btnBrowseForFile_clicked()
@@ -144,8 +146,6 @@ void QgsDelimitedTextPluginGui::on_buttonBox_accepted()
emit drawVectorLayer( QString::fromAscii( url.toEncoded() ), txtLayerName->text(), "delimitedtext" );

// store the settings
saveState();

QSettings settings;
QString key = "/Plugin-DelimitedText";
settings.setValue( key + "/geometry", saveGeometry() );
@@ -172,7 +172,6 @@ void QgsDelimitedTextPluginGui::on_buttonBox_accepted()

void QgsDelimitedTextPluginGui::on_buttonBox_rejected()
{
saveState();
reject();
}

@@ -504,9 +503,3 @@ QString QgsDelimitedTextPluginGui::readLine( QTextStream &stream )
}
return buffer;
}

void QgsDelimitedTextPluginGui::saveState()
{
QSettings settings;
settings.setValue( "/Plugin-DelimitedText/geometry", saveGeometry() );
}
@@ -38,7 +38,6 @@ class QgsDelimitedTextPluginGui : public QDialog, private Ui::QgsDelimitedTextPl
void updateFieldLists();
void getOpenFileName();
QString selectedChars();
void saveState();

QgisInterface * qI;
QAbstractButton *pbnOK;
@@ -37,12 +37,12 @@ dxf2shpConverterGui::dxf2shpConverterGui( QWidget *parent, Qt::WFlags fl ):

dxf2shpConverterGui::~dxf2shpConverterGui()
{
QSettings settings;
settings.setValue( "/Plugin-DXF/geometry", saveGeometry() );
}

void dxf2shpConverterGui::on_buttonBox_accepted()
{
saveState();

QString inf = name->text();
QString outd = dirout->text();

@@ -120,7 +120,6 @@ void dxf2shpConverterGui::on_buttonBox_accepted()

void dxf2shpConverterGui::on_buttonBox_rejected()
{
saveState();
reject();
}

@@ -185,12 +184,6 @@ void dxf2shpConverterGui::getOutputDir()
}
}

void dxf2shpConverterGui::saveState()
{
QSettings settings;
settings.setValue( "/Plugin-DXF/geometry", saveGeometry() );
}

void dxf2shpConverterGui::restoreState()
{
QSettings settings;
@@ -34,7 +34,6 @@ class dxf2shpConverterGui: public QDialog, private Ui::dxf2shpConverterGui
void getOutputFileName();
void getOutputDir();

void saveState();
void restoreState();

private slots:
@@ -51,7 +51,8 @@ eVisDatabaseConnectionGui::eVisDatabaseConnectionGui( QList<QTemporaryFile*>* th
{
setupUi( this );

restoreState();
QSettings settings;
restoreGeometry( settings.value( "/eVis/db-geometry" ).toByteArray() );

mTempOutputFileList = theTemoraryFileList;

@@ -88,9 +89,10 @@ eVisDatabaseConnectionGui::eVisDatabaseConnectionGui( QList<QTemporaryFile*>* th
*/
eVisDatabaseConnectionGui::~eVisDatabaseConnectionGui( )
{
QSettings settings;
settings.setValue( "/eVis/db-geometry", saveGeometry() );
}


/*
*
* Public and Private Slots
@@ -126,8 +128,6 @@ void eVisDatabaseConnectionGui::drawNewVectorLayer( QString layerName, QString x
*/
void eVisDatabaseConnectionGui::on_buttonBox_accepted( )
{
saveState();

//Deallocate memory, basically a predescructor
if ( 0 != mDatabaseConnection )
{
@@ -538,15 +538,3 @@ void eVisDatabaseConnectionGui::on_pbtnRunQuery_clicked( )
}
}
}

void eVisDatabaseConnectionGui::saveState()
{
QSettings settings;
settings.setValue( "/eVis/db-geometry", saveGeometry() );
}

void eVisDatabaseConnectionGui::restoreState()
{
QSettings settings;
restoreGeometry( settings.value( "/eVis/db-geometry" ).toByteArray() );
}
@@ -68,9 +68,6 @@ class eVisDatabaseConnectionGui : public QDialog, private Ui::eVisDatabaseConnec
/** \brief Pointer to a QMap which will hold the definition of preexisting query that can be loaded from an xml file */
QMap<int, eVisQueryDefinition>* mQueryDefinitionMap;

void saveState();
void restoreState();

private slots:
/** \brief Slot called after the user selects the x, y fields in the field selection gui component */
void drawNewVectorLayer( QString, QString, QString );
@@ -55,7 +55,8 @@ eVisGenericEventBrowserGui::eVisGenericEventBrowserGui( QWidget* parent, QgisInt
{
setupUi( this );

restoreState();
QSettings settings;
restoreGeometry( settings.value( "/eVis/browser-geometry" ).toByteArray() );

mCurrentFeatureIndex = 0;
mInterface = interface;
@@ -112,6 +113,9 @@ eVisGenericEventBrowserGui::eVisGenericEventBrowserGui( QWidget* parent, QgsMapC
*/
eVisGenericEventBrowserGui::~eVisGenericEventBrowserGui( )
{
QSettings settings;
settings.setValue( "/eVis/browser-geometry", saveGeometry() );

//Clean up, disconnect the highlighting routine and refesh the canvase to clear highlighting symbol
if ( 0 != mCanvas )
{
@@ -457,8 +461,6 @@ void eVisGenericEventBrowserGui::accept( )
myQSettings.setValue( "/eVis/applypathrulestodocs", chkboxApplyPathRulesToDocs->isChecked( ) );
}

saveState();

myQSettings.remove( "/eVis/filetypeassociations" );
myQSettings.beginWriteArray( "/eVis/filetypeassociations" );
int myIterator = 0;
@@ -1181,16 +1183,3 @@ void eVisGenericEventBrowserGui::renderSymbol( QPainter* thePainter )
}
}
}

void eVisGenericEventBrowserGui::saveState()
{
QSettings settings;
settings.setValue( "/eVis/browser-geometry", saveGeometry() );
}

void eVisGenericEventBrowserGui::restoreState()
{
QSettings settings;
restoreGeometry( settings.value( "/eVis/browser-geometry" ).toByteArray() );
}

@@ -152,9 +152,6 @@ class eVisGenericEventBrowserGui : public QDialog, private Ui::eVisGenericEventB
/** \brief Sets the base path to the path of the data source */
void setBasePathToDataSource( );

void saveState();
void restoreState();

private slots:
void launchExternalApplication( QTreeWidgetItem *, int );
void on_buttonboxOptions_clicked( QAbstractButton* );
@@ -80,12 +80,13 @@ QgsGPSPluginGui::QgsGPSPluginGui( const BabelMap& importers,

QgsGPSPluginGui::~QgsGPSPluginGui()
{
QSettings settings;
settings.setValue( "/Plugin-GPS/geometry", saveGeometry() );
settings.setValue( "/Plugin-GPS/lastTab", tabWidget->currentIndex() );
}

void QgsGPSPluginGui::on_buttonBox_accepted()
{
saveState();

// what should we do?
switch ( tabWidget->currentIndex() )
{
@@ -243,7 +244,6 @@ void QgsGPSPluginGui::enableRelevantControls()

void QgsGPSPluginGui::on_buttonBox_rejected()
{
saveState();
reject();
}

@@ -444,13 +444,6 @@ void QgsGPSPluginGui::devicesUpdated()
populateIMPBabelFormats();
}

void QgsGPSPluginGui::saveState()
{
QSettings settings;
settings.setValue( "/Plugin-GPS/geometry", saveGeometry() );
settings.setValue( "/Plugin-GPS/lastTab", tabWidget->currentIndex() );
}

void QgsGPSPluginGui::restoreState()
{
QSettings settings;
@@ -66,6 +66,9 @@ QgsInterpolationDialog::QgsInterpolationDialog( QWidget* parent, QgisInterface*

QgsInterpolationDialog::~QgsInterpolationDialog()
{
QSettings settings;
settings.setValue( "/Interpolation/geometry", saveGeometry() );
settings.setValue( "/Interpolation/lastMethod", mInterpolationMethodComboBox->currentIndex() );
}

void QgsInterpolationDialog::enableOrDisableOkButton()
@@ -92,8 +95,6 @@ void QgsInterpolationDialog::enableOrDisableOkButton()

void QgsInterpolationDialog::on_buttonBox_accepted()
{
saveState();

if ( !mInterpolatorDialog )
{
return;
@@ -207,12 +208,6 @@ void QgsInterpolationDialog::on_buttonBox_accepted()
delete theInterpolator;
}

void QgsInterpolationDialog::on_buttonBox_rejected()
{
saveState();
reject();
}

void QgsInterpolationDialog::on_mInputLayerComboBox_currentIndexChanged( const QString& text )
{
Q_UNUSED( text );
@@ -594,10 +589,3 @@ QgsRectangle QgsInterpolationDialog::currentBoundingBox()

return QgsRectangle( xMin, yMin, xMax, yMax );
}

void QgsInterpolationDialog::saveState()
{
QSettings settings;
settings.setValue( "/Interpolation/geometry", saveGeometry() );
settings.setValue( "/Interpolation/lastMethod", mInterpolationMethodComboBox->currentIndex() );
}
@@ -35,7 +35,6 @@ class QgsInterpolationDialog: public QDialog, private Ui::QgsInterpolationDialog

private slots:
void on_buttonBox_accepted();
void on_buttonBox_rejected();
void on_mInputLayerComboBox_currentIndexChanged( const QString& text );
void on_mOutputFileButton_clicked();
void on_mOutputFileLineEdit_textChanged();
@@ -78,8 +77,6 @@ class QgsInterpolationDialog: public QDialog, private Ui::QgsInterpolationDialog
void setNewCellsizeYOnNRowschange();
void setNColsOnCellsizeXChange();
void setNRowsOnCellsizeYChange();

void saveState();
};

#endif
@@ -34,6 +34,7 @@ QgsOfflineEditingPluginGui::QgsOfflineEditingPluginGui( QWidget* parent /*= 0*/,
setupUi( this );

restoreState();

mOfflineDbFile = "offline.sqlite";
ui_offlineDataPath->setText( QDir( mOfflineDataPath ).absoluteFilePath( mOfflineDbFile ) );

@@ -42,6 +43,10 @@ QgsOfflineEditingPluginGui::QgsOfflineEditingPluginGui( QWidget* parent /*= 0*/,

QgsOfflineEditingPluginGui::~QgsOfflineEditingPluginGui()
{
QSettings settings;
settings.setValue( "Plugin-OfflineEditing/geometry", saveGeometry() );
settings.setValue( "Plugin-OfflineEditing/offline_data_path", mOfflineDataPath );
settings.setValue( "Plugin-OfflineEditing/onlyEditableLayers", checkboxShowEditableLayers->isChecked() );
}

QString QgsOfflineEditingPluginGui::offlineDataPath()
@@ -138,14 +143,11 @@ void QgsOfflineEditingPluginGui::on_buttonBox_accepted()
mSelectedLayerIds.append(( *it )->data( Qt::UserRole ).toString() );
}

saveState();

accept();
}

void QgsOfflineEditingPluginGui::on_buttonBox_rejected()
{
saveState();
reject();
}

@@ -155,14 +157,6 @@ void QgsOfflineEditingPluginGui::on_buttonBox_helpRequested()
QgsContextHelp::run( context_id );
}

void QgsOfflineEditingPluginGui::saveState()
{
QSettings settings;
settings.setValue( "Plugin-OfflineEditing/geometry", saveGeometry() );
settings.setValue( "Plugin-OfflineEditing/offline_data_path", mOfflineDataPath );
settings.setValue( "Plugin-OfflineEditing/onlyEditableLayers", checkboxShowEditableLayers->isChecked() );
}

void QgsOfflineEditingPluginGui::restoreState()
{
QSettings settings;

0 comments on commit fbe2d99

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