Skip to content
Permalink
Browse files
[composer] Add method for hiding background and frame groups from ite…
…m properties
  • Loading branch information
nyalldawson committed Jan 12, 2013
1 parent 860e23a commit b4d082f97d82140c55a9b0afee5db06227b9c6b3
Showing with 19 additions and 0 deletions.
  1. +10 −0 src/app/composer/qgscomposeritemwidget.cpp
  2. +4 −0 src/app/composer/qgscomposeritemwidget.h
  3. +5 −0 src/app/composer/qgscomposershapewidget.cpp
@@ -62,6 +62,16 @@ QgsComposerItemWidget::~QgsComposerItemWidget()

}

void QgsComposerItemWidget::showBackgroundGroup( bool showGroup )
{
mBackgroundGroupBox->setVisible( showGroup );
}

void QgsComposerItemWidget::showFrameGroup( bool showGroup )
{
mFrameGroupBox->setVisible( showGroup );
}

//slots
void QgsComposerItemWidget::on_mFrameColorButton_clicked()
{
@@ -35,6 +35,10 @@ class QgsComposerItemWidget: public QWidget, private Ui::QgsComposerItemWidgetBa
/**A combination of upper/middle/lower and left/middle/right*/
QgsComposerItem::ItemPositionMode positionMode() const;

/**Toggles display of the background group*/
void showBackgroundGroup( bool showGroup );
/**Toggles display of the frame group*/
void showFrameGroup( bool showGroup );

public slots:
void on_mFrameColorButton_clicked();
@@ -30,6 +30,11 @@ QgsComposerShapeWidget::QgsComposerShapeWidget( QgsComposerShape* composerShape

//add widget for general composer item properties
QgsComposerItemWidget* itemPropertiesWidget = new QgsComposerItemWidget( this, composerShape );

//shapes don't use background or frame, since the symbol style is set through a QgsSymbolV2SelectorDialog
itemPropertiesWidget->showBackgroundGroup( false );
itemPropertiesWidget->showFrameGroup( false );

mainLayout->addWidget( itemPropertiesWidget );

blockAllSignals( true );

0 comments on commit b4d082f

Please sign in to comment.