Skip to content

Commit

Permalink
Fix #7973 Move print as raster and resolution spin box to "paper and …
Browse files Browse the repository at this point in the history
…quality" group box, don't disable resolution spin box when print as raster is unchecked.
  • Loading branch information
nyalldawson committed Jun 6, 2013
1 parent 46fedf9 commit 9a7776a
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 42 deletions.
12 changes: 6 additions & 6 deletions src/app/composer/qgscompositionwidget.cpp
Expand Up @@ -47,7 +47,7 @@ QgsCompositionWidget::QgsCompositionWidget( QWidget* parent, QgsComposition* c )
mResolutionSpinBox->setValue( mComposition->printResolution() );

//print as raster
mPrintAsRasterGroupCheckBox->setChecked( mComposition->printAsRaster() );
mPrintAsRasterCheckBox->setChecked( mComposition->printAsRaster() );

mAlignmentSnapGroupCheckBox->setChecked( mComposition->alignmentSnap() );
mAlignmentToleranceSpinBox->setValue( mComposition->alignmentSnapTolerance() );
Expand Down Expand Up @@ -379,9 +379,9 @@ void QgsCompositionWidget::displayCompositionWidthHeight()

void QgsCompositionWidget::setPrintAsRasterCheckBox( bool state )
{
mPrintAsRasterGroupCheckBox->blockSignals( true );
mPrintAsRasterGroupCheckBox->setChecked( state );
mPrintAsRasterGroupCheckBox->blockSignals( false );
mPrintAsRasterCheckBox->blockSignals( true );
mPrintAsRasterCheckBox->setChecked( state );
mPrintAsRasterCheckBox->blockSignals( false );
}

void QgsCompositionWidget::displaySnapingSettings()
Expand All @@ -402,7 +402,7 @@ void QgsCompositionWidget::on_mResolutionSpinBox_valueChanged( const int value )
mComposition->setPrintResolution( value );
}

void QgsCompositionWidget::on_mPrintAsRasterGroupCheckBox_toggled( bool state )
void QgsCompositionWidget::on_mPrintAsRasterCheckBox_toggled( bool state )
{
if ( !mComposition )
{
Expand Down Expand Up @@ -518,7 +518,7 @@ void QgsCompositionWidget::blockSignals( bool block )
mNumPagesSpinBox->blockSignals( block );
mPaperOrientationComboBox->blockSignals( block );
mResolutionSpinBox->blockSignals( block );
mPrintAsRasterGroupCheckBox->blockSignals( block );
mPrintAsRasterCheckBox->blockSignals( block );
mSnapToGridGroupCheckBox->blockSignals( block );
mGridResolutionSpinBox->blockSignals( block );
mOffsetXSpinBox->blockSignals( block );
Expand Down
2 changes: 1 addition & 1 deletion src/app/composer/qgscompositionwidget.h
Expand Up @@ -47,7 +47,7 @@ class QgsCompositionWidget: public QWidget, private Ui::QgsCompositionWidgetBase
void on_mPaperHeightDoubleSpinBox_editingFinished();
void on_mNumPagesSpinBox_valueChanged( int value );
void on_mResolutionSpinBox_valueChanged( const int value );
void on_mPrintAsRasterGroupCheckBox_toggled( bool state );
void on_mPrintAsRasterCheckBox_toggled( bool state );

void on_mSnapToGridGroupCheckBox_toggled( bool state );
void on_mGridResolutionSpinBox_valueChanged( double d );
Expand Down
56 changes: 21 additions & 35 deletions src/ui/qgscompositionwidgetbase.ui
Expand Up @@ -223,41 +223,7 @@
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QgsCollapsibleGroupBoxBasic" name="mPrintAsRasterGroupCheckBox">
<property name="title">
<string>Print as raster</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="checked">
<bool>false</bool>
</property>
<property name="syncGroup" stdset="0">
<string notr="true">composeritem</string>
</property>
<property name="collapsed" stdset="0">
<bool>false</bool>
</property>
<layout class="QFormLayout" name="formLayout_4">
<property name="fieldGrowthPolicy">
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
</property>
<property name="labelAlignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
</property>
<item row="0" column="0">
<widget class="QLabel" name="label_9">
<property name="text">
<string>Resolution</string>
</property>
</widget>
</item>
<item row="0" column="1">
<item row="6" column="1">
<widget class="QSpinBox" name="mResolutionSpinBox">
<property name="suffix">
<string> dpi</string>
Expand All @@ -270,6 +236,26 @@
</property>
</widget>
</item>
<item row="6" column="0">
<widget class="QLabel" name="label_9">
<property name="text">
<string>Export resolution</string>
</property>
</widget>
</item>
<item row="7" column="0" colspan="2">
<widget class="QCheckBox" name="mPrintAsRasterCheckBox">
<property name="text">
<string>Print as raster</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="checked">
<bool>false</bool>
</property>
</widget>
</item>
</layout>
</widget>
</item>
Expand Down

0 comments on commit 9a7776a

Please sign in to comment.