Skip to content
Permalink
Browse files
fix signal/slot warnings
  • Loading branch information
jef-n committed Jan 24, 2015
1 parent 1e21c5a commit 4afdf553e7996f3c4525498743ddb7546d8c432f
@@ -39,8 +39,6 @@ QgsSimplifyDialog::QgsSimplifyDialog( QgsMapToolSimplify* tool, QWidget* parent
connect( spinTolerance, SIGNAL( valueChanged( double ) ), mTool, SLOT( setTolerance( double ) ) );
connect( cboToleranceUnits, SIGNAL( currentIndexChanged( int ) ), mTool, SLOT( setToleranceUnits( int ) ) );
connect( okButton, SIGNAL( clicked() ), mTool, SLOT( storeSimplified() ) );
connect( this, SIGNAL( finished( int ) ), mTool, SLOT( removeRubberBand() ) );

}

void QgsSimplifyDialog::updateStatusText()
@@ -86,11 +86,11 @@ QgsRasterLayerProperties::QgsRasterLayerProperties( QgsMapLayer* lyr, QgsMapCanv

QPushButton* b = new QPushButton( tr( "Style" ) );
QMenu* m = new QMenu( this );
m->addAction( tr( "Load Style..." ), this, SLOT( on_pbnLoadStyle_clicked() ) );
m->addAction( tr( "Save Style..." ), this, SLOT( on_pbnSaveStyleAs_clicked() ) );
m->addAction( tr( "Load Style..." ), this, SLOT( loadStyle_clicked() ) );
m->addAction( tr( "Save Style..." ), this, SLOT( saveStyleAs_clicked() ) );
m->addSeparator();
m->addAction( tr( "Save As Default" ), this, SLOT( on_pbnSaveDefaultStyle_clicked() ) );
m->addAction( tr( "Restore Default" ), this, SLOT( on_pbnLoadDefaultStyle_clicked() ) );
m->addAction( tr( "Save As Default" ), this, SLOT( saveDefaultStyle_clicked() ) );
m->addAction( tr( "Restore Default" ), this, SLOT( loadDefaultStyle_clicked() ) );
b->setMenu( m );
connect( m, SIGNAL( aboutToShow() ), this, SLOT( aboutToShowStyleMenu() ) );
buttonBox->addButton( b, QDialogButtonBox::ResetRole );
@@ -1633,7 +1633,7 @@ QLinearGradient QgsRasterLayerProperties::highlightGradient()
// Next four methods for saving and restoring qml style state
//
//
void QgsRasterLayerProperties::on_pbnLoadDefaultStyle_clicked()
void QgsRasterLayerProperties::loadDefaultStyle_clicked()
{
bool defaultLoadedFlag = false;
QString myMessage = mRasterLayer->loadDefaultStyle( defaultLoadedFlag );
@@ -1652,7 +1652,7 @@ void QgsRasterLayerProperties::on_pbnLoadDefaultStyle_clicked()
}
}

void QgsRasterLayerProperties::on_pbnSaveDefaultStyle_clicked()
void QgsRasterLayerProperties::saveDefaultStyle_clicked()
{

apply(); // make sure the style to save is uptodate
@@ -1673,7 +1673,7 @@ void QgsRasterLayerProperties::on_pbnSaveDefaultStyle_clicked()
}


void QgsRasterLayerProperties::on_pbnLoadStyle_clicked()
void QgsRasterLayerProperties::loadStyle_clicked()
{
QSettings settings;
QString lastUsedDir = settings.value( "style/lastStyleDir", "." ).toString();
@@ -1704,7 +1704,7 @@ void QgsRasterLayerProperties::on_pbnLoadStyle_clicked()
}


void QgsRasterLayerProperties::on_pbnSaveStyleAs_clicked()
void QgsRasterLayerProperties::saveStyleAs_clicked()
{
QSettings settings;
QString lastUsedDir = settings.value( "style/lastStyleDir", "." ).toString();
@@ -88,13 +88,13 @@ class APP_EXPORT QgsRasterLayerProperties : public QgsOptionsDialogBase, private
private slots:
void on_mRenderTypeComboBox_currentIndexChanged( int index );
/** Load the default style when appropriate button is pressed. */
void on_pbnLoadDefaultStyle_clicked();
void loadDefaultStyle_clicked();
/** Save the default style when appropriate button is pressed. */
void on_pbnSaveDefaultStyle_clicked();
void saveDefaultStyle_clicked();
/** Load a saved style when appropriate button is pressed. */
void on_pbnLoadStyle_clicked();
void loadStyle_clicked();
/** Save a style when appriate button is pressed. */
void on_pbnSaveStyleAs_clicked();
void saveStyleAs_clicked();
/** Help button */
void on_buttonBox_helpRequested() { QgsContextHelp::run( metaObject()->className() ); }

@@ -84,11 +84,11 @@ QgsVectorLayerProperties::QgsVectorLayerProperties(

QPushButton* b = new QPushButton( tr( "Style" ) );
QMenu* m = new QMenu( this );
mActionLoadStyle = m->addAction( tr( "Load Style..." ), this, SLOT( on_pbnLoadStyle_clicked() ) );
mActionSaveStyleAs = m->addAction( tr( "Save Style..." ), this, SLOT( on_pbnSaveStyleAs_clicked() ) );
mActionLoadStyle = m->addAction( tr( "Load Style..." ), this, SLOT( loadStyle_clicked() ) );
mActionSaveStyleAs = m->addAction( tr( "Save Style..." ), this, SLOT( saveStyleAs_clicked() ) );
m->addSeparator();
m->addAction( tr( "Save As Default" ), this, SLOT( on_pbnSaveDefaultStyle_clicked() ) );
m->addAction( tr( "Restore Default" ), this, SLOT( on_pbnLoadDefaultStyle_clicked() ) );
m->addAction( tr( "Save As Default" ), this, SLOT( saveDefaultStyle_clicked() ) );
m->addAction( tr( "Restore Default" ), this, SLOT( loadDefaultStyle_clicked() ) );
b->setMenu( m );
connect( m, SIGNAL( aboutToShow() ), this, SLOT( aboutToShowStyleMenu() ) );
buttonBox->addButton( b, QDialogButtonBox::ResetRole );
@@ -669,7 +669,7 @@ void QgsVectorLayerProperties::on_mCrsSelector_crsChanged( QgsCoordinateReferenc
layer->setCrs( crs );
}

void QgsVectorLayerProperties::on_pbnLoadDefaultStyle_clicked()
void QgsVectorLayerProperties::loadDefaultStyle_clicked()
{
QString msg;
bool defaultLoadedFlag = false;
@@ -727,7 +727,7 @@ void QgsVectorLayerProperties::on_pbnLoadDefaultStyle_clicked()
}
}

void QgsVectorLayerProperties::on_pbnSaveDefaultStyle_clicked()
void QgsVectorLayerProperties::saveDefaultStyle_clicked()
{
apply();
QString errorMsg;
@@ -766,7 +766,7 @@ void QgsVectorLayerProperties::on_pbnSaveDefaultStyle_clicked()
}


void QgsVectorLayerProperties::on_pbnLoadStyle_clicked()
void QgsVectorLayerProperties::loadStyle_clicked()
{
QSettings myQSettings; // where we keep last used filter in persistent state
QString myLastUsedDir = myQSettings.value( "style/lastStyleDir", "." ).toString();
@@ -809,7 +809,7 @@ void QgsVectorLayerProperties::on_pbnLoadStyle_clicked()
}


void QgsVectorLayerProperties::on_pbnSaveStyleAs_clicked()
void QgsVectorLayerProperties::saveStyleAs_clicked()
{
saveStyleAs( QML );
}
@@ -937,11 +937,11 @@ void QgsVectorLayerProperties::loadStyleMenuTriggered( QAction *action )

if ( index == 0 ) //Load from filesystem
{
this->on_pbnLoadStyle_clicked();
loadStyle_clicked();
}
else if ( index == 1 ) //Load from database
{
this->showListOfStylesFromDatabase();
showListOfStylesFromDatabase();
}

}
@@ -1117,7 +1117,7 @@ void QgsVectorLayerProperties::updateSymbologyPage()
// display the menu to choose the output format (fix #5136)
mActionSaveStyleAs->setText( tr( "Save Style" ) );
mActionSaveStyleAs->setMenu( mSaveAsMenu );
QObject::disconnect( mActionSaveStyleAs, SIGNAL( triggered() ), this, SLOT( on_pbnSaveStyleAs_clicked() ) );
QObject::disconnect( mActionSaveStyleAs, SIGNAL( triggered() ), this, SLOT( saveStyleAs_clicked() ) );
}
else
{
@@ -104,10 +104,10 @@ class APP_EXPORT QgsVectorLayerProperties : public QgsOptionsDialogBase, private
void on_pbnQueryBuilder_clicked();
void on_pbnIndex_clicked();
void on_mCrsSelector_crsChanged( QgsCoordinateReferenceSystem crs );
void on_pbnLoadDefaultStyle_clicked();
void on_pbnSaveDefaultStyle_clicked();
void on_pbnLoadStyle_clicked();
void on_pbnSaveStyleAs_clicked();
void loadDefaultStyle_clicked();
void saveDefaultStyle_clicked();
void loadStyle_clicked();
void saveStyleAs_clicked();
void mOptionsStackedWidget_CurrentChanged( int indx );
void on_buttonBox_helpRequested() { QgsContextHelp::run( metaObject()->className() ); }
void on_pbnUpdateExtents_clicked();
@@ -389,7 +389,7 @@ void QgsVisibilityPresets::applyState( const QString& presetName )

void QgsVisibilityPresets::reconnectToLayersStyleManager()
{
disconnect( 0, 0, this, SLOT( layerStyleRenamed( QString, QString ) ) );
// disconnect( 0, 0, this, SLOT( layerStyleRenamed( QString, QString ) ) );

QSet<QString> layerIDs;
foreach ( const QString& grpName, mPresets.keys() )

0 comments on commit 4afdf55

Please sign in to comment.