diff --git a/python/core/composer/qgscomposeritemcommand.sip b/python/core/composer/qgscomposeritemcommand.sip index 0f517ffdd46..564d6c5a770 100644 --- a/python/core/composer/qgscomposeritemcommand.sip +++ b/python/core/composer/qgscomposeritemcommand.sip @@ -49,9 +49,14 @@ class QgsComposerMergeCommand : QgsComposerItemCommand //composer label ComposerLabelSetText, ComposerLabelSetId, + ComposerLabelFontColor, //composer map ComposerMapRotation, ComposerMapAnnotationDistance, + ComposerMapGridFramePenColor, + ComposerMapGridFrameFill1Color, + ComposerMapGridFrameFill2Color, + ComposerMapGridAnnotationFontColor, //composer legend ComposerLegendText, LegendColumnCount, @@ -69,8 +74,12 @@ class QgsComposerMergeCommand : QgsComposerItemCommand LegendBoxSpace, LegendColumnSpace, LegendRasterBorderWidth, + LegendFontColor, + LegendRasterBorderColor, //composer picture ComposerPictureRotation, + ComposerPictureFillColor, + ComposerPictureOutlineColor, // composer scalebar ScaleBarLineWidth, ScaleBarHeight, @@ -81,6 +90,10 @@ class QgsComposerMergeCommand : QgsComposerItemCommand ScaleBarMapUnitsSegment, ScaleBarLabelBarSize, ScaleBarBoxContentSpace, + ScaleBarFontColor, + ScaleBarFillColor, + ScaleBarFill2Color, + ScaleBarStrokeColor, // composer table TableMaximumFeatures, TableMargin, @@ -90,9 +103,13 @@ class QgsComposerMergeCommand : QgsComposerItemCommand ShapeOutlineWidth, //composer arrow ArrowOutlineWidth, + ArrowHeadFillColor, + ArrowHeadOutlineColor, ArrowHeadWidth, //item ItemOutlineWidth, + ItemOutlineColor, + ItemBackgroundColor, ItemMove, ItemRotation, ItemTransparency, diff --git a/python/core/composer/qgscomposermultiframecommand.sip b/python/core/composer/qgscomposermultiframecommand.sip index e405fa291ac..23738b81f81 100644 --- a/python/core/composer/qgscomposermultiframecommand.sip +++ b/python/core/composer/qgscomposermultiframecommand.sip @@ -49,7 +49,11 @@ class QgsComposerMultiFrameMergeCommand: QgsComposerMultiFrameCommand TableMaximumFeatures, TableMargin, TableGridStrokeWidth, - TableCellStyle + TableCellStyle, + TableHeaderFontColor, + TableContentFontColor, + TableGridColor, + TableBackgroundColor, }; QgsComposerMultiFrameMergeCommand( Context c, QgsComposerMultiFrame* multiFrame, const QString& text ); diff --git a/src/app/composer/qgscomposerarrowwidget.cpp b/src/app/composer/qgscomposerarrowwidget.cpp index bffe8464537..abaaa6d6f51 100644 --- a/src/app/composer/qgscomposerarrowwidget.cpp +++ b/src/app/composer/qgscomposerarrowwidget.cpp @@ -99,7 +99,7 @@ void QgsComposerArrowWidget::on_mArrowHeadFillColorButton_colorChanged( const QC return; } - mArrow->beginCommand( tr( "Arrow head fill color" ) ); + mArrow->beginCommand( tr( "Arrow head fill color" ), QgsComposerMergeCommand::ArrowHeadFillColor ); mArrow->setArrowHeadFillColor( newColor ); mArrow->update(); mArrow->endCommand(); @@ -112,7 +112,7 @@ void QgsComposerArrowWidget::on_mArrowHeadOutlineColorButton_colorChanged( const return; } - mArrow->beginCommand( tr( "Arrow head outline color" ) ); + mArrow->beginCommand( tr( "Arrow head outline color" ), QgsComposerMergeCommand::ArrowHeadOutlineColor ); mArrow->setArrowHeadOutlineColor( newColor ); mArrow->update(); mArrow->endCommand(); diff --git a/src/app/composer/qgscomposerattributetablewidget.cpp b/src/app/composer/qgscomposerattributetablewidget.cpp index 138f8e8772d..a2a264e0b96 100644 --- a/src/app/composer/qgscomposerattributetablewidget.cpp +++ b/src/app/composer/qgscomposerattributetablewidget.cpp @@ -269,7 +269,7 @@ void QgsComposerAttributeTableWidget::on_mHeaderFontColorButton_colorChanged( co QgsComposition* composition = mComposerTable->composition(); if ( composition ) { - composition->beginMultiFrameCommand( mComposerTable, tr( "Table header font color" ) ); + composition->beginMultiFrameCommand( mComposerTable, tr( "Table header font color" ), QgsComposerMultiFrameMergeCommand::TableHeaderFontColor ); } mComposerTable->setHeaderFontColor( newColor ); if ( composition ) @@ -310,7 +310,7 @@ void QgsComposerAttributeTableWidget::on_mContentFontColorButton_colorChanged( c QgsComposition* composition = mComposerTable->composition(); if ( composition ) { - composition->beginMultiFrameCommand( mComposerTable, tr( "Table content font color" ) ); + composition->beginMultiFrameCommand( mComposerTable, tr( "Table content font color" ), QgsComposerMultiFrameMergeCommand::TableContentFontColor ); } mComposerTable->setContentFontColor( newColor ); if ( composition ) @@ -348,7 +348,7 @@ void QgsComposerAttributeTableWidget::on_mGridColorButton_colorChanged( const QC QgsComposition* composition = mComposerTable->composition(); if ( composition ) { - composition->beginMultiFrameCommand( mComposerTable, tr( "Table grid color" ) ); + composition->beginMultiFrameCommand( mComposerTable, tr( "Table grid color" ), QgsComposerMultiFrameMergeCommand::TableGridColor ); } mComposerTable->setGridColor( newColor ); if ( composition ) @@ -386,7 +386,7 @@ void QgsComposerAttributeTableWidget::on_mBackgroundColorButton_colorChanged( co QgsComposition* composition = mComposerTable->composition(); if ( composition ) { - composition->beginMultiFrameCommand( mComposerTable, tr( "Table background color" ) ); + composition->beginMultiFrameCommand( mComposerTable, tr( "Table background color" ), QgsComposerMultiFrameMergeCommand::TableBackgroundColor ); } mComposerTable->setBackgroundColor( newColor ); if ( composition ) diff --git a/src/app/composer/qgscomposeritemwidget.cpp b/src/app/composer/qgscomposeritemwidget.cpp index e6295ac5c2b..30393dfdaf9 100644 --- a/src/app/composer/qgscomposeritemwidget.cpp +++ b/src/app/composer/qgscomposeritemwidget.cpp @@ -210,7 +210,7 @@ void QgsComposerItemWidget::on_mFrameColorButton_colorChanged( const QColor& new { return; } - mItem->beginCommand( tr( "Frame color changed" ) ); + mItem->beginCommand( tr( "Frame color changed" ), QgsComposerMergeCommand::ItemOutlineColor ); mItem->setFrameOutlineColor( newFrameColor ); mItem->update(); mItem->endCommand(); @@ -230,7 +230,7 @@ void QgsComposerItemWidget::on_mBackgroundColorButton_colorChanged( const QColor { return; } - mItem->beginCommand( tr( "Background color changed" ) ); + mItem->beginCommand( tr( "Background color changed" ), QgsComposerMergeCommand::ItemBackgroundColor ); mItem->setBackgroundColor( newBackgroundColor ); //if the item is a composer map, we need to regenerate the map image diff --git a/src/app/composer/qgscomposerlabelwidget.cpp b/src/app/composer/qgscomposerlabelwidget.cpp index 855557d5a75..31d8b80fc96 100644 --- a/src/app/composer/qgscomposerlabelwidget.cpp +++ b/src/app/composer/qgscomposerlabelwidget.cpp @@ -125,7 +125,7 @@ void QgsComposerLabelWidget::on_mFontColorButton_colorChanged( const QColor &new return; } - mComposerLabel->beginCommand( tr( "Label color changed" ) ); + mComposerLabel->beginCommand( tr( "Label color changed" ), QgsComposerMergeCommand::ComposerLabelFontColor ); mComposerLabel->setFontColor( newLabelColor ); mComposerLabel->update(); mComposerLabel->endCommand(); diff --git a/src/app/composer/qgscomposerlegendwidget.cpp b/src/app/composer/qgscomposerlegendwidget.cpp index f00ba5db41d..6bd43017536 100644 --- a/src/app/composer/qgscomposerlegendwidget.cpp +++ b/src/app/composer/qgscomposerlegendwidget.cpp @@ -406,7 +406,7 @@ void QgsComposerLegendWidget::on_mFontColorButton_colorChanged( const QColor& ne return; } - mLegend->beginCommand( tr( "Legend font color changed" ) ); + mLegend->beginCommand( tr( "Legend font color changed" ), QgsComposerMergeCommand::LegendFontColor ); mLegend->setFontColor( newFontColor ); mLegend->update(); mLegend->endCommand(); @@ -624,7 +624,7 @@ void QgsComposerLegendWidget::on_mRasterBorderColorButton_colorChanged( const QC return; } - mLegend->beginCommand( tr( "Legend raster border color" ) ); + mLegend->beginCommand( tr( "Legend raster border color" ), QgsComposerMergeCommand::LegendRasterBorderColor ); mLegend->setRasterBorderColor( newColor ); mLegend->update(); mLegend->endCommand(); diff --git a/src/app/composer/qgscomposermapwidget.cpp b/src/app/composer/qgscomposermapwidget.cpp index 7a488083674..5e9ec828e1d 100644 --- a/src/app/composer/qgscomposermapwidget.cpp +++ b/src/app/composer/qgscomposermapwidget.cpp @@ -1730,7 +1730,7 @@ void QgsComposerMapWidget::on_mGridFramePenColorButton_colorChanged( const QColo return; } - mComposerMap->beginCommand( tr( "Grid frame color changed" ) ); + mComposerMap->beginCommand( tr( "Grid frame color changed" ), QgsComposerMergeCommand::ComposerMapGridFramePenColor ); grid->setFramePenColor( newColor ); mComposerMap->update(); mComposerMap->endCommand(); @@ -1744,7 +1744,7 @@ void QgsComposerMapWidget::on_mGridFrameFill1ColorButton_colorChanged( const QCo return; } - mComposerMap->beginCommand( tr( "Grid frame first fill color changed" ) ); + mComposerMap->beginCommand( tr( "Grid frame first fill color changed" ), QgsComposerMergeCommand::ComposerMapGridFrameFill1Color ); grid->setFrameFillColor1( newColor ); mComposerMap->update(); mComposerMap->endCommand(); @@ -1758,7 +1758,7 @@ void QgsComposerMapWidget::on_mGridFrameFill2ColorButton_colorChanged( const QCo return; } - mComposerMap->beginCommand( tr( "Grid frame second fill color changed" ) ); + mComposerMap->beginCommand( tr( "Grid frame second fill color changed" ), QgsComposerMergeCommand::ComposerMapGridFrameFill2Color ); grid->setFrameFillColor2( newColor ); mComposerMap->update(); mComposerMap->endCommand(); @@ -2077,7 +2077,7 @@ void QgsComposerMapWidget::on_mAnnotationFontColorButton_colorChanged( const QCo return; } - mComposerMap->beginCommand( tr( "Annotation color changed" ) ); + mComposerMap->beginCommand( tr( "Annotation color changed" ), QgsComposerMergeCommand::ComposerMapGridAnnotationFontColor ); grid->setAnnotationFontColor( color ); mComposerMap->update(); mComposerMap->endCommand(); diff --git a/src/app/composer/qgscomposerpicturewidget.cpp b/src/app/composer/qgscomposerpicturewidget.cpp index 9ecffd1e996..cc055d8de15 100644 --- a/src/app/composer/qgscomposerpicturewidget.cpp +++ b/src/app/composer/qgscomposerpicturewidget.cpp @@ -633,7 +633,7 @@ void QgsComposerPictureWidget::loadPicturePreviews( bool collapsed ) void QgsComposerPictureWidget::on_mFillColorButton_colorChanged( const QColor& color ) { - mPicture->beginCommand( tr( "Picture fill color changed" ) ); + mPicture->beginCommand( tr( "Picture fill color changed" ), QgsComposerMergeCommand::ComposerPictureFillColor ); mPicture->setSvgFillColor( color ); mPicture->endCommand(); mPicture->update(); @@ -641,7 +641,7 @@ void QgsComposerPictureWidget::on_mFillColorButton_colorChanged( const QColor& c void QgsComposerPictureWidget::on_mOutlineColorButton_colorChanged( const QColor& color ) { - mPicture->beginCommand( tr( "Picture border color changed" ) ); + mPicture->beginCommand( tr( "Picture border color changed" ), QgsComposerMergeCommand::ComposerPictureOutlineColor ); mPicture->setSvgBorderColor( color ); mPicture->endCommand(); mPicture->update(); diff --git a/src/app/composer/qgscomposerscalebarwidget.cpp b/src/app/composer/qgscomposerscalebarwidget.cpp index 1f3c7e966bd..102b6dc1dff 100644 --- a/src/app/composer/qgscomposerscalebarwidget.cpp +++ b/src/app/composer/qgscomposerscalebarwidget.cpp @@ -263,7 +263,7 @@ void QgsComposerScaleBarWidget::on_mFontColorButton_colorChanged( const QColor& return; } - mComposerScaleBar->beginCommand( tr( "Scalebar font color changed" ) ); + mComposerScaleBar->beginCommand( tr( "Scalebar font color changed" ), QgsComposerMergeCommand::ScaleBarFontColor ); disconnectUpdateSignal(); mComposerScaleBar->setFontColor( newColor ); mComposerScaleBar->update(); @@ -278,7 +278,7 @@ void QgsComposerScaleBarWidget::on_mFillColorButton_colorChanged( const QColor& return; } - mComposerScaleBar->beginCommand( tr( "Scalebar color changed" ) ); + mComposerScaleBar->beginCommand( tr( "Scalebar color changed" ), QgsComposerMergeCommand::ScaleBarFillColor ); disconnectUpdateSignal(); QBrush newBrush = mComposerScaleBar->brush(); newBrush.setColor( newColor ); @@ -295,7 +295,7 @@ void QgsComposerScaleBarWidget::on_mFillColor2Button_colorChanged( const QColor return; } - mComposerScaleBar->beginCommand( tr( "Scalebar secondary color changed" ) ); + mComposerScaleBar->beginCommand( tr( "Scalebar secondary color changed" ), QgsComposerMergeCommand::ScaleBarFill2Color ); disconnectUpdateSignal(); QBrush newBrush = mComposerScaleBar->brush2(); newBrush.setColor( newColor ); @@ -312,7 +312,7 @@ void QgsComposerScaleBarWidget::on_mStrokeColorButton_colorChanged( const QColor return; } - mComposerScaleBar->beginCommand( tr( "Scalebar line color changed" ) ); + mComposerScaleBar->beginCommand( tr( "Scalebar line color changed" ), QgsComposerMergeCommand::ScaleBarStrokeColor ); disconnectUpdateSignal(); QPen newPen = mComposerScaleBar->pen(); newPen.setColor( newColor ); diff --git a/src/core/composer/qgscomposeritemcommand.h b/src/core/composer/qgscomposeritemcommand.h index 0a5a094b4f8..4b931186176 100644 --- a/src/core/composer/qgscomposeritemcommand.h +++ b/src/core/composer/qgscomposeritemcommand.h @@ -87,9 +87,14 @@ class CORE_EXPORT QgsComposerMergeCommand: public QgsComposerItemCommand //composer label ComposerLabelSetText, ComposerLabelSetId, + ComposerLabelFontColor, //composer map ComposerMapRotation, ComposerMapAnnotationDistance, + ComposerMapGridFramePenColor, + ComposerMapGridFrameFill1Color, + ComposerMapGridFrameFill2Color, + ComposerMapGridAnnotationFontColor, //composer legend ComposerLegendText, LegendColumnCount, @@ -107,8 +112,12 @@ class CORE_EXPORT QgsComposerMergeCommand: public QgsComposerItemCommand LegendBoxSpace, LegendColumnSpace, LegendRasterBorderWidth, + LegendFontColor, + LegendRasterBorderColor, //composer picture ComposerPictureRotation, + ComposerPictureFillColor, + ComposerPictureOutlineColor, // composer scalebar ScaleBarLineWidth, ScaleBarHeight, @@ -119,6 +128,10 @@ class CORE_EXPORT QgsComposerMergeCommand: public QgsComposerItemCommand ScaleBarMapUnitsSegment, ScaleBarLabelBarSize, ScaleBarBoxContentSpace, + ScaleBarFontColor, + ScaleBarFillColor, + ScaleBarFill2Color, + ScaleBarStrokeColor, // composer table TableMaximumFeatures, TableMargin, @@ -128,9 +141,13 @@ class CORE_EXPORT QgsComposerMergeCommand: public QgsComposerItemCommand ShapeOutlineWidth, //composer arrow ArrowOutlineWidth, + ArrowHeadFillColor, + ArrowHeadOutlineColor, ArrowHeadWidth, //item ItemOutlineWidth, + ItemOutlineColor, + ItemBackgroundColor, ItemMove, ItemRotation, ItemTransparency, diff --git a/src/core/composer/qgscomposermultiframecommand.h b/src/core/composer/qgscomposermultiframecommand.h index cc72fe3e844..255c5065fbf 100644 --- a/src/core/composer/qgscomposermultiframecommand.h +++ b/src/core/composer/qgscomposermultiframecommand.h @@ -78,7 +78,11 @@ class CORE_EXPORT QgsComposerMultiFrameMergeCommand: public QgsComposerMultiFram TableMaximumFeatures, TableMargin, TableGridStrokeWidth, - TableCellStyle + TableCellStyle, + TableHeaderFontColor, + TableContentFontColor, + TableGridColor, + TableBackgroundColor, }; QgsComposerMultiFrameMergeCommand( Context c, QgsComposerMultiFrame* multiFrame, const QString& text );