Handle position and size with units and ratio lock in item properties

This commit is contained in:
Nyall Dawson 2017-10-10 15:20:21 +10:00
parent aebe5a42e6
commit 1c735d59ee
7 changed files with 521 additions and 494 deletions

View File

@ -53,6 +53,7 @@ class QgsLayoutItem : QgsLayoutObject, QGraphicsRectItem, QgsLayoutUndoObjectInt
enum UndoCommand
{
UndoIncrementalMove,
UndoIncrementalResize,
UndoStrokeColor,
UndoStrokeWidth,
UndoBackgroundColor,

View File

@ -84,6 +84,7 @@ class CORE_EXPORT QgsLayoutItem : public QgsLayoutObject, public QGraphicsRectIt
enum UndoCommand
{
UndoIncrementalMove = 1, //!< Layout item incremental movement, e.g. as a result of a keypress
UndoIncrementalResize, //!< Incremental resize
UndoStrokeColor, //!< Stroke color adjustment
UndoStrokeWidth, //!< Stroke width adjustment
UndoBackgroundColor, //!< Background color adjustment

View File

@ -188,6 +188,24 @@ QgsLayoutItemPropertiesWidget::QgsLayoutItemPropertiesWidget( QWidget *parent, Q
{
setupUi( this );
mItemRotationSpinBox->setClearValue( 0 );
mStrokeUnitsComboBox->linkToWidget( mStrokeWidthSpinBox );
mStrokeUnitsComboBox->setConverter( &mItem->layout()->context().measurementConverter() );
mPosUnitsComboBox->linkToWidget( mXPosSpin );
mPosUnitsComboBox->linkToWidget( mYPosSpin );
mSizeUnitsComboBox->linkToWidget( mWidthSpin );
mSizeUnitsComboBox->linkToWidget( mHeightSpin );
mPosUnitsComboBox->setConverter( &mItem->layout()->context().measurementConverter() );
mSizeUnitsComboBox->setConverter( &mItem->layout()->context().measurementConverter() );
mPosLockAspectRatio->setWidthSpinBox( mXPosSpin );
mPosLockAspectRatio->setHeightSpinBox( mYPosSpin );
mSizeLockAspectRatio->setWidthSpinBox( mWidthSpin );
mSizeLockAspectRatio->setHeightSpinBox( mHeightSpin );
connect( mFrameColorButton, &QgsColorButton::colorChanged, this, &QgsLayoutItemPropertiesWidget::mFrameColorButton_colorChanged );
connect( mBackgroundColorButton, &QgsColorButton::colorChanged, this, &QgsLayoutItemPropertiesWidget::mBackgroundColorButton_colorChanged );
connect( mStrokeWidthSpinBox, static_cast < void ( QDoubleSpinBox::* )( double ) > ( &QDoubleSpinBox::valueChanged ), this, &QgsLayoutItemPropertiesWidget::mStrokeWidthSpinBox_valueChanged );
@ -199,36 +217,34 @@ QgsLayoutItemPropertiesWidget::QgsLayoutItemPropertiesWidget( QWidget *parent, Q
connect( mPageSpinBox, static_cast < void ( QSpinBox::* )( int ) > ( &QSpinBox::valueChanged ), this, &QgsLayoutItemPropertiesWidget::mPageSpinBox_valueChanged );
connect( mXPosSpin, static_cast < void ( QDoubleSpinBox::* )( double ) > ( &QDoubleSpinBox::valueChanged ), this, &QgsLayoutItemPropertiesWidget::mXPosSpin_valueChanged );
connect( mYPosSpin, static_cast < void ( QDoubleSpinBox::* )( double ) > ( &QDoubleSpinBox::valueChanged ), this, &QgsLayoutItemPropertiesWidget::mYPosSpin_valueChanged );
connect( mPosUnitsComboBox, &QgsLayoutUnitsComboBox::changed, this, &QgsLayoutItemPropertiesWidget::positionUnitsChanged );
connect( mWidthSpin, static_cast < void ( QDoubleSpinBox::* )( double ) > ( &QDoubleSpinBox::valueChanged ), this, &QgsLayoutItemPropertiesWidget::mWidthSpin_valueChanged );
connect( mHeightSpin, static_cast < void ( QDoubleSpinBox::* )( double ) > ( &QDoubleSpinBox::valueChanged ), this, &QgsLayoutItemPropertiesWidget::mHeightSpin_valueChanged );
connect( mUpperLeftCheckBox, &QCheckBox::stateChanged, this, &QgsLayoutItemPropertiesWidget::mUpperLeftCheckBox_stateChanged );
connect( mUpperMiddleCheckBox, &QCheckBox::stateChanged, this, &QgsLayoutItemPropertiesWidget::mUpperMiddleCheckBox_stateChanged );
connect( mUpperRightCheckBox, &QCheckBox::stateChanged, this, &QgsLayoutItemPropertiesWidget::mUpperRightCheckBox_stateChanged );
connect( mMiddleLeftCheckBox, &QCheckBox::stateChanged, this, &QgsLayoutItemPropertiesWidget::mMiddleLeftCheckBox_stateChanged );
connect( mMiddleCheckBox, &QCheckBox::stateChanged, this, &QgsLayoutItemPropertiesWidget::mMiddleCheckBox_stateChanged );
connect( mMiddleRightCheckBox, &QCheckBox::stateChanged, this, &QgsLayoutItemPropertiesWidget::mMiddleRightCheckBox_stateChanged );
connect( mLowerLeftCheckBox, &QCheckBox::stateChanged, this, &QgsLayoutItemPropertiesWidget::mLowerLeftCheckBox_stateChanged );
connect( mLowerMiddleCheckBox, &QCheckBox::stateChanged, this, &QgsLayoutItemPropertiesWidget::mLowerMiddleCheckBox_stateChanged );
connect( mLowerRightCheckBox, &QCheckBox::stateChanged, this, &QgsLayoutItemPropertiesWidget::mLowerRightCheckBox_stateChanged );
connect( mSizeUnitsComboBox, &QgsLayoutUnitsComboBox::changed, this, &QgsLayoutItemPropertiesWidget::sizeUnitsChanged );
connect( mUpperLeftRadioButton, &QRadioButton::toggled, this, &QgsLayoutItemPropertiesWidget::mUpperLeftCheckBox_stateChanged );
connect( mUpperMiddleRadioButton, &QRadioButton::toggled, this, &QgsLayoutItemPropertiesWidget::mUpperMiddleCheckBox_stateChanged );
connect( mUpperRightRadioButton, &QRadioButton::toggled, this, &QgsLayoutItemPropertiesWidget::mUpperRightCheckBox_stateChanged );
connect( mMiddleLeftRadioButton, &QRadioButton::toggled, this, &QgsLayoutItemPropertiesWidget::mMiddleLeftCheckBox_stateChanged );
connect( mMiddleRadioButton, &QRadioButton::toggled, this, &QgsLayoutItemPropertiesWidget::mMiddleCheckBox_stateChanged );
connect( mMiddleRightRadioButton, &QRadioButton::toggled, this, &QgsLayoutItemPropertiesWidget::mMiddleRightCheckBox_stateChanged );
connect( mLowerLeftRadioButton, &QRadioButton::toggled, this, &QgsLayoutItemPropertiesWidget::mLowerLeftCheckBox_stateChanged );
connect( mLowerMiddleRadioButton, &QRadioButton::toggled, this, &QgsLayoutItemPropertiesWidget::mLowerMiddleCheckBox_stateChanged );
connect( mLowerRightRadioButton, &QRadioButton::toggled, this, &QgsLayoutItemPropertiesWidget::mLowerRightCheckBox_stateChanged );
connect( mBlendModeCombo, static_cast<void ( QComboBox::* )( int )>( &QComboBox::currentIndexChanged ), this, &QgsLayoutItemPropertiesWidget::mBlendModeCombo_currentIndexChanged );
connect( mItemRotationSpinBox, static_cast < void ( QDoubleSpinBox::* )( double ) > ( &QDoubleSpinBox::valueChanged ), this, &QgsLayoutItemPropertiesWidget::mItemRotationSpinBox_valueChanged );
connect( mExcludeFromPrintsCheckBox, &QCheckBox::toggled, this, &QgsLayoutItemPropertiesWidget::mExcludeFromPrintsCheckBox_toggled );
mItemRotationSpinBox->setClearValue( 0 );
mStrokeUnitsComboBox->linkToWidget( mStrokeWidthSpinBox );
mStrokeUnitsComboBox->setConverter( &mItem->layout()->context().measurementConverter() );
//make button exclusive
QButtonGroup *buttonGroup = new QButtonGroup( this );
buttonGroup->addButton( mUpperLeftCheckBox );
buttonGroup->addButton( mUpperMiddleCheckBox );
buttonGroup->addButton( mUpperRightCheckBox );
buttonGroup->addButton( mMiddleLeftCheckBox );
buttonGroup->addButton( mMiddleCheckBox );
buttonGroup->addButton( mMiddleRightCheckBox );
buttonGroup->addButton( mLowerLeftCheckBox );
buttonGroup->addButton( mLowerMiddleCheckBox );
buttonGroup->addButton( mLowerRightCheckBox );
buttonGroup->addButton( mUpperLeftRadioButton );
buttonGroup->addButton( mUpperMiddleRadioButton );
buttonGroup->addButton( mUpperRightRadioButton );
buttonGroup->addButton( mMiddleLeftRadioButton );
buttonGroup->addButton( mMiddleRadioButton );
buttonGroup->addButton( mMiddleRightRadioButton );
buttonGroup->addButton( mLowerLeftRadioButton );
buttonGroup->addButton( mLowerMiddleRadioButton );
buttonGroup->addButton( mLowerRightRadioButton );
buttonGroup->setExclusive( true );
initializeDataDefinedButtons();
@ -237,9 +253,9 @@ QgsLayoutItemPropertiesWidget::QgsLayoutItemPropertiesWidget( QWidget *parent, Q
#if 0 //TODO
connect( mItem->composition(), &QgsComposition::paperSizeChanged, this, &QgsLayoutItemPropertiesWidget::setValuesForGuiPositionElements );
connect( mItem, &QgsComposerItem::sizeChanged, this, &QgsLayoutItemPropertiesWidget::setValuesForGuiPositionElements );
#endif
connect( mItem, &QgsLayoutItem::sizePositionChanged, this, &QgsLayoutItemPropertiesWidget::setValuesForGuiPositionElements );
connect( mItem, &QgsLayoutObject::changed, this, &QgsLayoutItemPropertiesWidget::setValuesForGuiNonPositionElements );
connect( mOpacityWidget, &QgsOpacityWidget::opacityChanged, this, &QgsLayoutItemPropertiesWidget::opacityChanged );
@ -304,17 +320,28 @@ void QgsLayoutItemPropertiesWidget::mBackgroundColorButton_colorChanged( const Q
void QgsLayoutItemPropertiesWidget::changeItemPosition()
{
mItem->layout()->undoStack()->beginCommand( mItem, tr( "Move Item" ) );
mItem->layout()->undoStack()->beginCommand( mItem, tr( "Move Item" ), QgsLayoutItem::UndoIncrementalMove );
double x = mXPosSpin->value();
double y = mYPosSpin->value();
double width = mWidthSpin->value();
double height = mHeightSpin->value();
QgsLayoutPoint point( mXPosSpin->value(), mYPosSpin->value(), mPosUnitsComboBox->unit() );
mItem->attemptMove( point );
mItem->layout()->undoStack()->endCommand();
}
void QgsLayoutItemPropertiesWidget::changeItemReference( QgsLayoutItem::ReferencePoint point )
{
mItem->layout()->undoStack()->beginCommand( mItem, tr( "Change Item Reference" ) );
mItem->setReferencePoint( point );
mItem->layout()->undoStack()->endCommand();
}
void QgsLayoutItemPropertiesWidget::changeItemSize()
{
mItem->layout()->undoStack()->beginCommand( mItem, tr( "Resize Item" ), QgsLayoutItem::UndoIncrementalResize );
QgsLayoutSize size( mWidthSpin->value(), mHeightSpin->value(), mSizeUnitsComboBox->unit() );
mItem->attemptResize( size );
#if 0 //TODO
mItem->setItemPosition( x, y, width, height, positionMode(), false, mPageSpinBox->value() );
#endif
mItem->update();
mItem->layout()->undoStack()->endCommand();
}
@ -327,39 +354,39 @@ void QgsLayoutItemPropertiesWidget::variablesChanged()
QgsLayoutItem::ReferencePoint QgsLayoutItemPropertiesWidget::positionMode() const
{
if ( mUpperLeftCheckBox->checkState() == Qt::Checked )
if ( mUpperLeftRadioButton->isChecked() )
{
return QgsLayoutItem::UpperLeft;
}
else if ( mUpperMiddleCheckBox->checkState() == Qt::Checked )
else if ( mUpperMiddleRadioButton->isChecked() )
{
return QgsLayoutItem::UpperMiddle;
}
else if ( mUpperRightCheckBox->checkState() == Qt::Checked )
else if ( mUpperRightRadioButton->isChecked() )
{
return QgsLayoutItem::UpperRight;
}
else if ( mMiddleLeftCheckBox->checkState() == Qt::Checked )
else if ( mMiddleLeftRadioButton->isChecked() )
{
return QgsLayoutItem::MiddleLeft;
}
else if ( mMiddleCheckBox->checkState() == Qt::Checked )
else if ( mMiddleRadioButton->isChecked() )
{
return QgsLayoutItem::Middle;
}
else if ( mMiddleRightCheckBox->checkState() == Qt::Checked )
else if ( mMiddleRightRadioButton->isChecked() )
{
return QgsLayoutItem::MiddleRight;
}
else if ( mLowerLeftCheckBox->checkState() == Qt::Checked )
else if ( mLowerLeftRadioButton->isChecked() )
{
return QgsLayoutItem::LowerLeft;
}
else if ( mLowerMiddleCheckBox->checkState() == Qt::Checked )
else if ( mLowerMiddleRadioButton->isChecked() )
{
return QgsLayoutItem::LowerMiddle;
}
else if ( mLowerRightCheckBox->checkState() == Qt::Checked )
else if ( mLowerRightRadioButton->isChecked() )
{
return QgsLayoutItem::LowerRight;
}
@ -449,139 +476,111 @@ void QgsLayoutItemPropertiesWidget::setValuesForGuiPositionElements()
return;
}
mXPosSpin->blockSignals( true );
mYPosSpin->blockSignals( true );
mWidthSpin->blockSignals( true );
mHeightSpin->blockSignals( true );
mUpperLeftCheckBox->blockSignals( true );
mUpperMiddleCheckBox->blockSignals( true );
mUpperRightCheckBox->blockSignals( true );
mMiddleLeftCheckBox->blockSignals( true );
mMiddleCheckBox->blockSignals( true );
mMiddleRightCheckBox->blockSignals( true );
mLowerLeftCheckBox->blockSignals( true );
mLowerMiddleCheckBox->blockSignals( true );
mLowerRightCheckBox->blockSignals( true );
mPageSpinBox->blockSignals( true );
auto block = [ = ]( bool blocked )
{
mXPosSpin->blockSignals( blocked );
mYPosSpin->blockSignals( blocked );
mPosUnitsComboBox->blockSignals( blocked );
mWidthSpin->blockSignals( blocked );
mHeightSpin->blockSignals( blocked );
mSizeUnitsComboBox->blockSignals( blocked );
mUpperLeftRadioButton->blockSignals( blocked );
mUpperMiddleRadioButton->blockSignals( blocked );
mUpperRightRadioButton->blockSignals( blocked );
mMiddleLeftRadioButton->blockSignals( blocked );
mMiddleRadioButton->blockSignals( blocked );
mMiddleRightRadioButton->blockSignals( blocked );
mLowerLeftRadioButton->blockSignals( blocked );
mLowerMiddleRadioButton->blockSignals( blocked );
mLowerRightRadioButton->blockSignals( blocked );
mPageSpinBox->blockSignals( blocked );
};
block( true );
QPointF pos; //TODO = mItem->pagePos();
QgsLayoutPoint point = mItem->positionWithUnits();
if ( !mFreezeXPosSpin )
mXPosSpin->setValue( point.x() );
if ( !mFreezeYPosSpin )
mYPosSpin->setValue( point.y() );
mPosUnitsComboBox->setUnit( point.units() );
switch ( mItem->referencePoint() )
{
case QgsLayoutItem::UpperLeft:
{
mUpperLeftCheckBox->setChecked( true );
if ( !mFreezeXPosSpin )
mXPosSpin->setValue( pos.x() );
if ( !mFreezeYPosSpin )
mYPosSpin->setValue( pos.y() );
mUpperLeftRadioButton->setChecked( true );
break;
}
case QgsLayoutItem::UpperMiddle:
{
mUpperMiddleCheckBox->setChecked( true );
if ( !mFreezeXPosSpin )
mXPosSpin->setValue( pos.x() + mItem->rect().width() / 2.0 );
if ( !mFreezeYPosSpin )
mYPosSpin->setValue( pos.y() );
mUpperMiddleRadioButton->setChecked( true );
break;
}
case QgsLayoutItem::UpperRight:
{
mUpperRightCheckBox->setChecked( true );
if ( !mFreezeXPosSpin )
mXPosSpin->setValue( pos.x() + mItem->rect().width() );
if ( !mFreezeYPosSpin )
mYPosSpin->setValue( pos.y() );
mUpperRightRadioButton->setChecked( true );
break;
}
case QgsLayoutItem::MiddleLeft:
{
mMiddleLeftCheckBox->setChecked( true );
if ( !mFreezeXPosSpin )
mXPosSpin->setValue( pos.x() );
if ( !mFreezeYPosSpin )
mYPosSpin->setValue( pos.y() + mItem->rect().height() / 2.0 );
mMiddleLeftRadioButton->setChecked( true );
break;
}
case QgsLayoutItem::Middle:
{
mMiddleCheckBox->setChecked( true );
if ( !mFreezeXPosSpin )
mXPosSpin->setValue( pos.x() + mItem->rect().width() / 2.0 );
if ( !mFreezeYPosSpin )
mYPosSpin->setValue( pos.y() + mItem->rect().height() / 2.0 );
mMiddleRadioButton->setChecked( true );
break;
}
case QgsLayoutItem::MiddleRight:
{
mMiddleRightCheckBox->setChecked( true );
if ( !mFreezeXPosSpin )
mXPosSpin->setValue( pos.x() + mItem->rect().width() );
if ( !mFreezeYPosSpin )
mYPosSpin->setValue( pos.y() + mItem->rect().height() / 2.0 );
mMiddleRightRadioButton->setChecked( true );
break;
}
case QgsLayoutItem::LowerLeft:
{
mLowerLeftCheckBox->setChecked( true );
if ( !mFreezeXPosSpin )
mXPosSpin->setValue( pos.x() );
if ( !mFreezeYPosSpin )
mYPosSpin->setValue( pos.y() + mItem->rect().height() );
mLowerLeftRadioButton->setChecked( true );
break;
}
case QgsLayoutItem::LowerMiddle:
{
mLowerMiddleCheckBox->setChecked( true );
if ( !mFreezeXPosSpin )
mXPosSpin->setValue( pos.x() + mItem->rect().width() / 2.0 );
if ( !mFreezeYPosSpin )
mYPosSpin->setValue( pos.y() + mItem->rect().height() );
mLowerMiddleRadioButton->setChecked( true );
break;
}
case QgsLayoutItem::LowerRight:
{
mLowerRightCheckBox->setChecked( true );
if ( !mFreezeXPosSpin )
mXPosSpin->setValue( pos.x() + mItem->rect().width() );
if ( !mFreezeYPosSpin )
mYPosSpin->setValue( pos.y() + mItem->rect().height() );
mLowerRightRadioButton->setChecked( true );
break;
}
}
QgsLayoutSize size = mItem->sizeWithUnits();
if ( !mFreezeWidthSpin )
mWidthSpin->setValue( mItem->rect().width() );
mWidthSpin->setValue( size.width() );
if ( !mFreezeHeightSpin )
mHeightSpin->setValue( mItem->rect().height() );
mHeightSpin->setValue( size.height() );
mSizeUnitsComboBox->setUnit( size.units() );
mSizeLockAspectRatio->resetRatio();
mPosLockAspectRatio->resetRatio();
#if 0 //TODO
if ( !mFreezePageSpin )
mPageSpinBox->setValue( mItem->page() );
#endif
mXPosSpin->blockSignals( false );
mYPosSpin->blockSignals( false );
mWidthSpin->blockSignals( false );
mHeightSpin->blockSignals( false );
mUpperLeftCheckBox->blockSignals( false );
mUpperMiddleCheckBox->blockSignals( false );
mUpperRightCheckBox->blockSignals( false );
mMiddleLeftCheckBox->blockSignals( false );
mMiddleCheckBox->blockSignals( false );
mMiddleRightCheckBox->blockSignals( false );
mLowerLeftCheckBox->blockSignals( false );
mLowerMiddleCheckBox->blockSignals( false );
mLowerRightCheckBox->blockSignals( false );
mPageSpinBox->blockSignals( false );
block( false );
}
void QgsLayoutItemPropertiesWidget::setValuesForGuiNonPositionElements()
@ -591,18 +590,22 @@ void QgsLayoutItemPropertiesWidget::setValuesForGuiNonPositionElements()
return;
}
mStrokeWidthSpinBox->blockSignals( true );
mStrokeUnitsComboBox->blockSignals( true );
mFrameGroupBox->blockSignals( true );
mBackgroundGroupBox->blockSignals( true );
mItemIdLineEdit->blockSignals( true );
mBlendModeCombo->blockSignals( true );
mOpacityWidget->blockSignals( true );
mFrameColorButton->blockSignals( true );
mFrameJoinStyleCombo->blockSignals( true );
mBackgroundColorButton->blockSignals( true );
mItemRotationSpinBox->blockSignals( true );
mExcludeFromPrintsCheckBox->blockSignals( true );
auto block = [ = ]( bool blocked )
{
mStrokeWidthSpinBox->blockSignals( blocked );
mStrokeUnitsComboBox->blockSignals( blocked );
mFrameGroupBox->blockSignals( blocked );
mBackgroundGroupBox->blockSignals( blocked );
mItemIdLineEdit->blockSignals( blocked );
mBlendModeCombo->blockSignals( blocked );
mOpacityWidget->blockSignals( blocked );
mFrameColorButton->blockSignals( blocked );
mFrameJoinStyleCombo->blockSignals( blocked );
mBackgroundColorButton->blockSignals( blocked );
mItemRotationSpinBox->blockSignals( blocked );
mExcludeFromPrintsCheckBox->blockSignals( blocked );
};
block( true );
mBackgroundColorButton->setColor( mItem->backgroundColor() );
mFrameColorButton->setColor( mItem->frameStrokeColor() );
@ -619,18 +622,7 @@ void QgsLayoutItemPropertiesWidget::setValuesForGuiNonPositionElements()
mExcludeFromPrintsCheckBox->setChecked( mItem->excludeFromExports( QgsComposerObject::OriginalValue ) );
#endif
mBackgroundColorButton->blockSignals( false );
mFrameColorButton->blockSignals( false );
mFrameJoinStyleCombo->blockSignals( false );
mStrokeWidthSpinBox->blockSignals( false );
mStrokeUnitsComboBox->blockSignals( false );
mFrameGroupBox->blockSignals( false );
mBackgroundGroupBox->blockSignals( false );
mItemIdLineEdit->blockSignals( false );
mBlendModeCombo->blockSignals( false );
mOpacityWidget->blockSignals( false );
mItemRotationSpinBox->blockSignals( false );
mExcludeFromPrintsCheckBox->blockSignals( false );
block( false );
}
void QgsLayoutItemPropertiesWidget::initializeDataDefinedButtons()
@ -732,141 +724,126 @@ void QgsLayoutItemPropertiesWidget::mYPosSpin_valueChanged( double )
mFreezeYPosSpin = false;
}
void QgsLayoutItemPropertiesWidget::positionUnitsChanged( QgsUnitTypes::LayoutUnit )
{
changeItemPosition();
}
void QgsLayoutItemPropertiesWidget::mWidthSpin_valueChanged( double )
{
mFreezeWidthSpin = true;
changeItemPosition();
changeItemSize();
mFreezeWidthSpin = false;
}
void QgsLayoutItemPropertiesWidget::mHeightSpin_valueChanged( double )
{
mFreezeHeightSpin = true;
changeItemPosition();
changeItemSize();
mFreezeHeightSpin = false;
}
void QgsLayoutItemPropertiesWidget::mUpperLeftCheckBox_stateChanged( int state )
void QgsLayoutItemPropertiesWidget::sizeUnitsChanged( QgsUnitTypes::LayoutUnit )
{
if ( state != Qt::Checked )
changeItemSize();
}
void QgsLayoutItemPropertiesWidget::mUpperLeftCheckBox_stateChanged( bool state )
{
if ( !state )
return;
if ( mItem )
{
#if 0 // TODO
mItem->setItemPosition( mItem->pos().x(), mItem->pos().y(), QgsComposerItem::UpperLeft );
#endif
changeItemReference( QgsLayoutItem::UpperLeft );
}
setValuesForGuiPositionElements();
}
void QgsLayoutItemPropertiesWidget::mUpperMiddleCheckBox_stateChanged( int state )
void QgsLayoutItemPropertiesWidget::mUpperMiddleCheckBox_stateChanged( bool state )
{
if ( state != Qt::Checked )
if ( !state )
return;
if ( mItem )
{
#if 0 //TODO
mItem->setItemPosition( mItem->pos().x() + mItem->rect().width() / 2.0,
mItem->pos().y(), QgsComposerItem::UpperMiddle );
#endif
changeItemReference( QgsLayoutItem::UpperMiddle );
}
setValuesForGuiPositionElements();
}
void QgsLayoutItemPropertiesWidget::mUpperRightCheckBox_stateChanged( int state )
void QgsLayoutItemPropertiesWidget::mUpperRightCheckBox_stateChanged( bool state )
{
if ( state != Qt::Checked )
if ( !state )
return;
if ( mItem )
{
#if 0 //TODO
mItem->setItemPosition( mItem->pos().x() + mItem->rect().width(),
mItem->pos().y(), QgsComposerItem::UpperRight );
#endif
changeItemReference( QgsLayoutItem::UpperRight );
}
setValuesForGuiPositionElements();
}
void QgsLayoutItemPropertiesWidget::mMiddleLeftCheckBox_stateChanged( int state )
void QgsLayoutItemPropertiesWidget::mMiddleLeftCheckBox_stateChanged( bool state )
{
if ( state != Qt::Checked )
if ( !state )
return;
if ( mItem )
{
#if 0 //TODO
mItem->setItemPosition( mItem->pos().x(),
mItem->pos().y() + mItem->rect().height() / 2.0, QgsComposerItem::MiddleLeft );
#endif
changeItemReference( QgsLayoutItem::MiddleLeft );
}
setValuesForGuiPositionElements();
}
void QgsLayoutItemPropertiesWidget::mMiddleCheckBox_stateChanged( int state )
void QgsLayoutItemPropertiesWidget::mMiddleCheckBox_stateChanged( bool state )
{
if ( state != Qt::Checked )
if ( !state )
return;
if ( mItem )
{
#if 0 //TODO
mItem->setItemPosition( mItem->pos().x() + mItem->rect().width() / 2.0,
mItem->pos().y() + mItem->rect().height() / 2.0, QgsComposerItem::Middle );
#endif
changeItemReference( QgsLayoutItem::Middle );
}
setValuesForGuiPositionElements();
}
void QgsLayoutItemPropertiesWidget::mMiddleRightCheckBox_stateChanged( int state )
void QgsLayoutItemPropertiesWidget::mMiddleRightCheckBox_stateChanged( bool state )
{
if ( state != Qt::Checked )
if ( !state )
return;
if ( mItem )
{
#if 0 //TODO
mItem->setItemPosition( mItem->pos().x() + mItem->rect().width(),
mItem->pos().y() + mItem->rect().height() / 2.0, QgsComposerItem::MiddleRight );
#endif
changeItemReference( QgsLayoutItem::MiddleRight );
}
setValuesForGuiPositionElements();
}
void QgsLayoutItemPropertiesWidget::mLowerLeftCheckBox_stateChanged( int state )
void QgsLayoutItemPropertiesWidget::mLowerLeftCheckBox_stateChanged( bool state )
{
if ( state != Qt::Checked )
if ( !state )
return;
if ( mItem )
{
#if 0 //TODO
mItem->setItemPosition( mItem->pos().x(),
mItem->pos().y() + mItem->rect().height(), QgsComposerItem::LowerLeft );
#endif
changeItemReference( QgsLayoutItem::LowerLeft );
}
setValuesForGuiPositionElements();
}
void QgsLayoutItemPropertiesWidget::mLowerMiddleCheckBox_stateChanged( int state )
void QgsLayoutItemPropertiesWidget::mLowerMiddleCheckBox_stateChanged( bool state )
{
if ( state != Qt::Checked )
if ( !state )
return;
if ( mItem )
{
#if 0 //TODO
mItem->setItemPosition( mItem->pos().x() + mItem->rect().width() / 2.0,
mItem->pos().y() + mItem->rect().height(), QgsComposerItem::LowerMiddle );
#endif
changeItemReference( QgsLayoutItem::LowerMiddle );
}
setValuesForGuiPositionElements();
}
void QgsLayoutItemPropertiesWidget::mLowerRightCheckBox_stateChanged( int state )
void QgsLayoutItemPropertiesWidget::mLowerRightCheckBox_stateChanged( bool state )
{
if ( state != Qt::Checked )
if ( !state )
return;
if ( mItem )
{
#if 0 //TODO
mItem->setItemPosition( mItem->pos().x() + mItem->rect().width(),
mItem->pos().y() + mItem->rect().height(), QgsComposerItem::LowerRight );
#endif
changeItemReference( QgsLayoutItem::LowerRight );
}
setValuesForGuiPositionElements();
}

View File

@ -206,18 +206,20 @@ class GUI_EXPORT QgsLayoutItemPropertiesWidget: public QWidget, private Ui::QgsL
void mPageSpinBox_valueChanged( int );
void mXPosSpin_valueChanged( double );
void mYPosSpin_valueChanged( double );
void positionUnitsChanged( QgsUnitTypes::LayoutUnit unit );
void mWidthSpin_valueChanged( double );
void mHeightSpin_valueChanged( double );
void sizeUnitsChanged( QgsUnitTypes::LayoutUnit unit );
void mUpperLeftCheckBox_stateChanged( int state );
void mUpperMiddleCheckBox_stateChanged( int state );
void mUpperRightCheckBox_stateChanged( int state );
void mMiddleLeftCheckBox_stateChanged( int state );
void mMiddleCheckBox_stateChanged( int state );
void mMiddleRightCheckBox_stateChanged( int state );
void mLowerLeftCheckBox_stateChanged( int state );
void mLowerMiddleCheckBox_stateChanged( int state );
void mLowerRightCheckBox_stateChanged( int state );
void mUpperLeftCheckBox_stateChanged( bool state );
void mUpperMiddleCheckBox_stateChanged( bool state );
void mUpperRightCheckBox_stateChanged( bool state );
void mMiddleLeftCheckBox_stateChanged( bool state );
void mMiddleCheckBox_stateChanged( bool state );
void mMiddleRightCheckBox_stateChanged( bool state );
void mLowerLeftCheckBox_stateChanged( bool state );
void mLowerMiddleCheckBox_stateChanged( bool state );
void mLowerRightCheckBox_stateChanged( bool state );
void mBlendModeCombo_currentIndexChanged( int index );
void opacityChanged( double value );
@ -247,6 +249,8 @@ class GUI_EXPORT QgsLayoutItemPropertiesWidget: public QWidget, private Ui::QgsL
// void changeItemTransparency( int value );
void changeItemPosition();
void changeItemReference( QgsLayoutItem::ReferencePoint point );
void changeItemSize();
};

View File

@ -25,15 +25,15 @@ QgsLayoutItemPropertiesDialog::QgsLayoutItemPropertiesDialog( QWidget *parent, Q
//make button exclusive
QButtonGroup *buttonGroup = new QButtonGroup( this );
buttonGroup->addButton( mUpperLeftCheckBox );
buttonGroup->addButton( mUpperMiddleCheckBox );
buttonGroup->addButton( mUpperRightCheckBox );
buttonGroup->addButton( mMiddleLeftCheckBox );
buttonGroup->addButton( mMiddleCheckBox );
buttonGroup->addButton( mMiddleRightCheckBox );
buttonGroup->addButton( mLowerLeftCheckBox );
buttonGroup->addButton( mLowerMiddleCheckBox );
buttonGroup->addButton( mLowerRightCheckBox );
buttonGroup->addButton( mUpperLeftRadioButton );
buttonGroup->addButton( mUpperMiddleRadioButton );
buttonGroup->addButton( mUpperRightRadioButton );
buttonGroup->addButton( mMiddleLeftRadioButton );
buttonGroup->addButton( mMiddleRadioButton );
buttonGroup->addButton( mMiddleRightRadioButton );
buttonGroup->addButton( mLowerLeftRadioButton );
buttonGroup->addButton( mLowerMiddleRadioButton );
buttonGroup->addButton( mLowerRightRadioButton );
buttonGroup->setExclusive( true );
QgsSettings settings;
@ -77,39 +77,39 @@ QgsLayoutSize QgsLayoutItemPropertiesDialog::itemSize() const
QgsLayoutItem::ReferencePoint QgsLayoutItemPropertiesDialog::referencePoint() const
{
if ( mUpperLeftCheckBox->checkState() == Qt::Checked )
if ( mUpperLeftRadioButton->isChecked() )
{
return QgsLayoutItem::UpperLeft;
}
else if ( mUpperMiddleCheckBox->checkState() == Qt::Checked )
else if ( mUpperMiddleRadioButton->isChecked() )
{
return QgsLayoutItem::UpperMiddle;
}
else if ( mUpperRightCheckBox->checkState() == Qt::Checked )
else if ( mUpperRightRadioButton->isChecked() )
{
return QgsLayoutItem::UpperRight;
}
else if ( mMiddleLeftCheckBox->checkState() == Qt::Checked )
else if ( mMiddleLeftRadioButton->isChecked() )
{
return QgsLayoutItem::MiddleLeft;
}
else if ( mMiddleCheckBox->checkState() == Qt::Checked )
else if ( mMiddleRadioButton->isChecked() )
{
return QgsLayoutItem::Middle;
}
else if ( mMiddleRightCheckBox->checkState() == Qt::Checked )
else if ( mMiddleRightRadioButton->isChecked() )
{
return QgsLayoutItem::MiddleRight;
}
else if ( mLowerLeftCheckBox->checkState() == Qt::Checked )
else if ( mLowerLeftRadioButton->isChecked() )
{
return QgsLayoutItem::LowerLeft;
}
else if ( mLowerMiddleCheckBox->checkState() == Qt::Checked )
else if ( mLowerMiddleRadioButton->isChecked() )
{
return QgsLayoutItem::LowerMiddle;
}
else if ( mLowerRightCheckBox->checkState() == Qt::Checked )
else if ( mLowerRightRadioButton->isChecked() )
{
return QgsLayoutItem::LowerRight;
}
@ -121,39 +121,39 @@ void QgsLayoutItemPropertiesDialog::setReferencePoint( QgsLayoutItem::ReferenceP
switch ( point )
{
case QgsLayoutItem::UpperLeft:
mUpperLeftCheckBox->setChecked( true );
mUpperLeftRadioButton->setChecked( true );
break;
case QgsLayoutItem::UpperMiddle:
mUpperMiddleCheckBox->setChecked( true );
mUpperMiddleRadioButton->setChecked( true );
break;
case QgsLayoutItem::UpperRight:
mUpperRightCheckBox->setChecked( true );
mUpperRightRadioButton->setChecked( true );
break;
case QgsLayoutItem::MiddleLeft:
mMiddleLeftCheckBox->setChecked( true );
mMiddleLeftRadioButton->setChecked( true );
break;
case QgsLayoutItem::Middle:
mMiddleCheckBox->setChecked( true );
mMiddleRadioButton->setChecked( true );
break;
case QgsLayoutItem::MiddleRight:
mMiddleRightCheckBox->setChecked( true );
mMiddleRightRadioButton->setChecked( true );
break;
case QgsLayoutItem::LowerLeft:
mLowerLeftCheckBox->setChecked( true );
mLowerLeftRadioButton->setChecked( true );
break;
case QgsLayoutItem::LowerMiddle:
mLowerMiddleCheckBox->setChecked( true );
mLowerMiddleRadioButton->setChecked( true );
break;
case QgsLayoutItem::LowerRight:
mLowerRightCheckBox->setChecked( true );
mLowerRightRadioButton->setChecked( true );
break;
}
}

View File

@ -6,7 +6,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>548</width>
<width>634</width>
<height>1812</height>
</rect>
</property>
@ -42,25 +42,20 @@
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<layout class="QGridLayout" name="gridLayout_3" columnstretch="0,1,1,1">
<item row="3" column="0">
<widget class="QLabel" name="mWidthLabel">
<property name="text">
<string>Width</string>
<layout class="QGridLayout" name="gridLayout_3" columnstretch="0,0,0,0,0,0">
<item row="4" column="1" colspan="2">
<widget class="QgsDoubleSpinBox" name="mHeightSpin">
<property name="suffix">
<string/>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="mXLabel">
<property name="text">
<string>X</string>
<property name="decimals">
<number>3</number>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="mHeightLabel">
<property name="text">
<string>Height</string>
<property name="maximum">
<double>9999999.000000000000000</double>
</property>
<property name="showClearButton" stdset="0">
<bool>false</bool>
</property>
</widget>
</item>
@ -71,6 +66,23 @@
</property>
</widget>
</item>
<item row="1" column="5" rowspan="2">
<widget class="QgsLayoutUnitsComboBox" name="mPosUnitsComboBox"/>
</item>
<item row="3" column="3">
<widget class="QgsPropertyOverrideButton" name="mWidthDDBtn">
<property name="text">
<string>…</string>
</property>
</widget>
</item>
<item row="2" column="3">
<widget class="QgsPropertyOverrideButton" name="mYPositionDDBtn">
<property name="text">
<string>…</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="mPageLabel">
<property name="text">
@ -85,24 +97,77 @@
</property>
</widget>
</item>
<item row="2" column="3">
<widget class="QgsPropertyOverrideButton" name="mYPositionDDBtn">
<item row="4" column="0">
<widget class="QLabel" name="mHeightLabel">
<property name="text">
<string></string>
<string>Height</string>
</property>
</widget>
</item>
<item row="3" column="3">
<widget class="QgsPropertyOverrideButton" name="mWidthDDBtn">
<property name="text">
<string>…</string>
<item row="1" column="4" rowspan="2">
<layout class="QHBoxLayout" name="_2">
<property name="leftMargin">
<number>2</number>
</property>
<property name="topMargin">
<number>2</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>2</number>
</property>
<item>
<widget class="QgsRatioLockButton" name="mPosLockAspectRatio">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>Lock aspect ratio (including while drawing extent onto canvas)</string>
</property>
<property name="leftMargin" stdset="0">
<number>13</number>
</property>
</widget>
</item>
</layout>
</item>
<item row="1" column="1" colspan="2">
<widget class="QgsDoubleSpinBox" name="mXPosSpin">
<property name="suffix">
<string/>
</property>
<property name="decimals">
<number>3</number>
</property>
<property name="minimum">
<double>-9999999.000000000000000</double>
</property>
<property name="maximum">
<double>9999999.000000000000000</double>
</property>
<property name="showClearButton" stdset="0">
<bool>false</bool>
</property>
</widget>
</item>
<item row="4" column="3">
<widget class="QgsPropertyOverrideButton" name="mHeightDDBtn">
<property name="text">
<string>…</string>
<item row="3" column="1" colspan="2">
<widget class="QgsDoubleSpinBox" name="mWidthSpin">
<property name="suffix">
<string/>
</property>
<property name="decimals">
<number>3</number>
</property>
<property name="maximum">
<double>9999999.000000000000000</double>
</property>
<property name="showClearButton" stdset="0">
<bool>false</bool>
</property>
</widget>
</item>
@ -116,42 +181,31 @@
</property>
</widget>
</item>
<item row="3" column="1" colspan="2">
<widget class="QgsDoubleSpinBox" name="mWidthSpin">
<property name="suffix">
<string> mm</string>
</property>
<property name="decimals">
<number>3</number>
</property>
<property name="maximum">
<double>9999999.000000000000000</double>
</property>
<property name="showClearButton" stdset="0">
<bool>false</bool>
<item row="1" column="0">
<widget class="QLabel" name="mXLabel">
<property name="text">
<string>X</string>
</property>
</widget>
</item>
<item row="4" column="1" colspan="2">
<widget class="QgsDoubleSpinBox" name="mHeightSpin">
<property name="suffix">
<string> mm</string>
<item row="4" column="3">
<widget class="QgsPropertyOverrideButton" name="mHeightDDBtn">
<property name="text">
<string>…</string>
</property>
<property name="decimals">
<number>3</number>
</property>
<property name="maximum">
<double>9999999.000000000000000</double>
</property>
<property name="showClearButton" stdset="0">
<bool>false</bool>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="mWidthLabel">
<property name="text">
<string>Width</string>
</property>
</widget>
</item>
<item row="2" column="1" colspan="2">
<widget class="QgsDoubleSpinBox" name="mYPosSpin">
<property name="suffix">
<string> mm</string>
<string/>
</property>
<property name="decimals">
<number>3</number>
@ -167,24 +221,40 @@
</property>
</widget>
</item>
<item row="1" column="1" colspan="2">
<widget class="QgsDoubleSpinBox" name="mXPosSpin">
<property name="suffix">
<string> mm</string>
<item row="3" column="4" rowspan="2">
<layout class="QHBoxLayout" name="_3">
<property name="leftMargin">
<number>2</number>
</property>
<property name="decimals">
<number>3</number>
<property name="topMargin">
<number>2</number>
</property>
<property name="minimum">
<double>-9999999.000000000000000</double>
<property name="rightMargin">
<number>0</number>
</property>
<property name="maximum">
<double>9999999.000000000000000</double>
<property name="bottomMargin">
<number>2</number>
</property>
<property name="showClearButton" stdset="0">
<bool>false</bool>
</property>
</widget>
<item>
<widget class="QgsRatioLockButton" name="mSizeLockAspectRatio">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>Lock aspect ratio (including while drawing extent onto canvas)</string>
</property>
<property name="leftMargin" stdset="0">
<number>13</number>
</property>
</widget>
</item>
</layout>
</item>
<item row="3" column="5" rowspan="2">
<widget class="QgsLayoutUnitsComboBox" name="mSizeUnitsComboBox"/>
</item>
</layout>
</item>
@ -202,34 +272,21 @@
</item>
<item>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QRadioButton" name="mUpperLeftRadioButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QCheckBox" name="mUpperMiddleCheckBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QCheckBox" name="mMiddleRightCheckBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QCheckBox" name="mMiddleCheckBox">
<widget class="QRadioButton" name="mUpperMiddleRadioButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
@ -242,7 +299,7 @@
</widget>
</item>
<item row="0" column="2">
<widget class="QCheckBox" name="mUpperRightCheckBox">
<widget class="QRadioButton" name="mUpperRightRadioButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
@ -254,8 +311,21 @@
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QCheckBox" name="mLowerMiddleCheckBox">
<item row="1" column="2">
<widget class="QRadioButton" name="mMiddleRightRadioButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QRadioButton" name="mMiddleRadioButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
@ -268,20 +338,7 @@
</widget>
</item>
<item row="2" column="2">
<widget class="QCheckBox" name="mLowerRightCheckBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QCheckBox" name="mUpperLeftCheckBox">
<widget class="QRadioButton" name="mLowerRightRadioButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
@ -294,7 +351,20 @@
</widget>
</item>
<item row="2" column="0">
<widget class="QCheckBox" name="mLowerLeftCheckBox">
<widget class="QRadioButton" name="mLowerLeftRadioButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QRadioButton" name="mLowerMiddleRadioButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
@ -307,7 +377,7 @@
</widget>
</item>
<item row="1" column="0">
<widget class="QCheckBox" name="mMiddleLeftCheckBox">
<widget class="QRadioButton" name="mMiddleLeftRadioButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
@ -424,7 +494,7 @@
<item>
<widget class="QgsColorButton" name="mFrameColorButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
@ -435,30 +505,11 @@
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>120</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QgsPropertyOverrideButton" name="mItemFrameColorDDBtn">
<property name="text">
@ -551,7 +602,7 @@
<item row="0" column="0">
<widget class="QLabel" name="label_4">
<property name="text">
<string>Background color</string>
<string>Color</string>
</property>
</widget>
</item>
@ -560,7 +611,7 @@
<item>
<widget class="QgsColorButton" name="mBackgroundColorButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
@ -571,30 +622,11 @@
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>120</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QgsPropertyOverrideButton" name="mItemBackgroundColorDDBtn">
<property name="text">
@ -810,6 +842,12 @@
<header>qgsopacitywidget.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>QgsRatioLockButton</class>
<extends>QToolButton</extends>
<header>qgsratiolockbutton.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>QgsLayoutUnitsComboBox</class>
<extends>QComboBox</extends>
@ -823,19 +861,23 @@
<tabstop>mXPositionDDBtn</tabstop>
<tabstop>mYPosSpin</tabstop>
<tabstop>mYPositionDDBtn</tabstop>
<tabstop>mPosLockAspectRatio</tabstop>
<tabstop>mPosUnitsComboBox</tabstop>
<tabstop>mWidthSpin</tabstop>
<tabstop>mWidthDDBtn</tabstop>
<tabstop>mHeightSpin</tabstop>
<tabstop>mHeightDDBtn</tabstop>
<tabstop>mUpperLeftCheckBox</tabstop>
<tabstop>mUpperMiddleCheckBox</tabstop>
<tabstop>mUpperRightCheckBox</tabstop>
<tabstop>mMiddleLeftCheckBox</tabstop>
<tabstop>mMiddleCheckBox</tabstop>
<tabstop>mMiddleRightCheckBox</tabstop>
<tabstop>mLowerLeftCheckBox</tabstop>
<tabstop>mLowerMiddleCheckBox</tabstop>
<tabstop>mLowerRightCheckBox</tabstop>
<tabstop>mSizeLockAspectRatio</tabstop>
<tabstop>mSizeUnitsComboBox</tabstop>
<tabstop>mUpperLeftRadioButton</tabstop>
<tabstop>mUpperMiddleRadioButton</tabstop>
<tabstop>mUpperRightRadioButton</tabstop>
<tabstop>mMiddleLeftRadioButton</tabstop>
<tabstop>mMiddleRadioButton</tabstop>
<tabstop>mMiddleRightRadioButton</tabstop>
<tabstop>mLowerLeftRadioButton</tabstop>
<tabstop>mLowerMiddleRadioButton</tabstop>
<tabstop>mLowerRightRadioButton</tabstop>
<tabstop>mTransformsGroupBox</tabstop>
<tabstop>mItemRotationSpinBox</tabstop>
<tabstop>mItemRotationDDBtn</tabstop>
@ -843,6 +885,7 @@
<tabstop>mFrameColorButton</tabstop>
<tabstop>mItemFrameColorDDBtn</tabstop>
<tabstop>mStrokeWidthSpinBox</tabstop>
<tabstop>mStrokeUnitsComboBox</tabstop>
<tabstop>mFrameJoinStyleCombo</tabstop>
<tabstop>mBackgroundGroupBox</tabstop>
<tabstop>mBackgroundColorButton</tabstop>
@ -852,6 +895,7 @@
<tabstop>groupRendering</tabstop>
<tabstop>mBlendModeCombo</tabstop>
<tabstop>mBlendModeDDBtn</tabstop>
<tabstop>mOpacityWidget</tabstop>
<tabstop>mOpacityDDBtn</tabstop>
<tabstop>mExcludeFromPrintsCheckBox</tabstop>
<tabstop>mExcludePrintsDDBtn</tabstop>

View File

@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>468</width>
<height>263</height>
<width>848</width>
<height>439</height>
</rect>
</property>
<property name="windowTitle">
@ -35,86 +35,8 @@
</item>
<item row="1" column="1">
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="1">
<widget class="QCheckBox" name="mUpperMiddleCheckBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QCheckBox" name="mMiddleRightCheckBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QCheckBox" name="mMiddleCheckBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QCheckBox" name="mUpperRightCheckBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QCheckBox" name="mLowerMiddleCheckBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="2" column="2">
<widget class="QCheckBox" name="mLowerRightCheckBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QCheckBox" name="mUpperLeftCheckBox">
<widget class="QRadioButton" name="mUpperLeftRadioButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
@ -129,8 +51,21 @@
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QCheckBox" name="mLowerLeftCheckBox">
<item row="0" column="1">
<widget class="QRadioButton" name="mUpperMiddleRadioButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QRadioButton" name="mUpperRightRadioButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
@ -143,7 +78,72 @@
</widget>
</item>
<item row="1" column="0">
<widget class="QCheckBox" name="mMiddleLeftCheckBox">
<widget class="QRadioButton" name="mMiddleLeftRadioButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QRadioButton" name="mMiddleRadioButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QRadioButton" name="mMiddleRightRadioButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="2" column="2">
<widget class="QRadioButton" name="mLowerRightRadioButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QRadioButton" name="mLowerMiddleRadioButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QRadioButton" name="mLowerLeftRadioButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
@ -380,17 +380,17 @@
</layout>
</widget>
<customwidgets>
<customwidget>
<class>QgsDoubleSpinBox</class>
<extends>QDoubleSpinBox</extends>
<header>qgsdoublespinbox.h</header>
</customwidget>
<customwidget>
<class>QgsRatioLockButton</class>
<extends>QToolButton</extends>
<header>qgsratiolockbutton.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>QgsDoubleSpinBox</class>
<extends>QDoubleSpinBox</extends>
<header>qgsdoublespinbox.h</header>
</customwidget>
<customwidget>
<class>QgsLayoutUnitsComboBox</class>
<extends>QComboBox</extends>
@ -405,15 +405,15 @@
<tabstop>mHeightSpin</tabstop>
<tabstop>mLockAspectRatio</tabstop>
<tabstop>mSizeUnitsComboBox</tabstop>
<tabstop>mUpperLeftCheckBox</tabstop>
<tabstop>mUpperMiddleCheckBox</tabstop>
<tabstop>mUpperRightCheckBox</tabstop>
<tabstop>mMiddleLeftCheckBox</tabstop>
<tabstop>mMiddleCheckBox</tabstop>
<tabstop>mMiddleRightCheckBox</tabstop>
<tabstop>mLowerLeftCheckBox</tabstop>
<tabstop>mLowerMiddleCheckBox</tabstop>
<tabstop>mLowerRightCheckBox</tabstop>
<tabstop>mUpperLeftRadioButton</tabstop>
<tabstop>mUpperMiddleRadioButton</tabstop>
<tabstop>mUpperRightRadioButton</tabstop>
<tabstop>mMiddleLeftRadioButton</tabstop>
<tabstop>mMiddleRadioButton</tabstop>
<tabstop>mMiddleRightRadioButton</tabstop>
<tabstop>mLowerLeftRadioButton</tabstop>
<tabstop>mLowerMiddleRadioButton</tabstop>
<tabstop>mLowerRightRadioButton</tabstop>
</tabstops>
<resources/>
<connections>