void QgsCompositionWidget::on_mPaperUnitsComboBox_currentIndexChanged( const QString& text ) { Q_UNUSED( text ); double width = size( mPaperWidthDoubleSpinBox ); double height = size( mPaperHeightDoubleSpinBox ); if ( mPaperUnitsComboBox->currentIndex() == 0 ) { // mm, value was inch width *= 25.4; height *= 25.4; } else { // inch, values was mm, width /= 25.4; height /= 25.4; } setSize( mPaperWidthDoubleSpinBox, width ); setSize( mPaperHeightDoubleSpinBox, height ); if ( mPaperSizeComboBox->currentText() == tr( "Custom" ) ) { adjustOrientation(); applyWidthHeight(); } else { adjustOrientation(); applyCurrentPaperSettings(); } }
void QgsCompositionWidget::on_mPaperOrientationComboBox_currentIndexChanged( const QString& text ) { if ( mPaperSizeComboBox->currentText() == tr( "Custom" ) ) { adjustOrientation(); applyWidthHeight(); } else { adjustOrientation(); applyCurrentPaperSettings(); } }
void QgsCompositionWidget::on_mPaperSizeComboBox_currentIndexChanged( const QString& text ) { if ( mPaperSizeComboBox->currentText() == tr( "Custom" ) ) { mPaperWidthDoubleSpinBox->setEnabled( true ); mPaperHeightDoubleSpinBox->setEnabled( true ); mPaperUnitsComboBox->setEnabled( true ); } else { mPaperWidthDoubleSpinBox->setEnabled( false ); mPaperHeightDoubleSpinBox->setEnabled( false ); mPaperUnitsComboBox->setEnabled( false ); } applyCurrentPaperSettings(); }