Skip to content

Commit b4d082f

Browse files
committedJan 12, 2013
[composer] Add method for hiding background and frame groups from item properties
1 parent 860e23a commit b4d082f

File tree

3 files changed

+19
-0
lines changed

3 files changed

+19
-0
lines changed
 

‎src/app/composer/qgscomposeritemwidget.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,16 @@ QgsComposerItemWidget::~QgsComposerItemWidget()
6262

6363
}
6464

65+
void QgsComposerItemWidget::showBackgroundGroup( bool showGroup )
66+
{
67+
mBackgroundGroupBox->setVisible( showGroup );
68+
}
69+
70+
void QgsComposerItemWidget::showFrameGroup( bool showGroup )
71+
{
72+
mFrameGroupBox->setVisible( showGroup );
73+
}
74+
6575
//slots
6676
void QgsComposerItemWidget::on_mFrameColorButton_clicked()
6777
{

‎src/app/composer/qgscomposeritemwidget.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ class QgsComposerItemWidget: public QWidget, private Ui::QgsComposerItemWidgetBa
3535
/**A combination of upper/middle/lower and left/middle/right*/
3636
QgsComposerItem::ItemPositionMode positionMode() const;
3737

38+
/**Toggles display of the background group*/
39+
void showBackgroundGroup( bool showGroup );
40+
/**Toggles display of the frame group*/
41+
void showFrameGroup( bool showGroup );
3842

3943
public slots:
4044
void on_mFrameColorButton_clicked();

‎src/app/composer/qgscomposershapewidget.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ QgsComposerShapeWidget::QgsComposerShapeWidget( QgsComposerShape* composerShape
3030

3131
//add widget for general composer item properties
3232
QgsComposerItemWidget* itemPropertiesWidget = new QgsComposerItemWidget( this, composerShape );
33+
34+
//shapes don't use background or frame, since the symbol style is set through a QgsSymbolV2SelectorDialog
35+
itemPropertiesWidget->showBackgroundGroup( false );
36+
itemPropertiesWidget->showFrameGroup( false );
37+
3338
mainLayout->addWidget( itemPropertiesWidget );
3439

3540
blockAllSignals( true );

0 commit comments

Comments
 (0)