Skip to content

Commit 20029c2

Browse files
committedJul 25, 2017
Add a lot of framework code for showing item properties in designer
And hook up a non-functional page properties widget which is shown when right clicking on a page in the view.
1 parent 0f90e23 commit 20029c2

12 files changed

+385
-12
lines changed
 

‎python/gui/layout/qgslayoutitemguiregistry.sip

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,14 @@ class QgsLayoutItemAbstractGuiMetadata
2828
%End
2929
public:
3030

31-
QgsLayoutItemAbstractGuiMetadata( int type, const QString &groupId = QString() );
31+
enum Flag
32+
{
33+
FlagNoCreationTools,
34+
};
35+
typedef QFlags<QgsLayoutItemAbstractGuiMetadata::Flag> Flags;
36+
37+
38+
QgsLayoutItemAbstractGuiMetadata( int type, const QString &groupId = QString(), Flags flags = 0 );
3239
%Docstring
3340
Constructor for QgsLayoutItemAbstractGuiMetadata with the specified class ``type``.
3441

@@ -43,6 +50,12 @@ class QgsLayoutItemAbstractGuiMetadata
4350
:rtype: int
4451
%End
4552

53+
Flags flags() const;
54+
%Docstring
55+
Returns item flags.
56+
:rtype: Flags
57+
%End
58+
4659
QString groupId() const;
4760
%Docstring
4861
Returns the item group ID, if set.

‎src/app/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ SET(QGIS_APP_SRCS
158158
layout/qgslayoutaddpagesdialog.cpp
159159
layout/qgslayoutdesignerdialog.cpp
160160
layout/qgslayoutappmenuprovider.cpp
161+
layout/qgslayoutpagepropertieswidget.cpp
161162

162163
locator/qgsinbuiltlocatorfilters.cpp
163164
locator/qgslocatoroptionswidget.cpp
@@ -337,6 +338,7 @@ SET (QGIS_APP_MOC_HDRS
337338
layout/qgslayoutaddpagesdialog.h
338339
layout/qgslayoutappmenuprovider.h
339340
layout/qgslayoutdesignerdialog.h
341+
layout/qgslayoutpagepropertieswidget.h
340342

341343
locator/qgsinbuiltlocatorfilters.h
342344
locator/qgslocatoroptionswidget.h

‎src/app/layout/qgslayoutappmenuprovider.cpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,14 @@
1515

1616
#include "qgslayoutappmenuprovider.h"
1717
#include "qgslayoutitempage.h"
18+
#include "qgslayoutdesignerdialog.h"
1819
#include "qgslayout.h"
1920
#include <QMenu>
2021
#include <QMessageBox>
2122

22-
QgsLayoutAppMenuProvider::QgsLayoutAppMenuProvider( QObject *parent )
23-
: QObject( parent )
23+
QgsLayoutAppMenuProvider::QgsLayoutAppMenuProvider( QgsLayoutDesignerDialog *designer )
24+
: QObject( nullptr )
25+
, mDesigner( designer )
2426
{
2527

2628
}
@@ -34,10 +36,9 @@ QMenu *QgsLayoutAppMenuProvider::createContextMenu( QWidget *parent, QgsLayout *
3436
if ( page )
3537
{
3638
QAction *pagePropertiesAction = new QAction( tr( "Page Properties…" ), menu );
37-
connect( pagePropertiesAction, &QAction::triggered, this, [page]()
39+
connect( pagePropertiesAction, &QAction::triggered, this, [this, page]()
3840
{
39-
40-
41+
mDesigner->showItemOptions( page );
4142
} );
4243
menu->addAction( pagePropertiesAction );
4344
QAction *removePageAction = new QAction( tr( "Remove Page" ), menu );

‎src/app/layout/qgslayoutappmenuprovider.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
#include "qgslayoutview.h"
2121
#include <QObject>
2222

23+
class QgsLayoutDesignerDialog;
24+
2325
/**
2426
* A menu provider for QgsLayoutView
2527
*/
@@ -29,10 +31,14 @@ class QgsLayoutAppMenuProvider : public QObject, public QgsLayoutViewMenuProvide
2931

3032
public:
3133

32-
QgsLayoutAppMenuProvider( QObject *parent = nullptr );
34+
QgsLayoutAppMenuProvider( QgsLayoutDesignerDialog *designer );
3335

3436
QMenu *createContextMenu( QWidget *parent, QgsLayout *layout, QPointF layoutPoint ) const override;
3537

38+
private:
39+
40+
QgsLayoutDesignerDialog *mDesigner = nullptr;
41+
3642
};
3743

3844
#endif // QGSLAYOUTAPPMENUPROVIDER_H

‎src/app/layout/qgslayoutdesignerdialog.cpp

Lines changed: 59 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,15 @@
2727
#include "qgslayoutviewtoolpan.h"
2828
#include "qgslayoutviewtoolzoom.h"
2929
#include "qgslayoutviewtoolselect.h"
30+
#include "qgslayoutitemwidget.h"
3031
#include "qgsgui.h"
3132
#include "qgslayoutitemguiregistry.h"
3233
#include "qgslayoutruler.h"
3334
#include "qgslayoutaddpagesdialog.h"
35+
#include "qgspanelwidgetstack.h"
36+
#include "qgspanelwidget.h"
37+
#include "qgsdockwidget.h"
38+
#include "qgslayoutpagepropertieswidget.h"
3439
#include <QShortcut>
3540
#include <QComboBox>
3641
#include <QLineEdit>
@@ -44,6 +49,8 @@ QList<double> QgsLayoutDesignerDialog::sStatusZoomLevelsList { 0.125, 0.25, 0.5,
4449
#define FIT_LAYOUT -101
4550
#define FIT_LAYOUT_WIDTH -102
4651

52+
bool QgsLayoutDesignerDialog::sInitializedRegistry = false;
53+
4754
QgsAppLayoutDesignerInterface::QgsAppLayoutDesignerInterface( QgsLayoutDesignerDialog *dialog )
4855
: QgsLayoutDesignerInterface( dialog )
4956
, mDesigner( dialog )
@@ -70,6 +77,10 @@ QgsLayoutDesignerDialog::QgsLayoutDesignerDialog( QWidget *parent, Qt::WindowFla
7077
, mInterface( new QgsAppLayoutDesignerInterface( this ) )
7178
, mToolsActionGroup( new QActionGroup( this ) )
7279
{
80+
if ( !sInitializedRegistry )
81+
{
82+
initializeRegistry();
83+
}
7384
QgsSettings settings;
7485
int size = settings.value( QStringLiteral( "IconSize" ), QGIS_ICON_SIZE ).toInt();
7586
setIconSize( QSize( size, size ) );
@@ -222,9 +233,22 @@ QgsLayoutDesignerDialog::QgsLayoutDesignerDialog( QWidget *parent, Qt::WindowFla
222233

223234
connect( mActionToggleFullScreen, &QAction::toggled, this, &QgsLayoutDesignerDialog::toggleFullScreen );
224235

225-
mMenuProvider = new QgsLayoutAppMenuProvider();
236+
mMenuProvider = new QgsLayoutAppMenuProvider( this );
226237
mView->setMenuProvider( mMenuProvider );
227238

239+
int minDockWidth( fontMetrics().width( QStringLiteral( "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" ) ) );
240+
241+
mItemDock = new QgsDockWidget( tr( "Item properties" ), this );
242+
mItemDock->setObjectName( QStringLiteral( "ItemDock" ) );
243+
mItemDock->setMinimumWidth( minDockWidth );
244+
mItemPropertiesStack = new QgsPanelWidgetStack();
245+
mItemDock->setWidget( mItemPropertiesStack );
246+
mPanelsMenu->addAction( mItemDock->toggleViewAction() );
247+
248+
addDockWidget( Qt::RightDockWidgetArea, mItemDock );
249+
250+
mItemDock->show();
251+
228252
restoreWindowState();
229253
}
230254

@@ -257,6 +281,25 @@ void QgsLayoutDesignerDialog::setIconSizes( int size )
257281
}
258282
}
259283

284+
void QgsLayoutDesignerDialog::showItemOptions( QgsLayoutItem *item )
285+
{
286+
if ( !item )
287+
{
288+
delete mItemPropertiesStack->takeMainPanel();
289+
return;
290+
}
291+
292+
std::unique_ptr< QgsLayoutItemBaseWidget > widget( QgsGui::layoutItemGuiRegistry()->createItemWidget( item ) );
293+
if ( ! widget )
294+
{
295+
return;
296+
}
297+
298+
delete mItemPropertiesStack->takeMainPanel();
299+
widget->setDockMode( true );
300+
mItemPropertiesStack->setMainPanel( widget.release() );
301+
}
302+
260303
void QgsLayoutDesignerDialog::open()
261304
{
262305
show();
@@ -302,6 +345,9 @@ void QgsLayoutDesignerDialog::closeEvent( QCloseEvent * )
302345

303346
void QgsLayoutDesignerDialog::itemTypeAdded( int type )
304347
{
348+
if ( QgsGui::layoutItemGuiRegistry()->itemMetadata( type )->flags() & QgsLayoutItemAbstractGuiMetadata::FlagNoCreationTools )
349+
return;
350+
305351
QString name = QgsApplication::layoutItemRegistry()->itemMetadata( type )->visibleName();
306352
QString groupId = QgsGui::layoutItemGuiRegistry()->itemMetadata( type )->groupId();
307353
QToolButton *groupButton = nullptr;
@@ -532,4 +578,16 @@ void QgsLayoutDesignerDialog::activateNewItemCreationTool( int type )
532578
}
533579
}
534580

581+
void QgsLayoutDesignerDialog::initializeRegistry()
582+
{
583+
sInitializedRegistry = true;
584+
auto createPageWidget = ( []( QgsLayoutItem * item )->QgsLayoutItemBaseWidget *
585+
{
586+
return new QgsLayoutPagePropertiesWidget( nullptr, item );
587+
} );
588+
589+
QgsGui::layoutItemGuiRegistry()->addLayoutItemGuiMetadata( new QgsLayoutItemGuiMetadata( QgsLayoutItemRegistry::LayoutPage, QIcon(), createPageWidget, nullptr, QString(), QgsLayoutItemAbstractGuiMetadata::FlagNoCreationTools ) );
590+
591+
}
592+
535593

‎src/app/layout/qgslayoutdesignerdialog.h

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ class QComboBox;
3232
class QSlider;
3333
class QLabel;
3434
class QgsLayoutAppMenuProvider;
35+
class QgsLayoutItem;
36+
class QgsPanelWidgetStack;
37+
class QgsDockWidget;
3538

3639
class QgsAppLayoutDesignerInterface : public QgsLayoutDesignerInterface
3740
{
@@ -90,6 +93,10 @@ class QgsLayoutDesignerDialog: public QMainWindow, private Ui::QgsLayoutDesigner
9093
*/
9194
void setIconSizes( int size );
9295

96+
/**
97+
* Shows the configuration widget for the specified layout \a item.
98+
*/
99+
void showItemOptions( QgsLayoutItem *item );
93100

94101
public slots:
95102

@@ -138,6 +145,8 @@ class QgsLayoutDesignerDialog: public QMainWindow, private Ui::QgsLayoutDesigner
138145

139146
private:
140147

148+
static bool sInitializedRegistry;
149+
141150
QgsAppLayoutDesignerInterface *mInterface = nullptr;
142151

143152
QgsLayout *mLayout = nullptr;
@@ -170,6 +179,9 @@ class QgsLayoutDesignerDialog: public QMainWindow, private Ui::QgsLayoutDesigner
170179

171180
QgsLayoutAppMenuProvider *mMenuProvider;
172181

182+
QgsDockWidget *mItemDock = nullptr;
183+
QgsPanelWidgetStack *mItemPropertiesStack = nullptr;
184+
173185
//! Save window state
174186
void saveWindowState();
175187

@@ -179,6 +191,8 @@ class QgsLayoutDesignerDialog: public QMainWindow, private Ui::QgsLayoutDesigner
179191
//! Switch to new item creation tool, for a new item of the specified \a type.
180192
void activateNewItemCreationTool( int type );
181193

194+
void initializeRegistry();
195+
182196
};
183197

184198
#endif // QGSLAYOUTDESIGNERDIALOG_H
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/***************************************************************************
2+
qgslayoutpagepropertieswidget.cpp
3+
---------------------------------
4+
Date : July 2017
5+
Copyright : (C) 2017 Nyall Dawson
6+
Email : nyall dot dawson at gmail dot com
7+
***************************************************************************
8+
* *
9+
* This program is free software; you can redistribute it and/or modify *
10+
* it under the terms of the GNU General Public License as published by *
11+
* the Free Software Foundation; either version 2 of the License, or *
12+
* (at your option) any later version. *
13+
* *
14+
***************************************************************************/
15+
16+
#include "qgslayoutpagepropertieswidget.h"
17+
#include "qgslayoutitempage.h"
18+
19+
QgsLayoutPagePropertiesWidget::QgsLayoutPagePropertiesWidget( QWidget *parent, QgsLayoutItem *layoutItem )
20+
: QgsLayoutItemBaseWidget( parent, layoutItem )
21+
, mPage( static_cast< QgsLayoutItemPage *>( layoutItem ) )
22+
{
23+
setupUi( this );
24+
25+
}
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
/***************************************************************************
2+
qgslayoutpagepropertieswidget.h
3+
-------------------------------
4+
Date : July 2017
5+
Copyright : (C) 2017 Nyall Dawson
6+
Email : nyall dot dawson at gmail dot com
7+
***************************************************************************
8+
* *
9+
* This program is free software; you can redistribute it and/or modify *
10+
* it under the terms of the GNU General Public License as published by *
11+
* the Free Software Foundation; either version 2 of the License, or *
12+
* (at your option) any later version. *
13+
* *
14+
***************************************************************************/
15+
16+
#ifndef QGSLAYOUTPAGEPROPERTIESWIDGET_H
17+
#define QGSLAYOUTPAGEPROPERTIESWIDGET_H
18+
19+
#include "qgis.h"
20+
#include "ui_qgslayoutpagepropertieswidget.h"
21+
22+
#include "qgslayoutsize.h"
23+
#include "qgslayoutpoint.h"
24+
#include "qgslayoutitemwidget.h"
25+
#include "qgslayoutmeasurementconverter.h"
26+
27+
class QgsLayoutItem;
28+
class QgsLayoutItemPage;
29+
30+
/**
31+
* A widget for configuring properties of pages in a layout
32+
*/
33+
class QgsLayoutPagePropertiesWidget : public QgsLayoutItemBaseWidget, private Ui::QgsLayoutPagePropertiesWidget
34+
{
35+
Q_OBJECT
36+
37+
public:
38+
39+
/**
40+
* Constructor for QgsLayoutPagePropertiesWidget.
41+
*/
42+
QgsLayoutPagePropertiesWidget( QWidget *parent, QgsLayoutItem *page );
43+
44+
private:
45+
46+
QgsLayoutItemPage *mPage = nullptr;
47+
48+
QgsLayoutMeasurementConverter mConverter;
49+
50+
};
51+
52+
#endif // QGSLAYOUTPAGEPROPERTIESWIDGET_H

‎src/core/layout/qgslayoutitemregistry.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ bool QgsLayoutItemRegistry::populate()
4242
};
4343

4444
addLayoutItemType( new QgsLayoutItemMetadata( 101, QStringLiteral( "temp type" ), QgsApplication::getThemeIcon( QStringLiteral( "/mActionAddLabel.svg" ) ), createTemporaryItem ) );
45+
addLayoutItemType( new QgsLayoutItemMetadata( LayoutPage, QStringLiteral( "Page" ), QgsApplication::getThemeIcon( QStringLiteral( "/mActionFileNew.svg" ) ), nullptr ) );
46+
4547
addLayoutItemType( new QgsLayoutItemMetadata( LayoutRectangle, QStringLiteral( "Rectangle" ), QgsApplication::getThemeIcon( QStringLiteral( "/mActionAddBasicRectangle.svg" ) ), QgsLayoutItemRectangularShape::create ) );
4648
addLayoutItemType( new QgsLayoutItemMetadata( LayoutEllipse, QStringLiteral( "Ellipse" ), QgsApplication::getThemeIcon( QStringLiteral( "/mActionAddBasicCircle.svg" ) ), QgsLayoutItemEllipseShape::create ) );
4749
addLayoutItemType( new QgsLayoutItemMetadata( LayoutTriangle, QStringLiteral( "Triangle" ), QgsApplication::getThemeIcon( QStringLiteral( "/mActionAddBasicTriangle.svg" ) ), QgsLayoutItemTriangleShape::create ) );

‎src/gui/layout/qgslayoutitemguiregistry.h

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,22 @@ class GUI_EXPORT QgsLayoutItemAbstractGuiMetadata
4646
{
4747
public:
4848

49+
//! Flags for controlling how a items behave in the GUI
50+
enum Flag
51+
{
52+
FlagNoCreationTools = 1 << 1, //!< Do not show item creation tools for the item type
53+
};
54+
Q_DECLARE_FLAGS( Flags, Flag )
55+
4956
/**
5057
* Constructor for QgsLayoutItemAbstractGuiMetadata with the specified class \a type.
5158
*
5259
* An optional \a groupId can be set, which allows grouping of related layout item classes. See QgsLayoutItemGuiMetadata for details.
5360
*/
54-
QgsLayoutItemAbstractGuiMetadata( int type, const QString &groupId = QString() )
61+
QgsLayoutItemAbstractGuiMetadata( int type, const QString &groupId = QString(), Flags flags = 0 )
5562
: mType( type )
5663
, mGroupId( groupId )
64+
, mFlags( flags )
5765
{}
5866

5967
virtual ~QgsLayoutItemAbstractGuiMetadata() = default;
@@ -63,6 +71,11 @@ class GUI_EXPORT QgsLayoutItemAbstractGuiMetadata
6371
*/
6472
int type() const { return mType; }
6573

74+
/**
75+
* Returns item flags.
76+
*/
77+
Flags flags() const { return mFlags; }
78+
6679
/**
6780
* Returns the item group ID, if set.
6881
*/
@@ -88,6 +101,7 @@ class GUI_EXPORT QgsLayoutItemAbstractGuiMetadata
88101

89102
int mType = -1;
90103
QString mGroupId;
104+
Flags mFlags;
91105

92106
};
93107

@@ -118,8 +132,8 @@ class GUI_EXPORT QgsLayoutItemGuiMetadata : public QgsLayoutItemAbstractGuiMetad
118132
*/
119133
QgsLayoutItemGuiMetadata( int type, const QIcon &creationIcon,
120134
QgsLayoutItemWidgetFunc pfWidget = nullptr,
121-
QgsLayoutItemRubberBandFunc pfRubberBand = nullptr, const QString &groupId = QString() )
122-
: QgsLayoutItemAbstractGuiMetadata( type, groupId )
135+
QgsLayoutItemRubberBandFunc pfRubberBand = nullptr, const QString &groupId = QString(), QgsLayoutItemAbstractGuiMetadata::Flags flags = 0 )
136+
: QgsLayoutItemAbstractGuiMetadata( type, groupId, flags )
123137
, mIcon( creationIcon )
124138
, mWidgetFunc( pfWidget )
125139
, mRubberBandFunc( pfRubberBand )

‎src/ui/layout/qgslayoutdesignerbase.ui

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383
<x>0</x>
8484
<y>0</y>
8585
<width>1083</width>
86-
<height>25</height>
86+
<height>42</height>
8787
</rect>
8888
</property>
8989
<widget class="QMenu" name="mLayoutMenu">
@@ -107,6 +107,11 @@
107107
<string>&amp;Toolbars</string>
108108
</property>
109109
</widget>
110+
<widget class="QMenu" name="mPanelsMenu">
111+
<property name="title">
112+
<string>&amp;Panels</string>
113+
</property>
114+
</widget>
110115
<addaction name="mActionZoomIn"/>
111116
<addaction name="mActionZoomOut"/>
112117
<addaction name="mActionZoomActual"/>
@@ -116,6 +121,7 @@
116121
<addaction name="mActionShowRulers"/>
117122
<addaction name="separator"/>
118123
<addaction name="mToolbarMenu"/>
124+
<addaction name="mPanelsMenu"/>
119125
<addaction name="mActionToggleFullScreen"/>
120126
</widget>
121127
<addaction name="mLayoutMenu"/>
Lines changed: 180 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,180 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<ui version="4.0">
3+
<class>QgsLayoutPagePropertiesWidget</class>
4+
<widget class="QWidget" name="QgsLayoutPagePropertiesWidget">
5+
<property name="geometry">
6+
<rect>
7+
<x>0</x>
8+
<y>0</y>
9+
<width>660</width>
10+
<height>368</height>
11+
</rect>
12+
</property>
13+
<property name="windowTitle">
14+
<string>New Item Properties</string>
15+
</property>
16+
<layout class="QGridLayout" name="gridLayout_2">
17+
<item row="3" column="1">
18+
<spacer name="verticalSpacer">
19+
<property name="orientation">
20+
<enum>Qt::Vertical</enum>
21+
</property>
22+
<property name="sizeHint" stdset="0">
23+
<size>
24+
<width>20</width>
25+
<height>40</height>
26+
</size>
27+
</property>
28+
</spacer>
29+
</item>
30+
<item row="2" column="0" colspan="3">
31+
<widget class="QGroupBox" name="groupBox">
32+
<property name="title">
33+
<string>Page size</string>
34+
</property>
35+
<layout class="QGridLayout" name="gridLayout" columnstretch="0,1">
36+
<item row="0" column="0">
37+
<widget class="QLabel" name="label_3">
38+
<property name="text">
39+
<string>Size</string>
40+
</property>
41+
</widget>
42+
</item>
43+
<item row="2" column="0">
44+
<widget class="QLabel" name="mWidthLabel">
45+
<property name="text">
46+
<string>Width</string>
47+
</property>
48+
</widget>
49+
</item>
50+
<item row="1" column="1">
51+
<widget class="QComboBox" name="mPageOrientationComboBox"/>
52+
</item>
53+
<item row="1" column="0">
54+
<widget class="QLabel" name="label_4">
55+
<property name="text">
56+
<string>Orientation</string>
57+
</property>
58+
</widget>
59+
</item>
60+
<item row="0" column="1">
61+
<widget class="QComboBox" name="mPageSizeComboBox"/>
62+
</item>
63+
<item row="3" column="0">
64+
<widget class="QLabel" name="mHeightLabel">
65+
<property name="text">
66+
<string>Height</string>
67+
</property>
68+
</widget>
69+
</item>
70+
<item row="2" column="1" rowspan="2">
71+
<layout class="QGridLayout" name="gridLayout_3" columnstretch="1,0,0,0,1">
72+
<item row="0" column="4" rowspan="2">
73+
<widget class="QgsLayoutUnitsComboBox" name="mSizeUnitsComboBox"/>
74+
</item>
75+
<item row="0" column="3" rowspan="2">
76+
<layout class="QHBoxLayout" name="_2">
77+
<property name="leftMargin">
78+
<number>2</number>
79+
</property>
80+
<property name="topMargin">
81+
<number>2</number>
82+
</property>
83+
<property name="rightMargin">
84+
<number>0</number>
85+
</property>
86+
<property name="bottomMargin">
87+
<number>2</number>
88+
</property>
89+
<item>
90+
<widget class="QgsRatioLockButton" name="mLockAspectRatio">
91+
<property name="sizePolicy">
92+
<sizepolicy hsizetype="Fixed" vsizetype="Expanding">
93+
<horstretch>0</horstretch>
94+
<verstretch>0</verstretch>
95+
</sizepolicy>
96+
</property>
97+
<property name="toolTip">
98+
<string>Lock aspect ratio (including while drawing extent onto canvas)</string>
99+
</property>
100+
<property name="leftMargin" stdset="0">
101+
<number>13</number>
102+
</property>
103+
</widget>
104+
</item>
105+
</layout>
106+
</item>
107+
<item row="0" column="0" colspan="3">
108+
<widget class="QgsDoubleSpinBox" name="mWidthSpin">
109+
<property name="suffix">
110+
<string/>
111+
</property>
112+
<property name="decimals">
113+
<number>3</number>
114+
</property>
115+
<property name="maximum">
116+
<double>9999999.000000000000000</double>
117+
</property>
118+
<property name="value">
119+
<double>100.000000000000000</double>
120+
</property>
121+
<property name="showClearButton" stdset="0">
122+
<bool>false</bool>
123+
</property>
124+
</widget>
125+
</item>
126+
<item row="1" column="0" colspan="3">
127+
<widget class="QgsDoubleSpinBox" name="mHeightSpin">
128+
<property name="suffix">
129+
<string/>
130+
</property>
131+
<property name="decimals">
132+
<number>3</number>
133+
</property>
134+
<property name="maximum">
135+
<double>9999999.000000000000000</double>
136+
</property>
137+
<property name="value">
138+
<double>100.000000000000000</double>
139+
</property>
140+
<property name="showClearButton" stdset="0">
141+
<bool>false</bool>
142+
</property>
143+
</widget>
144+
</item>
145+
</layout>
146+
</item>
147+
</layout>
148+
</widget>
149+
</item>
150+
</layout>
151+
</widget>
152+
<customwidgets>
153+
<customwidget>
154+
<class>QgsRatioLockButton</class>
155+
<extends>QToolButton</extends>
156+
<header>qgsratiolockbutton.h</header>
157+
<container>1</container>
158+
</customwidget>
159+
<customwidget>
160+
<class>QgsDoubleSpinBox</class>
161+
<extends>QDoubleSpinBox</extends>
162+
<header>qgsdoublespinbox.h</header>
163+
</customwidget>
164+
<customwidget>
165+
<class>QgsLayoutUnitsComboBox</class>
166+
<extends>QComboBox</extends>
167+
<header>qgslayoutunitscombobox.h</header>
168+
</customwidget>
169+
</customwidgets>
170+
<tabstops>
171+
<tabstop>mPageSizeComboBox</tabstop>
172+
<tabstop>mPageOrientationComboBox</tabstop>
173+
<tabstop>mWidthSpin</tabstop>
174+
<tabstop>mHeightSpin</tabstop>
175+
<tabstop>mLockAspectRatio</tabstop>
176+
<tabstop>mSizeUnitsComboBox</tabstop>
177+
</tabstops>
178+
<resources/>
179+
<connections/>
180+
</ui>

0 commit comments

Comments
 (0)
Please sign in to comment.