diff --git a/python/gui/qgscomposerview.sip b/python/gui/qgscomposerview.sip index d305b687d09..ee44f418185 100644 --- a/python/gui/qgscomposerview.sip +++ b/python/gui/qgscomposerview.sip @@ -30,7 +30,9 @@ class QgsComposerView: QGraphicsView AddLabel, // add label AddScalebar, // add scalebar AddPicture, // add raster/vector picture - AddShape, //add shape item (ellipse, rectangle, triangle) + AddRectangle, + AddEllipse, + AddTriangle, MoveItemContent //move content of item (e.g. content of map) }; diff --git a/src/app/composer/qgscomposer.cpp b/src/app/composer/qgscomposer.cpp index 47860d73543..7fd608eb71e 100644 --- a/src/app/composer/qgscomposer.cpp +++ b/src/app/composer/qgscomposer.cpp @@ -89,7 +89,6 @@ QgsComposer::QgsComposer( QgisApp *qgis, const QString& title ) orderingToolButton->setPopupMode( QToolButton::InstantPopup ); orderingToolButton->setAutoRaise( true ); orderingToolButton->setToolButtonStyle( Qt::ToolButtonIconOnly ); - orderingToolButton->addAction( mActionRaiseItems ); orderingToolButton->addAction( mActionLowerItems ); orderingToolButton->addAction( mActionMoveItemsToTop ); @@ -111,6 +110,17 @@ QgsComposer::QgsComposer( QgisApp *qgis, const QString& title ) alignToolButton->setDefaultAction( mActionAlignLeft ); toolBar->addWidget( alignToolButton ); + QToolButton* shapeToolButton = new QToolButton( toolBar ); + shapeToolButton->setCheckable( true ); + shapeToolButton->setPopupMode( QToolButton::InstantPopup ); + shapeToolButton->setAutoRaise( true ); + shapeToolButton->setToolButtonStyle( Qt::ToolButtonIconOnly ); + shapeToolButton->addAction( mActionAddRectangle ); + shapeToolButton->addAction( mActionAddTriangle ); + shapeToolButton->addAction( mActionAddEllipse ); + shapeToolButton->setDefaultAction( mActionAddEllipse ); + toolBar->insertWidget( mActionAddArrow, shapeToolButton ); + QActionGroup* toggleActionGroup = new QActionGroup( this ); toggleActionGroup->addAction( mActionMoveItemContent ); toggleActionGroup->addAction( mActionAddNewMap ); @@ -119,11 +129,14 @@ QgsComposer::QgsComposer( QgisApp *qgis, const QString& title ) toggleActionGroup->addAction( mActionAddNewScalebar ); toggleActionGroup->addAction( mActionAddImage ); toggleActionGroup->addAction( mActionSelectMoveItem ); - toggleActionGroup->addAction( mActionAddBasicShape ); + toggleActionGroup->addAction( mActionAddRectangle ); + toggleActionGroup->addAction( mActionAddTriangle ); + toggleActionGroup->addAction( mActionAddEllipse ); toggleActionGroup->addAction( mActionAddArrow ); toggleActionGroup->addAction( mActionAddTable ); toggleActionGroup->setExclusive( true ); + mActionAddNewMap->setCheckable( true ); mActionAddNewLabel->setCheckable( true ); mActionAddNewLegend->setCheckable( true ); @@ -131,7 +144,6 @@ QgsComposer::QgsComposer( QgisApp *qgis, const QString& title ) mActionAddNewScalebar->setCheckable( true ); mActionAddImage->setCheckable( true ); mActionMoveItemContent->setCheckable( true ); - mActionAddBasicShape->setCheckable( true ); mActionAddArrow->setCheckable( true ); #ifdef Q_WS_MAC @@ -172,7 +184,7 @@ QgsComposer::QgsComposer( QgisApp *qgis, const QString& title ) layoutMenu->addAction( mActionAddImage ); layoutMenu->addAction( mActionSelectMoveItem ); layoutMenu->addAction( mActionMoveItemContent ); - layoutMenu->addAction( mActionAddBasicShape ); + layoutMenu->addAction( mActionAddArrow ); layoutMenu->addAction( mActionAddTable ); layoutMenu->addSeparator(); @@ -201,7 +213,6 @@ QgsComposer::QgsComposer( QgisApp *qgis, const QString& title ) QgsDebugMsg( "entered." ); setMouseTracking( true ); - //mSplitter->setMouseTracking(true); mViewFrame->setMouseTracking( true ); //create composer view @@ -224,24 +235,41 @@ QgsComposer::QgsComposer( QgisApp *qgis, const QString& title ) mComposition->setParent( mView ); mView->setComposition( mComposition ); - QgsCompositionWidget* compositionWidget = new QgsCompositionWidget( mCompositionOptionsFrame, mComposition ); - QObject::connect( mComposition, SIGNAL( paperSizeChanged() ), compositionWidget, SLOT( displayCompositionWidthHeight() ) ); - compositionWidget->show(); + setTabPosition( Qt::AllDockWidgetAreas, QTabWidget::North); + mGeneralDock = new QDockWidget(tr("Composition"),this); + mGeneralDock->setObjectName( "CompositionDock" ); + mItemDock = new QDockWidget(tr("Item Properties")); + mItemDock->setObjectName( "ItemDock"); + mUndoDock = new QDockWidget(tr("Command history"),this); + mUndoDock->setObjectName( "CommandDock" ); - mCompositionOptionsLayout = new QGridLayout( mCompositionOptionsFrame ); - mCompositionOptionsLayout->setMargin( 0 ); - mCompositionOptionsLayout->addWidget( compositionWidget ); + + + QgsCompositionWidget* compositionWidget = new QgsCompositionWidget( mGeneralDock, mComposition ); + connect( mComposition, SIGNAL( paperSizeChanged() ), compositionWidget, SLOT( displayCompositionWidthHeight() ) ); + mGeneralDock->setWidget( compositionWidget ); + + //undo widget + mUndoView = new QUndoView( mComposition->undoStack(), this ); + mUndoDock->setWidget( mUndoView ); + + addDockWidget( Qt::RightDockWidgetArea, mItemDock ); + addDockWidget( Qt::RightDockWidgetArea, mGeneralDock ); + addDockWidget( Qt::RightDockWidgetArea, mUndoDock ); + + mItemDock->show(); + mGeneralDock->show(); + mUndoDock->hide(); + + tabifyDockWidget(mGeneralDock, mUndoDock); + tabifyDockWidget(mGeneralDock, mItemDock); + + mGeneralDock->raise(); QGridLayout *l = new QGridLayout( mViewFrame ); l->setMargin( 0 ); l->addWidget( mView, 0, 0 ); - mCompositionNameComboBox->insertItem( 0, tr( "Map 1" ) ); - - //undo widget - mUndoView = new QUndoView( mComposition->undoStack(), this ); - mOptionsTabWidget->addTab( mUndoView, tr( "Command history" ) ); - // Create size grip (needed by Mac OS X for QMainWindow if QStatusBar is not visible) mSizeGrip = new QSizeGrip( this ); mSizeGrip->resize( mSizeGrip->sizeHint() ); @@ -286,7 +314,9 @@ void QgsComposer::setupTheme() mActionAddNewLabel->setIcon( QgisApp::getThemeIcon( "/mActionLabel.png" ) ); mActionAddNewLegend->setIcon( QgisApp::getThemeIcon( "/mActionAddLegend.png" ) ); mActionAddNewScalebar->setIcon( QgisApp::getThemeIcon( "/mActionScaleBar.png" ) ); - mActionAddBasicShape->setIcon( QgisApp::getThemeIcon( "/mActionAddBasicShape.png" ) ); + mActionAddRectangle->setIcon( QgisApp::getThemeIcon( "/mActionAddBasicShape.png" ) ); + mActionAddTriangle->setIcon( QgisApp::getThemeIcon( "/mActionAddBasicShape.png" ) ); + mActionAddEllipse->setIcon( QgisApp::getThemeIcon( "/mActionAddBasicShape.png" ) ); mActionAddArrow->setIcon( QgisApp::getThemeIcon( "/mActionAddArrow.png" ) ); mActionAddTable->setIcon( QgisApp::getThemeIcon( "/mActionOpenTable.png" ) ); mActionSelectMoveItem->setIcon( QgisApp::getThemeIcon( "/mActionSelectPan.png" ) ); @@ -396,21 +426,13 @@ void QgsComposer::setTitle( const QString& title ) } } -void QgsComposer::showCompositionOptions( QWidget *w ) -{ - QWidget* currentWidget = mItemStackedWidget->currentWidget(); - mItemStackedWidget->removeWidget( currentWidget ); - mItemStackedWidget->addWidget( w ); -} - void QgsComposer::showItemOptions( QgsComposerItem* item ) { - QWidget* currentWidget = mItemStackedWidget->currentWidget(); + QWidget* currentWidget = mItemDock->widget(); if ( !item ) { - mItemStackedWidget->removeWidget( currentWidget ); - mItemStackedWidget->setCurrentWidget( 0 ); + mItemDock->setWidget( 0 ); return; } @@ -427,10 +449,7 @@ void QgsComposer::showItemOptions( QgsComposerItem* item ) return; } - mItemStackedWidget->removeWidget( currentWidget ); - mItemStackedWidget->addWidget( newWidget ); - mItemStackedWidget->setCurrentWidget( newWidget ); - //newWidget->show(); + mItemDock->setWidget( newWidget ); } QgsMapCanvas *QgsComposer::mapCanvas( void ) @@ -848,11 +867,27 @@ void QgsComposer::on_mActionAddImage_triggered() } } -void QgsComposer::on_mActionAddBasicShape_triggered() +void QgsComposer::on_mActionAddRectangle_triggered() { if ( mView ) { - mView->setCurrentTool( QgsComposerView::AddShape ); + mView->setCurrentTool( QgsComposerView::AddRectangle ); + } +} + +void QgsComposer::on_mActionAddTriangle_triggered() +{ + if ( mView ) + { + mView->setCurrentTool( QgsComposerView::AddTriangle ); + } +} + +void QgsComposer::on_mActionAddEllipse_triggered() +{ + if ( mView ) + { + mView->setCurrentTool( QgsComposerView::AddEllipse ); } } @@ -1064,6 +1099,12 @@ void QgsComposer::on_mActionRedo_triggered() } } +void QgsComposer::closeEvent(QCloseEvent *e) +{ + Q_UNUSED( e ); + saveWindowState(); +} + void QgsComposer::moveEvent( QMoveEvent *e ) { Q_UNUSED( e ); @@ -1108,24 +1149,18 @@ void QgsComposer::saveWindowState() { QSettings settings; settings.setValue( "/Composer/geometry", saveGeometry() ); - //settings.setValue("/Composer/splitterState", mSplitter->saveState()); + // store the toolbar/dock widget settings using Qt4 settings API + settings.setValue( "/ComposerUI/state", saveState() ); } void QgsComposer::restoreWindowState() { QSettings settings; + if (! restoreState( settings.value( "/ComposerUI/state" ).toByteArray() )) + { + QgsDebugMsg("RESTORE STATE FAILED!!"); + } restoreGeometry( settings.value( "/Composer/geometry" ).toByteArray() ); - QVariant splitterState = settings.value( "/Composer/splitterState" ); - if ( !splitterState.isNull() ) - { - //mSplitter->restoreState(settings.value("/Composer/splitterState").toByteArray()); - } - else - { - QList defaultSize; - defaultSize << 300 << 100; // page display 300 pixels, details pane 100 pixels - //mSplitter->setSizes(defaultSize); - } } void QgsComposer::writeXML( QDomDocument& doc ) @@ -1218,7 +1253,7 @@ void QgsComposer::readXML( const QDomElement& composerElem, const QDomDocument& delete( *it ); } //delete composition widget - QgsCompositionWidget* oldCompositionWidget = qobject_cast( mCompositionOptionsFrame->children().at( 0 ) ); + QgsCompositionWidget* oldCompositionWidget = qobject_cast( mGeneralDock->widget() ); delete oldCompositionWidget; delete mCompositionOptionsLayout; mCompositionOptionsLayout = 0; @@ -1241,13 +1276,13 @@ void QgsComposer::readXML( const QDomElement& composerElem, const QDomDocument& l->addWidget( mView, 0, 0 ); //create compositionwidget - QgsCompositionWidget* compositionWidget = new QgsCompositionWidget( mCompositionOptionsFrame, mComposition ); - QObject::connect( mComposition, SIGNAL( paperSizeChanged() ), compositionWidget, SLOT( displayCompositionWidthHeight() ) ); - compositionWidget->show(); +// QgsCompositionWidget* compositionWidget = new QgsCompositionWidget( mCompositionOptionsFrame, mComposition ); +// QObject::connect( mComposition, SIGNAL( paperSizeChanged() ), compositionWidget, SLOT( displayCompositionWidthHeight() ) ); +// compositionWidget->show(); - mCompositionOptionsLayout = new QGridLayout( mCompositionOptionsFrame ); - mCompositionOptionsLayout->setMargin( 0 ); - mCompositionOptionsLayout->addWidget( compositionWidget ); +// mCompositionOptionsLayout = new QGridLayout( mCompositionOptionsFrame ); +// mCompositionOptionsLayout->setMargin( 0 ); +// mCompositionOptionsLayout->addWidget( compositionWidget ); //read and restore all the items if ( mComposition ) diff --git a/src/app/composer/qgscomposer.h b/src/app/composer/qgscomposer.h index 080ae5414e4..797819f3fb9 100644 --- a/src/app/composer/qgscomposer.h +++ b/src/app/composer/qgscomposer.h @@ -20,6 +20,7 @@ #include "qgscomposermap.h" #include "qgscontexthelp.h" #include +#include class QgisApp; class QgsComposerArrow; @@ -74,9 +75,6 @@ class QgsComposer: public QMainWindow, private Ui::QgsComposerBase //! Return current composition //QgsComposition *composition(void); - //! Show composition options in widget - void showCompositionOptions( QWidget *w ); - //! Restore the window and toolbar state void restoreWindowState(); @@ -89,6 +87,8 @@ class QgsComposer: public QMainWindow, private Ui::QgsComposerBase //! Move event virtual void moveEvent( QMoveEvent * ); + virtual void closeEvent(QCloseEvent * ); + //! Resize event virtual void resizeEvent( QResizeEvent * ); @@ -157,8 +157,11 @@ class QgsComposer: public QMainWindow, private Ui::QgsComposerBase //! Add new picture void on_mActionAddImage_triggered(); - //! Add ellipse shape item - void on_mActionAddBasicShape_triggered(); + void on_mActionAddRectangle_triggered(); + + void on_mActionAddTriangle_triggered(); + + void on_mActionAddEllipse_triggered(); //! Add attribute table void on_mActionAddTable_triggered(); @@ -322,6 +325,10 @@ class QgsComposer: public QMainWindow, private Ui::QgsComposerBase //! We load composer map content from project xml only on demand. Therefore we need to store the real preview mode type QMap< QgsComposerMap*, QgsComposerMap::PreviewMode > mMapsToRestore; + + QDockWidget* mItemDock; + QDockWidget* mUndoDock; + QDockWidget* mGeneralDock; }; #endif diff --git a/src/gui/qgscomposerview.cpp b/src/gui/qgscomposerview.cpp index 31404762d15..f0f32f1df4c 100644 --- a/src/gui/qgscomposerview.cpp +++ b/src/gui/qgscomposerview.cpp @@ -123,7 +123,9 @@ void QgsComposerView::mousePressEvent( QMouseEvent* e ) //create rubber band for map and ellipse items case AddMap: - case AddShape: + case AddRectangle: + case AddTriangle: + case AddEllipse: { QTransform t; mRubberBandItem = new QGraphicsRectItem( 0, 0, 0, 0 ); @@ -204,6 +206,35 @@ void QgsComposerView::mousePressEvent( QMouseEvent* e ) } } +void QgsComposerView::addShape(Tool currentTool) +{ + QgsComposerShape::Shape shape = QgsComposerShape::Ellipse; + + if ( currentTool == AddRectangle ) + shape = QgsComposerShape::Rectangle; + else if ( currentTool == AddTriangle ) + shape = QgsComposerShape::Triangle; + + if ( !mRubberBandItem || mRubberBandItem->rect().width() < 0.1 || mRubberBandItem->rect().width() < 0.1 ) + { + scene()->removeItem( mRubberBandItem ); + delete mRubberBandItem; + mRubberBandItem = 0; + return; + } + if ( composition() ) + { + QgsComposerShape* composerShape = new QgsComposerShape( mRubberBandItem->transform().dx(), mRubberBandItem->transform().dy(), mRubberBandItem->rect().width(), mRubberBandItem->rect().height(), composition() ); + composerShape->setShapeType( shape ); + composition()->addComposerShape( composerShape ); + scene()->removeItem( mRubberBandItem ); + delete mRubberBandItem; + mRubberBandItem = 0; + emit actionFinished(); + composition()->pushAddRemoveCommand( composerShape, tr( "Shape added" ) ); + } +} + void QgsComposerView::mouseReleaseEvent( QMouseEvent* e ) { if ( !composition() ) @@ -257,24 +288,10 @@ void QgsComposerView::mouseReleaseEvent( QMouseEvent* e ) } break; - case AddShape: - if ( !mRubberBandItem || mRubberBandItem->rect().width() < 0.1 || mRubberBandItem->rect().width() < 0.1 ) - { - scene()->removeItem( mRubberBandItem ); - delete mRubberBandItem; - mRubberBandItem = 0; - return; - } - if ( composition() ) - { - QgsComposerShape* composerShape = new QgsComposerShape( mRubberBandItem->transform().dx(), mRubberBandItem->transform().dy(), mRubberBandItem->rect().width(), mRubberBandItem->rect().height(), composition() ); - composition()->addComposerShape( composerShape ); - scene()->removeItem( mRubberBandItem ); - delete mRubberBandItem; - mRubberBandItem = 0; - emit actionFinished(); - composition()->pushAddRemoveCommand( composerShape, tr( "Shape added" ) ); - } + case AddRectangle: + case AddTriangle: + case AddEllipse: + addShape( mCurrentTool ); break; case AddMap: @@ -339,7 +356,9 @@ void QgsComposerView::mouseMoveEvent( QMouseEvent* e ) } case AddMap: - case AddShape: + case AddRectangle: + case AddTriangle: + case AddEllipse: //adjust rubber band item { double x = 0; diff --git a/src/gui/qgscomposerview.h b/src/gui/qgscomposerview.h index 5dbdfce3fe6..5f4277a9729 100644 --- a/src/gui/qgscomposerview.h +++ b/src/gui/qgscomposerview.h @@ -59,7 +59,9 @@ class GUI_EXPORT QgsComposerView: public QGraphicsView AddLabel, // add label AddScalebar, // add scalebar AddPicture, // add raster/vector picture - AddShape, //add shape item (ellipse, rectangle, triangle) + AddRectangle, + AddEllipse, + AddTriangle, AddTable, //add attribute table MoveItemContent //move content of item (e.g. content of map) }; @@ -120,6 +122,9 @@ class GUI_EXPORT QgsComposerView: public QGraphicsView bool mPaintingEnabled; + /** Draw a shape on the canvas */ + void addShape( Tool currentTool ); + //void connectAddRemoveCommandSignals( QgsAddRemoveItemCommand* c ); signals: diff --git a/src/ui/qgscomposerarrowwidgetbase.ui b/src/ui/qgscomposerarrowwidgetbase.ui index 41406332eb8..e7ff689d559 100644 --- a/src/ui/qgscomposerarrowwidgetbase.ui +++ b/src/ui/qgscomposerarrowwidgetbase.ui @@ -6,8 +6,8 @@ 0 0 - 196 - 407 + 232 + 430 @@ -24,14 +24,17 @@ 0 0 - 178 - 363 + 214 + 383 Arrow + + 3 + @@ -58,20 +61,27 @@ Arrow markers - - - + + + - Default marker + Start marker - - - - No marker - - + + + + + + + + + ... + + + + @@ -80,37 +90,38 @@ - - - - Start marker - - + + + + + + + + + ... + + + + - - - - - - ... - - - - End marker - - - - - + + - ... + No marker + + + + + + + Default marker diff --git a/src/ui/qgscomposerbase.ui b/src/ui/qgscomposerbase.ui index 38d56429198..06d113ea44e 100644 --- a/src/ui/qgscomposerbase.ui +++ b/src/ui/qgscomposerbase.ui @@ -20,117 +20,21 @@ true - + + + 0 + - + true - - Qt::Horizontal + + QFrame::StyledPanel + + + QFrame::Raised - - - true - - - QFrame::StyledPanel - - - QFrame::Raised - - - - - - 0 - 0 - - - - - 150 - 10 - - - - - 32767 - 32767 - - - - 0 - - - - General - - - - 9 - - - 6 - - - - - QFrame::StyledPanel - - - QFrame::Raised - - - - - - - false - - - - 0 - 0 - - - - - - - - - 0 - 0 - - - - Composition - - - - - - - - Item - - - - 0 - - - 6 - - - - - - - - - - @@ -143,6 +47,9 @@ + + Toolbar + Qt::Horizontal @@ -171,7 +78,6 @@ - @@ -449,14 +355,6 @@ Ctrl+Q - - - true - - - Add Basic Shape - - true @@ -512,11 +410,40 @@ Ctrl+Shift+Z + + + true + + + Add Rectangle + + + Add Rectangle + + + + + true + + + Add Triangle + + + Add Triangle + + + + + true + + + Add Ellipse + + + Add Ellipse + + - - mCompositionNameComboBox - mOptionsTabWidget - diff --git a/src/ui/qgscomposeritemwidgetbase.ui b/src/ui/qgscomposeritemwidgetbase.ui index ac83be22600..cd8df9e81f6 100644 --- a/src/ui/qgscomposeritemwidgetbase.ui +++ b/src/ui/qgscomposeritemwidgetbase.ui @@ -13,7 +13,40 @@ Form - + + + + + Opacity + + + true + + + mOpacitySlider + + + + + + + Outline width + + + true + + + mOutlineWidthSpinBox + + + + + + + Item ID + + + @@ -28,20 +61,7 @@ - - - - Opacity - - - true - - - mOpacitySlider - - - - + 255 @@ -51,47 +71,20 @@ - - - - Outline width - - - true - - - mOutlineWidthSpinBox - - - - + - + Position and size... - - - - Show frame - - - - - - - Item ID - - - - + - + Qt::Vertical @@ -104,6 +97,13 @@ + + + + Show frame + + + diff --git a/src/ui/qgscomposerlabelwidgetbase.ui b/src/ui/qgscomposerlabelwidgetbase.ui index 7a98e4ef7b3..d808f267f8f 100644 --- a/src/ui/qgscomposerlabelwidgetbase.ui +++ b/src/ui/qgscomposerlabelwidgetbase.ui @@ -6,7 +6,7 @@ 0 0 - 547 + 433 425 @@ -30,8 +30,8 @@ 0 0 - 529 - 376 + 415 + 378 @@ -65,19 +65,6 @@ - - - - Margin (mm) - - - mMarginDoubleSpinBox - - - - - - @@ -108,6 +95,19 @@ + + + + Qt::Horizontal + + + + 40 + 20 + + + + @@ -138,9 +138,32 @@ + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Margin + + + mm + + + diff --git a/src/ui/qgscomposerlegendwidgetbase.ui b/src/ui/qgscomposerlegendwidgetbase.ui index cf7dff75949..829d06f96e8 100644 --- a/src/ui/qgscomposerlegendwidgetbase.ui +++ b/src/ui/qgscomposerlegendwidgetbase.ui @@ -6,8 +6,8 @@ 0 0 - 371 - 476 + 405 + 490 @@ -25,6 +25,9 @@ + + QFrame::NoFrame + true @@ -33,43 +36,33 @@ 0 0 - 367 - 472 + 405 + 490 - 0 + 1 0 - 0 - 349 - 398 + -26 + 370 + 440 General - - - - &Title - - - mTitleLineEdit - - - - + - + @@ -82,28 +75,28 @@ - + Group Font... - + Layer Font... - + Item Font... - + Symbol width @@ -113,7 +106,7 @@ - + Symbol height @@ -123,7 +116,7 @@ - + Layer space @@ -133,7 +126,7 @@ - + Symbol space @@ -143,7 +136,7 @@ - + Icon label space @@ -153,7 +146,7 @@ - + Box space @@ -163,7 +156,7 @@ - + Qt::Vertical @@ -176,16 +169,26 @@ - + - + Map + + + + &Title + + + mTitleLineEdit + + + @@ -193,8 +196,8 @@ 0 0 - 349 - 398 + 387 + 414 @@ -217,7 +220,7 @@ - + @@ -241,9 +244,21 @@ + + + 0 + 0 + + + + + 24 + 24 + + @@ -251,6 +266,12 @@ + + + 24 + 24 + + @@ -258,6 +279,12 @@ + + + 24 + 24 + + @@ -265,6 +292,12 @@ + + + 24 + 24 + + @@ -272,6 +305,12 @@ + + + 24 + 24 + + @@ -279,6 +318,12 @@ Update + + + 24 + 24 + + @@ -288,6 +333,19 @@ + + + + Qt::Horizontal + + + + 0 + 0 + + + + diff --git a/src/ui/qgscomposermapwidgetbase.ui b/src/ui/qgscomposermapwidgetbase.ui index e324f4d338d..2f400d10181 100644 --- a/src/ui/qgscomposermapwidgetbase.ui +++ b/src/ui/qgscomposermapwidgetbase.ui @@ -6,8 +6,8 @@ 0 0 - 404 - 447 + 309 + 452 @@ -33,280 +33,22 @@ 0 0 - 377 - 414 + 309 + 365 Map - - - - Preview - - - - - - - 0 - 0 - - - - - - - - Update preview - - - - - - - - - - Map - - - - - - Width - - - true - - - mWidthLineEdit - - - - - - - - - - Height - - - true - - - mHeightLineEdit - - - - - - - - - - - 0 - 0 - - - - Scale - - - true - - - mScaleLineEdit - - - - - - - - - - - - - - Rotation - - - true - - - - - - - - - - 20 - 16777215 - - - - - - - - - - - Lock layers for map item - - - true - - - - - - - - - Draw map canvas items - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - 360.000000000000000 - - - - - - - - - - - - 0 - 0 - 394 - 356 - - - - Extents - - - - - - Map extent - - - - - - true - - - X min - - - true - - - mXMinLineEdit - - - - - - - - - - X max - - - true - - - mXMaxLineEdit - - - - - - - - - - Y min - - - true - - - mYMinLineEdit - - - - - - - - - - Y max - - - true - - - mYMaxLineEdit - - - - - - - - - - - 0 - 0 - - - - Set to map canvas extent - - - - - - - - + + Qt::Vertical + + QSizePolicy::Expanding + 20 @@ -315,6 +57,277 @@ + + + + + 0 + 0 + + + + + + + + Update preview + + + + + + + QFormLayout::AllNonFixedFieldsGrow + + + 0 + + + + + Width + + + true + + + mWidthLineEdit + + + + + + + + + + Height + + + true + + + mHeightLineEdit + + + + + + + + + + + 0 + 0 + + + + Scale + + + true + + + mScaleLineEdit + + + + + + + + + + + + + + Rotation + + + true + + + + + + + degrees + + + 360.000000000000000 + + + + + + + + 0 + 0 + + + + + 16777215 + 16777215 + + + + Lock layers for map item + + + + + + + Draw map canvas items + + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 10 + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 15 + + + + + + + + + + 0 + 0 + 169 + 169 + + + + Extents + + + + 3 + + + + + QFormLayout::AllNonFixedFieldsGrow + + + 3 + + + + + true + + + X min + + + true + + + mXMinLineEdit + + + + + + + + + + X max + + + true + + + mXMaxLineEdit + + + + + + + + + + Y min + + + true + + + mYMinLineEdit + + + + + + + + + + Y max + + + true + + + mYMaxLineEdit + + + + + + + + + + + 0 + 0 + + + + Set to map canvas extent + + + + + @@ -322,14 +335,20 @@ 0 0 - 377 - 695 + 199 + 581 Grid + + 3 + + + 6 + @@ -341,7 +360,13 @@ false - + + + QFormLayout::AllNonFixedFieldsGrow + + + 3 + @@ -358,7 +383,7 @@ - + @@ -374,7 +399,7 @@ - + 5 @@ -384,147 +409,6 @@ - - - - Offset X - - - true - - - mOffsetXSpinBox - - - - - - - 5 - - - 9999999.000000000000000 - - - - - - - Line width - - - true - - - mLineWidthSpinBox - - - - - - - 5 - - - - - - - Draw annotation - - - - - - - Annotation position - - - true - - - mAnnotationPositionComboBox - - - - - - - - - - QFrame::NoFrame - - - Annotation direction - - - true - - - mAnnotationDirectionComboBox - - - - - - - - - - Font... - - - - - - - Distance to map frame - - - true - - - mDistanceToMapFrameSpinBox - - - - - - - - - - Coordinate precision - - - true - - - mCoordinatePrecisionSpinBox - - - - - - - - - - 5 - - - - - - - 5 - - - 9999999.000000000000000 - - - @@ -539,7 +423,20 @@ - + + + Offset X + + + true + + + mOffsetXSpinBox + + + + + 5 @@ -548,7 +445,7 @@ - + Offset Y @@ -561,7 +458,17 @@ - + + + + 5 + + + 9999999.000000000000000 + + + + Cross width @@ -574,20 +481,34 @@ - - - - Qt::Vertical + + + + 5 - - - 20 - 40 - - - + - + + + + Line width + + + true + + + mLineWidthSpinBox + + + + + + + 5 + + + + Line color @@ -600,7 +521,7 @@ - + @@ -613,6 +534,110 @@ + + + + Draw annotation + + + + + + + Annotation position + + + true + + + mAnnotationPositionComboBox + + + + + + + + + + QFrame::NoFrame + + + Annotation direction + + + true + + + mAnnotationDirectionComboBox + + + + + + + + + + Font... + + + + + + + Distance to map frame + + + true + + + mDistanceToMapFrameSpinBox + + + + + + + + + + Coordinate precision + + + true + + + mCoordinatePrecisionSpinBox + + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + 5 + + + 9999999.000000000000000 + + + @@ -631,32 +656,8 @@ - mPreviewModeComboBox - mUpdatePreviewButton - mWidthLineEdit - mHeightLineEdit - mScaleLineEdit - mKeepLayerListCheckBox - mXMinLineEdit - mXMaxLineEdit - mYMinLineEdit - mYMaxLineEdit - mSetToMapCanvasExtentButton - mGridCheckBox - mGridTypeComboBox - mIntervalXSpinBox - mIntervalYSpinBox - mOffsetXSpinBox - mOffsetYSpinBox - mCrossWidthSpinBox - mLineWidthSpinBox - mLineColorButton mDrawAnnotationCheckBox - mAnnotationPositionComboBox - mAnnotationDirectionComboBox mAnnotationFontButton - mDistanceToMapFrameSpinBox - mCoordinatePrecisionSpinBox diff --git a/src/ui/qgscomposerpicturewidgetbase.ui b/src/ui/qgscomposerpicturewidgetbase.ui index c89862811e5..8c5a335b671 100644 --- a/src/ui/qgscomposerpicturewidgetbase.ui +++ b/src/ui/qgscomposerpicturewidgetbase.ui @@ -6,8 +6,8 @@ 0 0 - 293 - 540 + 327 + 614 @@ -32,16 +32,202 @@ 0 - -129 - 266 - 632 + 0 + 327 + 585 Picture options - - + + + 3 + + + + + + 0 + 0 + + + + Preloaded images + + + + 0 + + + 0 + + + + + false + + + QAbstractItemView::DragDrop + + + QListView::Free + + + QListView::LeftToRight + + + true + + + + 30 + 30 + + + + QListView::IconMode + + + true + + + + + + + + + Load another + + + mPictureLineEdit + + + + + + + + + + + 0 + 0 + + + + + 150 + 32767 + + + + ... + + + + + + + + + + + + Options + + + + QFormLayout::AllNonFixedFieldsGrow + + + 3 + + + + + + 0 + 0 + + + + Width + + + true + + + mWidthLineEdit + + + + + + + + 0 + 0 + + + + Height + + + true + + + mHeightLineEdit + + + + + + + + + + + 0 + 0 + + + + Rotation + + + true + + + mRotationSpinBox + + + + + + + Sync with map + + + + + + + 360.000000000000000 + + + + + + + + + + + + + @@ -93,187 +279,6 @@ - - - - - 0 - 0 - - - - Preview - - - - 0 - - - 0 - - - - - false - - - QAbstractItemView::DragDrop - - - QListView::Free - - - QListView::LeftToRight - - - true - - - - 30 - 30 - - - - QListView::IconMode - - - true - - - - - - - - - - Options - - - - - - Load - - - mPictureLineEdit - - - - - - - - - - - - - 0 - 0 - - - - - 150 - 32767 - - - - ... - - - - - - - - - - 0 - 0 - - - - Width - - - true - - - mWidthLineEdit - - - - - - - - - - - 0 - 0 - - - - Height - - - true - - - mHeightLineEdit - - - - - - - - - - - - - - - 0 - 0 - - - - Rotation - - - true - - - mRotationSpinBox - - - - - - - 360.000000000000000 - - - - - - - Sync with map - - - - - - - - - @@ -288,11 +293,7 @@ mPreviewListWidget mPictureLineEdit mPictureBrowseButton - mWidthLineEdit - mHeightLineEdit - mRotationSpinBox mRotationFromComposerMapCheckBox - mComposerMapComboBox diff --git a/src/ui/qgscomposerscalebarwidgetbase.ui b/src/ui/qgscomposerscalebarwidgetbase.ui index 5b9f3c8332f..f182957ad9c 100644 --- a/src/ui/qgscomposerscalebarwidgetbase.ui +++ b/src/ui/qgscomposerscalebarwidgetbase.ui @@ -33,14 +33,14 @@ 0 0 - 298 - 545 + 325 + 508 Scale bar - + @@ -54,7 +54,7 @@ - + 4 @@ -64,7 +64,7 @@ - + Map units per bar unit @@ -77,28 +77,32 @@ - + 9999999999999.000000000000000 - - - - Right segments - - + + + + + + Left segments + + + + + + + Right segments + + + + - - - - Left segments - - - - + Style @@ -108,10 +112,10 @@ - + - + @@ -130,7 +134,7 @@ - + true @@ -143,7 +147,53 @@ - + + + + Alignment + + + + + + + + + + Unit label + + + true + + + mUnitLabelLineEdit + + + + + + + + + + + 0 + 0 + + + + Font... + + + + + + + Color... + + + + mm @@ -153,7 +203,7 @@ - + @@ -178,7 +228,7 @@ - + Label space @@ -188,7 +238,7 @@ - + Box space @@ -198,43 +248,7 @@ - - - - Unit label - - - true - - - mUnitLabelLineEdit - - - - - - - - - - - 0 - 0 - - - - Font... - - - - - - - Color... - - - - + Qt::Vertical @@ -247,16 +261,6 @@ - - - - - - - Alignment - - - diff --git a/src/ui/qgscomposertablewidgetbase.ui b/src/ui/qgscomposertablewidgetbase.ui index eedaced00e8..ec790908a66 100644 --- a/src/ui/qgscomposertablewidgetbase.ui +++ b/src/ui/qgscomposertablewidgetbase.ui @@ -6,14 +6,17 @@ 0 0 - 269 - 346 + 262 + 490 Form + + 3 + @@ -24,134 +27,116 @@ 0 0 - 260 - 298 + 239 + 464 Table - - - - - - - Layer - - - mLayerComboBox - - - - - - - + + + QFormLayout::AllNonFixedFieldsGrow + + + + + Layer + + + mLayerComboBox + + - + + + + Attributes... - - + + - Qt::Horizontal + Qt::Vertical + + + QSizePolicy::Fixed - 40 - 20 + 20 + 10 - - + + - Show only visible features + Composer map + + + mComposerMapComboBox - - - - - - Composer map - - - mComposerMapComboBox - - - - - - - + + - - - - - - Maximum rows - - - mMaximumColumnsSpinBox - - - - - - - + + + + Maximum rows + + + mMaximumColumnsSpinBox + + - - - - - - Margin - - - mMarginSpinBox - - - - - - - + + - + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 10 + + + + + Show grid - - - - - - Grid stroke width - - - mGridStrokeWidthSpinBox - - - - - - - + + + + Grid stroke width + + + mGridStrokeWidthSpinBox + + - + + + + Grid color @@ -161,7 +146,7 @@ - + @@ -174,20 +159,56 @@ - + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 10 + + + + + Header Font... - + Content Font... + + + + Margin + + + mMarginSpinBox + + + + + + + + + + Show only visible features + + + diff --git a/src/ui/qgscompositionwidgetbase.ui b/src/ui/qgscompositionwidgetbase.ui index fe097cd468c..fe2c495430d 100644 --- a/src/ui/qgscompositionwidgetbase.ui +++ b/src/ui/qgscompositionwidgetbase.ui @@ -6,7 +6,7 @@ 0 0 - 416 + 352 570 @@ -23,8 +23,17 @@ 0 + + 6 + + + QFrame::NoFrame + + + QFrame::Plain + true @@ -33,17 +42,29 @@ 0 0 - 395 - 579 + 352 + 570 + + 3 + + + + 0 + 0 + + Paper and quality - + + + QFormLayout::AllNonFixedFieldsGrow + @@ -63,7 +84,7 @@ - + true @@ -76,39 +97,62 @@ + + + + + + + 0 + 0 + + + + Width + + + + + + 99999.000000000000000 + + + + + + + + 0 + 0 + + + + Height + + + + + + 99999.000000000000000 + + + + + + + true + + + + 0 + 0 + + + + + + - - - - 0 - 0 - - - - Units - - - true - - - mPaperUnitsComboBox - - - - - - - true - - - - 0 - 0 - - - - - @@ -127,7 +171,7 @@ - + true @@ -140,15 +184,27 @@ - + + + + 0 + 0 + + Print as raster - + + + + 0 + 0 + + dpi @@ -160,134 +216,6 @@ - - - - Width - - - - - - 99999.000000000000000 - - - - - - - Height - - - - - - 99999.000000000000000 - - - - - - - - - - Snapping - - - - - - Snap to grid - - - - - - - Spacing - - - - - - 9999.000000000000000 - - - - - - - X offset - - - 9999.000000000000000 - - - - - - - Y offset - - - - - - - Pen width - - - - - - - Grid color - - - true - - - mGridColorButton - - - - - - - - 0 - 0 - - - - - - - - - - - Grid style - - - true - - - mGridStyleComboBox - - - - - - - - - - Selection tolerance (mm) - - - @@ -304,6 +232,133 @@ + + + + + 0 + 0 + + + + Snapping + + + + QFormLayout::AllNonFixedFieldsGrow + + + + + Snap to grid + + + + + + + + + X offset + + + 9999.000000000000000 + + + + + + + Y offset + + + + + + + + + Grid color + + + true + + + mGridColorButton + + + + + + + + 0 + 0 + + + + + + + + + + + Grid style + + + true + + + mGridStyleComboBox + + + + + + + + + + Selection tolerance (mm) + + + + + + + + 0 + 0 + + + + Spacing + + + + + + 9999.000000000000000 + + + + + + + + 0 + 0 + + + + Pen width + + + + + + @@ -320,20 +375,11 @@ scrollArea - mPaperSizeComboBox - mPaperUnitsComboBox - mPaperWidthDoubleSpinBox - mPaperHeightDoubleSpinBox - mPaperOrientationComboBox - mResolutionSpinBox mPrintAsRasterCheckBox mSnapToGridCheckBox mGridResolutionSpinBox mOffsetXSpinBox - mOffsetYSpinBox mPenWidthSpinBox - mGridColorButton - mGridStyleComboBox