From 028db7e54182a82c4e64e955dfe4971210b21f5b Mon Sep 17 00:00:00 2001 From: Nyall Dawson Date: Thu, 6 Oct 2016 08:13:05 +1000 Subject: [PATCH 1/2] [FEATURE] Port composer config widgets to QgsPanelWidgets Brings the inline (ie, no modal dialogs!) color modification and symbol editing from the layer styling panel to composer item configuration. --- src/app/composer/qgscomposer.cpp | 26 +++--- src/app/composer/qgscomposer.h | 5 +- src/app/composer/qgscomposerarrowwidget.cpp | 1 + .../qgscomposerattributetablewidget.cpp | 1 + src/app/composer/qgscomposerhtmlwidget.cpp | 1 + src/app/composer/qgscomposeritemwidget.cpp | 87 +++++++++++-------- src/app/composer/qgscomposeritemwidget.h | 85 ++++++++++++++---- src/app/composer/qgscomposerlabelwidget.cpp | 1 + src/app/composer/qgscomposerlegendwidget.cpp | 1 + src/app/composer/qgscomposermapwidget.cpp | 1 + src/app/composer/qgscomposerpicturewidget.cpp | 1 + src/app/composer/qgscomposerpolygonwidget.cpp | 1 + .../composer/qgscomposerpolylinewidget.cpp | 1 + .../composer/qgscomposerscalebarwidget.cpp | 2 + src/app/composer/qgscomposershapewidget.cpp | 37 +++++--- src/app/composer/qgscomposershapewidget.h | 2 + 16 files changed, 178 insertions(+), 75 deletions(-) diff --git a/src/app/composer/qgscomposer.cpp b/src/app/composer/qgscomposer.cpp index 06444932188..cd55b1f2740 100644 --- a/src/app/composer/qgscomposer.cpp +++ b/src/app/composer/qgscomposer.cpp @@ -67,6 +67,7 @@ #include "qgsvectorlayer.h" #include "qgscomposerimageexportoptionsdialog.h" #include "ui_qgssvgexportoptions.h" +#include "qgspanelwidgetstack.h" #include #include @@ -578,6 +579,8 @@ QgsComposer::QgsComposer( QgisApp *qgis, const QString& title ) mItemDock = new QgsDockWidget( tr( "Item properties" ), this ); mItemDock->setObjectName( "ItemDock" ); mItemDock->setMinimumWidth( minDockWidth ); + mItemPropertiesStack = new QgsPanelWidgetStack(); + mItemDock->setWidget( mItemPropertiesStack ); mPanelMenu->addAction( mItemDock->toggleViewAction() ); mUndoDock = new QgsDockWidget( tr( "Command history" ), this ); mUndoDock->setObjectName( "CommandDock" ); @@ -996,28 +999,27 @@ void QgsComposer::updateStatusAtlasMsg( const QString& message ) void QgsComposer::showItemOptions( QgsComposerItem* item ) { - QWidget* currentWidget = mItemDock->widget(); - if ( !item ) { - mItemDock->setWidget( nullptr ); + mItemPropertiesStack->takeMainPanel(); return; } - QMap::const_iterator it = mItemWidgetMap.constFind( item ); + QMap::const_iterator it = mItemWidgetMap.constFind( item ); if ( it == mItemWidgetMap.constEnd() ) { return; } - QWidget* newWidget = it.value(); - - if ( !newWidget || newWidget == currentWidget ) //bail out if new widget does not exist or is already there + QgsPanelWidget* newWidget = it.value(); + if ( !newWidget || newWidget == mItemPropertiesStack->mainPanel() ) //bail out if new widget does not exist or is already there { return; } - mItemDock->setWidget( newWidget ); + ( void ) mItemPropertiesStack->takeMainPanel(); + newWidget->setDockMode( true ); + mItemPropertiesStack->setMainPanel( newWidget ); } void QgsComposer::on_mActionOptions_triggered() @@ -3774,7 +3776,7 @@ void QgsComposer::addComposerHtmlFrame( QgsComposerHtml* html, QgsComposerFrame* void QgsComposer::deleteItem( QgsComposerItem* item ) { - QMap::const_iterator it = mItemWidgetMap.constFind( item ); + QMap::const_iterator it = mItemWidgetMap.constFind( item ); if ( it == mItemWidgetMap.constEnd() ) { @@ -3800,7 +3802,7 @@ void QgsComposer::setSelectionTool() bool QgsComposer::containsWmsLayer() const { - QMap::const_iterator item_it = mItemWidgetMap.constBegin(); + QMap::const_iterator item_it = mItemWidgetMap.constBegin(); QgsComposerItem* currentItem = nullptr; QgsComposerMap* currentMap = nullptr; @@ -3822,7 +3824,7 @@ bool QgsComposer::containsWmsLayer() const bool QgsComposer::containsAdvancedEffects() const { // Check if composer contains any blend modes or flattened layers for transparency - QMap::const_iterator item_it = mItemWidgetMap.constBegin(); + QMap::const_iterator item_it = mItemWidgetMap.constBegin(); QgsComposerItem* currentItem = nullptr; QgsComposerMap* currentMap = nullptr; @@ -3893,7 +3895,7 @@ void QgsComposer::showAdvancedEffectsWarning() void QgsComposer::cleanupAfterTemplateRead() { - QMap::const_iterator itemIt = mItemWidgetMap.constBegin(); + QMap::const_iterator itemIt = mItemWidgetMap.constBegin(); for ( ; itemIt != mItemWidgetMap.constEnd(); ++itemIt ) { //update all legends completely diff --git a/src/app/composer/qgscomposer.h b/src/app/composer/qgscomposer.h index 05043a3a4f6..664d693ff93 100644 --- a/src/app/composer/qgscomposer.h +++ b/src/app/composer/qgscomposer.h @@ -18,6 +18,7 @@ #define QGSCOMPOSER_H #include "ui_qgscomposerbase.h" +#include "qgspanelwidget.h" class QgisApp; class QgsComposerArrow; class QgsComposerPolygon; @@ -44,6 +45,7 @@ class QgsDockWidget; class QgsMapLayer; class QgsFeature; class QgsVectorLayer; +class QgsPanelWidgetStack; class QGridLayout; class QDomNode; @@ -568,7 +570,7 @@ class QgsComposer: public QMainWindow, private Ui::QgsComposerBase QSizeGrip *mSizeGrip; //! To know which item to show if selection changes - QMap mItemWidgetMap; + QMap mItemWidgetMap; //! Window menu action to select this window QAction *mWindowAction; @@ -597,6 +599,7 @@ class QgsComposer: public QMainWindow, private Ui::QgsComposerBase QMap< QgsComposerMap*, int > mMapsToRestore; QgsDockWidget* mItemDock; + QgsPanelWidgetStack* mItemPropertiesStack; QgsDockWidget* mUndoDock; QgsDockWidget* mGeneralDock; QgsDockWidget* mAtlasDock; diff --git a/src/app/composer/qgscomposerarrowwidget.cpp b/src/app/composer/qgscomposerarrowwidget.cpp index 47effd16247..bffe8464537 100644 --- a/src/app/composer/qgscomposerarrowwidget.cpp +++ b/src/app/composer/qgscomposerarrowwidget.cpp @@ -28,6 +28,7 @@ QgsComposerArrowWidget::QgsComposerArrowWidget( QgsComposerArrow* arrow ): QgsComposerItemBaseWidget( nullptr, arrow ), mArrow( arrow ) { setupUi( this ); + setPanelTitle( tr( "Arrow properties" ) ); mRadioButtonGroup = new QButtonGroup( this ); mRadioButtonGroup->addButton( mDefaultMarkerRadioButton ); mRadioButtonGroup->addButton( mNoMarkerRadioButton ); diff --git a/src/app/composer/qgscomposerattributetablewidget.cpp b/src/app/composer/qgscomposerattributetablewidget.cpp index 963a128d587..138f8e8772d 100644 --- a/src/app/composer/qgscomposerattributetablewidget.cpp +++ b/src/app/composer/qgscomposerattributetablewidget.cpp @@ -39,6 +39,7 @@ QgsComposerAttributeTableWidget::QgsComposerAttributeTableWidget( QgsComposerAtt , mFrame( frame ) { setupUi( this ); + setPanelTitle( tr( "Table properties" ) ); blockAllSignals( true ); diff --git a/src/app/composer/qgscomposerhtmlwidget.cpp b/src/app/composer/qgscomposerhtmlwidget.cpp index 5c0a904c856..ca4c48eba1a 100644 --- a/src/app/composer/qgscomposerhtmlwidget.cpp +++ b/src/app/composer/qgscomposerhtmlwidget.cpp @@ -31,6 +31,7 @@ QgsComposerHtmlWidget::QgsComposerHtmlWidget( QgsComposerHtml* html, QgsComposer , mFrame( frame ) { setupUi( this ); + setPanelTitle( tr( "HTML properties" ) ); //setup html editor mHtmlEditor = new QgsCodeEditorHTML( this ); diff --git a/src/app/composer/qgscomposeritemwidget.cpp b/src/app/composer/qgscomposeritemwidget.cpp index f699d972372..e6295ac5c2b 100644 --- a/src/app/composer/qgscomposeritemwidget.cpp +++ b/src/app/composer/qgscomposeritemwidget.cpp @@ -30,18 +30,20 @@ //QgsComposerItemBaseWidget -QgsComposerItemBaseWidget::QgsComposerItemBaseWidget( QWidget* parent, QgsComposerObject *composerObject ): QWidget( parent ), mComposerObject( composerObject ) +QgsComposerConfigObject::QgsComposerConfigObject( QWidget* parent, QgsComposerObject *composerObject ) + : QObject( parent ) + , mComposerObject( composerObject ) { connect( atlasComposition(), SIGNAL( coverageLayerChanged( QgsVectorLayer* ) ), this, SLOT( updateDataDefinedButtons() ) ); connect( atlasComposition(), SIGNAL( toggled( bool ) ), this, SLOT( updateDataDefinedButtons() ) ); } -QgsComposerItemBaseWidget::~QgsComposerItemBaseWidget() +QgsComposerConfigObject::~QgsComposerConfigObject() { } -void QgsComposerItemBaseWidget::updateDataDefinedProperty() +void QgsComposerConfigObject::updateDataDefinedProperty() { //match data defined button to item's data defined property QgsDataDefinedButton* ddButton = dynamic_cast( sender() ); @@ -64,7 +66,7 @@ void QgsComposerItemBaseWidget::updateDataDefinedProperty() mComposerObject->refreshDataDefinedProperty( property ); } -void QgsComposerItemBaseWidget::updateDataDefinedButtons() +void QgsComposerConfigObject::updateDataDefinedButtons() { Q_FOREACH ( QgsDataDefinedButton* button, findChildren< QgsDataDefinedButton* >() ) { @@ -72,7 +74,7 @@ void QgsComposerItemBaseWidget::updateDataDefinedButtons() } } -void QgsComposerItemBaseWidget::setDataDefinedProperty( const QgsDataDefinedButton *ddBtn, QgsComposerObject::DataDefinedProperty p ) +void QgsComposerConfigObject::setDataDefinedProperty( const QgsDataDefinedButton *ddBtn, QgsComposerObject::DataDefinedProperty p ) { if ( !mComposerObject ) { @@ -83,7 +85,7 @@ void QgsComposerItemBaseWidget::setDataDefinedProperty( const QgsDataDefinedButt mComposerObject->setDataDefinedProperty( p, map.value( "active" ).toInt(), map.value( "useexpr" ).toInt(), map.value( "expression" ), map.value( "field" ) ); } -void QgsComposerItemBaseWidget::registerDataDefinedButton( QgsDataDefinedButton* button, QgsComposerObject::DataDefinedProperty property, +void QgsComposerConfigObject::registerDataDefinedButton( QgsDataDefinedButton* button, QgsComposerObject::DataDefinedProperty property, QgsDataDefinedButton::DataType type, const QString& description ) { button->blockSignals( true ); @@ -98,7 +100,7 @@ void QgsComposerItemBaseWidget::registerDataDefinedButton( QgsDataDefinedButton* button->blockSignals( false ); } -QgsAtlasComposition* QgsComposerItemBaseWidget::atlasComposition() const +QgsAtlasComposition* QgsComposerConfigObject::atlasComposition() const { if ( !mComposerObject ) { @@ -115,7 +117,7 @@ QgsAtlasComposition* QgsComposerItemBaseWidget::atlasComposition() const return &composition->atlasComposition(); } -QgsVectorLayer* QgsComposerItemBaseWidget::atlasCoverageLayer() const +QgsVectorLayer* QgsComposerConfigObject::atlasCoverageLayer() const { QgsAtlasComposition* atlasMap = atlasComposition(); @@ -140,8 +142,9 @@ void QgsComposerItemWidget::updateVariables() } QgsComposerItemWidget::QgsComposerItemWidget( QWidget* parent, QgsComposerItem* item ) - : QgsComposerItemBaseWidget( parent, item ) + : QWidget( parent ) , mItem( item ) + , mConfigObject( new QgsComposerConfigObject( this, item ) ) , mFreezeXPosSpin( false ) , mFreezeYPosSpin( false ) , mFreezeWidthSpin( false ) @@ -184,18 +187,6 @@ QgsComposerItemWidget::QgsComposerItemWidget( QWidget* parent, QgsComposerItem* connect( mItem->composition(), SIGNAL( variablesChanged() ), this, SLOT( updateVariables() ) ); } -QgsComposerItemWidget::QgsComposerItemWidget() - : QgsComposerItemBaseWidget( nullptr, nullptr ) - , mItem( nullptr ) - , mFreezeXPosSpin( false ) - , mFreezeYPosSpin( false ) - , mFreezeWidthSpin( false ) - , mFreezeHeightSpin( false ) - , mFreezePageSpin( false ) -{ - -} - QgsComposerItemWidget::~QgsComposerItemWidget() { @@ -552,22 +543,22 @@ void QgsComposerItemWidget::setValuesForGuiNonPositionElements() void QgsComposerItemWidget::populateDataDefinedButtons() { - registerDataDefinedButton( mXPositionDDBtn, QgsComposerObject::PositionX, - QgsDataDefinedButton::AnyType, QgsDataDefinedButton::doubleDesc() ); - registerDataDefinedButton( mYPositionDDBtn, QgsComposerObject::PositionY, - QgsDataDefinedButton::AnyType, QgsDataDefinedButton::doubleDesc() ); - registerDataDefinedButton( mWidthDDBtn, QgsComposerObject::ItemWidth, - QgsDataDefinedButton::AnyType, QgsDataDefinedButton::doubleDesc() ); - registerDataDefinedButton( mHeightDDBtn, QgsComposerObject::ItemHeight, - QgsDataDefinedButton::AnyType, QgsDataDefinedButton::doubleDesc() ); - registerDataDefinedButton( mItemRotationDDBtn, QgsComposerObject::ItemRotation, - QgsDataDefinedButton::AnyType, QgsDataDefinedButton::double180RotDesc() ); - registerDataDefinedButton( mTransparencyDDBtn, QgsComposerObject::Transparency, - QgsDataDefinedButton::AnyType, QgsDataDefinedButton::intTranspDesc() ); - registerDataDefinedButton( mBlendModeDDBtn, QgsComposerObject::BlendMode, - QgsDataDefinedButton::String, QgsDataDefinedButton::blendModesDesc() ); - registerDataDefinedButton( mExcludePrintsDDBtn, QgsComposerObject::ExcludeFromExports, - QgsDataDefinedButton::String, QgsDataDefinedButton::boolDesc() ); + mConfigObject->registerDataDefinedButton( mXPositionDDBtn, QgsComposerObject::PositionX, + QgsDataDefinedButton::AnyType, QgsDataDefinedButton::doubleDesc() ); + mConfigObject->registerDataDefinedButton( mYPositionDDBtn, QgsComposerObject::PositionY, + QgsDataDefinedButton::AnyType, QgsDataDefinedButton::doubleDesc() ); + mConfigObject->registerDataDefinedButton( mWidthDDBtn, QgsComposerObject::ItemWidth, + QgsDataDefinedButton::AnyType, QgsDataDefinedButton::doubleDesc() ); + mConfigObject->registerDataDefinedButton( mHeightDDBtn, QgsComposerObject::ItemHeight, + QgsDataDefinedButton::AnyType, QgsDataDefinedButton::doubleDesc() ); + mConfigObject->registerDataDefinedButton( mItemRotationDDBtn, QgsComposerObject::ItemRotation, + QgsDataDefinedButton::AnyType, QgsDataDefinedButton::double180RotDesc() ); + mConfigObject->registerDataDefinedButton( mTransparencyDDBtn, QgsComposerObject::Transparency, + QgsDataDefinedButton::AnyType, QgsDataDefinedButton::intTranspDesc() ); + mConfigObject->registerDataDefinedButton( mBlendModeDDBtn, QgsComposerObject::BlendMode, + QgsDataDefinedButton::String, QgsDataDefinedButton::blendModesDesc() ); + mConfigObject->registerDataDefinedButton( mExcludePrintsDDBtn, QgsComposerObject::ExcludeFromExports, + QgsDataDefinedButton::String, QgsDataDefinedButton::boolDesc() ); } void QgsComposerItemWidget::setValuesForGuiElements() @@ -786,3 +777,25 @@ void QgsComposerItemWidget::on_mExcludeFromPrintsCheckBox_toggled( bool checked mItem->endCommand(); } } + +QgsComposerItemBaseWidget::QgsComposerItemBaseWidget( QWidget* parent, QgsComposerObject* composerObject ) + : QgsPanelWidget( parent ) + , mConfigObject( new QgsComposerConfigObject( this, composerObject ) ) +{ + +} + +void QgsComposerItemBaseWidget::registerDataDefinedButton( QgsDataDefinedButton* button, QgsComposerObject::DataDefinedProperty property, QgsDataDefinedButton::DataType type, const QString& description ) +{ + mConfigObject->registerDataDefinedButton( button, property, type, description ); +} + +QgsVectorLayer* QgsComposerItemBaseWidget::atlasCoverageLayer() const +{ + return mConfigObject->atlasCoverageLayer(); +} + +QgsAtlasComposition* QgsComposerItemBaseWidget::atlasComposition() const +{ + return mConfigObject->atlasComposition(); +} diff --git a/src/app/composer/qgscomposeritemwidget.h b/src/app/composer/qgscomposeritemwidget.h index b4004be3205..defdec92514 100644 --- a/src/app/composer/qgscomposeritemwidget.h +++ b/src/app/composer/qgscomposeritemwidget.h @@ -20,29 +20,42 @@ #include "ui_qgscomposeritemwidgetbase.h" #include "qgscomposeritem.h" +#include "qgspanelwidget.h" class QgsComposerItem; class QgsAtlasComposition; class QgsDataDefinedButton; -/** A base class for property widgets for composer items. All composer item widgets should inherit from - * this base class. + +// NOTE - the inheritance here is tricky, as we need to avoid the multiple inheritance +// diamond problem and the ideal base object (QgsComposerConfigObject) MUST be a QObject +// because of its slots. + +// So here we go: +// QgsComposerItemWidget is just a QWidget which is embedded inside specific item property +// widgets and contains common settings like position and rotation of the items. While the +// actual individual item type widgets MUST be QgsPanelWidgets unfortunately QgsComposerItemWidget +// CANNOT be a QgsPanelWidget and must instead be a generic QWidget (otherwise a QgsPanelWidget +// contains a child QgsPanelWidget, which breaks lots of assumptions made in QgsPanelWidget +// and related classes). +// So QgsComposerItemWidget HAS a QgsComposerConfigObject to handle these common tasks. +// Specific item property widgets (eg QgsComposerMapWidget) should inherit from QgsComposerItemBaseWidget +// (which is a QgsPanelWidget) and also HAS a QgsComposerConfigObject, with protected methods +// which are just proxied through to the QgsComposerConfigObject. +// phew! +// long story short - don't change this without good reason. If you add a new item type, inherit +// from QgsComposerItemWidget and trust that everything else has been done for you. + +/** An object for property widgets for composer items. All composer config type widgets should contain + * this object. */ -class QgsComposerItemBaseWidget: public QWidget +class QgsComposerConfigObject: public QObject { Q_OBJECT public: - QgsComposerItemBaseWidget( QWidget* parent, QgsComposerObject* composerObject ); - ~QgsComposerItemBaseWidget(); + QgsComposerConfigObject( QWidget* parent, QgsComposerObject* composerObject ); + ~QgsComposerConfigObject(); - protected slots: - /** Must be called when a data defined button changes*/ - void updateDataDefinedProperty(); - - //! Updates data defined buttons to reflect current state of atlas (eg coverage layer) - void updateDataDefinedButtons(); - - protected: /** Sets a data defined property for the item from its current data defined button settings*/ void setDataDefinedProperty( const QgsDataDefinedButton *ddBtn, QgsComposerObject::DataDefinedProperty p ); @@ -61,12 +74,54 @@ class QgsComposerItemBaseWidget: public QWidget /** Returns the atlas for the composition*/ QgsAtlasComposition *atlasComposition() const; + private slots: + /** Must be called when a data defined button changes*/ + void updateDataDefinedProperty(); + + //! Updates data defined buttons to reflect current state of atlas (eg coverage layer) + void updateDataDefinedButtons(); + + private: + QgsComposerObject* mComposerObject; }; +/** + * A base class for property widgets for composer items. All composer item widgets should inherit from + * this base class. + */ +class QgsComposerItemBaseWidget: public QgsPanelWidget +{ + Q_OBJECT + + public: + QgsComposerItemBaseWidget( QWidget* parent, QgsComposerObject* composerObject ); + + protected: + + /** Registers a data defined button, setting up its initial value, connections and description. + * @param button button to register + * @param property correponding data defined property + * @param type valid data types for button + * @param description user visible description for data defined property + */ + void registerDataDefinedButton( QgsDataDefinedButton* button, QgsComposerObject::DataDefinedProperty property, + QgsDataDefinedButton::DataType type, const QString& description ); + + /** Returns the current atlas coverage layer (if set)*/ + QgsVectorLayer* atlasCoverageLayer() const; + + /** Returns the atlas for the composition*/ + QgsAtlasComposition *atlasComposition() const; + + private: + + QgsComposerConfigObject* mConfigObject; +}; + /** A class to enter generic properties for composer items (e.g. background, outline, frame). This widget can be embedded into other item widgets*/ -class QgsComposerItemWidget: public QgsComposerItemBaseWidget, private Ui::QgsComposerItemWidgetBase +class QgsComposerItemWidget: public QWidget, private Ui::QgsComposerItemWidgetBase { Q_OBJECT public: @@ -132,9 +187,9 @@ class QgsComposerItemWidget: public QgsComposerItemBaseWidget, private Ui::QgsCo void populateDataDefinedButtons(); private: - QgsComposerItemWidget(); QgsComposerItem* mItem; + QgsComposerConfigObject* mConfigObject; bool mFreezeXPosSpin; bool mFreezeYPosSpin; diff --git a/src/app/composer/qgscomposerlabelwidget.cpp b/src/app/composer/qgscomposerlabelwidget.cpp index 1fd9fdc1807..855557d5a75 100644 --- a/src/app/composer/qgscomposerlabelwidget.cpp +++ b/src/app/composer/qgscomposerlabelwidget.cpp @@ -29,6 +29,7 @@ QgsComposerLabelWidget::QgsComposerLabelWidget( QgsComposerLabel* label ): QgsComposerItemBaseWidget( nullptr, label ), mComposerLabel( label ) { setupUi( this ); + setPanelTitle( tr( "Label properties" ) ); //add widget for general composer item properties QgsComposerItemWidget* itemPropertiesWidget = new QgsComposerItemWidget( this, label ); diff --git a/src/app/composer/qgscomposerlegendwidget.cpp b/src/app/composer/qgscomposerlegendwidget.cpp index 2cd9e12452f..f00ba5db41d 100644 --- a/src/app/composer/qgscomposerlegendwidget.cpp +++ b/src/app/composer/qgscomposerlegendwidget.cpp @@ -47,6 +47,7 @@ QgsComposerLegendWidget::QgsComposerLegendWidget( QgsComposerLegend* legend ) , mLegend( legend ) { setupUi( this ); + setPanelTitle( tr( "Legend properties" ) ); // setup icons mAddToolButton->setIcon( QIcon( QgsApplication::iconPath( "symbologyAdd.svg" ) ) ); diff --git a/src/app/composer/qgscomposermapwidget.cpp b/src/app/composer/qgscomposermapwidget.cpp index 753c5f913ab..7a488083674 100644 --- a/src/app/composer/qgscomposermapwidget.cpp +++ b/src/app/composer/qgscomposermapwidget.cpp @@ -48,6 +48,7 @@ QgsComposerMapWidget::QgsComposerMapWidget( QgsComposerMap* composerMap ) , mComposerMap( composerMap ) { setupUi( this ); + setPanelTitle( tr( "Map properties" ) ); //add widget for general composer item properties QgsComposerItemWidget* itemPropertiesWidget = new QgsComposerItemWidget( this, composerMap ); diff --git a/src/app/composer/qgscomposerpicturewidget.cpp b/src/app/composer/qgscomposerpicturewidget.cpp index b1087196108..9ecffd1e996 100644 --- a/src/app/composer/qgscomposerpicturewidget.cpp +++ b/src/app/composer/qgscomposerpicturewidget.cpp @@ -36,6 +36,7 @@ QgsComposerPictureWidget::QgsComposerPictureWidget( QgsComposerPicture* picture ): QgsComposerItemBaseWidget( nullptr, picture ), mPicture( picture ), mPreviewsLoaded( false ) { setupUi( this ); + setPanelTitle( tr( "Picture properties" ) ); mFillColorButton->setAllowAlpha( true ); mFillColorButton->setColorDialogTitle( tr( "Select fill color" ) ); diff --git a/src/app/composer/qgscomposerpolygonwidget.cpp b/src/app/composer/qgscomposerpolygonwidget.cpp index 8a0832814a8..cf20635f5a5 100644 --- a/src/app/composer/qgscomposerpolygonwidget.cpp +++ b/src/app/composer/qgscomposerpolygonwidget.cpp @@ -26,6 +26,7 @@ QgsComposerPolygonWidget::QgsComposerPolygonWidget( QgsComposerPolygon* composer , mComposerPolygon( composerPolygon ) { setupUi( this ); + setPanelTitle( tr( "Polygon properties" ) ); //add widget for general composer item properties QgsComposerItemWidget* itemPropertiesWidget = new QgsComposerItemWidget( this, composerPolygon ); diff --git a/src/app/composer/qgscomposerpolylinewidget.cpp b/src/app/composer/qgscomposerpolylinewidget.cpp index f16bef6c823..5e0777713ca 100644 --- a/src/app/composer/qgscomposerpolylinewidget.cpp +++ b/src/app/composer/qgscomposerpolylinewidget.cpp @@ -26,6 +26,7 @@ QgsComposerPolylineWidget::QgsComposerPolylineWidget( QgsComposerPolyline* compo , mComposerPolyline( composerPolyline ) { setupUi( this ); + setPanelTitle( tr( "Polyline properties" ) ); //add widget for general composer item properties QgsComposerItemWidget* itemPropertiesWidget = new QgsComposerItemWidget( this, composerPolyline ); diff --git a/src/app/composer/qgscomposerscalebarwidget.cpp b/src/app/composer/qgscomposerscalebarwidget.cpp index 4992ddcbd70..1f3c7e966bd 100644 --- a/src/app/composer/qgscomposerscalebarwidget.cpp +++ b/src/app/composer/qgscomposerscalebarwidget.cpp @@ -27,6 +27,8 @@ QgsComposerScaleBarWidget::QgsComposerScaleBarWidget( QgsComposerScaleBar* scaleBar ): QgsComposerItemBaseWidget( nullptr, scaleBar ), mComposerScaleBar( scaleBar ) { setupUi( this ); + setPanelTitle( tr( "Scalebar properties" ) ); + connectUpdateSignal(); //add widget for general composer item properties diff --git a/src/app/composer/qgscomposershapewidget.cpp b/src/app/composer/qgscomposershapewidget.cpp index fc9770413e4..8e736c2ba46 100644 --- a/src/app/composer/qgscomposershapewidget.cpp +++ b/src/app/composer/qgscomposershapewidget.cpp @@ -27,6 +27,7 @@ QgsComposerShapeWidget::QgsComposerShapeWidget( QgsComposerShape* composerShape ): QgsComposerItemBaseWidget( nullptr, composerShape ), mComposerShape( composerShape ) { setupUi( this ); + setPanelTitle( tr( "Shape properties" ) ); //add widget for general composer item properties QgsComposerItemWidget* itemPropertiesWidget = new QgsComposerItemWidget( this, composerShape ); @@ -109,19 +110,18 @@ void QgsComposerShapeWidget::on_mShapeStyleButton_clicked() QgsFillSymbol* newSymbol = mComposerShape->shapeStyleSymbol()->clone(); QgsExpressionContext context = mComposerShape->createExpressionContext(); - QgsSymbolSelectorDialog d( newSymbol, QgsStyle::defaultStyle(), coverageLayer, this ); + + + + QgsSymbolSelectorWidget* d = new QgsSymbolSelectorWidget( newSymbol, QgsStyle::defaultStyle(), coverageLayer, nullptr ); QgsSymbolWidgetContext symbolContext; symbolContext.setExpressionContext( &context ); - d.setContext( symbolContext ); + d->setContext( symbolContext ); - if ( d.exec() == QDialog::Accepted ) - { - mComposerShape->beginCommand( tr( "Shape style changed" ) ); - mComposerShape->setShapeStyleSymbol( newSymbol ); - updateShapeStyle(); - mComposerShape->endCommand(); - } - delete newSymbol; + connect( d, SIGNAL( widgetChanged() ), this, SLOT( updateSymbolFromWidget() ) ); + connect( d, SIGNAL( panelAccepted( QgsPanelWidget* ) ), this, SLOT( cleanUpSymbolSelector( QgsPanelWidget* ) ) ); + openPanel( d ); + mComposerShape->beginCommand( tr( "Shape style changed" ) ); } void QgsComposerShapeWidget::updateShapeStyle() @@ -182,5 +182,22 @@ void QgsComposerShapeWidget::toggleRadiusSpin( const QString& shapeText ) } } +void QgsComposerShapeWidget::updateSymbolFromWidget() +{ + QgsSymbolSelectorWidget* w = qobject_cast( sender() ); + mComposerShape->setShapeStyleSymbol( dynamic_cast< QgsFillSymbol* >( w->symbol() ) ); +} + +void QgsComposerShapeWidget::cleanUpSymbolSelector( QgsPanelWidget* container ) +{ + QgsSymbolSelectorWidget* w = qobject_cast( container ); + if ( !w ) + return; + + delete w->symbol(); + updateShapeStyle(); + mComposerShape->endCommand(); +} + diff --git a/src/app/composer/qgscomposershapewidget.h b/src/app/composer/qgscomposershapewidget.h index 053af65970c..21b86ea55ba 100644 --- a/src/app/composer/qgscomposershapewidget.h +++ b/src/app/composer/qgscomposershapewidget.h @@ -49,6 +49,8 @@ class QgsComposerShapeWidget: public QgsComposerItemBaseWidget, private Ui::QgsC /** Enables or disables the rounded radius spin box based on shape type*/ void toggleRadiusSpin( const QString& shapeText ); + void updateSymbolFromWidget(); + void cleanUpSymbolSelector( QgsPanelWidget* container ); }; #endif // QGSCOMPOSERSHAPEWIDGET_H From 521cc3becd95ff0951fea3624c9b7259c26094ce Mon Sep 17 00:00:00 2001 From: Nyall Dawson Date: Thu, 6 Oct 2016 19:03:00 +1000 Subject: [PATCH 2/2] [composer] Merge color change undo commands Avoids color modifications spamming the undo stack --- python/core/composer/qgscomposeritemcommand.sip | 17 +++++++++++++++++ .../composer/qgscomposermultiframecommand.sip | 6 +++++- src/app/composer/qgscomposerarrowwidget.cpp | 4 ++-- .../qgscomposerattributetablewidget.cpp | 8 ++++---- src/app/composer/qgscomposeritemwidget.cpp | 4 ++-- src/app/composer/qgscomposerlabelwidget.cpp | 2 +- src/app/composer/qgscomposerlegendwidget.cpp | 4 ++-- src/app/composer/qgscomposermapwidget.cpp | 8 ++++---- src/app/composer/qgscomposerpicturewidget.cpp | 4 ++-- src/app/composer/qgscomposerscalebarwidget.cpp | 8 ++++---- src/core/composer/qgscomposeritemcommand.h | 17 +++++++++++++++++ .../composer/qgscomposermultiframecommand.h | 6 +++++- 12 files changed, 65 insertions(+), 23 deletions(-) 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 );