Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[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 b4d082f
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/app/composer/qgscomposeritemwidget.cpp
Expand Up @@ -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()
{
Expand Down
4 changes: 4 additions & 0 deletions src/app/composer/qgscomposeritemwidget.h
Expand Up @@ -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();
Expand Down
5 changes: 5 additions & 0 deletions src/app/composer/qgscomposershapewidget.cpp
Expand Up @@ -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 );
Expand Down

0 comments on commit b4d082f

Please sign in to comment.