Skip to content
Permalink
Browse files

multicolumn composer legend

  • Loading branch information
blazek committed Nov 13, 2012
1 parent d8d9766 commit 1b437d3cde29bad48428ef9f48ec9c21312a67aa
@@ -87,6 +87,7 @@ void QgsComposerLegendWidget::setGuiElements()

blockAllSignals( true );
mTitleLineEdit->setText( mLegend->title() );
mColumnCountSpinBox->setValue( mLegend->columnCount() );
mSymbolWidthSpinBox->setValue( mLegend->symbolWidth() );
mSymbolHeightSpinBox->setValue( mLegend->symbolHeight() );
mGroupSpaceSpinBox->setValue( mLegend->groupSpace() );
@@ -109,7 +110,6 @@ void QgsComposerLegendWidget::setGuiElements()
{
mMapComboBox->setCurrentIndex( mMapComboBox->findData( -1 ) );
}

blockAllSignals( false );
}

@@ -137,6 +137,18 @@ void QgsComposerLegendWidget::on_mTitleLineEdit_textChanged( const QString& text
}
}

void QgsComposerLegendWidget::on_mColumnCountSpinBox_valueChanged( int c )
{
if ( mLegend )
{
mLegend->beginCommand( tr( "Legend column count" ), QgsComposerMergeCommand::LegendColumnCount );
mLegend->setColumnCount( c );
mLegend->adjustBoxSize();
mLegend->update();
mLegend->endCommand();
}
}

void QgsComposerLegendWidget::on_mSymbolWidthSpinBox_valueChanged( double d )
{
if ( mLegend )
@@ -718,6 +730,7 @@ void QgsComposerLegendWidget::blockAllSignals( bool b )
mItemTreeView->blockSignals( b );
mCheckBoxAutoUpdate->blockSignals( b );
mMapComboBox->blockSignals( b );
mColumnCountSpinBox->blockSignals( b );
mSymbolWidthSpinBox->blockSignals( b );
mSymbolHeightSpinBox->blockSignals( b );
mGroupSpaceSpinBox->blockSignals( b );
@@ -41,6 +41,7 @@ class QgsComposerLegendWidget: public QWidget, private Ui::QgsComposerLegendWidg

void on_mWrapCharLineEdit_textChanged( const QString& text );
void on_mTitleLineEdit_textChanged( const QString& text );
void on_mColumnCountSpinBox_valueChanged( int c );
void on_mSymbolWidthSpinBox_valueChanged( double d );
void on_mSymbolHeightSpinBox_valueChanged( double d );
void on_mGroupSpaceSpinBox_valueChanged( double d );
@@ -80,6 +80,7 @@ class CORE_EXPORT QgsComposerMergeCommand: public QgsComposerItemCommand
ComposerMapAnnotationDistance,
//composer legend
ComposerLegendText,
LegendColumnCount,
LegendSymbolWidth,
LegendSymbolHeight,
LegendGroupSpace,

0 comments on commit 1b437d3

Please sign in to comment.
You can’t perform that action at this time.