Update of composer item's GUI

This commit is contained in:
olivierdalang 2013-02-12 12:30:54 +01:00 committed by Larry Shaffer
parent a645f43f67
commit 2d4220bba9
39 changed files with 3234 additions and 3280 deletions

View File

@ -189,6 +189,11 @@ class QgsComposerItem: QObject, QGraphicsRectItem
@note: this method was added in version 1.6*/
void setItemPosition( double x, double y, double width, double height, ItemPositionMode itemPoint = UpperLeft );
/**Returns item's last used position mode.
@note: This property has no effect on actual's item position, which is always the top-left corner.
@note: this method was added in version 2.0*/
ItemPositionMode lastUsedPositionMode();
/**Sets this items bound in scene coordinates such that 1 item size units
corresponds to 1 scene size unit*/
virtual void setSceneRect( const QRectF& rectangle );

View File

@ -36,16 +36,8 @@ class QgsComposerShape: QgsComposerItem
bool readXML( const QDomElement& itemElem, const QDomDocument& doc );
//setters and getters
void setLineWidth( double width );
double lineWidth() const;
void setOutlineColor( const QColor& color );
QColor outlineColor() const;
void setFillColor( const QColor& color );
QColor fillColor() const;
QgsComposerShape::Shape shapeType() const;
void setShapeType( QgsComposerShape::Shape s );
bool transparentFill() const;
void setTransparentFill( bool transparent );
/**Sets this items bound in scene coordinates such that 1 item size units
corresponds to 1 scene size unit. Also, the shape is scaled*/

View File

@ -133,7 +133,6 @@ SET(QGIS_APP_SRCS
composer/qgscomposerlegendwidget.cpp
composer/qgscompositionwidget.cpp
composer/qgsatlascompositionwidget.cpp
composer/qgsitempositiondialog.cpp
legend/qgslegendgroup.cpp
legend/qgslegend.cpp
@ -281,7 +280,6 @@ SET (QGIS_APP_MOC_HDRS
composer/qgscomposershapewidget.h
composer/qgscompositionwidget.h
composer/qgsatlascompositionwidget.h
composer/qgsitempositiondialog.h
legend/qgslegend.h
legend/qgsapplegendinterface.h

View File

@ -36,7 +36,7 @@ QgsComposerArrowWidget::QgsComposerArrowWidget( QgsComposerArrow* arrow ): QWidg
//add widget for general composer item properties
QgsComposerItemWidget* itemPropertiesWidget = new QgsComposerItemWidget( this, mArrow );
toolBox->addItem( itemPropertiesWidget, tr( "General options" ) );
mainLayout->addWidget( itemPropertiesWidget );
setGuiElementValues();

View File

@ -42,7 +42,7 @@ QgsComposerHtmlWidget::QgsComposerHtmlWidget( QgsComposerHtml* html, QgsComposer
{
//add widget for general composer item properties
QgsComposerItemWidget* itemPropertiesWidget = new QgsComposerItemWidget( this, mFrame );
mToolBox->addItem( itemPropertiesWidget, tr( "General options" ) );
mainLayout->addWidget( itemPropertiesWidget );
}
}

View File

@ -18,14 +18,35 @@
#include "qgscomposeritemwidget.h"
#include "qgscomposeritem.h"
#include "qgscomposermap.h"
#include "qgsitempositiondialog.h"
#include "qgspoint.h"
#include <QColorDialog>
QgsComposerItemWidget::QgsComposerItemWidget( QWidget* parent, QgsComposerItem* item ): QWidget( parent ), mItem( item )
{
setupUi( this );
//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->setExclusive( true );
mXLineEdit->setValidator( new QDoubleValidator( 0 ) );
mYLineEdit->setValidator( new QDoubleValidator( 0 ) );
mWidthLineEdit->setValidator( new QDoubleValidator( 0 ) );
mHeightLineEdit->setValidator( new QDoubleValidator( 0 ) );
setValuesForGuiElements();
connect( mItem, SIGNAL( sizeChanged() ), this, SLOT( setValuesForGuiPositionElements() ) );
}
QgsComposerItemWidget::QgsComposerItemWidget(): QWidget( 0 ), mItem( 0 )
@ -126,6 +147,70 @@ void QgsComposerItemWidget::changeItemOpacity( int value )
mItem->endCommand();
}
void QgsComposerItemWidget::changeItemPosition()
{
mItem->beginCommand( tr( "Item position changed" ) );
bool convXSuccess, convYSuccess;
double x = mXLineEdit->text().toDouble( &convXSuccess );
double y = mYLineEdit->text().toDouble( &convYSuccess );
bool convSuccessWidth, convSuccessHeight;
double width = mWidthLineEdit->text().toDouble( &convSuccessWidth );
double height = mHeightLineEdit->text().toDouble( &convSuccessHeight );
if ( !convXSuccess || !convYSuccess || !convSuccessWidth || !convSuccessHeight )
{
return;
}
mItem->setItemPosition( x, y, width, height, positionMode() );
mItem->update();
mItem->endCommand();
}
QgsComposerItem::ItemPositionMode QgsComposerItemWidget::positionMode() const
{
if ( mUpperLeftCheckBox->checkState() == Qt::Checked )
{
return QgsComposerItem::UpperLeft;
}
else if ( mUpperMiddleCheckBox->checkState() == Qt::Checked )
{
return QgsComposerItem::UpperMiddle;
}
else if ( mUpperRightCheckBox->checkState() == Qt::Checked )
{
return QgsComposerItem::UpperRight;
}
else if ( mMiddleLeftCheckBox->checkState() == Qt::Checked )
{
return QgsComposerItem::MiddleLeft;
}
else if ( mMiddleCheckBox->checkState() == Qt::Checked )
{
return QgsComposerItem::Middle;
}
else if ( mMiddleRightCheckBox->checkState() == Qt::Checked )
{
return QgsComposerItem::MiddleRight;
}
else if ( mLowerLeftCheckBox->checkState() == Qt::Checked )
{
return QgsComposerItem::LowerLeft;
}
else if ( mLowerMiddleCheckBox->checkState() == Qt::Checked )
{
return QgsComposerItem::LowerMiddle;
}
else if ( mLowerRightCheckBox->checkState() == Qt::Checked )
{
return QgsComposerItem::LowerRight;
}
return QgsComposerItem::UpperLeft;
}
void QgsComposerItemWidget::on_mOutlineWidthSpinBox_valueChanged( double d )
{
if ( !mItem )
@ -166,6 +251,93 @@ void QgsComposerItemWidget::on_mBackgroundGroupBox_toggled( bool state )
mItem->endCommand();
}
void QgsComposerItemWidget::setValuesForGuiPositionElements()
{
if ( !mItem )
{
return;
}
mXLineEdit->blockSignals( true );
mYLineEdit->blockSignals( true );
mWidthLineEdit->blockSignals( true );
mHeightLineEdit->blockSignals( true );
if( mItem->lastUsedPositionMode() == QgsComposerItem::UpperLeft )
{
mUpperLeftCheckBox->setChecked( true );
mXLineEdit->setText( QString::number( mItem->transform().dx() ) );
mYLineEdit->setText( QString::number( mItem->transform().dy() ) );
}
if( mItem->lastUsedPositionMode() == QgsComposerItem::UpperMiddle )
{
mUpperMiddleCheckBox->setChecked( true );
mXLineEdit->setText( QString::number( mItem->transform().dx() + mItem->rect().width() / 2.0 ) );
mYLineEdit->setText( QString::number( mItem->transform().dy() ) );
}
if( mItem->lastUsedPositionMode() == QgsComposerItem::UpperRight )
{
mUpperRightCheckBox->setChecked( true );
mXLineEdit->setText( QString::number( mItem->transform().dx() + mItem->rect().width() ) );
mYLineEdit->setText( QString::number( mItem->transform().dy() ) );
}
if( mItem->lastUsedPositionMode() == QgsComposerItem::MiddleLeft )
{
mMiddleLeftCheckBox->setChecked( true );
mXLineEdit->setText( QString::number( mItem->transform().dx() ) );
mYLineEdit->setText( QString::number( mItem->transform().dy() + mItem->rect().height() / 2.0 ) );
}
if( mItem->lastUsedPositionMode() == QgsComposerItem::Middle )
{
mMiddleCheckBox->setChecked( true );
mXLineEdit->setText( QString::number( mItem->transform().dx() + mItem->rect().width() / 2.0 ) );
mYLineEdit->setText( QString::number( mItem->transform().dy() + mItem->rect().height() / 2.0 ) );
}
if( mItem->lastUsedPositionMode() == QgsComposerItem::MiddleRight )
{
mMiddleRightCheckBox->setChecked( true );
mXLineEdit->setText( QString::number( mItem->transform().dx() + mItem->rect().width() ) );
mYLineEdit->setText( QString::number( mItem->transform().dy() + mItem->rect().height() / 2.0 ) );
}
if( mItem->lastUsedPositionMode() == QgsComposerItem::LowerLeft )
{
mLowerLeftCheckBox->setChecked( true );
mXLineEdit->setText( QString::number( mItem->transform().dx() ) );
mYLineEdit->setText( QString::number( mItem->transform().dy() + mItem->rect().height() ) );
}
if( mItem->lastUsedPositionMode() == QgsComposerItem::LowerMiddle )
{
mLowerMiddleCheckBox->setChecked( true );
mXLineEdit->setText( QString::number( mItem->transform().dx() + mItem->rect().width() / 2.0 ) );
mYLineEdit->setText( QString::number( mItem->transform().dy() + mItem->rect().height() ) );
}
if( mItem->lastUsedPositionMode() == QgsComposerItem::LowerRight )
{
mLowerRightCheckBox->setChecked( true );
mXLineEdit->setText( QString::number( mItem->transform().dx() + mItem->rect().width() ) );
mYLineEdit->setText( QString::number( mItem->transform().dy() + mItem->rect().height() ) );
}
mWidthLineEdit->setText( QString::number( mItem->rect().width() ) );
mHeightLineEdit->setText( QString::number( mItem->rect().height() ) );
mXLineEdit->blockSignals( false );
mYLineEdit->blockSignals( false );
mWidthLineEdit->blockSignals( false );
mHeightLineEdit->blockSignals( false );
}
void QgsComposerItemWidget::setValuesForGuiElements()
{
if ( !mItem )
@ -173,6 +345,8 @@ void QgsComposerItemWidget::setValuesForGuiElements()
return;
}
setValuesForGuiPositionElements();
mOpacitySlider->blockSignals( true );
mOutlineWidthSpinBox->blockSignals( true );
mFrameGroupBox->blockSignals( true );
@ -195,25 +369,6 @@ void QgsComposerItemWidget::setValuesForGuiElements()
mOpacitySpinBox->blockSignals( false );
}
void QgsComposerItemWidget::on_mPositionButton_clicked()
{
if ( !mItem )
{
return;
}
mItem->beginCommand( tr( "Item position changed" ) );
QgsItemPositionDialog d( mItem, 0 );
if ( d.exec() == QDialog::Accepted )
{
mItem->endCommand();
}
else
{
mItem->cancelCommand();
}
}
void QgsComposerItemWidget::on_mItemIdLineEdit_textChanged( const QString &text )
{
if ( mItem )

View File

@ -19,6 +19,7 @@
#define QGSCOMPOSERITEMWIDGET_H
#include "ui_qgscomposeritemwidgetbase.h"
#include "qgscomposeritem.h"
class QgsComposerItem;
@ -31,6 +32,10 @@ class QgsComposerItemWidget: public QWidget, private Ui::QgsComposerItemWidgetBa
QgsComposerItemWidget( QWidget* parent, QgsComposerItem* item );
~QgsComposerItemWidget();
/**A combination of upper/middle/lower and left/middle/right*/
QgsComposerItem::ItemPositionMode positionMode() const;
public slots:
void on_mFrameColorButton_clicked();
void on_mBackgroundColorButton_clicked();
@ -39,13 +44,31 @@ class QgsComposerItemWidget: public QWidget, private Ui::QgsComposerItemWidgetBa
void on_mOutlineWidthSpinBox_valueChanged( double d );
void on_mFrameGroupBox_toggled( bool state );
void on_mBackgroundGroupBox_toggled( bool state );
void on_mPositionButton_clicked();
void on_mItemIdLineEdit_textChanged( const QString& text );
//adjust coordinates in line edits
void on_mXLineEdit_editingFinished(){ changeItemPosition(); }
void on_mYLineEdit_editingFinished(){ changeItemPosition(); }
void on_mWidthLineEdit_editingFinished(){ changeItemPosition(); }
void on_mHeightLineEdit_editingFinished(){ changeItemPosition(); }
void on_mUpperLeftCheckBox_stateChanged( int state ){ changeItemPosition(); }
void on_mUpperMiddleCheckBox_stateChanged( int state ){ changeItemPosition(); }
void on_mUpperRightCheckBox_stateChanged( int state ){ changeItemPosition(); }
void on_mMiddleLeftCheckBox_stateChanged( int state ){ changeItemPosition(); }
void on_mMiddleCheckBox_stateChanged( int state ){ changeItemPosition(); }
void on_mMiddleRightCheckBox_stateChanged( int state ){ changeItemPosition(); }
void on_mLowerLeftCheckBox_stateChanged( int state ){ changeItemPosition(); }
void on_mLowerMiddleCheckBox_stateChanged( int state ){ changeItemPosition(); }
void on_mLowerRightCheckBox_stateChanged( int state ){ changeItemPosition(); }
void setValuesForGuiElements();
void setValuesForGuiPositionElements();
private:
QgsComposerItemWidget();
void setValuesForGuiElements();
void changeItemOpacity( int value );
void changeItemPosition();
QgsComposerItem* mItem;
};

View File

@ -30,7 +30,7 @@ QgsComposerLabelWidget::QgsComposerLabelWidget( QgsComposerLabel* label ): QWidg
//add widget for general composer item properties
QgsComposerItemWidget* itemPropertiesWidget = new QgsComposerItemWidget( this, label );
toolBox->addItem( itemPropertiesWidget, tr( "General options" ) );
mainLayout->addWidget( itemPropertiesWidget );
if ( mComposerLabel )
@ -48,15 +48,13 @@ void QgsComposerLabelWidget::on_mHtmlCheckBox_stateChanged( int state )
{
mFontButton->setEnabled( false );
mFontColorButton->setEnabled( false );
mHorizontalAlignementGroup->setEnabled( false );
mVerticalAlignementGroup->setEnabled( false );
mAlignementGroup->setEnabled( false );
}
else
{
mFontButton->setEnabled( true );
mFontColorButton->setEnabled( true );
mHorizontalAlignementGroup->setEnabled( true );
mVerticalAlignementGroup->setEnabled( true );
mAlignementGroup->setEnabled( true );
}
mComposerLabel->beginCommand( tr( "Label text HTML state changed" ), QgsComposerMergeCommand::ComposerLabelSetText );

View File

@ -49,7 +49,7 @@ QgsComposerLegendWidget::QgsComposerLegendWidget( QgsComposerLegend* legend ): m
//add widget for item properties
QgsComposerItemWidget* itemPropertiesWidget = new QgsComposerItemWidget( this, legend );
toolBox->addItem( itemPropertiesWidget, tr( "General Options" ) );
mainLayout->addWidget( itemPropertiesWidget );
if ( legend )
{

View File

@ -39,10 +39,8 @@ QgsComposerMapWidget::QgsComposerMapWidget( QgsComposerMap* composerMap ): QWidg
//add widget for general composer item properties
QgsComposerItemWidget* itemPropertiesWidget = new QgsComposerItemWidget( this, composerMap );
toolBox->addItem( itemPropertiesWidget, tr( "General options" ) );
mainLayout->addWidget( itemPropertiesWidget );
mWidthLineEdit->setValidator( new QDoubleValidator( mWidthLineEdit ) );
mHeightLineEdit->setValidator( new QDoubleValidator( mHeightLineEdit ) );
mScaleLineEdit->setValidator( new QDoubleValidator( mScaleLineEdit ) );
mXMinLineEdit->setValidator( new QDoubleValidator( mXMinLineEdit ) );
@ -91,47 +89,6 @@ QgsComposerMapWidget::~QgsComposerMapWidget()
{
}
void QgsComposerMapWidget::on_mWidthLineEdit_editingFinished()
{
if ( mComposerMap )
{
bool conversionSuccess = true;
double newWidth = mWidthLineEdit->text().toDouble( &conversionSuccess );
if ( !conversionSuccess )
{
return;
}
QRectF composerMapRect = mComposerMap->rect();
QTransform composerMapTransform = mComposerMap->transform();
QRectF newRect( composerMapTransform.dx(), composerMapTransform.dy(), newWidth, composerMapRect.height() );
mComposerMap->beginCommand( tr( "Change item width" ) );
mComposerMap->setSceneRect( newRect );
mComposerMap->endCommand();
}
}
void QgsComposerMapWidget::on_mHeightLineEdit_editingFinished()
{
if ( mComposerMap )
{
bool conversionSuccess = true;
double newHeight = mHeightLineEdit->text().toDouble( &conversionSuccess );
if ( !conversionSuccess )
{
return;
}
QRectF composerMapRect = mComposerMap->rect();
QTransform composerMapTransform = mComposerMap->transform();
QRectF newRect( composerMapTransform.dx(), composerMapTransform.dy(), composerMapRect.width(), newHeight );
mComposerMap->beginCommand( tr( "Change item height" ) );
mComposerMap->setSceneRect( newRect );
mComposerMap->endCommand();
}
}
void QgsComposerMapWidget::on_mPreviewModeComboBox_activated( int i )
{
Q_UNUSED( i );
@ -264,15 +221,11 @@ void QgsComposerMapWidget::on_mYMaxLineEdit_editingFinished()
void QgsComposerMapWidget::setGuiElementValues()
{
mHeightLineEdit->blockSignals( true );
mWidthLineEdit->blockSignals( true );
mScaleLineEdit->blockSignals( true );
mPreviewModeComboBox->blockSignals( true );
updateGuiElements();
mHeightLineEdit->blockSignals( false );
mWidthLineEdit->blockSignals( false );
mScaleLineEdit->blockSignals( false );
mPreviewModeComboBox->blockSignals( false );
}
@ -285,8 +238,6 @@ void QgsComposerMapWidget::updateGuiElements()
//width, height, scale
QRectF composerMapRect = mComposerMap->rect();
mWidthLineEdit->setText( QString::number( composerMapRect.width() ) );
mHeightLineEdit->setText( QString::number( composerMapRect.height() ) );
mScaleLineEdit->setText( QString::number( mComposerMap->scale(), 'f', 0 ) );
//preview mode
@ -404,11 +355,11 @@ void QgsComposerMapWidget::updateGuiElements()
if ( mComposerMap->showGridAnnotation() )
{
mDrawAnnotationCheckBox->setCheckState( Qt::Checked );
mDrawAnnotationCheckableGroupBox->setChecked( true );
}
else
{
mDrawAnnotationCheckBox->setCheckState( Qt::Unchecked );
mDrawAnnotationCheckableGroupBox->setChecked( false );
}
mCoordinatePrecisionSpinBox->setValue( mComposerMap->gridAnnotationPrecision() );
@ -448,8 +399,6 @@ void QgsComposerMapWidget::updateComposerExtentFromGui()
void QgsComposerMapWidget::blockAllSignals( bool b )
{
mWidthLineEdit->blockSignals( b );
mHeightLineEdit->blockSignals( b );
mScaleLineEdit->blockSignals( b );
mXMinLineEdit->blockSignals( b );
mXMaxLineEdit->blockSignals( b );
@ -466,7 +415,7 @@ void QgsComposerMapWidget::blockAllSignals( bool b )
mSetToMapCanvasExtentButton->blockSignals( b );
mUpdatePreviewButton->blockSignals( b );
mGridLineStyleButton->blockSignals( b );
mDrawAnnotationCheckBox->blockSignals( b );
mDrawAnnotationCheckableGroupBox->blockSignals( b );
mAnnotationFontButton->blockSignals( b );
mAnnotationFormatComboBox->blockSignals( b );
mAnnotationPositionLeftComboBox->blockSignals( b );
@ -812,7 +761,7 @@ void QgsComposerMapWidget::on_mAnnotationPositionBottomComboBox_currentIndexChan
handleChangedAnnotationPosition( QgsComposerMap::Bottom, text );
}
void QgsComposerMapWidget::on_mDrawAnnotationCheckBox_stateChanged( int state )
void QgsComposerMapWidget::on_mDrawAnnotationCheckableGroupBox_toggled( bool state )
{
if ( !mComposerMap )
{
@ -820,7 +769,7 @@ void QgsComposerMapWidget::on_mDrawAnnotationCheckBox_stateChanged( int state )
}
mComposerMap->beginCommand( tr( "Annotation toggled" ) );
if ( state == Qt::Checked )
if ( state )
{
mComposerMap->setShowGridAnnotation( true );
}
@ -907,7 +856,8 @@ void QgsComposerMapWidget::showEvent( QShowEvent * event )
void QgsComposerMapWidget::addPageToToolbox( QWidget* widget, const QString& name )
{
toolBox->addItem( widget, name );
//TODO : wrap the widget in a collapsibleGroupBox to be more consistent with previous implementation
mainLayout->addWidget( widget );
}
void QgsComposerMapWidget::insertAnnotationPositionEntries( QComboBox* c )

View File

@ -35,8 +35,6 @@ class QgsComposerMapWidget: public QWidget, private Ui::QgsComposerMapWidgetBase
virtual ~QgsComposerMapWidget();
public slots:
void on_mWidthLineEdit_editingFinished();
void on_mHeightLineEdit_editingFinished();
void on_mPreviewModeComboBox_activated( int i );
void on_mScaleLineEdit_editingFinished();
void on_mRotationSpinBox_valueChanged( double value );
@ -78,7 +76,7 @@ class QgsComposerMapWidget: public QWidget, private Ui::QgsComposerMapWidgetBase
void on_mAnnotationDirectionComboBoxTop_currentIndexChanged( const QString& text );
void on_mAnnotationDirectionComboBoxBottom_currentIndexChanged( const QString& text );
void on_mDrawAnnotationCheckBox_stateChanged( int state );
void on_mDrawAnnotationCheckableGroupBox_toggled( bool state );
void on_mCoordinatePrecisionSpinBox_valueChanged( int value );
void on_mFrameStyleComboBox_currentIndexChanged( const QString& text );

View File

@ -36,10 +36,8 @@ QgsComposerPictureWidget::QgsComposerPictureWidget( QgsComposerPicture* picture
//add widget for general composer item properties
QgsComposerItemWidget* itemPropertiesWidget = new QgsComposerItemWidget( this, picture );
toolBox->addItem( itemPropertiesWidget, tr( "General options" ) );
mainLayout->addWidget( itemPropertiesWidget );
mWidthLineEdit->setValidator( new QDoubleValidator( this ) );
mHeightLineEdit->setValidator( new QDoubleValidator( this ) );
setGuiElementValues();
mPreviewListWidget->setIconSize( QSize( 30, 30 ) );
@ -115,41 +113,6 @@ void QgsComposerPictureWidget::on_mPictureLineEdit_editingFinished()
}
}
void QgsComposerPictureWidget::on_mWidthLineEdit_editingFinished()
{
if ( mPicture )
{
QRectF pictureRect = mPicture->rect();
bool conversionOk;
double newWidth = mWidthLineEdit->text().toDouble( &conversionOk );
if ( conversionOk )
{
mPicture->beginCommand( tr( "Picture width changed" ) );
QRectF newSceneRect( mPicture->transform().dx(), mPicture->transform().dy(), newWidth, pictureRect.height() );
mPicture->setSceneRect( newSceneRect );
mPicture->endCommand();
}
}
}
void QgsComposerPictureWidget::on_mHeightLineEdit_editingFinished()
{
if ( mPicture )
{
QRectF pictureRect = mPicture->rect();
bool conversionOk;
double newHeight = mHeightLineEdit->text().toDouble( &conversionOk );
if ( conversionOk )
{
mPicture->beginCommand( tr( "Picture height changed" ) );
QRectF newSceneRect( mPicture->transform().dx(), mPicture->transform().dy(), pictureRect.width(), newHeight );
mPicture->setSceneRect( newSceneRect );
mPicture->endCommand();
}
}
}
void QgsComposerPictureWidget::on_mRotationSpinBox_valueChanged( double d )
{
@ -345,8 +308,6 @@ void QgsComposerPictureWidget::setGuiElementValues()
//set initial gui values
if ( mPicture )
{
mWidthLineEdit->blockSignals( true );
mHeightLineEdit->blockSignals( true );
mRotationSpinBox->blockSignals( true );
mPictureLineEdit->blockSignals( true );
mComposerMapComboBox->blockSignals( true );
@ -354,8 +315,6 @@ void QgsComposerPictureWidget::setGuiElementValues()
mPictureLineEdit->setText( mPicture->pictureFile() );
QRectF pictureRect = mPicture->rect();
mWidthLineEdit->setText( QString::number( pictureRect.width() ) );
mHeightLineEdit->setText( QString::number( pictureRect.height() ) );
mRotationSpinBox->setValue( mPicture->rotation() );
refreshMapComboBox();
@ -381,8 +340,6 @@ void QgsComposerPictureWidget::setGuiElementValues()
mRotationFromComposerMapCheckBox->blockSignals( false );
mWidthLineEdit->blockSignals( false );
mHeightLineEdit->blockSignals( false );
mRotationSpinBox->blockSignals( false );
mPictureLineEdit->blockSignals( false );
mComposerMapComboBox->blockSignals( false );

View File

@ -40,8 +40,6 @@ class QgsComposerPictureWidget: public QWidget, private Ui::QgsComposerPictureWi
void on_mPictureBrowseButton_clicked();
void on_mPictureLineEdit_editingFinished();
void on_mRotationSpinBox_valueChanged( double d );
void on_mWidthLineEdit_editingFinished();
void on_mHeightLineEdit_editingFinished();
void on_mPreviewListWidget_currentItemChanged( QListWidgetItem* current, QListWidgetItem* previous );
void on_mAddDirectoryButton_clicked();
void on_mRemoveDirectoryButton_clicked();

View File

@ -29,7 +29,7 @@ QgsComposerScaleBarWidget::QgsComposerScaleBarWidget( QgsComposerScaleBar* scale
//add widget for general composer item properties
QgsComposerItemWidget* itemPropertiesWidget = new QgsComposerItemWidget( this, scaleBar );
toolBox->addItem( itemPropertiesWidget, tr( "General options" ) );
mainLayout->addWidget( itemPropertiesWidget );
blockMemberSignals( true );

View File

@ -26,7 +26,7 @@ QgsComposerShapeWidget::QgsComposerShapeWidget( QgsComposerShape* composerShape
//add widget for general composer item properties
QgsComposerItemWidget* itemPropertiesWidget = new QgsComposerItemWidget( this, composerShape );
toolBox->addItem( itemPropertiesWidget, tr( "General options" ) );
mainLayout->addWidget( itemPropertiesWidget );
blockAllSignals( true );
@ -53,11 +53,7 @@ QgsComposerShapeWidget::~QgsComposerShapeWidget()
void QgsComposerShapeWidget::blockAllSignals( bool block )
{
mShapeComboBox->blockSignals( block );
mOutlineColorButton->blockSignals( block );
mOutlineWidthSpinBox->blockSignals( block );
mFillColorButton->blockSignals( block );
mRotationSpinBox->blockSignals( block );
mTransparentCheckBox->blockSignals( block );
}
void QgsComposerShapeWidget::setGuiElementValues()
@ -68,7 +64,7 @@ void QgsComposerShapeWidget::setGuiElementValues()
}
blockAllSignals( true );
mOutlineWidthSpinBox->setValue( mComposerShape->lineWidth() );
mRotationSpinBox->setValue( mComposerShape->rotation() );
if ( mComposerShape->shapeType() == QgsComposerShape::Ellipse )
{
@ -83,16 +79,6 @@ void QgsComposerShapeWidget::setGuiElementValues()
mShapeComboBox->setCurrentIndex( mShapeComboBox->findText( tr( "Triangle" ) ) );
}
if ( mComposerShape->transparentFill() )
{
mTransparentCheckBox->setCheckState( Qt::Checked );
mFillColorButton->setEnabled( false );
}
else
{
mTransparentCheckBox->setCheckState( Qt::Unchecked );
mFillColorButton->setEnabled( true );
}
blockAllSignals( false );
}
@ -131,79 +117,5 @@ void QgsComposerShapeWidget::on_mShapeComboBox_currentIndexChanged( const QStrin
mComposerShape->endCommand();
}
void QgsComposerShapeWidget::on_mOutlineColorButton_clicked()
{
if ( !mComposerShape )
{
return;
}
QColor existingColor = mComposerShape->outlineColor();
#if QT_VERSION >= 0x040500
QColor newColor = QColorDialog::getColor( existingColor, 0, tr( "Select outline color" ), QColorDialog::ShowAlphaChannel );
#else
QColor newColor = QColorDialog::getColor( existingColor );
#endif
if ( newColor.isValid() )
{
mComposerShape->beginCommand( tr( "Shape outline color" ) );
mComposerShape->setOutlineColor( newColor );
mComposerShape->update();
mComposerShape->endCommand();
}
}
void QgsComposerShapeWidget::on_mOutlineWidthSpinBox_valueChanged( double d )
{
if ( !mComposerShape )
{
return;
}
mComposerShape->beginCommand( tr( "Shape outline width" ), QgsComposerMergeCommand::ShapeOutlineWidth );
mComposerShape->setLineWidth( d );
mComposerShape->update();
mComposerShape->endCommand();
}
void QgsComposerShapeWidget::on_mTransparentCheckBox_stateChanged( int state )
{
if ( !mComposerShape )
{
return;
}
mComposerShape->beginCommand( tr( "Shape transparency toggled" ) );
if ( state == Qt::Checked )
{
mComposerShape->setTransparentFill( true );
mFillColorButton->setEnabled( false );
}
else
{
mComposerShape->setTransparentFill( false );
mFillColorButton->setEnabled( true );
}
mComposerShape->update();
mComposerShape->endCommand();
}
void QgsComposerShapeWidget::on_mFillColorButton_clicked()
{
if ( !mComposerShape )
{
return;
}
QColor existingColor = mComposerShape->fillColor();
#if QT_VERSION >= 0x040500
QColor newColor = QColorDialog::getColor( existingColor, 0, tr( "Select fill color" ), QColorDialog::ShowAlphaChannel );
#else
QColor newColor = QColorDialog::getColor( existingColor );
#endif
if ( newColor.isValid() )
{
mComposerShape->beginCommand( tr( "Shape fill color" ) );
mComposerShape->setFillColor( newColor );
mComposerShape->update();
mComposerShape->endCommand();
}
}

View File

@ -38,10 +38,6 @@ class QgsComposerShapeWidget: public QWidget, private Ui::QgsComposerShapeWidget
private slots:
void on_mShapeComboBox_currentIndexChanged( const QString& text );
void on_mOutlineColorButton_clicked();
void on_mOutlineWidthSpinBox_valueChanged( double d );
void on_mTransparentCheckBox_stateChanged( int state );
void on_mFillColorButton_clicked();
void on_mRotationSpinBox_valueChanged( int val );
/**Sets the GUI elements to the currentValues of mComposerShape*/

View File

@ -30,7 +30,7 @@ QgsComposerTableWidget::QgsComposerTableWidget( QgsComposerAttributeTable* table
setupUi( this );
//add widget for general composer item properties
QgsComposerItemWidget* itemPropertiesWidget = new QgsComposerItemWidget( this, mComposerTable );
mToolBox->addItem( itemPropertiesWidget, tr( "General options" ) );
mainLayout->addWidget( itemPropertiesWidget );
blockAllSignals( true );
@ -288,20 +288,15 @@ void QgsComposerTableWidget::on_mGridColorButton_clicked()
mComposerTable->endCommand();
}
void QgsComposerTableWidget::on_mShowGridCheckBox_stateChanged( int state )
void QgsComposerTableWidget::on_mShowGridGroupCheckBox_toggled( bool state )
{
if ( !mComposerTable )
{
return;
}
bool showGrid = false;
if ( state == Qt::Checked )
{
showGrid = true;
}
mComposerTable->beginCommand( tr( "Table grid toggled" ) );
mComposerTable->setShowGrid( showGrid );
mComposerTable->setShowGrid( state );
mComposerTable->update();
mComposerTable->endCommand();
}
@ -343,11 +338,11 @@ void QgsComposerTableWidget::updateGuiElements()
mGridColorButton->setColor( mComposerTable->gridColor() );
if ( mComposerTable->showGrid() )
{
mShowGridCheckBox->setCheckState( Qt::Checked );
mShowGridGroupCheckBox->setChecked( true );
}
else
{
mShowGridCheckBox->setCheckState( Qt::Unchecked );
mShowGridGroupCheckBox->setChecked( false );
}
if ( mComposerTable->displayOnlyVisibleFeatures() )
@ -369,7 +364,7 @@ void QgsComposerTableWidget::blockAllSignals( bool b )
mMarginSpinBox->blockSignals( b );
mGridColorButton->blockSignals( b );
mGridStrokeWidthSpinBox->blockSignals( b );
mShowGridCheckBox->blockSignals( b );
mShowGridGroupCheckBox->blockSignals( b );
mShowOnlyVisibleFeaturesCheckBox->blockSignals( b );
}

View File

@ -49,7 +49,7 @@ class QgsComposerTableWidget: public QWidget, private Ui::QgsComposerTableWidget
void on_mGridColorButton_clicked();
void on_mHeaderFontPushButton_clicked();
void on_mContentFontPushButton_clicked();
void on_mShowGridCheckBox_stateChanged( int state );
void on_mShowGridGroupCheckBox_toggled( bool state );
void on_mShowOnlyVisibleFeaturesCheckBox_stateChanged( int state );
/**Inserts a new maximum number of features into the spin box (without the spinbox emitting a signal)*/

View File

@ -47,27 +47,13 @@ QgsCompositionWidget::QgsCompositionWidget( QWidget* parent, QgsComposition* c )
mResolutionSpinBox->setValue( mComposition->printResolution() );
//print as raster
if ( mComposition->printAsRaster() )
{
mPrintAsRasterCheckBox->setCheckState( Qt::Checked );
}
else
{
mPrintAsRasterCheckBox->setCheckState( Qt::Unchecked );
}
mPrintAsRasterGroupCheckBox->setChecked( mComposition->printAsRaster() );
mAlignmentSnapCheckBox->setCheckState( mComposition->alignmentSnap() ? Qt::Checked : Qt::Unchecked );
mAlignmentSnapGroupCheckBox->setChecked( mComposition->alignmentSnap() );
mAlignmentToleranceSpinBox->setValue( mComposition->alignmentSnapTolerance() );
//snap grid
if ( mComposition->snapToGridEnabled() )
{
mSnapToGridCheckBox->setCheckState( Qt::Checked );
}
else
{
mSnapToGridCheckBox->setCheckState( Qt::Unchecked );
}
mSnapToGridGroupCheckBox->setChecked( mComposition->snapToGridEnabled() );
mGridResolutionSpinBox->setValue( mComposition->snapGridResolution() );
mOffsetXSpinBox->setValue( mComposition->snapGridOffsetX() );
mOffsetYSpinBox->setValue( mComposition->snapGridOffsetY() );
@ -396,15 +382,7 @@ void QgsCompositionWidget::displaySnapingSettings()
return;
}
if ( mComposition->snapToGridEnabled() )
{
mSnapToGridCheckBox->setCheckState( Qt::Checked );
}
else
{
mSnapToGridCheckBox->setCheckState( Qt::Unchecked );
}
mSnapToGridGroupCheckBox->setChecked( mComposition->snapToGridEnabled() );
mGridResolutionSpinBox->setValue( mComposition->snapGridResolution() );
mOffsetXSpinBox->setValue( mComposition->snapGridOffsetX() );
mOffsetYSpinBox->setValue( mComposition->snapGridOffsetY() );
@ -415,35 +393,21 @@ void QgsCompositionWidget::on_mResolutionSpinBox_valueChanged( const int value )
mComposition->setPrintResolution( value );
}
void QgsCompositionWidget::on_mPrintAsRasterCheckBox_stateChanged( int state )
void QgsCompositionWidget::on_mPrintAsRasterGroupCheckBox_toggled( bool state )
{
if ( !mComposition )
{
return;
}
if ( state == Qt::Checked )
{
mComposition->setPrintAsRaster( true );
}
else
{
mComposition->setPrintAsRaster( false );
}
mComposition->setPrintAsRaster( state );
}
void QgsCompositionWidget::on_mSnapToGridCheckBox_stateChanged( int state )
void QgsCompositionWidget::on_mSnapToGridGroupCheckBox_toggled( bool state )
{
if ( mComposition )
{
if ( state == Qt::Checked )
{
mComposition->setSnapToGridEnabled( true );
}
else
{
mComposition->setSnapToGridEnabled( false );
}
mComposition->setSnapToGridEnabled( state );
}
}
@ -527,11 +491,11 @@ void QgsCompositionWidget::on_mSelectionToleranceSpinBox_valueChanged( double d
}
}
void QgsCompositionWidget::on_mAlignmentSnapCheckBox_stateChanged( int state )
void QgsCompositionWidget::on_mAlignmentSnapGroupCheckBox_toggled( bool state )
{
if ( mComposition )
{
mComposition->setAlignmentSnap( state == Qt::Checked ? true : false );
mComposition->setAlignmentSnap( state );
}
}
@ -552,8 +516,8 @@ void QgsCompositionWidget::blockSignals( bool block )
mNumPagesSpinBox->blockSignals( block );
mPaperOrientationComboBox->blockSignals( block );
mResolutionSpinBox->blockSignals( block );
mPrintAsRasterCheckBox->blockSignals( block );
mSnapToGridCheckBox->blockSignals( block );
mPrintAsRasterGroupCheckBox->blockSignals( block );
mSnapToGridGroupCheckBox->blockSignals( block );
mGridResolutionSpinBox->blockSignals( block );
mOffsetXSpinBox->blockSignals( block );
mOffsetYSpinBox->blockSignals( block );
@ -561,6 +525,6 @@ void QgsCompositionWidget::blockSignals( bool block )
mGridColorButton->blockSignals( block );
mGridStyleComboBox->blockSignals( block );
mSelectionToleranceSpinBox->blockSignals( block );
mAlignmentSnapCheckBox->blockSignals( block );
mAlignmentSnapGroupCheckBox->blockSignals( block );
mAlignmentToleranceSpinBox->blockSignals( block );
}

View File

@ -47,9 +47,9 @@ 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_mPrintAsRasterCheckBox_stateChanged( int state );
void on_mPrintAsRasterGroupCheckBox_toggled( bool state );
void on_mSnapToGridCheckBox_stateChanged( int state );
void on_mSnapToGridGroupCheckBox_toggled( bool state );
void on_mGridResolutionSpinBox_valueChanged( double d );
void on_mOffsetXSpinBox_valueChanged( double d );
void on_mOffsetYSpinBox_valueChanged( double d );
@ -57,7 +57,7 @@ class QgsCompositionWidget: public QWidget, private Ui::QgsCompositionWidgetBase
void on_mGridStyleComboBox_currentIndexChanged( const QString& text );
void on_mPenWidthSpinBox_valueChanged( double d );
void on_mSelectionToleranceSpinBox_valueChanged( double d );
void on_mAlignmentSnapCheckBox_stateChanged( int state );
void on_mAlignmentSnapGroupCheckBox_toggled( bool state );
void on_mAlignmentToleranceSpinBox_valueChanged( double d );
/**Sets GUI elements to width/height from composition*/

View File

@ -1,247 +0,0 @@
/***************************************************************************
qgsitempositiondialog.cpp
-------------------------
begin : October 2008
copyright : (C) 2008 by Marco Hugentobler
email : marco dot hugentobler at karto dot baug dot ethz dot ch
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#include "qgsitempositiondialog.h"
#include "qgspoint.h"
#include <QButtonGroup>
#include <QDoubleValidator>
QgsItemPositionDialog::QgsItemPositionDialog( QgsComposerItem* item, QWidget* parent ): QDialog( parent ), mItem( item )
{
setupUi( this );
//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->setExclusive( true );
mXLineEdit->setValidator( new QDoubleValidator( 0 ) );
mYLineEdit->setValidator( new QDoubleValidator( 0 ) );
mWidthLineEdit->setValidator( new QDoubleValidator( 0 ) );
mHeightLineEdit->setValidator( new QDoubleValidator( 0 ) );
//set lower left position of item
mUpperLeftCheckBox->setCheckState( Qt::Checked );
//set initial width and height
if ( mItem )
{
mWidthLineEdit->setText( QString::number( mItem->rect().width() ) );
mHeightLineEdit->setText( QString::number( mItem->rect().height() ) );
}
}
QgsItemPositionDialog::QgsItemPositionDialog(): mItem( 0 )
{
}
QgsItemPositionDialog::~QgsItemPositionDialog()
{
}
int QgsItemPositionDialog::position( QgsPoint& point ) const
{
bool convXSuccess, convYSuccess;
double x = mXLineEdit->text().toDouble( &convXSuccess );
double y = mYLineEdit->text().toDouble( &convYSuccess );
if ( !convXSuccess || !convYSuccess )
{
return 1;
}
point.setX( x );
point.setY( y );
return 0;
}
int QgsItemPositionDialog::size( QSizeF& s ) const
{
bool convSuccessWidth, convSuccessHeight;
double width = mWidthLineEdit->text().toDouble( &convSuccessWidth );
double height = mHeightLineEdit->text().toDouble( &convSuccessHeight );
if ( !convSuccessWidth || !convSuccessHeight )
{
return 1;
}
s.setWidth( width );
s.setHeight( height );
return 0;
}
QgsComposerItem::ItemPositionMode QgsItemPositionDialog::positionMode() const
{
if ( mUpperLeftCheckBox->checkState() == Qt::Checked )
{
return QgsComposerItem::UpperLeft;
}
else if ( mUpperMiddleCheckBox->checkState() == Qt::Checked )
{
return QgsComposerItem::UpperMiddle;
}
else if ( mUpperRightCheckBox->checkState() == Qt::Checked )
{
return QgsComposerItem::UpperRight;
}
else if ( mMiddleLeftCheckBox->checkState() == Qt::Checked )
{
return QgsComposerItem::MiddleLeft;
}
else if ( mMiddleCheckBox->checkState() == Qt::Checked )
{
return QgsComposerItem::Middle;
}
else if ( mMiddleRightCheckBox->checkState() == Qt::Checked )
{
return QgsComposerItem::MiddleRight;
}
else if ( mLowerLeftCheckBox->checkState() == Qt::Checked )
{
return QgsComposerItem::LowerLeft;
}
else if ( mLowerMiddleCheckBox->checkState() == Qt::Checked )
{
return QgsComposerItem::LowerMiddle;
}
else if ( mLowerRightCheckBox->checkState() == Qt::Checked )
{
return QgsComposerItem::LowerRight;
}
return QgsComposerItem::UpperLeft;
}
void QgsItemPositionDialog::on_mCloseButton_clicked()
{
accept();
}
void QgsItemPositionDialog::on_mSetPositionButton_clicked()
{
if ( !mItem )
{
return;
}
QgsPoint itemPosition;
QSizeF itemSize;
if ( position( itemPosition ) == 0 )
{
if ( size( itemSize ) == 0 )
{
mItem->setItemPosition( itemPosition.x(), itemPosition.y(), itemSize.width(), itemSize.height(), positionMode() );
}
else
{
mItem->setItemPosition( itemPosition.x(), itemPosition.y(), positionMode() );
}
mItem->update();
}
}
void QgsItemPositionDialog::on_mUpperLeftCheckBox_stateChanged( int state )
{
if ( state == Qt::Checked && mItem )
{
mXLineEdit->setText( QString::number( mItem->transform().dx() ) );
mYLineEdit->setText( QString::number( mItem->transform().dy() ) );
}
}
void QgsItemPositionDialog::on_mUpperMiddleCheckBox_stateChanged( int state )
{
if ( state == Qt::Checked && mItem )
{
mXLineEdit->setText( QString::number( mItem->transform().dx() + mItem->rect().width() / 2.0 ) );
mYLineEdit->setText( QString::number( mItem->transform().dy() ) );
}
}
void QgsItemPositionDialog::on_mUpperRightCheckBox_stateChanged( int state )
{
if ( state == Qt::Checked && mItem )
{
mXLineEdit->setText( QString::number( mItem->transform().dx() + mItem->rect().width() ) );
mYLineEdit->setText( QString::number( mItem->transform().dy() ) );
}
}
void QgsItemPositionDialog::on_mMiddleLeftCheckBox_stateChanged( int state )
{
if ( state == Qt::Checked && mItem )
{
mXLineEdit->setText( QString::number( mItem->transform().dx() ) );
mYLineEdit->setText( QString::number( mItem->transform().dy() + mItem->rect().height() / 2.0 ) );
}
}
void QgsItemPositionDialog::on_mMiddleCheckBox_stateChanged( int state )
{
if ( state == Qt::Checked && mItem )
{
mXLineEdit->setText( QString::number( mItem->transform().dx() + mItem->rect().width() / 2.0 ) );
mYLineEdit->setText( QString::number( mItem->transform().dy() + mItem->rect().height() / 2.0 ) );
}
}
void QgsItemPositionDialog::on_mMiddleRightCheckBox_stateChanged( int state )
{
if ( state == Qt::Checked && mItem )
{
mXLineEdit->setText( QString::number( mItem->transform().dx() + mItem->rect().width() ) );
mYLineEdit->setText( QString::number( mItem->transform().dy() + mItem->rect().height() / 2.0 ) );
}
}
void QgsItemPositionDialog::on_mLowerLeftCheckBox_stateChanged( int state )
{
if ( state == Qt::Checked && mItem )
{
mXLineEdit->setText( QString::number( mItem->transform().dx() ) );
mYLineEdit->setText( QString::number( mItem->transform().dy() + mItem->rect().height() ) );
}
}
void QgsItemPositionDialog::on_mLowerMiddleCheckBox_stateChanged( int state )
{
if ( state == Qt::Checked && mItem )
{
mXLineEdit->setText( QString::number( mItem->transform().dx() + mItem->rect().width() / 2.0 ) );
mYLineEdit->setText( QString::number( mItem->transform().dy() + mItem->rect().height() ) );
}
}
void QgsItemPositionDialog::on_mLowerRightCheckBox_stateChanged( int state )
{
if ( state == Qt::Checked && mItem )
{
mXLineEdit->setText( QString::number( mItem->transform().dx() + mItem->rect().width() ) );
mYLineEdit->setText( QString::number( mItem->transform().dy() + mItem->rect().height() ) );
}
}

View File

@ -1,63 +0,0 @@
/***************************************************************************
qgsitempositiondialog.h
-------------------------
begin : October 2008
copyright : (C) 2008 by Marco Hugentobler
email : marco dot hugentobler at karto dot baug dot ethz dot ch
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#ifndef QGSITEMPOSITIONDIALOG_H
#define QGSITEMPOSITIONDIALOG_H
#include "ui_qgsitempositiondialogbase.h"
#include "qgscomposeritem.h"
class QgsPoint;
/**A dialog to set the position of upper/middle/lower left/middle/lower point of an item*/
class QgsItemPositionDialog: public QDialog, private Ui::QgsItemPositionDialogBase
{
Q_OBJECT
public:
QgsItemPositionDialog( QgsComposerItem* item, QWidget* parent = 0 );
~QgsItemPositionDialog();
/**Get selected x- and y-coordinate as point. Returns 0 in case of success*/
int position( QgsPoint& point ) const;
/**Get selected size. Returns 0 in case of success*/
int size( QSizeF& s ) const;
/**A combination of upper/middle/lower and left/middle/right*/
QgsComposerItem::ItemPositionMode positionMode() const;
public slots:
void on_mCloseButton_clicked();
void on_mSetPositionButton_clicked();
//adjust coordinates in line edits
void on_mUpperLeftCheckBox_stateChanged( int state );
void on_mUpperMiddleCheckBox_stateChanged( int state );
void on_mUpperRightCheckBox_stateChanged( int state );
void on_mMiddleLeftCheckBox_stateChanged( int state );
void on_mMiddleCheckBox_stateChanged( int state );
void on_mMiddleRightCheckBox_stateChanged( int state );
void on_mLowerLeftCheckBox_stateChanged( int state );
void on_mLowerMiddleCheckBox_stateChanged( int state );
void on_mLowerRightCheckBox_stateChanged( int state );
private:
QgsComposerItem* mItem;
//default constructor forbidden
QgsItemPositionDialog();
};
#endif

View File

@ -50,6 +50,7 @@ QgsComposerItem::QgsComposerItem( QgsComposition* composition, bool manageZValue
, mItemPositionLocked( false )
, mLastValidViewScaleFactor( -1 )
, mRotation( 0 )
, mLastUsedPositionMode( UpperLeft )
{
init( manageZValue );
}
@ -66,6 +67,7 @@ QgsComposerItem::QgsComposerItem( qreal x, qreal y, qreal width, qreal height, Q
, mItemPositionLocked( false )
, mLastValidViewScaleFactor( -1 )
, mRotation( 0 )
, mLastUsedPositionMode( UpperLeft )
{
init( manageZValue );
QTransform t;
@ -147,6 +149,7 @@ bool QgsComposerItem::_writeXML( QDomElement& itemElem, QDomDocument& doc ) cons
composerItemElem.setAttribute( "y", QString::number( transform().dy() ) );
composerItemElem.setAttribute( "width", QString::number( rect().width() ) );
composerItemElem.setAttribute( "height", QString::number( rect().height() ) );
composerItemElem.setAttribute( "positionMode", QString::number( (int) mLastUsedPositionMode ) );
composerItemElem.setAttribute( "zValue", QString::number( zValue() ) );
composerItemElem.setAttribute( "outlineWidth", QString::number( pen().widthF() ) );
composerItemElem.setAttribute( "rotation", QString::number( mRotation ) );
@ -236,12 +239,17 @@ bool QgsComposerItem::_readXML( const QDomElement& itemElem, const QDomDocument&
//position
double x, y, width, height;
bool xOk, yOk, widthOk, heightOk;
bool xOk, yOk, widthOk, heightOk, positionModeOK;
x = itemElem.attribute( "x" ).toDouble( &xOk );
y = itemElem.attribute( "y" ).toDouble( &yOk );
width = itemElem.attribute( "width" ).toDouble( &widthOk );
height = itemElem.attribute( "height" ).toDouble( &heightOk );
mLastUsedPositionMode = ( ItemPositionMode )itemElem.attribute( "positionMode" ).toInt( &positionModeOK );
if ( !positionModeOK )
{
mLastUsedPositionMode = UpperLeft;
}
if ( !xOk || !yOk || !widthOk || !heightOk )
{
@ -771,6 +779,9 @@ void QgsComposerItem::setItemPosition( double x, double y, double width, double
double upperLeftX = x;
double upperLeftY = y;
//store the item position mode
mLastUsedPositionMode = itemPoint;
//adjust x-coordinate if placement is not done to a left point
if ( itemPoint == UpperMiddle || itemPoint == Middle || itemPoint == LowerMiddle )
{

View File

@ -138,6 +138,11 @@ class CORE_EXPORT QgsComposerItem: public QObject, public QGraphicsRectItem
@note: this method was added in version 1.6*/
void setItemPosition( double x, double y, double width, double height, ItemPositionMode itemPoint = UpperLeft );
/**Returns item's last used position mode.
@note: This property has no effect on actual's item position, which is always the top-left corner.
@note: this method was added in version 2.0*/
ItemPositionMode lastUsedPositionMode(){ return mLastUsedPositionMode; }
/**Sets this items bound in scene coordinates such that 1 item size units
corresponds to 1 scene size unit*/
virtual void setSceneRect( const QRectF& rectangle );
@ -290,6 +295,7 @@ class CORE_EXPORT QgsComposerItem: public QObject, public QGraphicsRectItem
/**True if item background needs to be painted*/
bool mBackground;
/**True if item position and size cannot be changed with mouse move
@note: this member was added in version 1.2*/
bool mItemPositionLocked;
@ -300,6 +306,10 @@ class CORE_EXPORT QgsComposerItem: public QObject, public QGraphicsRectItem
/**Item rotation in degrees, clockwise*/
double mRotation;
/**The item's position mode
@note: this member was added in version 2.0*/
ItemPositionMode mLastUsedPositionMode;
//event handlers
virtual void mouseMoveEvent( QGraphicsSceneMouseEvent * event );
virtual void mousePressEvent( QGraphicsSceneMouseEvent * event );

View File

@ -20,15 +20,13 @@
QgsComposerShape::QgsComposerShape( QgsComposition* composition ): QgsComposerItem( composition ), mShape( Ellipse )
{
initGraphicsSettings();
setFrameEnabled(true);
}
QgsComposerShape::QgsComposerShape( qreal x, qreal y, qreal width, qreal height, QgsComposition* composition ): QgsComposerItem( x, y, width, height, composition ), mShape( Ellipse )
{
setSceneRect( QRectF( x, y, width, height ) );
mShapeWidth = width;
mShapeHeight = height;
initGraphicsSettings();
setFrameEnabled(true);
}
QgsComposerShape::~QgsComposerShape()
@ -45,64 +43,73 @@ void QgsComposerShape::paint( QPainter* painter, const QStyleOptionGraphicsItem*
return;
}
drawBackground( painter );
painter->save();
painter->setRenderHint( QPainter::Antialiasing );
painter->setPen( mPen );
painter->setBrush( mBrush );
painter->translate( rect().width() / 2.0, rect().height() / 2.0 );
painter->rotate( mRotation );
painter->translate( -mShapeWidth / 2.0, -mShapeHeight / 2.0 );
double halfPenWidth = mPen.widthF() / 2.0;
switch ( mShape )
{
case Ellipse:
painter->drawEllipse( QRectF( halfPenWidth, halfPenWidth , mShapeWidth - mPen.widthF(), mShapeHeight - mPen.widthF() ) );
break;
case Rectangle:
painter->drawRect( QRectF( halfPenWidth, halfPenWidth , mShapeWidth - mPen.widthF(), mShapeHeight - mPen.widthF() ) );
break;
case Triangle:
QPolygonF triangle;
triangle << QPointF( halfPenWidth, mShapeHeight - halfPenWidth );
triangle << QPointF( mShapeWidth - halfPenWidth, mShapeHeight - halfPenWidth );
triangle << QPointF( mShapeWidth / 2.0, halfPenWidth );
painter->drawPolygon( triangle );
break;
}
painter->restore();
drawFrame( painter );
if ( isSelected() )
{
drawSelectionBoxes( painter );
}
}
void QgsComposerShape::drawShape( QPainter* p )
{
p->save();
p->setRenderHint( QPainter::Antialiasing );
p->translate( rect().width() / 2.0, rect().height() / 2.0 );
p->rotate( mRotation );
p->translate( -rect().width() / 2.0, -rect().height() / 2.0 );
switch ( mShape )
{
case Ellipse:
p->drawEllipse( QRectF( 0, 0 , rect().width(), rect().height() ) );
break;
case Rectangle:
p->drawRect( QRectF( 0, 0 , rect().width(), rect().height() ) );
break;
case Triangle:
QPolygonF triangle;
triangle << QPointF( 0, rect().height() );
triangle << QPointF( rect().width() , rect().height() );
triangle << QPointF( rect().width() / 2.0, 0 );
p->drawPolygon( triangle );
break;
}
p->restore();
}
void QgsComposerShape::drawFrame( QPainter* p )
{
if ( mFrame && p )
{
p->setPen( pen() );
p->setBrush( Qt::NoBrush );
p->setRenderHint( QPainter::Antialiasing, true );
drawShape( p );
}
}
void QgsComposerShape::drawBackground( QPainter* p )
{
if ( mBackground && p )
{
p->setBrush( brush() );//this causes a problem in atlas generation
p->setPen( Qt::NoPen );
p->setRenderHint( QPainter::Antialiasing, true );
drawShape( p );
}
}
bool QgsComposerShape::writeXML( QDomElement& elem, QDomDocument & doc ) const
{
QDomElement composerShapeElem = doc.createElement( "ComposerShape" );
composerShapeElem.setAttribute( "shapeType", mShape );
composerShapeElem.setAttribute( "outlineWidth", QString::number( mPen.widthF() ) );
composerShapeElem.setAttribute( "transparentFill", mBrush.style() == Qt::NoBrush );
composerShapeElem.setAttribute( "shapeWidth", QString::number( mShapeWidth ) );
composerShapeElem.setAttribute( "shapeHeight", QString::number( mShapeHeight ) );
QDomElement outlineColorElem = doc.createElement( "OutlineColor" );
outlineColorElem.setAttribute( "red", mPen.color().red() );
outlineColorElem.setAttribute( "green", mPen.color().green() );
outlineColorElem.setAttribute( "blue", mPen.color().blue() );
outlineColorElem.setAttribute( "alpha", mPen.color().alpha() );
composerShapeElem.appendChild( outlineColorElem );
QDomElement fillColorElem = doc.createElement( "FillColor" );
fillColorElem.setAttribute( "red", mBrush.color().red() );
fillColorElem.setAttribute( "green", mBrush.color().green() );
fillColorElem.setAttribute( "blue", mBrush.color().blue() );
fillColorElem.setAttribute( "alpha", mBrush.color().alpha() );
composerShapeElem.appendChild( fillColorElem );
elem.appendChild( composerShapeElem );
return _writeXML( composerShapeElem, doc );
}
@ -110,45 +117,6 @@ bool QgsComposerShape::writeXML( QDomElement& elem, QDomDocument & doc ) const
bool QgsComposerShape::readXML( const QDomElement& itemElem, const QDomDocument& doc )
{
mShape = QgsComposerShape::Shape( itemElem.attribute( "shapeType", "0" ).toInt() );
mShapeWidth = itemElem.attribute( "shapeWidth", "10" ).toDouble();
mShapeHeight = itemElem.attribute( "shapeHeight", "10" ).toDouble();
mPen.setWidthF( itemElem.attribute( "outlineWidth", "0.4" ).toDouble() );
//transparent fill
bool transparent = itemElem.attribute( "transparentFill", "1" ).toInt() == 1;
if ( transparent )
{
mBrush.setStyle( Qt::NoBrush );
}
else
{
mBrush.setStyle( Qt::SolidPattern );
}
//outline color
QDomNodeList outlineColorList = itemElem.elementsByTagName( "OutlineColor" );
if ( outlineColorList.size() > 0 )
{
QDomElement outlineColorElem = outlineColorList.at( 0 ).toElement();
int penRed = outlineColorElem.attribute( "red", "0" ).toInt();
int penGreen = outlineColorElem.attribute( "green", "0" ).toInt();
int penBlue = outlineColorElem.attribute( "blue", "0" ).toInt();
int penAlpha = outlineColorElem.attribute( "alpha", "255" ).toInt();
mPen.setColor( QColor( penRed, penGreen, penBlue, penAlpha ) );
}
//fill color
QDomNodeList fillNodeList = itemElem.elementsByTagName( "FillColor" );
if ( fillNodeList.size() > 0 )
{
QDomElement fillColorElem = fillNodeList.at( 0 ).toElement();
int brushRed = fillColorElem.attribute( "red", "0" ).toInt();
int brushGreen = fillColorElem.attribute( "green", "0" ).toInt();
int brushBlue = fillColorElem.attribute( "blue", "0" ).toInt();
int brushAlpha = fillColorElem.attribute( "alpha", "255" ).toInt();
mBrush.setColor( QColor( brushRed, brushGreen, brushBlue, brushAlpha ) );
}
//restore general composer item properties
QDomNodeList composerItemList = itemElem.elementsByTagName( "ComposerItem" );
@ -161,71 +129,12 @@ bool QgsComposerShape::readXML( const QDomElement& itemElem, const QDomDocument&
return true;
}
void QgsComposerShape::setLineWidth( double width )
{
mPen.setWidthF( width );
}
double QgsComposerShape::lineWidth() const
{
return mPen.widthF();
}
void QgsComposerShape::setOutlineColor( const QColor& color )
{
mPen.setColor( color );
}
QColor QgsComposerShape::outlineColor() const
{
return mPen.color();
}
void QgsComposerShape::setFillColor( const QColor& color )
{
mBrush.setColor( color );
}
QColor QgsComposerShape::fillColor() const
{
return mBrush.color();
}
bool QgsComposerShape::transparentFill() const
{
return mBrush.style() == Qt::NoBrush;
}
void QgsComposerShape::setTransparentFill( bool transparent )
{
if ( transparent )
{
mBrush.setStyle( Qt::NoBrush );
}
else
{
mBrush.setStyle( Qt::SolidPattern );
}
}
void QgsComposerShape::initGraphicsSettings()
{
mPen.setColor( QColor( 0, 0, 0 ) );
mPen.setWidthF( 1 );
mPen.setJoinStyle( Qt::RoundJoin );
mBrush.setColor( QColor( 0, 0, 0 ) );
mBrush.setStyle( Qt::NoBrush );
//set composer item brush and pen to transparent white by default
setPen( QPen( QColor( 255, 255, 255, 0 ) ) );
setBrush( QBrush( QColor( 255, 255, 255, 0 ) ) );
}
void QgsComposerShape::setRotation( double r )
{
//adapt rectangle size
double width = mShapeWidth;
double height = mShapeHeight;
double width = rect().width();
double height = rect().height();
sizeChangedByRotation( width, height );
//adapt scene rect to have the same center and the new width / height
@ -246,8 +155,6 @@ void QgsComposerShape::setSceneRect( const QRectF& rectangle )
double newShapeWidth = rectangle.width();
double newShapeHeight = rectangle.height();
imageSizeConsideringRotation( newShapeWidth, newShapeHeight );
mShapeWidth = newShapeWidth;
mShapeHeight = newShapeHeight;
}
QgsComposerItem::setSceneRect( rectangle );

View File

@ -56,16 +56,8 @@ class CORE_EXPORT QgsComposerShape: public QgsComposerItem
bool readXML( const QDomElement& itemElem, const QDomDocument& doc );
//setters and getters
void setLineWidth( double width );
double lineWidth() const;
void setOutlineColor( const QColor& color );
QColor outlineColor() const;
void setFillColor( const QColor& color );
QColor fillColor() const;
QgsComposerShape::Shape shapeType() const {return mShape;}
void setShapeType( QgsComposerShape::Shape s ) {mShape = s;}
bool transparentFill() const;
void setTransparentFill( bool transparent );
/**Sets this items bound in scene coordinates such that 1 item size units
corresponds to 1 scene size unit. Also, the shape is scaled*/
@ -75,18 +67,21 @@ class CORE_EXPORT QgsComposerShape: public QgsComposerItem
/**Sets item rotation and resizes item bounds such that the shape always has the same size*/
virtual void setRotation( double r );
protected:
/* reimplement drawFrame, since it's not a rect, but a custom shape */
virtual void drawFrame( QPainter* p );
/* reimplement drawBackground, since it's not a rect, but a custom shape */
virtual void drawBackground( QPainter* p );
private:
/**Ellipse, rectangle or triangle*/
Shape mShape;
/**Shape outline*/
QPen mPen;
/**Shape fill*/
QBrush mBrush;
double mShapeWidth;
double mShapeHeight;
/**Apply default graphics settings*/
void initGraphicsSettings();
/* draws the custom shape */
void drawShape( QPainter* p );
/**Returns a point on the line from startPoint to directionPoint that is a certain distance away from the starting point*/
QPointF pointOnLineWithDistance( const QPointF& startPoint, const QPointF& directionPoint, double distance ) const;

View File

@ -49,7 +49,7 @@
QgsComposition::QgsComposition( QgsMapRenderer* mapRenderer ) :
QGraphicsScene( 0 ), mMapRenderer( mapRenderer ), mPlotStyle( QgsComposition::Preview ), mPageWidth( 297 ), mPageHeight( 210 ), mSpaceBetweenPages( 10 ), mPrintAsRaster( false ), mSelectionTolerance( 0.0 ),
mSnapToGrid( false ), mSnapGridResolution( 0.0 ), mSnapGridOffsetX( 0.0 ), mSnapGridOffsetY( 0.0 ), mAlignmentSnap( true ), mAlignmentSnapTolerance( 2 ),
mSnapToGrid( false ), mSnapGridResolution( 10.0 ), mSnapGridOffsetX( 0.0 ), mSnapGridOffsetY( 0.0 ), mAlignmentSnap( true ), mAlignmentSnapTolerance( 2 ),
mActiveItemCommand( 0 ), mActiveMultiFrameCommand( 0 ), mAtlasComposition( this )
{
setBackgroundBrush( Qt::gray );
@ -61,7 +61,7 @@ QgsComposition::QgsComposition( QgsMapRenderer* mapRenderer ) :
QgsComposition::QgsComposition():
QGraphicsScene( 0 ), mMapRenderer( 0 ), mPlotStyle( QgsComposition::Preview ), mPageWidth( 297 ), mPageHeight( 210 ), mSpaceBetweenPages( 10 ), mPrintAsRaster( false ),
mSelectionTolerance( 0.0 ), mSnapToGrid( false ), mSnapGridResolution( 0.0 ), mSnapGridOffsetX( 0.0 ), mSnapGridOffsetY( 0.0 ), mAlignmentSnap( true ),
mSelectionTolerance( 0.0 ), mSnapToGrid( false ), mSnapGridResolution( 10.0 ), mSnapGridOffsetX( 0.0 ), mSnapGridOffsetY( 0.0 ), mAlignmentSnap( true ),
mAlignmentSnapTolerance( 2 ), mActiveItemCommand( 0 ), mActiveMultiFrameCommand( 0 ), mAtlasComposition( this )
{
loadSettings();

View File

@ -6,70 +6,145 @@
<rect>
<x>0</x>
<y>0</y>
<width>232</width>
<height>430</height>
<width>469</width>
<height>689</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QGridLayout" name="gridLayout_3">
<item row="0" column="0">
<widget class="QToolBox" name="toolBox">
<property name="currentIndex">
<number>0</number>
<layout class="QHBoxLayout" name="horizontalLayout_5">
<property name="margin">
<number>0</number>
</property>
<item>
<widget class="QScrollArea" name="scrollArea">
<property name="widgetResizable">
<bool>true</bool>
</property>
<widget class="QWidget" name="page">
<widget class="QWidget" name="scrollAreaWidgetContents">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>214</width>
<height>383</height>
<width>467</width>
<height>687</height>
</rect>
</property>
<attribute name="label">
<string>Arrow</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_2">
<property name="margin">
<number>3</number>
</property>
<item row="0" column="0">
<widget class="QPushButton" name="mArrowColorButton">
<property name="text">
<string>Arrow color...</string>
<layout class="QVBoxLayout" name="mainLayout">
<item>
<widget class="QgsCollapsibleGroupBoxBasic" name="groupBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>Main properties</string>
</property>
<property name="collapsed" stdset="0">
<bool>false</bool>
</property>
<layout class="QFormLayout" name="formLayout_2">
<property name="fieldGrowthPolicy">
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
</property>
<item row="1" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Line width</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QDoubleSpinBox" name="mOutlineWidthSpinBox">
<property name="prefix">
<string/>
</property>
<property name="suffix">
<string> mm</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Arrow head width</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QDoubleSpinBox" name="mArrowHeadWidthSpinBox">
<property name="prefix">
<string/>
</property>
<property name="suffix">
<string> mm</string>
</property>
</widget>
</item>
<item row="0" column="0" colspan="2">
<widget class="QPushButton" name="mArrowColorButton">
<property name="text">
<string>Arrow color...</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="1" column="0">
<widget class="QDoubleSpinBox" name="mOutlineWidthSpinBox">
<property name="prefix">
<string>Line width </string>
<item>
<widget class="QgsCollapsibleGroupBoxBasic" name="mArrowMarkersGroupBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QDoubleSpinBox" name="mArrowHeadWidthSpinBox">
<property name="prefix">
<string>Arrow head width </string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QGroupBox" name="mArrowMarkersGroupBox">
<property name="title">
<string>Arrow markers</string>
</property>
<property name="collapsed" stdset="0">
<bool>true</bool>
</property>
<layout class="QFormLayout" name="formLayout">
<item row="3" column="0">
<property name="fieldGrowthPolicy">
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
</property>
<item row="0" column="0" colspan="2">
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<widget class="QRadioButton" name="mDefaultMarkerRadioButton">
<property name="text">
<string>Default</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="mNoMarkerRadioButton">
<property name="text">
<string>None</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="mSvgMarkerRadioButton">
<property name="text">
<string>SVG</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="1" column="0">
<widget class="QLabel" name="mStartMarkerLabel">
<property name="text">
<string>Start marker</string>
</property>
</widget>
</item>
<item row="3" column="1">
<item row="1" column="1">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLineEdit" name="mStartMarkerLineEdit"/>
@ -83,14 +158,14 @@
</item>
</layout>
</item>
<item row="2" column="0" colspan="2">
<widget class="QRadioButton" name="mSvgMarkerRadioButton">
<item row="2" column="0">
<widget class="QLabel" name="mEndMarkerLabel">
<property name="text">
<string>SVG markers</string>
<string>End marker</string>
</property>
</widget>
</item>
<item row="4" column="1">
<item row="2" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QLineEdit" name="mEndMarkerLineEdit"/>
@ -104,49 +179,23 @@
</item>
</layout>
</item>
<item row="4" column="0">
<widget class="QLabel" name="mEndMarkerLabel">
<property name="text">
<string>End marker</string>
</property>
</widget>
</item>
<item row="1" column="0" colspan="2">
<widget class="QRadioButton" name="mNoMarkerRadioButton">
<property name="text">
<string>No marker</string>
</property>
</widget>
</item>
<item row="0" column="0" colspan="2">
<widget class="QRadioButton" name="mDefaultMarkerRadioButton">
<property name="text">
<string>Default marker</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="4" column="0">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>62</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>QgsCollapsibleGroupBoxBasic</class>
<extends>QGroupBox</extends>
<header location="global">qgscollapsiblegroupbox.h</header>
<container>1</container>
</customwidget>
</customwidgets>
<resources/>
<connections/>
</ui>

View File

@ -6,70 +6,79 @@
<rect>
<x>0</x>
<y>0</y>
<width>243</width>
<height>153</height>
<width>409</width>
<height>370</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<property name="margin">
<number>0</number>
</property>
<item row="0" column="0">
<widget class="QToolBox" name="mToolBox">
<property name="currentIndex">
<number>0</number>
<widget class="QScrollArea" name="scrollArea">
<property name="widgetResizable">
<bool>true</bool>
</property>
<widget class="QWidget" name="page">
<widget class="QWidget" name="scrollAreaWidgetContents">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>221</width>
<height>100</height>
<width>407</width>
<height>368</height>
</rect>
</property>
<attribute name="label">
<string>HTML</string>
</attribute>
<layout class="QGridLayout" name="gridLayout">
<item row="2" column="2">
<widget class="QToolButton" name="mFileToolButton">
<property name="text">
<string>...</string>
<layout class="QVBoxLayout" name="mainLayout">
<item>
<widget class="QgsCollapsibleGroupBoxBasic" name="groupBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLineEdit" name="mUrlLineEdit"/>
</item>
<item row="2" column="0">
<widget class="QLabel" name="mUrlLabel">
<property name="text">
<string>URL</string>
<property name="title">
<string>Main properties</string>
</property>
</widget>
</item>
<item row="0" column="1" colspan="2">
<widget class="QComboBox" name="mResizeModeComboBox"/>
</item>
<item row="3" column="1">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="0">
<widget class="QLabel" name="mResizeModeLabel">
<property name="text">
<string>Resize mode</string>
<property name="collapsed" stdset="0">
<bool>false</bool>
</property>
<layout class="QFormLayout" name="formLayout">
<item row="2" column="0">
<widget class="QLabel" name="mResizeModeLabel">
<property name="text">
<string>Resize mode</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QComboBox" name="mResizeModeComboBox"/>
</item>
<item row="0" column="1">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLineEdit" name="mUrlLineEdit"/>
</item>
<item>
<widget class="QToolButton" name="mFileToolButton">
<property name="text">
<string>...</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="0" column="0">
<widget class="QLabel" name="mUrlLabel">
<property name="text">
<string>URL</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
@ -78,6 +87,14 @@
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>QgsCollapsibleGroupBoxBasic</class>
<extends>QGroupBox</extends>
<header location="global">qgscollapsiblegroupbox.h</header>
<container>1</container>
</customwidget>
</customwidgets>
<resources/>
<connections/>
</ui>

View File

@ -7,62 +7,276 @@
<x>0</x>
<y>0</y>
<width>393</width>
<height>391</height>
<height>729</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
<string>Global Options</string>
</property>
<layout class="QFormLayout" name="formLayout_2">
<property name="fieldGrowthPolicy">
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
<layout class="QVBoxLayout" name="verticalLayout_2">
<property name="spacing">
<number>7</number>
</property>
<item row="0" column="0" colspan="2">
<widget class="QPushButton" name="mPositionButton">
<property name="text">
<string>Position and size...</string>
<property name="margin">
<number>0</number>
</property>
<item>
<widget class="QgsCollapsibleGroupBoxBasic" name="mGeneralOptionsGroupBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>Position and size</string>
</property>
<property name="collapsed" stdset="0">
<bool>true</bool>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_6">
<item>
<layout class="QFormLayout" name="formLayout">
<property name="fieldGrowthPolicy">
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
</property>
<item row="0" column="0">
<widget class="QLabel" name="mXLabel">
<property name="text">
<string>X</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="mXLineEdit"/>
</item>
<item row="1" column="0">
<widget class="QLabel" name="mYLabel">
<property name="text">
<string>Y</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLineEdit" name="mYLineEdit"/>
</item>
<item row="2" column="0">
<widget class="QLabel" name="mWidthLabel">
<property name="text">
<string>Width</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLineEdit" name="mWidthLineEdit"/>
</item>
<item row="3" column="0">
<widget class="QLabel" name="mHeightLabel">
<property name="text">
<string>Height</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QLineEdit" name="mHeightLineEdit"/>
</item>
</layout>
</item>
<item>
<widget class="QGroupBox" name="mReferencePointGroupBox">
<property name="title">
<string>Reference point</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_5">
<item>
<layout class="QGridLayout" name="gridLayout">
<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="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="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="0">
<widget class="QCheckBox" name="mMiddleLeftCheckBox">
<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="0" column="0">
<widget class="QCheckBox" name="mUpperLeftCheckBox">
<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="QCheckBox" name="mLowerLeftCheckBox">
<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="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>
</layout>
</item>
</layout>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
<item row="1" column="0" colspan="2">
<widget class="QgsCollapsibleGroupBox" name="mFrameGroupBox"><property name="collapsed" stdset="0"><bool>false</bool></property><property name="saveCollapsedState" stdset="0"><bool>true</bool></property>
<item>
<widget class="QgsCollapsibleGroupBoxBasic" name="mFrameGroupBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>Show frame</string>
<string>Frame</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0" colspan="2">
<property name="collapsed" stdset="0">
<bool>true</bool>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<widget class="QPushButton" name="mFrameColorButton">
<property name="text">
<string>Frame color...</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="mOutlineWidthLabel">
<property name="text">
<string>Thickness</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="buddy">
<cstring>mOutlineWidthSpinBox</cstring>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QDoubleSpinBox" name="mOutlineWidthSpinBox"/>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLabel" name="mOutlineWidthLabel">
<property name="text">
<string>Thickness</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="buddy">
<cstring>mOutlineWidthSpinBox</cstring>
</property>
</widget>
</item>
<item>
<widget class="QDoubleSpinBox" name="mOutlineWidthSpinBox"/>
</item>
</layout>
</item>
</layout>
</widget>
</item>
<item row="2" column="0" colspan="2">
<widget class="QgsCollapsibleGroupBox" name="mBackgroundGroupBox"><property name="collapsed" stdset="0"><bool>false</bool></property><property name="saveCollapsedState" stdset="0"><bool>true</bool></property>
<item>
<widget class="QgsCollapsibleGroupBoxBasic" name="mBackgroundGroupBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>Show background</string>
<string>Background</string>
</property>
<property name="flat">
<bool>false</bool>
@ -73,69 +287,94 @@
<property name="checked">
<bool>true</bool>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0" colspan="3">
<property name="collapsed" stdset="0">
<bool>true</bool>
</property>
<layout class="QVBoxLayout" name="verticalLayout_4">
<item>
<widget class="QPushButton" name="mBackgroundColorButton">
<property name="text">
<string>Background color...</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="mOpacityLabel">
<property name="text">
<string>Opacity</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="buddy">
<cstring>mOpacitySlider</cstring>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QSlider" name="mOpacitySlider">
<property name="maximum">
<number>255</number>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QSpinBox" name="mOpacitySpinBox">
<property name="maximum">
<number>255</number>
</property>
</widget>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QSpinBox" name="mOpacitySpinBox">
<property name="maximum">
<number>255</number>
</property>
</widget>
</item>
<item>
<widget class="QSlider" name="mOpacitySlider">
<property name="maximum">
<number>255</number>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="mOpacityLabel">
<property name="text">
<string>Opacity</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="buddy">
<cstring>mOpacitySlider</cstring>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
<item row="3" column="0" colspan="2">
<layout class="QHBoxLayout" name="horizontalLayout"/>
</item>
<item row="5" column="0">
<widget class="QLabel" name="mIdLabel">
<property name="text">
<item>
<widget class="QgsCollapsibleGroupBoxBasic" name="groupBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>Item ID</string>
</property>
<property name="collapsed" stdset="0">
<bool>true</bool>
</property>
<layout class="QFormLayout" name="formLayout_2">
<item row="0" column="0">
<widget class="QLabel" name="mIdLabel">
<property name="text">
<string>Item ID</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="mItemIdLineEdit"/>
</item>
</layout>
</widget>
</item>
<item row="5" column="1">
<widget class="QLineEdit" name="mItemIdLineEdit"/>
</item>
<item row="6" column="0" colspan="2">
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::MinimumExpanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>143</width>
<height>87</height>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
@ -144,9 +383,9 @@
</widget>
<customwidgets>
<customwidget>
<class>QgsCollapsibleGroupBox</class>
<class>QgsCollapsibleGroupBoxBasic</class>
<extends>QGroupBox</extends>
<header>qgscollapsiblegroupbox.h</header>
<header location="global">qgscollapsiblegroupbox.h</header>
<container>1</container>
</customwidget>
</customwidgets>

View File

@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>443</width>
<height>550</height>
<height>712</height>
</rect>
</property>
<property name="sizePolicy">
@ -19,225 +19,303 @@
<property name="windowTitle">
<string>Label Options</string>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0">
<widget class="QToolBox" name="toolBox">
<property name="currentIndex">
<number>0</number>
<layout class="QVBoxLayout" name="_2">
<property name="margin">
<number>0</number>
</property>
<item>
<widget class="QScrollArea" name="scrollArea">
<property name="widgetResizable">
<bool>true</bool>
</property>
<widget class="QWidget" name="page">
<widget class="QWidget" name="scrollAreaWidgetContents">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>400</width>
<height>503</height>
<width>441</width>
<height>710</height>
</rect>
</property>
<attribute name="label">
<string>Label</string>
</attribute>
<layout class="QGridLayout" name="gridLayout">
<item row="7" column="1">
<widget class="QDoubleSpinBox" name="mMarginDoubleSpinBox">
<property name="prefix">
<string/>
<layout class="QVBoxLayout" name="mainLayout">
<item>
<widget class="QgsCollapsibleGroupBoxBasic" name="mTextGroupBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>1</verstretch>
</sizepolicy>
</property>
<property name="suffix">
<string> mm</string>
<property name="title">
<string>Main properties</string>
</property>
<property name="checkable">
<bool>false</bool>
</property>
<property name="collapsed" stdset="0">
<bool>false</bool>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QPlainTextEdit" name="mTextEdit">
<property name="tabStopWidth">
<number>10</number>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<widget class="QCheckBox" name="mHtmlCheckBox">
<property name="text">
<string>Render as HTML</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="mInsertExpressionButton">
<property name="text">
<string>Insert an expression</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_4">
<item>
<widget class="QPushButton" name="mFontButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Font</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="mFontColorButton">
<property name="text">
<string>Font color...</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
<item row="8" column="0">
<widget class="QLabel" name="mRotationLabel">
<item>
<widget class="QgsCollapsibleGroupBoxBasic" name="mAlignementGroup">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Rotation</string>
<property name="title">
<string>Alignement</string>
</property>
<property name="wordWrap">
<property name="checkable">
<bool>false</bool>
</property>
<property name="collapsed" stdset="0">
<bool>true</bool>
</property>
<property name="buddy">
<cstring>mRotationSpinBox</cstring>
</property>
</widget>
</item>
<item row="8" column="1">
<widget class="QDoubleSpinBox" name="mRotationSpinBox">
<property name="suffix">
<string> °</string>
</property>
<property name="maximum">
<double>360.000000000000000</double>
</property>
</widget>
</item>
<item row="1" column="0" colspan="2">
<widget class="QPushButton" name="mInsertExpressionButton">
<property name="text">
<string>Insert an expression</string>
</property>
</widget>
</item>
<item row="2" column="0" colspan="2">
<widget class="QCheckBox" name="mHtmlCheckBox">
<property name="text">
<string>Render as HTML</string>
</property>
</widget>
</item>
<item row="7" column="0">
<widget class="QLabel" name="mMarginLabel">
<property name="text">
<string>Margin</string>
</property>
</widget>
</item>
<item row="6" column="0" colspan="2">
<widget class="QGroupBox" name="mVerticalAlignementGroup">
<property name="title">
<string>Vertical Alignment:</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<spacer name="horizontalSpacer_3">
<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="QRadioButton" name="mTopRadioButton">
<property name="text">
<string>Top</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="mMiddleRadioButton">
<property name="text">
<string>Middle</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="mBottomRadioButton">
<property name="text">
<string>Bottom</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_4">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
<item row="5" column="0" colspan="2">
<widget class="QGroupBox" name="mHorizontalAlignementGroup">
<property name="title">
<string>Horizontal Alignment:</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="sizeConstraint">
<enum>QLayout::SetMinimumSize</enum>
<layout class="QFormLayout" name="formLayout_4">
<property name="fieldGrowthPolicy">
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
</property>
<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="QRadioButton" name="mLeftRadioButton">
<item row="0" column="0">
<widget class="QLabel" name="mVerticalAlignementLabel">
<property name="text">
<string>Left</string>
<string>Vertical</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="mCenterRadioButton">
<item row="0" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_6">
<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="QRadioButton" name="mTopRadioButton">
<property name="text">
<string>Top</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="mMiddleRadioButton">
<property name="text">
<string>Middle</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="mBottomRadioButton">
<property name="text">
<string>Bottom</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item row="1" column="0">
<widget class="QLabel" name="mHorizontalAlignementLabel">
<property name="text">
<string>Center</string>
<string>Horizontal</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="mRightRadioButton">
<property name="text">
<string>Right</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 row="1" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_5">
<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="QRadioButton" name="mLeftRadioButton">
<property name="text">
<string>Left</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="mCenterRadioButton">
<property name="text">
<string>Center</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="mRightRadioButton">
<property name="text">
<string>Right</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_4">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
</layout>
</widget>
</item>
<item row="3" column="1">
<widget class="QPushButton" name="mFontColorButton">
<property name="text">
<string>Font color...</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QPushButton" name="mFontButton">
<item>
<widget class="QgsCollapsibleGroupBoxBasic" name="mDisplayGroupBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Font</string>
<property name="title">
<string>Display</string>
</property>
</widget>
</item>
<item row="0" column="0" colspan="2">
<widget class="QPlainTextEdit" name="mTextEdit">
<property name="tabStopWidth">
<number>10</number>
<property name="checkable">
<bool>false</bool>
</property>
<property name="collapsed" stdset="0">
<bool>true</bool>
</property>
<layout class="QFormLayout" name="formLayout_2">
<property name="fieldGrowthPolicy">
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
</property>
<item row="0" column="0">
<widget class="QLabel" name="mMarginLabel">
<property name="text">
<string>Margin</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QDoubleSpinBox" name="mMarginDoubleSpinBox">
<property name="prefix">
<string/>
</property>
<property name="suffix">
<string> mm</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="mRotationLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Rotation</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="buddy">
<cstring>mRotationSpinBox</cstring>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QDoubleSpinBox" name="mRotationSpinBox">
<property name="suffix">
<string> °</string>
</property>
<property name="maximum">
<double>360.000000000000000</double>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
@ -247,10 +325,14 @@
</layout>
</widget>
<layoutdefault spacing="6" margin="11"/>
<tabstops>
<tabstop>mFontButton</tabstop>
<tabstop>mMarginDoubleSpinBox</tabstop>
</tabstops>
<customwidgets>
<customwidget>
<class>QgsCollapsibleGroupBoxBasic</class>
<extends>QGroupBox</extends>
<header location="global">qgscollapsiblegroupbox.h</header>
<container>1</container>
</customwidget>
</customwidgets>
<resources/>
<connections/>
</ui>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -6,7 +6,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>327</width>
<width>331</width>
<height>614</height>
</rect>
</property>
@ -19,50 +19,89 @@
<property name="windowTitle">
<string>Picture Options</string>
</property>
<layout class="QGridLayout" name="gridLayout_3">
<layout class="QVBoxLayout" name="verticalLayout_2">
<property name="margin">
<number>0</number>
</property>
<item row="0" column="0">
<widget class="QToolBox" name="toolBox">
<property name="currentIndex">
<number>0</number>
<item>
<widget class="QScrollArea" name="scrollArea">
<property name="widgetResizable">
<bool>true</bool>
</property>
<widget class="QWidget" name="page">
<widget class="QWidget" name="scrollAreaWidgetContents">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>317</width>
<height>577</height>
<width>329</width>
<height>612</height>
</rect>
</property>
<attribute name="label">
<string>Picture options</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="margin">
<number>3</number>
</property>
<layout class="QVBoxLayout" name="mainLayout">
<item>
<widget class="QGroupBox" name="mPreviewGroupBox">
<widget class="QgsCollapsibleGroupBoxBasic" name="mPreviewGroupBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>Preloaded images</string>
<string>Main properties</string>
</property>
<layout class="QGridLayout">
<property name="leftMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<item row="0" column="0">
<property name="collapsed" stdset="0">
<bool>false</bool>
</property>
<layout class="QFormLayout" name="formLayout_2">
<item row="1" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Path</string>
</property>
<property name="buddy">
<cstring>mPictureLineEdit</cstring>
</property>
</widget>
</item>
<item row="1" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QLineEdit" name="mPictureLineEdit"/>
</item>
<item>
<widget class="QPushButton" name="mPictureBrowseButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>150</width>
<height>32767</height>
</size>
</property>
<property name="text">
<string>...</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QgsCollapsibleGroupBoxBasic" name="mSearchDirectoriesGroupBox">
<property name="title">
<string>Search directories</string>
</property>
<property name="collapsed" stdset="0">
<bool>false</bool>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QListWidget" name="mPreviewListWidget">
<property name="showDropIndicator" stdset="0">
<bool>false</bool>
@ -96,37 +135,22 @@
</property>
</widget>
</item>
<item row="1" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QComboBox" name="mSearchDirectoriesComboBox"/>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLabel" name="label">
<widget class="QPushButton" name="mRemoveDirectoryButton">
<property name="text">
<string>Load another</string>
</property>
<property name="buddy">
<cstring>mPictureLineEdit</cstring>
<string>Remove</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="mPictureLineEdit"/>
</item>
<item>
<widget class="QPushButton" name="mPictureBrowseButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>150</width>
<height>32767</height>
</size>
</property>
<widget class="QPushButton" name="mAddDirectoryButton">
<property name="text">
<string>...</string>
<string>Add...</string>
</property>
</widget>
</item>
@ -136,9 +160,18 @@
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox">
<widget class="QgsCollapsibleGroupBoxBasic" name="groupBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>Options</string>
<string>Rotation</string>
</property>
<property name="collapsed" stdset="0">
<bool>true</bool>
</property>
<layout class="QFormLayout" name="formLayout">
<property name="fieldGrowthPolicy">
@ -147,135 +180,23 @@
<property name="margin">
<number>3</number>
</property>
<item row="3" column="0">
<widget class="QLabel" name="textLabel3">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Width</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="buddy">
<cstring>mWidthLineEdit</cstring>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QLabel" name="textLabel4">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Height</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="buddy">
<cstring>mHeightLineEdit</cstring>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QLineEdit" name="mHeightLineEdit"/>
</item>
<item row="6" column="0">
<widget class="QLabel" name="mRotationLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Rotation</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="buddy">
<cstring>mRotationSpinBox</cstring>
</property>
</widget>
</item>
<item row="8" column="0">
<item row="1" column="0">
<widget class="QCheckBox" name="mRotationFromComposerMapCheckBox">
<property name="text">
<string>Sync with map</string>
</property>
</widget>
</item>
<item row="6" column="1">
<widget class="QDoubleSpinBox" name="mRotationSpinBox">
<property name="maximum">
<double>360.000000000000000</double>
</property>
</widget>
</item>
<item row="8" column="1">
<item row="1" column="1">
<widget class="QComboBox" name="mComposerMapComboBox"/>
</item>
<item row="3" column="1">
<widget class="QLineEdit" name="mWidthLineEdit"/>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="mSearchDirectoriesGroupBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>Search directories</string>
</property>
<layout class="QGridLayout">
<item row="0" column="0" colspan="3">
<widget class="QComboBox" name="mSearchDirectoriesComboBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
<item row="0" column="0" colspan="2">
<widget class="QDoubleSpinBox" name="mRotationSpinBox">
<property name="suffix">
<string> °</string>
</property>
</widget>
</item>
<item row="1" column="0">
<spacer>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>101</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="1" column="1">
<widget class="QPushButton" name="mAddDirectoryButton">
<property name="text">
<string>Add...</string>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QPushButton" name="mRemoveDirectoryButton">
<property name="text">
<string>Remove</string>
<property name="maximum">
<double>360.000000000000000</double>
</property>
</widget>
</item>
@ -289,11 +210,16 @@
</layout>
</widget>
<layoutdefault spacing="6" margin="11"/>
<customwidgets>
<customwidget>
<class>QgsCollapsibleGroupBoxBasic</class>
<extends>QGroupBox</extends>
<header location="global">qgscollapsiblegroupbox.h</header>
<container>1</container>
</customwidget>
</customwidgets>
<tabstops>
<tabstop>mSearchDirectoriesComboBox</tabstop>
<tabstop>mAddDirectoryButton</tabstop>
<tabstop>mRemoveDirectoryButton</tabstop>
<tabstop>mPreviewListWidget</tabstop>
<tabstop>mPictureLineEdit</tabstop>
<tabstop>mPictureBrowseButton</tabstop>
<tabstop>mRotationFromComposerMapCheckBox</tabstop>

View File

@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>436</width>
<height>499</height>
<height>761</height>
</rect>
</property>
<property name="sizePolicy">
@ -24,294 +24,407 @@
<number>0</number>
</property>
<item>
<widget class="QToolBox" name="toolBox">
<property name="currentIndex">
<number>0</number>
<widget class="QScrollArea" name="scrollArea">
<property name="widgetResizable">
<bool>true</bool>
</property>
<widget class="QWidget" name="page">
<property name="enabled">
<bool>true</bool>
</property>
<widget class="QWidget" name="scrollAreaWidgetContents">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>415</width>
<height>552</height>
<width>434</width>
<height>759</height>
</rect>
</property>
<attribute name="label">
<string>Scale bar</string>
</attribute>
<layout class="QFormLayout" name="formLayout">
<property name="fieldGrowthPolicy">
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
</property>
<item row="1" column="0">
<widget class="QLabel" name="mUnitsLabel">
<property name="text">
<layout class="QVBoxLayout" name="mainLayout">
<item>
<widget class="QgsCollapsibleGroupBoxBasic" name="groupBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>Main properties</string>
</property>
<property name="collapsed" stdset="0">
<bool>false</bool>
</property>
<layout class="QFormLayout" name="formLayout">
<property name="fieldGrowthPolicy">
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
</property>
<item row="0" column="0">
<widget class="QLabel" name="mMapLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Map</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="buddy">
<cstring>mMapComboBox</cstring>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QComboBox" name="mMapComboBox">
<property name="enabled">
<bool>true</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="mStyleLabel">
<property name="text">
<string>Style</string>
</property>
<property name="buddy">
<cstring>mStyleComboBox</cstring>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QComboBox" name="mStyleComboBox"/>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QgsCollapsibleGroupBoxBasic" name="groupBox_2">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>Units</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QComboBox" name="mUnitsComboBox"/>
</item>
<item row="3" column="0">
<widget class="QLabel" name="mUnitLabelLabel">
<property name="text">
<string>Unit label</string>
</property>
<property name="wordWrap">
<property name="collapsed" stdset="0">
<bool>true</bool>
</property>
<property name="buddy">
<cstring>mUnitLabelLineEdit</cstring>
</property>
<layout class="QFormLayout" name="formLayout_2">
<item row="1" column="0">
<widget class="QLabel" name="mUnitLabelLabel">
<property name="text">
<string>Label</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="buddy">
<cstring>mUnitLabelLineEdit</cstring>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLineEdit" name="mUnitLabelLineEdit"/>
</item>
<item row="2" column="0">
<widget class="QLabel" name="mMapUnitsPerBarUnitLabel">
<property name="text">
<string>Map units per bar unit</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="buddy">
<cstring>mMapUnitsPerBarUnitSpinBox</cstring>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QDoubleSpinBox" name="mMapUnitsPerBarUnitSpinBox">
<property name="maximum">
<double>9999999999999.000000000000000</double>
</property>
</widget>
</item>
<item row="0" column="0" colspan="2">
<widget class="QComboBox" name="mUnitsComboBox"/>
</item>
</layout>
</widget>
</item>
<item row="3" column="1">
<widget class="QLineEdit" name="mUnitLabelLineEdit"/>
</item>
<item row="4" column="0">
<widget class="QLabel" name="mMapUnitsPerBarUnitLabel">
<property name="text">
<string>Map units per bar unit</string>
<item>
<widget class="QgsCollapsibleGroupBoxBasic" name="groupBox_3">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="buddy">
<cstring>mMapUnitsPerBarUnitSpinBox</cstring>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QDoubleSpinBox" name="mMapUnitsPerBarUnitSpinBox">
<property name="maximum">
<double>9999999999999.000000000000000</double>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QLabel" name="mSegmentSizeLabel">
<property name="text">
<string>Segment size</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="buddy">
<cstring>mSegmentSizeSpinBox</cstring>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QDoubleSpinBox" name="mSegmentSizeSpinBox">
<property name="decimals">
<number>4</number>
</property>
<property name="maximum">
<double>9999999999999.000000000000000</double>
</property>
</widget>
</item>
<item row="6" column="0">
<widget class="QLabel" name="mSegmentLabel">
<property name="text">
<property name="title">
<string>Segments</string>
</property>
</widget>
</item>
<item row="6" column="1">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QSpinBox" name="mSegmentsLeftSpinBox">
<property name="suffix">
<string> left</string>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="mNumberOfSegmentsSpinBox">
<property name="suffix">
<string> right</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="8" column="0">
<widget class="QLabel" name="mStyleLabel">
<property name="text">
<string>Style</string>
</property>
<property name="buddy">
<cstring>mStyleComboBox</cstring>
</property>
</widget>
</item>
<item row="8" column="1">
<widget class="QComboBox" name="mStyleComboBox"/>
</item>
<item row="9" column="0">
<widget class="QLabel" name="mMapLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Map</string>
</property>
<property name="wordWrap">
<property name="collapsed" stdset="0">
<bool>true</bool>
</property>
<property name="buddy">
<cstring>mMapComboBox</cstring>
</property>
<layout class="QFormLayout" name="formLayout_3">
<property name="fieldGrowthPolicy">
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
</property>
<item row="0" column="0">
<widget class="QLabel" name="mSegmentLabel">
<property name="text">
<string>Segments</string>
</property>
</widget>
</item>
<item row="0" column="1">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QSpinBox" name="mSegmentsLeftSpinBox">
<property name="suffix">
<string/>
</property>
<property name="prefix">
<string>left </string>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="mNumberOfSegmentsSpinBox">
<property name="suffix">
<string/>
</property>
<property name="prefix">
<string>right </string>
</property>
</widget>
</item>
</layout>
</item>
<item row="1" column="0">
<widget class="QLabel" name="mSegmentSizeLabel">
<property name="text">
<string>Size</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="buddy">
<cstring>mSegmentSizeSpinBox</cstring>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QDoubleSpinBox" name="mSegmentSizeSpinBox">
<property name="suffix">
<string> units</string>
</property>
<property name="decimals">
<number>2</number>
</property>
<property name="maximum">
<double>9999999999999.000000000000000</double>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Height</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QSpinBox" name="mHeightSpinBox">
<property name="suffix">
<string> mm</string>
</property>
<property name="prefix">
<string/>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="9" column="1">
<widget class="QComboBox" name="mMapComboBox">
<property name="enabled">
<item>
<widget class="QgsCollapsibleGroupBoxBasic" name="groupBox_5">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>Display</string>
</property>
<property name="collapsed" stdset="0">
<bool>true</bool>
</property>
<layout class="QFormLayout" name="formLayout_4">
<property name="fieldGrowthPolicy">
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
</property>
<item row="0" column="0">
<widget class="QLabel" name="label_4">
<property name="text">
<string>Box margin</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QDoubleSpinBox" name="mBoxSizeSpinBox">
<property name="prefix">
<string/>
</property>
<property name="suffix">
<string> mm</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Labels margin</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QDoubleSpinBox" name="mLabelBarSpaceSpinBox">
<property name="prefix">
<string/>
</property>
<property name="suffix">
<string> mm</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Line width</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QDoubleSpinBox" name="mLineWidthSpinBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="prefix">
<string/>
</property>
<property name="suffix">
<string> mm</string>
</property>
<property name="minimum">
<double>0.010000000000000</double>
</property>
<property name="singleStep">
<double>0.100000000000000</double>
</property>
<property name="value">
<double>0.200000000000000</double>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="mAlignmentLabel">
<property name="text">
<string>Alignment</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QComboBox" name="mAlignmentComboBox"/>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QgsCollapsibleGroupBoxBasic" name="groupBox_4">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>Fonts and colors</string>
</property>
<property name="collapsed" stdset="0">
<bool>true</bool>
</property>
<property name="saveCheckedState" stdset="0">
<bool>false</bool>
</property>
<property name="saveCollapsedState" stdset="0">
<bool>false</bool>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<layout class="QHBoxLayout" name="horizontalLayout2">
<property name="margin">
<number>0</number>
</property>
<item>
<widget class="QPushButton" name="mFontButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Font...</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="mFontColorPushButton">
<property name="text">
<string>Font color...</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout3">
<property name="margin">
<number>0</number>
</property>
<item>
<widget class="QPushButton" name="mColorPushButton">
<property name="text">
<string>Fill color...</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="mStrokeColorPushButton">
<property name="text">
<string>Stroke color...</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
<item row="10" column="0">
<widget class="QLabel" name="mAlignmentLabel">
<property name="text">
<string>Alignment</string>
</property>
</widget>
</item>
<item row="10" column="1">
<widget class="QComboBox" name="mAlignmentComboBox"/>
</item>
<item row="14" column="0" colspan="2">
<widget class="QSpinBox" name="mHeightSpinBox">
<property name="suffix">
<string> mm</string>
</property>
<property name="prefix">
<string>Height </string>
</property>
</widget>
</item>
<item row="15" column="0" colspan="2">
<widget class="QDoubleSpinBox" name="mLabelBarSpaceSpinBox">
<property name="prefix">
<string>Label space </string>
</property>
<property name="suffix">
<string> mm</string>
</property>
</widget>
</item>
<item row="16" column="0" colspan="2">
<widget class="QDoubleSpinBox" name="mLineWidthSpinBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="prefix">
<string>Line width </string>
</property>
<property name="suffix">
<string> mm</string>
</property>
<property name="minimum">
<double>0.010000000000000</double>
</property>
<property name="singleStep">
<double>0.100000000000000</double>
</property>
<property name="value">
<double>0.200000000000000</double>
</property>
</widget>
</item>
<item row="17" column="0" colspan="2">
<widget class="QDoubleSpinBox" name="mBoxSizeSpinBox">
<property name="prefix">
<string>Box space </string>
</property>
<property name="suffix">
<string> mm</string>
</property>
</widget>
</item>
<item row="19" column="0" colspan="2">
<layout class="QHBoxLayout" name="horizontalLayout2">
<property name="margin">
<number>0</number>
</property>
<item>
<widget class="QPushButton" name="mFontButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Font...</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="mFontColorPushButton">
<property name="text">
<string>Font color...</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="22" column="0" colspan="2">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item row="20" column="0" colspan="2">
<layout class="QHBoxLayout" name="horizontalLayout3">
<property name="margin">
<number>0</number>
</property>
<item>
<widget class="QPushButton" name="mColorPushButton">
<property name="text">
<string>Fill color...</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="mStrokeColorPushButton">
<property name="text">
<string>Stroke color...</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</widget>
@ -319,6 +432,14 @@
</layout>
</widget>
<layoutdefault spacing="6" margin="11"/>
<customwidgets>
<customwidget>
<class>QgsCollapsibleGroupBoxBasic</class>
<extends>QGroupBox</extends>
<header location="global">qgscollapsiblegroupbox.h</header>
<container>1</container>
</customwidget>
</customwidgets>
<resources/>
<connections/>
</ui>

View File

@ -13,85 +13,83 @@
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0">
<widget class="QToolBox" name="toolBox">
<property name="currentIndex">
<number>0</number>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="margin">
<number>0</number>
</property>
<item>
<widget class="QScrollArea" name="scrollArea">
<property name="widgetResizable">
<bool>true</bool>
</property>
<widget class="QWidget" name="Shape">
<widget class="QWidget" name="scrollAreaWidgetContents">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>267</width>
<height>377</height>
<width>283</width>
<height>425</height>
</rect>
</property>
<attribute name="label">
<string>Shape</string>
</attribute>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QComboBox" name="mShapeComboBox"/>
</item>
<item row="1" column="0">
<widget class="QPushButton" name="mOutlineColorButton">
<property name="text">
<string>Shape outline color...</string>
<layout class="QVBoxLayout" name="mainLayout">
<item>
<widget class="QgsCollapsibleGroupBoxBasic" name="groupBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>Main properties</string>
</property>
<property name="collapsed" stdset="0">
<bool>false</bool>
</property>
<layout class="QFormLayout" name="formLayout">
<property name="fieldGrowthPolicy">
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
</property>
<item row="0" column="0" colspan="2">
<widget class="QComboBox" name="mShapeComboBox"/>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Rotation</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QSpinBox" name="mRotationSpinBox">
<property name="suffix">
<string> °</string>
</property>
<property name="prefix">
<string comment="Rotation" extracomment="Rotation"/>
</property>
<property name="maximum">
<number>359</number>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="2" column="0">
<widget class="QDoubleSpinBox" name="mOutlineWidthSpinBox">
<property name="prefix">
<string>Outline width </string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QCheckBox" name="mTransparentCheckBox">
<property name="text">
<string>Transparent fill</string>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QPushButton" name="mFillColorButton">
<property name="text">
<string>Shape fill Color...</string>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QSpinBox" name="mRotationSpinBox">
<property name="prefix">
<string comment="Rotation" extracomment="Rotation">Rotation </string>
</property>
<property name="maximum">
<number>359</number>
</property>
</widget>
</item>
<item row="6" column="0">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>QgsCollapsibleGroupBoxBasic</class>
<extends>QGroupBox</extends>
<header location="global">qgscollapsiblegroupbox.h</header>
<container>1</container>
</customwidget>
</customwidgets>
<resources/>
<connections/>
</ui>

View File

@ -6,207 +6,206 @@
<rect>
<x>0</x>
<y>0</y>
<width>262</width>
<height>490</height>
<width>605</width>
<height>631</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<layout class="QVBoxLayout" name="verticalLayout">
<property name="margin">
<number>3</number>
<number>0</number>
</property>
<item row="0" column="0">
<widget class="QToolBox" name="mToolBox">
<property name="currentIndex">
<number>0</number>
<item>
<widget class="QScrollArea" name="scrollArea">
<property name="widgetResizable">
<bool>true</bool>
</property>
<widget class="QWidget" name="page">
<widget class="QWidget" name="scrollAreaWidgetContents">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>239</width>
<height>464</height>
<width>603</width>
<height>629</height>
</rect>
</property>
<attribute name="label">
<string>Table</string>
</attribute>
<layout class="QFormLayout" name="formLayout">
<property name="fieldGrowthPolicy">
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
</property>
<item row="0" column="0">
<widget class="QLabel" name="mLayerLabel">
<property name="text">
<string>Layer</string>
</property>
<property name="buddy">
<cstring>mLayerComboBox</cstring>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QComboBox" name="mLayerComboBox"/>
</item>
<item row="1" column="0" colspan="2">
<widget class="QPushButton" name="mAttributesPushButton">
<property name="text">
<string>Attributes...</string>
</property>
</widget>
</item>
<item row="3" column="0" colspan="2">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>10</height>
</size>
</property>
</spacer>
</item>
<item row="5" column="0">
<widget class="QLabel" name="mComposerMapLabel">
<property name="text">
<string>Composer map</string>
</property>
<property name="buddy">
<cstring>mComposerMapComboBox</cstring>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QComboBox" name="mComposerMapComboBox"/>
</item>
<item row="8" column="0">
<widget class="QLabel" name="mMaxNumFeaturesLabel">
<property name="text">
<string>Maximum rows</string>
</property>
<property name="buddy">
<cstring>mMaximumColumnsSpinBox</cstring>
</property>
</widget>
</item>
<item row="8" column="1">
<widget class="QSpinBox" name="mMaximumColumnsSpinBox"/>
</item>
<item row="12" column="0" colspan="2">
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>10</height>
</size>
</property>
</spacer>
</item>
<item row="13" column="0" colspan="2">
<widget class="QCheckBox" name="mShowGridCheckBox">
<property name="text">
<string>Show grid</string>
</property>
</widget>
</item>
<item row="14" column="0">
<widget class="QLabel" name="mGridStrokeWidthLabel">
<property name="text">
<string>Grid stroke width</string>
</property>
<property name="buddy">
<cstring>mGridStrokeWidthSpinBox</cstring>
</property>
</widget>
</item>
<item row="14" column="1">
<widget class="QDoubleSpinBox" name="mGridStrokeWidthSpinBox"/>
</item>
<item row="15" column="0">
<widget class="QLabel" name="mGridColorLabel">
<property name="text">
<string>Grid color</string>
</property>
<property name="buddy">
<cstring>mGridColorButton</cstring>
</property>
</widget>
</item>
<item row="15" column="1">
<widget class="QgsColorButton" name="mGridColorButton">
<layout class="QVBoxLayout" name="mainLayout">
<item>
<widget class="QgsCollapsibleGroupBoxBasic" name="groupBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string/>
<property name="title">
<string>Main attributes</string>
</property>
<property name="collapsed" stdset="0">
<bool>false</bool>
</property>
<layout class="QFormLayout" name="formLayout_2">
<item row="1" column="0">
<widget class="QLabel" name="mLayerLabel">
<property name="text">
<string>Layer</string>
</property>
<property name="buddy">
<cstring>mLayerComboBox</cstring>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QComboBox" name="mLayerComboBox"/>
</item>
<item row="2" column="0" colspan="2">
<widget class="QPushButton" name="mAttributesPushButton">
<property name="text">
<string>Attributes...</string>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QLabel" name="mComposerMapLabel">
<property name="text">
<string>Composer map</string>
</property>
<property name="buddy">
<cstring>mComposerMapComboBox</cstring>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QComboBox" name="mComposerMapComboBox"/>
</item>
<item row="3" column="0" colspan="2">
<widget class="QCheckBox" name="mShowOnlyVisibleFeaturesCheckBox">
<property name="text">
<string>Show only visible features</string>
</property>
</widget>
</item>
<item row="6" column="0">
<widget class="QLabel" name="mMaxNumFeaturesLabel">
<property name="text">
<string>Maximum rows</string>
</property>
<property name="buddy">
<cstring>mMaximumColumnsSpinBox</cstring>
</property>
</widget>
</item>
<item row="6" column="1">
<widget class="QSpinBox" name="mMaximumColumnsSpinBox"/>
</item>
<item row="7" column="0">
<widget class="QLabel" name="mMarginLabel">
<property name="text">
<string>Margin</string>
</property>
<property name="buddy">
<cstring>mMarginSpinBox</cstring>
</property>
</widget>
</item>
<item row="7" column="1">
<widget class="QDoubleSpinBox" name="mMarginSpinBox"/>
</item>
</layout>
</widget>
</item>
<item row="20" column="0" colspan="2">
<spacer name="verticalSpacer_3">
<property name="orientation">
<enum>Qt::Vertical</enum>
<item>
<widget class="QgsCollapsibleGroupBoxBasic" name="mShowGridGroupCheckBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
<property name="title">
<string>Show grid</string>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>10</height>
</size>
<property name="checkable">
<bool>true</bool>
</property>
</spacer>
</item>
<item row="22" column="0" colspan="2">
<widget class="QPushButton" name="mHeaderFontPushButton">
<property name="text">
<string>Header Font...</string>
<property name="collapsed" stdset="0">
<bool>true</bool>
</property>
<layout class="QFormLayout" name="formLayout_3">
<property name="fieldGrowthPolicy">
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
</property>
<item row="0" column="0">
<widget class="QLabel" name="mGridStrokeWidthLabel">
<property name="text">
<string>Stroke width</string>
</property>
<property name="buddy">
<cstring>mGridStrokeWidthSpinBox</cstring>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QDoubleSpinBox" name="mGridStrokeWidthSpinBox"/>
</item>
<item row="1" column="0">
<widget class="QLabel" name="mGridColorLabel">
<property name="text">
<string>Color</string>
</property>
<property name="buddy">
<cstring>mGridColorButton</cstring>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QgsColorButton" name="mGridColorButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="24" column="0" colspan="2">
<widget class="QPushButton" name="mContentFontPushButton">
<property name="text">
<string>Content Font...</string>
<item>
<widget class="QgsCollapsibleGroupBoxBasic" name="groupBox_3">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item row="21" column="0">
<widget class="QLabel" name="mMarginLabel">
<property name="text">
<string>Margin</string>
<property name="title">
<string>Fonts</string>
</property>
<property name="buddy">
<cstring>mMarginSpinBox</cstring>
</property>
</widget>
</item>
<item row="21" column="1">
<widget class="QDoubleSpinBox" name="mMarginSpinBox"/>
</item>
<item row="4" column="0" colspan="2">
<widget class="QCheckBox" name="mShowOnlyVisibleFeaturesCheckBox">
<property name="text">
<string>Show only visible features</string>
<property name="collapsed" stdset="0">
<bool>true</bool>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QPushButton" name="mHeaderFontPushButton">
<property name="text">
<string>Header Font...</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="mContentFontPushButton">
<property name="text">
<string>Content Font...</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
@ -221,6 +220,12 @@
<extends>QToolButton</extends>
<header>qgscolorbutton.h</header>
</customwidget>
<customwidget>
<class>QgsCollapsibleGroupBoxBasic</class>
<extends>QGroupBox</extends>
<header location="global">qgscollapsiblegroupbox.h</header>
<container>1</container>
</customwidget>
</customwidgets>
<resources/>
<connections/>

View File

@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>352</width>
<height>511</height>
<width>391</width>
<height>787</height>
</rect>
</property>
<property name="sizePolicy">
@ -19,9 +19,18 @@
<property name="windowTitle">
<string>Composition</string>
</property>
<layout class="QGridLayout" name="gridLayout_3">
<item row="0" column="0">
<layout class="QVBoxLayout" name="verticalLayout">
<property name="margin">
<number>0</number>
</property>
<item>
<widget class="QScrollArea" name="scrollArea">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
@ -36,15 +45,15 @@
<rect>
<x>0</x>
<y>0</y>
<width>344</width>
<height>503</height>
<width>391</width>
<height>787</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0">
<widget class="QGroupBox" name="groupBox">
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QgsCollapsibleGroupBoxBasic" name="groupBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
@ -52,6 +61,9 @@
<property name="title">
<string>Paper and quality</string>
</property>
<property name="collapsed" stdset="0">
<bool>false</bool>
</property>
<layout class="QFormLayout" name="formLayout">
<property name="fieldGrowthPolicy">
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
@ -65,7 +77,7 @@
</sizepolicy>
</property>
<property name="text">
<string>Size</string>
<string>Presets</string>
</property>
<property name="wordWrap">
<bool>true</bool>
@ -80,6 +92,72 @@
<property name="enabled">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Width</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QDoubleSpinBox" name="mPaperWidthDoubleSpinBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="prefix">
<string/>
</property>
<property name="suffix">
<string/>
</property>
<property name="maximum">
<double>99999.000000000000000</double>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Height</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QDoubleSpinBox" name="mPaperHeightDoubleSpinBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="prefix">
<string/>
</property>
<property name="suffix">
<string/>
</property>
<property name="maximum">
<double>99999.000000000000000</double>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Units</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QComboBox" name="mPaperUnitsComboBox">
<property name="enabled">
<bool>true</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
@ -88,62 +166,17 @@
</property>
</widget>
</item>
<item row="1" column="0" colspan="2">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QDoubleSpinBox" name="mPaperWidthDoubleSpinBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="prefix">
<string>Width </string>
</property>
<property name="suffix">
<string/>
</property>
<property name="maximum">
<double>99999.000000000000000</double>
</property>
</widget>
</item>
<item>
<widget class="QDoubleSpinBox" name="mPaperHeightDoubleSpinBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="prefix">
<string>Height </string>
</property>
<property name="suffix">
<string/>
</property>
<property name="maximum">
<double>99999.000000000000000</double>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="mPaperUnitsComboBox">
<property name="enabled">
<bool>true</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
</layout>
</item>
<item row="4" column="0">
<widget class="QLabel" name="mNumPagesLabel">
<property name="text">
<string>Number of pages</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QSpinBox" name="mNumPagesSpinBox"/>
</item>
<item row="5" column="0">
<widget class="QLabel" name="textLabel7">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
@ -162,7 +195,7 @@
</property>
</widget>
</item>
<item row="4" column="1">
<item row="5" column="1">
<widget class="QComboBox" name="mPaperOrientationComboBox">
<property name="enabled">
<bool>true</bool>
@ -175,20 +208,38 @@
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QCheckBox" name="mPrintAsRasterCheckBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</layout>
</widget>
</item>
<item>
<widget class="QgsCollapsibleGroupBoxBasic" name="mPrintAsRasterGroupCheckBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<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="collapsed" stdset="0">
<bool>true</bool>
</property>
<layout class="QFormLayout" name="formLayout_4">
<item row="0" column="0">
<widget class="QLabel" name="label_9">
<property name="text">
<string>Print as raster</string>
<string>Resolution</string>
</property>
</widget>
</item>
<item row="5" column="1">
<item row="0" column="1">
<widget class="QSpinBox" name="mResolutionSpinBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
@ -200,60 +251,38 @@
<string> dpi</string>
</property>
<property name="prefix">
<string>Quality </string>
<string/>
</property>
<property name="maximum">
<number>3000</number>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QSpinBox" name="mNumPagesSpinBox"/>
</item>
<item row="2" column="0">
<widget class="QLabel" name="mNumPagesLabel">
<property name="text">
<string>Number of pages</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="1" column="0">
<widget class="QGroupBox" name="mSnapGroupBox">
<item>
<widget class="QgsCollapsibleGroupBoxBasic" name="mSnapToGridGroupCheckBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>Snapping</string>
<string>Snap to grid</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0" colspan="2">
<widget class="QCheckBox" name="mAlignmentSnapCheckBox">
<property name="text">
<string>Alignment snap</string>
</property>
</widget>
</item>
<item row="1" column="0" colspan="2">
<widget class="QDoubleSpinBox" name="mAlignmentToleranceSpinBox">
<property name="prefix">
<string>Tolerance </string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QCheckBox" name="mSnapToGridCheckBox">
<property name="text">
<string>Snap to grid</string>
</property>
</widget>
</item>
<item row="3" column="0" colspan="2">
<property name="checkable">
<bool>true</bool>
</property>
<property name="checked">
<bool>false</bool>
</property>
<property name="collapsed" stdset="0">
<bool>true</bool>
</property>
<layout class="QFormLayout" name="formLayout_2">
<item row="0" column="1">
<widget class="QDoubleSpinBox" name="mGridResolutionSpinBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
@ -262,22 +291,32 @@
</sizepolicy>
</property>
<property name="prefix">
<string>Spacing </string>
<string/>
</property>
<property name="suffix">
<string/>
<string> mm</string>
</property>
<property name="minimum">
<double>10.000000000000000</double>
</property>
<property name="maximum">
<double>9999.000000000000000</double>
</property>
</widget>
</item>
<item row="4" column="0" colspan="2">
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item row="1" column="0">
<widget class="QLabel" name="label_6">
<property name="text">
<string>Grid offset</string>
</property>
</widget>
</item>
<item row="1" column="1">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QDoubleSpinBox" name="mOffsetXSpinBox">
<property name="prefix">
<string>X offset </string>
<string>x: </string>
</property>
<property name="maximum">
<double>9999.000000000000000</double>
@ -287,13 +326,23 @@
<item>
<widget class="QDoubleSpinBox" name="mOffsetYSpinBox">
<property name="prefix">
<string>Y offset </string>
<string>y: </string>
</property>
<property name="suffix">
<string/>
</property>
</widget>
</item>
</layout>
</item>
<item row="5" column="0" colspan="2">
<item row="2" column="0">
<widget class="QLabel" name="label_5">
<property name="text">
<string>Pen width</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QDoubleSpinBox" name="mPenWidthSpinBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
@ -302,11 +351,14 @@
</sizepolicy>
</property>
<property name="prefix">
<string>Pen width </string>
<string/>
</property>
<property name="suffix">
<string> mm</string>
</property>
</widget>
</item>
<item row="6" column="0">
<item row="3" column="0">
<widget class="QLabel" name="mGridColorLabel">
<property name="text">
<string>Grid color</string>
@ -319,7 +371,7 @@
</property>
</widget>
</item>
<item row="6" column="1">
<item row="3" column="1">
<widget class="QgsColorButton" name="mGridColorButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
@ -332,7 +384,7 @@
</property>
</widget>
</item>
<item row="7" column="0">
<item row="4" column="0">
<widget class="QLabel" name="mGridStyleLabel">
<property name="text">
<string>Grid style</string>
@ -345,20 +397,75 @@
</property>
</widget>
</item>
<item row="7" column="1">
<item row="4" column="1">
<widget class="QComboBox" name="mGridStyleComboBox"/>
</item>
<item row="8" column="0" colspan="2">
<item row="5" column="0">
<widget class="QLabel" name="label_4">
<property name="text">
<string>Selection tolerance</string>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QDoubleSpinBox" name="mSelectionToleranceSpinBox">
<property name="prefix">
<string>Selection tolerance (mm) </string>
<string/>
</property>
<property name="suffix">
<string> mm</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_8">
<property name="text">
<string>Spacing</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="2" column="0">
<item>
<widget class="QgsCollapsibleGroupBoxBasic" name="mAlignmentSnapGroupCheckBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>Snap to alignements</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="collapsed" stdset="0">
<bool>true</bool>
</property>
<layout class="QFormLayout" name="formLayout_3">
<item row="0" column="0">
<widget class="QLabel" name="label_7">
<property name="text">
<string>Tolerance</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QDoubleSpinBox" name="mAlignmentToleranceSpinBox">
<property name="prefix">
<string/>
</property>
<property name="suffix">
<string> mm</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
@ -384,14 +491,16 @@
<extends>QToolButton</extends>
<header>qgscolorbutton.h</header>
</customwidget>
<customwidget>
<class>QgsCollapsibleGroupBoxBasic</class>
<extends>QGroupBox</extends>
<header location="global">qgscollapsiblegroupbox.h</header>
<container>1</container>
</customwidget>
</customwidgets>
<tabstops>
<tabstop>scrollArea</tabstop>
<tabstop>mPrintAsRasterCheckBox</tabstop>
<tabstop>mSnapToGridCheckBox</tabstop>
<tabstop>mGridResolutionSpinBox</tabstop>
<tabstop>mOffsetXSpinBox</tabstop>
<tabstop>mPenWidthSpinBox</tabstop>
</tabstops>
<resources/>
<connections/>

View File

@ -1,173 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>QgsItemPositionDialogBase</class>
<widget class="QDialog" name="QgsItemPositionDialogBase">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>334</width>
<height>192</height>
</rect>
</property>
<property name="windowTitle">
<string>Set item position</string>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0">
<widget class="QGroupBox" name="mPositionGroupBox">
<property name="title">
<string>Item reference point</string>
</property>
<layout class="QGridLayout">
<item row="0" column="0">
<widget class="QCheckBox" name="mUpperLeftCheckBox">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QCheckBox" name="mUpperMiddleCheckBox">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QCheckBox" name="mUpperRightCheckBox">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QCheckBox" name="mMiddleLeftCheckBox">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QCheckBox" name="mMiddleCheckBox">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QCheckBox" name="mMiddleRightCheckBox">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QCheckBox" name="mLowerLeftCheckBox">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QCheckBox" name="mLowerMiddleCheckBox">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="2" column="2">
<widget class="QCheckBox" name="mLowerRightCheckBox">
<property name="text">
<string/>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="0" column="1" colspan="2">
<widget class="QGroupBox" name="mCoordinatesGroupBox">
<property name="title">
<string>Coordinates</string>
</property>
<layout class="QGridLayout" name="gridLayout_1">
<item row="0" column="0">
<widget class="QLabel" name="mXLabel">
<property name="text">
<string>x</string>
</property>
</widget>
</item>
<item row="0" column="1" colspan="2">
<widget class="QLineEdit" name="mXLineEdit"/>
</item>
<item row="1" column="0">
<widget class="QLabel" name="mYLabel">
<property name="text">
<string>y</string>
</property>
</widget>
</item>
<item row="1" column="1" colspan="2">
<widget class="QLineEdit" name="mYLineEdit"/>
</item>
<item row="2" column="0" colspan="2">
<widget class="QLabel" name="mWidthLabel">
<property name="text">
<string>Width</string>
</property>
</widget>
</item>
<item row="2" column="2">
<widget class="QLineEdit" name="mWidthLineEdit"/>
</item>
<item row="3" column="0" colspan="2">
<widget class="QLabel" name="mHeightLabel">
<property name="text">
<string>Height</string>
</property>
</widget>
</item>
<item row="3" column="2">
<widget class="QLineEdit" name="mHeightLineEdit"/>
</item>
</layout>
</widget>
</item>
<item row="1" column="0" colspan="2">
<spacer>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>201</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="1" column="2">
<layout class="QHBoxLayout">
<item>
<widget class="QPushButton" name="mSetPositionButton">
<property name="text">
<string>Set Position</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="mCloseButton">
<property name="text">
<string>Close</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>