Skip to content
Permalink
Browse files

[composer] Fix invalid signal connection

  • Loading branch information
nyalldawson committed May 2, 2016
1 parent a6c88c1 commit cba82658e48d147420670991f457c259e415aedb
@@ -63,7 +63,7 @@ QgsComposerAttributeTableWidget::QgsComposerAttributeTableWidget( QgsComposerAtt

mComposerMapComboBox->setComposition( mComposerTable->composition() );
mComposerMapComboBox->setItemType( QgsComposerItem::ComposerMap );
connect( mComposerMapComboBox, SIGNAL( itemChanged( const QgsComposerItem* ) ), this, SLOT( composerMapChanged( const QgsComposerItem* ) ) );
connect( mComposerMapComboBox, SIGNAL( itemChanged( QgsComposerItem* ) ), this, SLOT( composerMapChanged( const QgsComposerItem* ) ) );

mHeaderFontColorButton->setColorDialogTitle( tr( "Select header font color" ) );
mHeaderFontColorButton->setAllowAlpha( true );
@@ -66,7 +66,7 @@ QgsComposerLegendWidget::QgsComposerLegendWidget( QgsComposerLegend* legend )

mMapComboBox->setComposition( legend->composition() );
mMapComboBox->setItemType( QgsComposerItem::ComposerMap );
connect( mMapComboBox, SIGNAL( itemChanged( const QgsComposerItem* ) ), this, SLOT( composerMapChanged( const QgsComposerItem* ) ) );
connect( mMapComboBox, SIGNAL( itemChanged( QgsComposerItem* ) ), this, SLOT( composerMapChanged( QgsComposerItem* ) ) );

//add widget for item properties
QgsComposerItemWidget* itemPropertiesWidget = new QgsComposerItemWidget( this, legend );
@@ -549,7 +549,7 @@ void QgsComposerLegendWidget::on_mCheckBoxAutoUpdate_stateChanged( int state )
}
}

void QgsComposerLegendWidget::composerMapChanged( const QgsComposerItem* item )
void QgsComposerLegendWidget::composerMapChanged( QgsComposerItem* item )
{
if ( !mLegend )
{
@@ -562,7 +562,7 @@ void QgsComposerLegendWidget::composerMapChanged( const QgsComposerItem* item )
return;
}

const QgsComposerMap* map = dynamic_cast< const QgsComposerMap* >( item );
QgsComposerMap* map = dynamic_cast< QgsComposerMap* >( item );
if ( map )
{
mLegend->beginCommand( tr( "Legend map changed" ) );
@@ -67,7 +67,7 @@ class QgsComposerLegendWidget: public QgsComposerItemBaseWidget, private Ui::Qgs
void on_mBoxSpaceSpinBox_valueChanged( double d );
void on_mColumnSpaceSpinBox_valueChanged( double d );
void on_mCheckBoxAutoUpdate_stateChanged( int state );
void composerMapChanged( const QgsComposerItem* item );
void composerMapChanged( QgsComposerItem* item );

void on_mRasterBorderGroupBox_toggled( bool state );
void on_mRasterBorderWidthSpinBox_valueChanged( double d );
@@ -156,7 +156,7 @@ QgsComposerMapWidget::QgsComposerMapWidget( QgsComposerMap* composerMap )
mOverviewFrameMapComboBox->setComposition( composerMap->composition() );
mOverviewFrameMapComboBox->setItemType( QgsComposerItem::ComposerMap );
mOverviewFrameMapComboBox->setExceptedItemList( QList< QgsComposerItem* >() << composerMap );
connect( mOverviewFrameMapComboBox, SIGNAL( itemChanged( const QgsComposerItem* ) ), this, SLOT( overviewMapChanged( const QgsComposerItem* ) ) );
connect( mOverviewFrameMapComboBox, SIGNAL( itemChanged( QgsComposerItem* ) ), this, SLOT( overviewMapChanged( QgsComposerItem* ) ) );
}

//connections for data defined buttons
@@ -2458,15 +2458,15 @@ void QgsComposerMapWidget::on_mOverviewCheckBox_toggled( bool state )
mComposerMap->endCommand();
}

void QgsComposerMapWidget::overviewMapChanged( const QgsComposerItem* item )
void QgsComposerMapWidget::overviewMapChanged( QgsComposerItem* item )
{
QgsComposerMapOverview* overview = currentOverview();
if ( !overview )
{
return;
}

const QgsComposerMap* map = dynamic_cast< const QgsComposerMap* >( item );
QgsComposerMap* map = dynamic_cast< QgsComposerMap* >( item );
if ( !map )
return;

@@ -46,7 +46,7 @@ class QgsComposerMapWidget: public QgsComposerItemBaseWidget, private Ui::QgsCom
void on_mKeepLayerListCheckBox_stateChanged( int state );
void on_mKeepLayerStylesCheckBox_stateChanged( int state );
void on_mDrawCanvasItemsCheckBox_stateChanged( int state );
void overviewMapChanged( const QgsComposerItem* item );
void overviewMapChanged( QgsComposerItem* item );
void on_mOverviewFrameStyleButton_clicked();
void on_mOverviewBlendModeComboBox_currentIndexChanged( int index );
void on_mOverviewInvertCheckbox_toggled( bool state );
@@ -52,7 +52,7 @@ QgsComposerPictureWidget::QgsComposerPictureWidget( QgsComposerPicture* picture
{
mComposerMapComboBox->setComposition( mPicture->composition() );
mComposerMapComboBox->setItemType( QgsComposerItem::ComposerMap );
connect( mComposerMapComboBox, SIGNAL( itemChanged( const QgsComposerItem* ) ), this, SLOT( composerMapChanged( const QgsComposerItem* ) ) );
connect( mComposerMapComboBox, SIGNAL( itemChanged( QgsComposerItem* ) ), this, SLOT( composerMapChanged( QgsComposerItem* ) ) );
}

setGuiElementValues();
@@ -293,7 +293,7 @@ void QgsComposerPictureWidget::on_mRotationFromComposerMapCheckBox_stateChanged(
mPicture->endCommand();
}

void QgsComposerPictureWidget::composerMapChanged( const QgsComposerItem* item )
void QgsComposerPictureWidget::composerMapChanged( QgsComposerItem* item )
{
if ( !mPicture )
{
@@ -307,7 +307,7 @@ void QgsComposerPictureWidget::composerMapChanged( const QgsComposerItem* item )
return;
}

const QgsComposerMap* composerMap = dynamic_cast< const QgsComposerMap*>( item );
QgsComposerMap* composerMap = dynamic_cast< QgsComposerMap*>( item );
int id = composerMap ? composerMap->id() : -1;
if ( !composerMap )
{
@@ -45,7 +45,7 @@ class QgsComposerPictureWidget: public QgsComposerItemBaseWidget, private Ui::Qg
void on_mAddDirectoryButton_clicked();
void on_mRemoveDirectoryButton_clicked();
void on_mRotationFromComposerMapCheckBox_stateChanged( int state );
void composerMapChanged( const QgsComposerItem* item );
void composerMapChanged( QgsComposerItem* item );
void on_mResizeModeComboBox_currentIndexChanged( int index );
void on_mAnchorPointComboBox_currentIndexChanged( int index );

@@ -86,7 +86,7 @@ QgsComposerScaleBarWidget::QgsComposerScaleBarWidget( QgsComposerScaleBar* scale
mMapItemComboBox->setItemType( QgsComposerItem::ComposerMap );
}

connect( mMapItemComboBox, SIGNAL( itemChanged( const QgsComposerItem* ) ), this, SLOT( composerMapChanged( const QgsComposerItem* ) ) );
connect( mMapItemComboBox, SIGNAL( itemChanged( QgsComposerItem* ) ), this, SLOT( composerMapChanged( QgsComposerItem* ) ) );

blockMemberSignals( false );
setGuiElements(); //set the GUI elements to the state of scaleBar
@@ -630,9 +630,9 @@ void QgsComposerScaleBarWidget::segmentSizeRadioChanged( QAbstractButton* radio
mComposerScaleBar->endCommand();
}

void QgsComposerScaleBarWidget::composerMapChanged( const QgsComposerItem* item )
void QgsComposerScaleBarWidget::composerMapChanged( QgsComposerItem* item )
{
const QgsComposerMap* composerMap = dynamic_cast< const QgsComposerMap* >( item );
QgsComposerMap* composerMap = dynamic_cast< QgsComposerMap* >( item );
if ( !composerMap )
{
return;
@@ -60,7 +60,7 @@ class QgsComposerScaleBarWidget: public QgsComposerItemBaseWidget, private Ui::Q
private slots:
void setGuiElements();
void segmentSizeRadioChanged( QAbstractButton*radio );
void composerMapChanged( const QgsComposerItem* item );
void composerMapChanged( QgsComposerItem* item );

private:
QgsComposerScaleBar* mComposerScaleBar;
@@ -123,7 +123,7 @@ QgsCompositionWidget::QgsCompositionWidget( QWidget* parent, QgsComposition* c )
connect( mPaperOrientationDDBtn, SIGNAL( dataDefinedActivated( bool ) ), this, SLOT( updateDataDefinedProperty() ) );
connect( mPaperOrientationDDBtn, SIGNAL( dataDefinedActivated( bool ) ), mPaperOrientationComboBox, SLOT( setDisabled( bool ) ) );

connect( mWorldFileMapComboBox, SIGNAL( itemChanged( const QgsComposerItem* ) ), this, SLOT( worldFileMapChanged( const QgsComposerItem* ) ) );
connect( mWorldFileMapComboBox, SIGNAL( itemChanged( QgsComposerItem* ) ), this, SLOT( worldFileMapChanged( QgsComposerItem* ) ) );

//initialize data defined buttons
populateDataDefinedButtons();
@@ -661,15 +661,15 @@ void QgsCompositionWidget::on_mGenerateWorldFileCheckBox_toggled( bool state )
mWorldFileMapComboBox->setEnabled( state );
}

void QgsCompositionWidget::worldFileMapChanged( const QgsComposerItem* item )
void QgsCompositionWidget::worldFileMapChanged( QgsComposerItem* item )
{
if ( !mComposition )
{
return;
}

const QgsComposerMap* map = dynamic_cast< const QgsComposerMap* >( item );
mComposition->setWorldFileMap( const_cast< QgsComposerMap* >( map ) );
QgsComposerMap* map = dynamic_cast< QgsComposerMap* >( item );
mComposition->setWorldFileMap( map );
}

void QgsCompositionWidget::on_mGridResolutionSpinBox_valueChanged( double d )
@@ -54,7 +54,7 @@ class QgsCompositionWidget: public QWidget, private Ui::QgsCompositionWidgetBase
void on_mResolutionSpinBox_valueChanged( const int value );
void on_mPrintAsRasterCheckBox_toggled( bool state );
void on_mGenerateWorldFileCheckBox_toggled( bool state );
void worldFileMapChanged( const QgsComposerItem* );
void worldFileMapChanged( QgsComposerItem* );

void on_mGridResolutionSpinBox_valueChanged( double d );
void on_mOffsetXSpinBox_valueChanged( double d );

0 comments on commit cba8265

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