Skip to content

Commit 25170da

Browse files
committedJan 5, 2018
Start porting atlas GUI
1 parent f86c298 commit 25170da

File tree

6 files changed

+835
-0
lines changed

6 files changed

+835
-0
lines changed
 

‎src/app/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@ SET(QGIS_APP_SRCS
180180

181181
layout/qgslayoutaddpagesdialog.cpp
182182
layout/qgslayoutapputils.cpp
183+
layout/qgslayoutatlaswidget.cpp
183184
layout/qgslayoutattributeselectiondialog.cpp
184185
layout/qgslayoutattributetablewidget.cpp
185186
layout/qgslayoutdesignerdialog.cpp
@@ -399,6 +400,7 @@ SET (QGIS_APP_MOC_HDRS
399400

400401
layout/qgslayoutaddpagesdialog.h
401402
layout/qgslayoutappmenuprovider.h
403+
layout/qgslayoutatlaswidget.h
402404
layout/qgslayoutattributeselectiondialog.h
403405
layout/qgslayoutattributetablewidget.h
404406
layout/qgslayoutdesignerdialog.h
Lines changed: 343 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,343 @@
1+
/***************************************************************************
2+
qgslayoutatlaswidget.cpp
3+
-----------------------------
4+
begin : October 2012
5+
copyright : (C) 2012 Hugo Mercier
6+
email : hugo dot mercier at oslandia dot com
7+
***************************************************************************/
8+
/***************************************************************************
9+
* *
10+
* This program is free software; you can redistribute it and/or modify *
11+
* it under the terms of the GNU General Public License as published by *
12+
* the Free Software Foundation; either version 2 of the License, or *
13+
* (at your option) any later version. *
14+
* *
15+
***************************************************************************/
16+
17+
#include <QComboBox>
18+
#include <QImageWriter>
19+
#include <QMessageBox>
20+
21+
#include "qgslayoutatlaswidget.h"
22+
#include "qgsprintlayout.h"
23+
#include "qgslayoutatlas.h"
24+
#include "qgsexpressionbuilderdialog.h"
25+
26+
QgsLayoutAtlasWidget::QgsLayoutAtlasWidget( QWidget *parent, QgsPrintLayout *layout )
27+
: QWidget( parent )
28+
, mAtlas( layout->atlas() )
29+
{
30+
setupUi( this );
31+
connect( mUseAtlasCheckBox, &QCheckBox::stateChanged, this, &QgsLayoutAtlasWidget::mUseAtlasCheckBox_stateChanged );
32+
connect( mAtlasFilenamePatternEdit, &QLineEdit::editingFinished, this, &QgsLayoutAtlasWidget::mAtlasFilenamePatternEdit_editingFinished );
33+
connect( mAtlasFilenameExpressionButton, &QToolButton::clicked, this, &QgsLayoutAtlasWidget::mAtlasFilenameExpressionButton_clicked );
34+
connect( mAtlasHideCoverageCheckBox, &QCheckBox::stateChanged, this, &QgsLayoutAtlasWidget::mAtlasHideCoverageCheckBox_stateChanged );
35+
connect( mAtlasSingleFileCheckBox, &QCheckBox::stateChanged, this, &QgsLayoutAtlasWidget::mAtlasSingleFileCheckBox_stateChanged );
36+
connect( mAtlasSortFeatureCheckBox, &QCheckBox::stateChanged, this, &QgsLayoutAtlasWidget::mAtlasSortFeatureCheckBox_stateChanged );
37+
connect( mAtlasSortFeatureDirectionButton, &QToolButton::clicked, this, &QgsLayoutAtlasWidget::mAtlasSortFeatureDirectionButton_clicked );
38+
connect( mAtlasFeatureFilterEdit, &QLineEdit::editingFinished, this, &QgsLayoutAtlasWidget::mAtlasFeatureFilterEdit_editingFinished );
39+
connect( mAtlasFeatureFilterButton, &QToolButton::clicked, this, &QgsLayoutAtlasWidget::mAtlasFeatureFilterButton_clicked );
40+
connect( mAtlasFeatureFilterCheckBox, &QCheckBox::stateChanged, this, &QgsLayoutAtlasWidget::mAtlasFeatureFilterCheckBox_stateChanged );
41+
42+
mAtlasCoverageLayerComboBox->setFilters( QgsMapLayerProxyModel::VectorLayer );
43+
44+
connect( mAtlasCoverageLayerComboBox, &QgsMapLayerComboBox::layerChanged, mAtlasSortFeatureKeyComboBox, &QgsFieldComboBox::setLayer );
45+
connect( mAtlasCoverageLayerComboBox, &QgsMapLayerComboBox::layerChanged, mPageNameWidget, &QgsFieldExpressionWidget::setLayer );
46+
connect( mAtlasCoverageLayerComboBox, &QgsMapLayerComboBox::layerChanged, this, &QgsLayoutAtlasWidget::changeCoverageLayer );
47+
connect( mAtlasSortFeatureKeyComboBox, &QgsFieldComboBox::fieldChanged, this, &QgsLayoutAtlasWidget::changesSortFeatureField );
48+
connect( mPageNameWidget, static_cast < void ( QgsFieldExpressionWidget::* )( const QString &, bool ) > ( &QgsFieldExpressionWidget::fieldChanged ), this, &QgsLayoutAtlasWidget::pageNameExpressionChanged );
49+
50+
// Sort direction
51+
mAtlasSortFeatureDirectionButton->setEnabled( false );
52+
mAtlasSortFeatureKeyComboBox->setEnabled( false );
53+
54+
// connect to updates
55+
connect( mAtlas, &QgsLayoutAtlas::changed, this, &QgsLayoutAtlasWidget::updateGuiElements );
56+
57+
mPageNameWidget->registerExpressionContextGenerator( mLayout );
58+
59+
QList<QByteArray> formats = QImageWriter::supportedImageFormats();
60+
for ( int i = 0; i < formats.size(); ++i )
61+
{
62+
mAtlasFileFormat->addItem( QString( formats.at( i ) ) );
63+
}
64+
connect( mAtlasFileFormat, static_cast<void ( QComboBox::* )( int )>( &QComboBox::currentIndexChanged ), this, [ = ]( int ) { changeFileFormat(); } );
65+
66+
updateGuiElements();
67+
}
68+
69+
void QgsLayoutAtlasWidget::mUseAtlasCheckBox_stateChanged( int state )
70+
{
71+
if ( state == Qt::Checked )
72+
{
73+
mAtlas->setEnabled( true );
74+
mConfigurationGroup->setEnabled( true );
75+
mOutputGroup->setEnabled( true );
76+
}
77+
else
78+
{
79+
mAtlas->setEnabled( false );
80+
mConfigurationGroup->setEnabled( false );
81+
mOutputGroup->setEnabled( false );
82+
}
83+
}
84+
85+
void QgsLayoutAtlasWidget::changeCoverageLayer( QgsMapLayer *layer )
86+
{
87+
QgsVectorLayer *vl = dynamic_cast<QgsVectorLayer *>( layer );
88+
89+
if ( !vl )
90+
{
91+
mAtlas->setCoverageLayer( nullptr );
92+
}
93+
else
94+
{
95+
mAtlas->setCoverageLayer( vl );
96+
updateAtlasFeatures();
97+
}
98+
}
99+
100+
void QgsLayoutAtlasWidget::mAtlasFilenamePatternEdit_editingFinished()
101+
{
102+
QString error;
103+
if ( !mAtlas->setFilenameExpression( mAtlasFilenamePatternEdit->text(), error ) )
104+
{
105+
//expression could not be set
106+
QMessageBox::warning( this
107+
, tr( "Could not evaluate filename pattern" )
108+
, tr( "Could not set filename pattern as '%1'.\nParser error:\n%2" )
109+
.arg( mAtlasFilenamePatternEdit->text(),
110+
error )
111+
);
112+
}
113+
}
114+
115+
void QgsLayoutAtlasWidget::mAtlasFilenameExpressionButton_clicked()
116+
{
117+
if ( !mAtlas || !mAtlas->coverageLayer() )
118+
{
119+
return;
120+
}
121+
122+
QgsExpressionContext context = mLayout->createExpressionContext();
123+
QgsExpressionBuilderDialog exprDlg( mAtlas->coverageLayer(), mAtlasFilenamePatternEdit->text(), this, QStringLiteral( "generic" ), context );
124+
exprDlg.setWindowTitle( tr( "Expression Based Filename" ) );
125+
126+
if ( exprDlg.exec() == QDialog::Accepted )
127+
{
128+
QString expression = exprDlg.expressionText();
129+
if ( !expression.isEmpty() )
130+
{
131+
//set atlas filename expression
132+
mAtlasFilenamePatternEdit->setText( expression );
133+
QString error;
134+
if ( !mAtlas->setFilenameExpression( expression, error ) )
135+
{
136+
//expression could not be set
137+
QMessageBox::warning( this
138+
, tr( "Could not evaluate filename pattern" )
139+
, tr( "Could not set filename pattern as '%1'.\nParser error:\n%2" )
140+
.arg( expression,
141+
error )
142+
);
143+
}
144+
}
145+
}
146+
}
147+
148+
void QgsLayoutAtlasWidget::mAtlasHideCoverageCheckBox_stateChanged( int state )
149+
{
150+
mAtlas->setHideCoverage( state == Qt::Checked );
151+
}
152+
153+
void QgsLayoutAtlasWidget::mAtlasSingleFileCheckBox_stateChanged( int state )
154+
{
155+
if ( state == Qt::Checked )
156+
{
157+
mAtlasFilenamePatternEdit->setEnabled( false );
158+
mAtlasFilenameExpressionButton->setEnabled( false );
159+
}
160+
else
161+
{
162+
mAtlasFilenamePatternEdit->setEnabled( true );
163+
mAtlasFilenameExpressionButton->setEnabled( true );
164+
}
165+
#if 0 //TODO
166+
mAtlas->setSingleFile( state == Qt::Checked );
167+
#endif
168+
}
169+
170+
void QgsLayoutAtlasWidget::mAtlasSortFeatureCheckBox_stateChanged( int state )
171+
{
172+
if ( state == Qt::Checked )
173+
{
174+
mAtlasSortFeatureDirectionButton->setEnabled( true );
175+
mAtlasSortFeatureKeyComboBox->setEnabled( true );
176+
}
177+
else
178+
{
179+
mAtlasSortFeatureDirectionButton->setEnabled( false );
180+
mAtlasSortFeatureKeyComboBox->setEnabled( false );
181+
}
182+
mAtlas->setSortFeatures( state == Qt::Checked );
183+
updateAtlasFeatures();
184+
}
185+
186+
void QgsLayoutAtlasWidget::updateAtlasFeatures()
187+
{
188+
#if 0 //TODO
189+
bool updated = mAtlas->updateFeatures();
190+
if ( !updated )
191+
{
192+
QMessageBox::warning( nullptr, tr( "Atlas preview" ),
193+
tr( "No matching atlas features found!" ),
194+
QMessageBox::Ok,
195+
QMessageBox::Ok );
196+
197+
//Perhaps atlas preview should be disabled now? If so, it may get annoying if user is editing
198+
//the filter expression and it keeps disabling itself.
199+
return;
200+
}
201+
#endif
202+
}
203+
204+
void QgsLayoutAtlasWidget::changesSortFeatureField( const QString &fieldName )
205+
{
206+
mAtlas->setSortExpression( fieldName );
207+
updateAtlasFeatures();
208+
}
209+
210+
void QgsLayoutAtlasWidget::mAtlasFeatureFilterCheckBox_stateChanged( int state )
211+
{
212+
if ( state == Qt::Checked )
213+
{
214+
mAtlasFeatureFilterEdit->setEnabled( true );
215+
mAtlasFeatureFilterButton->setEnabled( true );
216+
}
217+
else
218+
{
219+
mAtlasFeatureFilterEdit->setEnabled( false );
220+
mAtlasFeatureFilterButton->setEnabled( false );
221+
}
222+
mAtlas->setFilterFeatures( state == Qt::Checked );
223+
updateAtlasFeatures();
224+
}
225+
226+
void QgsLayoutAtlasWidget::pageNameExpressionChanged( const QString &, bool valid )
227+
{
228+
QString expression = mPageNameWidget->asExpression();
229+
if ( !valid && !expression.isEmpty() )
230+
{
231+
return;
232+
}
233+
234+
mAtlas->setPageNameExpression( expression );
235+
}
236+
237+
void QgsLayoutAtlasWidget::mAtlasFeatureFilterEdit_editingFinished()
238+
{
239+
QString error;
240+
mAtlas->setFilterExpression( mAtlasFeatureFilterEdit->text(), error );
241+
updateAtlasFeatures();
242+
}
243+
244+
void QgsLayoutAtlasWidget::mAtlasFeatureFilterButton_clicked()
245+
{
246+
QgsVectorLayer *vl = dynamic_cast<QgsVectorLayer *>( mAtlasCoverageLayerComboBox->currentLayer() );
247+
248+
if ( !vl )
249+
{
250+
return;
251+
}
252+
253+
QgsExpressionContext context = mLayout->createExpressionContext();
254+
QgsExpressionBuilderDialog exprDlg( vl, mAtlasFeatureFilterEdit->text(), this, QStringLiteral( "generic" ), context );
255+
exprDlg.setWindowTitle( tr( "Expression Based Filter" ) );
256+
257+
if ( exprDlg.exec() == QDialog::Accepted )
258+
{
259+
QString expression = exprDlg.expressionText();
260+
if ( !expression.isEmpty() )
261+
{
262+
mAtlasFeatureFilterEdit->setText( expression );
263+
QString error;
264+
mAtlas->setFilterExpression( mAtlasFeatureFilterEdit->text(), error );
265+
updateAtlasFeatures();
266+
}
267+
}
268+
}
269+
270+
void QgsLayoutAtlasWidget::mAtlasSortFeatureDirectionButton_clicked()
271+
{
272+
Qt::ArrowType at = mAtlasSortFeatureDirectionButton->arrowType();
273+
at = ( at == Qt::UpArrow ) ? Qt::DownArrow : Qt::UpArrow;
274+
mAtlasSortFeatureDirectionButton->setArrowType( at );
275+
276+
mAtlas->setSortAscending( at == Qt::UpArrow );
277+
updateAtlasFeatures();
278+
}
279+
280+
void QgsLayoutAtlasWidget::changeFileFormat()
281+
{
282+
#if 0 //TODO
283+
QgsAtlasComposition *atlasMap = mAtlas;
284+
atlasMap->setFileFormat( mAtlasFileFormat->currentText() );
285+
#endif
286+
}
287+
void QgsLayoutAtlasWidget::updateGuiElements()
288+
{
289+
blockAllSignals( true );
290+
mUseAtlasCheckBox->setCheckState( mAtlas->enabled() ? Qt::Checked : Qt::Unchecked );
291+
mConfigurationGroup->setEnabled( mAtlas->enabled() );
292+
mOutputGroup->setEnabled( mAtlas->enabled() );
293+
294+
mAtlasCoverageLayerComboBox->setLayer( mAtlas->coverageLayer() );
295+
mPageNameWidget->setLayer( mAtlas->coverageLayer() );
296+
mPageNameWidget->setField( mAtlas->pageNameExpression() );
297+
298+
mAtlasSortFeatureKeyComboBox->setLayer( mAtlas->coverageLayer() );
299+
mAtlasSortFeatureKeyComboBox->setField( mAtlas->sortExpression() );
300+
301+
mAtlasFilenamePatternEdit->setText( mAtlas->filenameExpression() );
302+
mAtlasHideCoverageCheckBox->setCheckState( mAtlas->hideCoverage() ? Qt::Checked : Qt::Unchecked );
303+
304+
#if 0 //TODO
305+
mAtlasSingleFileCheckBox->setCheckState( mAtlas->singleFile() ? Qt::Checked : Qt::Unchecked );
306+
mAtlasFilenamePatternEdit->setEnabled( !mAtlas->singleFile() );
307+
mAtlasFilenameExpressionButton->setEnabled( !mAtlas->singleFile() );
308+
#endif
309+
310+
mAtlasSortFeatureCheckBox->setCheckState( mAtlas->sortFeatures() ? Qt::Checked : Qt::Unchecked );
311+
mAtlasSortFeatureDirectionButton->setEnabled( mAtlas->sortFeatures() );
312+
mAtlasSortFeatureKeyComboBox->setEnabled( mAtlas->sortFeatures() );
313+
314+
mAtlasSortFeatureDirectionButton->setArrowType( mAtlas->sortAscending() ? Qt::UpArrow : Qt::DownArrow );
315+
mAtlasFeatureFilterEdit->setText( mAtlas->filterExpression() );
316+
317+
mAtlasFeatureFilterCheckBox->setCheckState( mAtlas->filterFeatures() ? Qt::Checked : Qt::Unchecked );
318+
mAtlasFeatureFilterEdit->setEnabled( mAtlas->filterFeatures() );
319+
mAtlasFeatureFilterButton->setEnabled( mAtlas->filterFeatures() );
320+
321+
#if 0 //TODO
322+
mAtlasFileFormat->setCurrentIndex( mAtlasFileFormat->findText( mAtlas->fileFormat() ) );
323+
#endif
324+
325+
blockAllSignals( false );
326+
}
327+
328+
void QgsLayoutAtlasWidget::blockAllSignals( bool b )
329+
{
330+
mUseAtlasCheckBox->blockSignals( b );
331+
mConfigurationGroup->blockSignals( b );
332+
mOutputGroup->blockSignals( b );
333+
mAtlasCoverageLayerComboBox->blockSignals( b );
334+
mPageNameWidget->blockSignals( b );
335+
mAtlasSortFeatureKeyComboBox->blockSignals( b );
336+
mAtlasFilenamePatternEdit->blockSignals( b );
337+
mAtlasHideCoverageCheckBox->blockSignals( b );
338+
mAtlasSingleFileCheckBox->blockSignals( b );
339+
mAtlasSortFeatureCheckBox->blockSignals( b );
340+
mAtlasSortFeatureDirectionButton->blockSignals( b );
341+
mAtlasFeatureFilterEdit->blockSignals( b );
342+
mAtlasFeatureFilterCheckBox->blockSignals( b );
343+
}

‎src/app/layout/qgslayoutatlaswidget.h

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
/***************************************************************************
2+
qgslayoutatlaswidget.h
3+
---------------------------
4+
begin : October 2012
5+
copyright : (C) 2012 Hugo Mercier
6+
email : hugo dot mercier at oslandia dot com
7+
***************************************************************************/
8+
/***************************************************************************
9+
* *
10+
* This program is free software; you can redistribute it and/or modify *
11+
* it under the terms of the GNU General Public License as published by *
12+
* the Free Software Foundation; either version 2 of the License, or *
13+
* (at your option) any later version. *
14+
* *
15+
***************************************************************************/
16+
17+
#include "ui_qgslayoutatlaswidgetbase.h"
18+
19+
class QgsPrintLayout;
20+
class QgsLayoutAtlas;
21+
22+
/**
23+
* \ingroup app
24+
* A widget for layout atlas settings.
25+
*/
26+
class QgsLayoutAtlasWidget: public QWidget, private Ui::QgsLayoutAtlasWidgetBase
27+
{
28+
Q_OBJECT
29+
public:
30+
QgsLayoutAtlasWidget( QWidget *parent, QgsPrintLayout *layout );
31+
32+
public slots:
33+
void mUseAtlasCheckBox_stateChanged( int state );
34+
void changeCoverageLayer( QgsMapLayer *layer );
35+
void mAtlasFilenamePatternEdit_editingFinished();
36+
void mAtlasFilenameExpressionButton_clicked();
37+
void mAtlasHideCoverageCheckBox_stateChanged( int state );
38+
void mAtlasSingleFileCheckBox_stateChanged( int state );
39+
40+
void mAtlasSortFeatureCheckBox_stateChanged( int state );
41+
void changesSortFeatureField( const QString &fieldName );
42+
void mAtlasSortFeatureDirectionButton_clicked();
43+
void mAtlasFeatureFilterEdit_editingFinished();
44+
void mAtlasFeatureFilterButton_clicked();
45+
void mAtlasFeatureFilterCheckBox_stateChanged( int state );
46+
void pageNameExpressionChanged( const QString &expression, bool valid );
47+
48+
void changeFileFormat();
49+
50+
private slots:
51+
void updateGuiElements();
52+
53+
void updateAtlasFeatures();
54+
55+
private:
56+
QgsPrintLayout *mLayout = nullptr;
57+
QgsLayoutAtlas *mAtlas = nullptr;
58+
59+
void blockAllSignals( bool b );
60+
void checkLayerType( QgsVectorLayer *layer );
61+
};

‎src/app/layout/qgslayoutdesignerdialog.cpp

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
#include "qgslayoutitemwidget.h"
3737
#include "qgslayoutimageexportoptionsdialog.h"
3838
#include "qgslayoutitemmap.h"
39+
#include "qgsprintlayout.h"
3940
#include "qgsmessageviewer.h"
4041
#include "qgsgui.h"
4142
#include "qgslayoutitemguiregistry.h"
@@ -53,6 +54,7 @@
5354
#include "qgsproject.h"
5455
#include "qgsbusyindicatordialog.h"
5556
#include "qgslayoutundostack.h"
57+
#include "qgslayoutatlaswidget.h"
5658
#include "qgslayoutpagecollection.h"
5759
#include "ui_qgssvgexportoptions.h"
5860
#include <QShortcut>
@@ -685,6 +687,11 @@ void QgsLayoutDesignerDialog::setCurrentLayout( QgsLayout *layout )
685687
#endif
686688

687689
createLayoutPropertiesWidget();
690+
691+
if ( qobject_cast< QgsPrintLayout * >( layout ) )
692+
{
693+
createAtlasWidget();
694+
}
688695
}
689696

690697
void QgsLayoutDesignerDialog::setIconSizes( int size )
@@ -1937,6 +1944,22 @@ void QgsLayoutDesignerDialog::createLayoutPropertiesWidget()
19371944
mGuideStack->setMainPanel( guideWidget );
19381945
}
19391946

1947+
void QgsLayoutDesignerDialog::createAtlasWidget()
1948+
{
1949+
if ( !mAtlasDock )
1950+
{
1951+
mAtlasDock = new QgsDockWidget( tr( "Atlas" ), this );
1952+
mAtlasDock->setObjectName( QStringLiteral( "AtlasDock" ) );
1953+
mPanelsMenu->addAction( mAtlasDock->toggleViewAction() );
1954+
addDockWidget( Qt::RightDockWidgetArea, mAtlasDock );
1955+
tabifyDockWidget( mItemDock, mAtlasDock );
1956+
}
1957+
1958+
QgsLayoutAtlasWidget *atlasWidget = new QgsLayoutAtlasWidget( mGeneralDock, qobject_cast< QgsPrintLayout * >( mLayout ) );
1959+
mAtlasDock->setWidget( atlasWidget );
1960+
mAtlasDock->show();
1961+
}
1962+
19401963
void QgsLayoutDesignerDialog::initializeRegistry()
19411964
{
19421965
sInitializedRegistry = true;

‎src/app/layout/qgslayoutdesignerdialog.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,7 @@ class QgsLayoutDesignerDialog: public QMainWindow, private Ui::QgsLayoutDesigner
333333
QgsPanelWidgetStack *mGeneralPropertiesStack = nullptr;
334334
QgsDockWidget *mGuideDock = nullptr;
335335
QgsPanelWidgetStack *mGuideStack = nullptr;
336+
QgsDockWidget *mAtlasDock = nullptr;
336337

337338
QgsLayoutPropertiesWidget *mLayoutPropertiesWidget = nullptr;
338339

@@ -372,6 +373,7 @@ class QgsLayoutDesignerDialog: public QMainWindow, private Ui::QgsLayoutDesigner
372373
void activateNewItemCreationTool( int id, bool nodeBasedItem );
373374

374375
void createLayoutPropertiesWidget();
376+
void createAtlasWidget();
375377

376378
void initializeRegistry();
377379

Lines changed: 404 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,404 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<ui version="4.0">
3+
<class>QgsLayoutAtlasWidgetBase</class>
4+
<widget class="QWidget" name="QgsLayoutAtlasWidgetBase">
5+
<property name="geometry">
6+
<rect>
7+
<x>0</x>
8+
<y>0</y>
9+
<width>435</width>
10+
<height>359</height>
11+
</rect>
12+
</property>
13+
<property name="sizePolicy">
14+
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
15+
<horstretch>0</horstretch>
16+
<verstretch>0</verstretch>
17+
</sizepolicy>
18+
</property>
19+
<property name="windowTitle">
20+
<string>Atlas Generation</string>
21+
</property>
22+
<layout class="QVBoxLayout" name="verticalLayout">
23+
<property name="spacing">
24+
<number>0</number>
25+
</property>
26+
<property name="leftMargin">
27+
<number>0</number>
28+
</property>
29+
<property name="topMargin">
30+
<number>0</number>
31+
</property>
32+
<property name="rightMargin">
33+
<number>0</number>
34+
</property>
35+
<property name="bottomMargin">
36+
<number>0</number>
37+
</property>
38+
<item>
39+
<widget class="QFrame" name="verticalFrame">
40+
<property name="frameShape">
41+
<enum>QFrame::StyledPanel</enum>
42+
</property>
43+
<layout class="QGridLayout" name="gridLayout">
44+
<property name="leftMargin">
45+
<number>0</number>
46+
</property>
47+
<property name="topMargin">
48+
<number>0</number>
49+
</property>
50+
<property name="rightMargin">
51+
<number>0</number>
52+
</property>
53+
<property name="bottomMargin">
54+
<number>0</number>
55+
</property>
56+
<property name="horizontalSpacing">
57+
<number>0</number>
58+
</property>
59+
<property name="verticalSpacing">
60+
<number>3</number>
61+
</property>
62+
<item row="0" column="1">
63+
<widget class="QCheckBox" name="mUseAtlasCheckBox">
64+
<property name="text">
65+
<string>Generate an atlas</string>
66+
</property>
67+
</widget>
68+
</item>
69+
<item row="0" column="2">
70+
<spacer name="horizontalSpacer">
71+
<property name="orientation">
72+
<enum>Qt::Horizontal</enum>
73+
</property>
74+
<property name="sizeHint" stdset="0">
75+
<size>
76+
<width>40</width>
77+
<height>20</height>
78+
</size>
79+
</property>
80+
</spacer>
81+
</item>
82+
<item row="0" column="0">
83+
<spacer name="horizontalSpacer_2">
84+
<property name="orientation">
85+
<enum>Qt::Horizontal</enum>
86+
</property>
87+
<property name="sizeType">
88+
<enum>QSizePolicy::Fixed</enum>
89+
</property>
90+
<property name="sizeHint" stdset="0">
91+
<size>
92+
<width>12</width>
93+
<height>20</height>
94+
</size>
95+
</property>
96+
</spacer>
97+
</item>
98+
<item row="1" column="0" colspan="3">
99+
<widget class="QgsScrollArea" name="scrollArea">
100+
<property name="focusPolicy">
101+
<enum>Qt::WheelFocus</enum>
102+
</property>
103+
<property name="widgetResizable">
104+
<bool>true</bool>
105+
</property>
106+
<widget class="QWidget" name="scrollAreaWidgetContents">
107+
<property name="enabled">
108+
<bool>true</bool>
109+
</property>
110+
<property name="geometry">
111+
<rect>
112+
<x>0</x>
113+
<y>-63</y>
114+
<width>417</width>
115+
<height>389</height>
116+
</rect>
117+
</property>
118+
<layout class="QVBoxLayout" name="mainLayout">
119+
<property name="bottomMargin">
120+
<number>0</number>
121+
</property>
122+
<item>
123+
<widget class="QgsCollapsibleGroupBoxBasic" name="mConfigurationGroup">
124+
<property name="enabled">
125+
<bool>false</bool>
126+
</property>
127+
<property name="focusPolicy">
128+
<enum>Qt::StrongFocus</enum>
129+
</property>
130+
<property name="title">
131+
<string>Configuration</string>
132+
</property>
133+
<property name="checkable">
134+
<bool>false</bool>
135+
</property>
136+
<property name="syncGroup" stdset="0">
137+
<string notr="true">composeritem</string>
138+
</property>
139+
<property name="collapsed" stdset="0">
140+
<bool>false</bool>
141+
</property>
142+
<layout class="QGridLayout" name="gridLayout_2" columnstretch="0,1,0">
143+
<item row="4" column="2">
144+
<widget class="QToolButton" name="mAtlasSortFeatureDirectionButton">
145+
<property name="toolTip">
146+
<string>Sort direction</string>
147+
</property>
148+
<property name="text">
149+
<string>…</string>
150+
</property>
151+
<property name="arrowType">
152+
<enum>Qt::UpArrow</enum>
153+
</property>
154+
</widget>
155+
</item>
156+
<item row="4" column="1">
157+
<widget class="QgsFieldComboBox" name="mAtlasSortFeatureKeyComboBox"/>
158+
</item>
159+
<item row="3" column="0">
160+
<widget class="QCheckBox" name="mAtlasFeatureFilterCheckBox">
161+
<property name="text">
162+
<string>Filter with</string>
163+
</property>
164+
</widget>
165+
</item>
166+
<item row="3" column="2">
167+
<widget class="QToolButton" name="mAtlasFeatureFilterButton">
168+
<property name="text">
169+
<string>…</string>
170+
</property>
171+
<property name="icon">
172+
<iconset resource="../../../images/images.qrc">
173+
<normaloff>:/images/themes/default/mIconExpression.svg</normaloff>:/images/themes/default/mIconExpression.svg</iconset>
174+
</property>
175+
</widget>
176+
</item>
177+
<item row="1" column="0" colspan="3">
178+
<widget class="QCheckBox" name="mAtlasHideCoverageCheckBox">
179+
<property name="text">
180+
<string>Hidden coverage layer</string>
181+
</property>
182+
</widget>
183+
</item>
184+
<item row="0" column="0">
185+
<widget class="QLabel" name="mHorizontalAlignementLabel">
186+
<property name="text">
187+
<string>Coverage layer </string>
188+
</property>
189+
</widget>
190+
</item>
191+
<item row="2" column="0">
192+
<widget class="QLabel" name="label">
193+
<property name="text">
194+
<string>Page name</string>
195+
</property>
196+
</widget>
197+
</item>
198+
<item row="3" column="1">
199+
<widget class="QLineEdit" name="mAtlasFeatureFilterEdit"/>
200+
</item>
201+
<item row="0" column="1" colspan="2">
202+
<widget class="QgsMapLayerComboBox" name="mAtlasCoverageLayerComboBox">
203+
<property name="sizePolicy">
204+
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
205+
<horstretch>0</horstretch>
206+
<verstretch>0</verstretch>
207+
</sizepolicy>
208+
</property>
209+
</widget>
210+
</item>
211+
<item row="2" column="1" colspan="2">
212+
<widget class="QgsFieldExpressionWidget" name="mPageNameWidget" native="true">
213+
<property name="sizePolicy">
214+
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
215+
<horstretch>0</horstretch>
216+
<verstretch>0</verstretch>
217+
</sizepolicy>
218+
</property>
219+
<property name="maximumSize">
220+
<size>
221+
<width>16777215</width>
222+
<height>16777215</height>
223+
</size>
224+
</property>
225+
</widget>
226+
</item>
227+
<item row="4" column="0">
228+
<widget class="QCheckBox" name="mAtlasSortFeatureCheckBox">
229+
<property name="sizePolicy">
230+
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
231+
<horstretch>0</horstretch>
232+
<verstretch>0</verstretch>
233+
</sizepolicy>
234+
</property>
235+
<property name="text">
236+
<string>Sort by</string>
237+
</property>
238+
</widget>
239+
</item>
240+
</layout>
241+
</widget>
242+
</item>
243+
<item>
244+
<widget class="QgsCollapsibleGroupBoxBasic" name="mOutputGroup">
245+
<property name="enabled">
246+
<bool>false</bool>
247+
</property>
248+
<property name="focusPolicy">
249+
<enum>Qt::StrongFocus</enum>
250+
</property>
251+
<property name="title">
252+
<string>Output</string>
253+
</property>
254+
<property name="checkable">
255+
<bool>false</bool>
256+
</property>
257+
<property name="syncGroup" stdset="0">
258+
<string notr="true">composeritem</string>
259+
</property>
260+
<property name="collapsed" stdset="0">
261+
<bool>false</bool>
262+
</property>
263+
<layout class="QGridLayout" name="gridLayout_3" columnstretch="0,1,0">
264+
<item row="1" column="2">
265+
<widget class="QToolButton" name="mAtlasFilenameExpressionButton">
266+
<property name="text">
267+
<string>…</string>
268+
</property>
269+
<property name="icon">
270+
<iconset resource="../../../images/images.qrc">
271+
<normaloff>:/images/themes/default/mIconExpression.svg</normaloff>:/images/themes/default/mIconExpression.svg</iconset>
272+
</property>
273+
</widget>
274+
</item>
275+
<item row="1" column="0" colspan="2">
276+
<widget class="QLineEdit" name="mAtlasFilenamePatternEdit"/>
277+
</item>
278+
<item row="2" column="0" colspan="3">
279+
<widget class="QCheckBox" name="mAtlasSingleFileCheckBox">
280+
<property name="text">
281+
<string>Single file export when possible</string>
282+
</property>
283+
</widget>
284+
</item>
285+
<item row="3" column="1" colspan="2">
286+
<widget class="QComboBox" name="mAtlasFileFormat"/>
287+
</item>
288+
<item row="3" column="0">
289+
<widget class="QLabel" name="mFileFormatLabel">
290+
<property name="text">
291+
<string>Image export format</string>
292+
</property>
293+
</widget>
294+
</item>
295+
<item row="0" column="0" colspan="3">
296+
<widget class="QLabel" name="label_4">
297+
<property name="text">
298+
<string>Output filename expression</string>
299+
</property>
300+
</widget>
301+
</item>
302+
</layout>
303+
</widget>
304+
</item>
305+
<item>
306+
<spacer name="verticalSpacer">
307+
<property name="orientation">
308+
<enum>Qt::Vertical</enum>
309+
</property>
310+
<property name="sizeHint" stdset="0">
311+
<size>
312+
<width>20</width>
313+
<height>40</height>
314+
</size>
315+
</property>
316+
</spacer>
317+
</item>
318+
</layout>
319+
</widget>
320+
</widget>
321+
</item>
322+
</layout>
323+
</widget>
324+
</item>
325+
</layout>
326+
</widget>
327+
<customwidgets>
328+
<customwidget>
329+
<class>QgsCollapsibleGroupBoxBasic</class>
330+
<extends>QGroupBox</extends>
331+
<header location="global">qgscollapsiblegroupbox.h</header>
332+
<container>1</container>
333+
</customwidget>
334+
<customwidget>
335+
<class>QgsScrollArea</class>
336+
<extends>QScrollArea</extends>
337+
<header>qgsscrollarea.h</header>
338+
<container>1</container>
339+
</customwidget>
340+
<customwidget>
341+
<class>QgsMapLayerComboBox</class>
342+
<extends>QComboBox</extends>
343+
<header location="global">qgsmaplayercombobox.h</header>
344+
</customwidget>
345+
<customwidget>
346+
<class>QgsFieldComboBox</class>
347+
<extends>QComboBox</extends>
348+
<header location="global">qgsfieldcombobox.h</header>
349+
</customwidget>
350+
<customwidget>
351+
<class>QgsFieldExpressionWidget</class>
352+
<extends>QWidget</extends>
353+
<header>qgsfieldexpressionwidget.h</header>
354+
</customwidget>
355+
</customwidgets>
356+
<tabstops>
357+
<tabstop>mUseAtlasCheckBox</tabstop>
358+
<tabstop>mConfigurationGroup</tabstop>
359+
<tabstop>mAtlasCoverageLayerComboBox</tabstop>
360+
<tabstop>mAtlasHideCoverageCheckBox</tabstop>
361+
<tabstop>mAtlasFeatureFilterCheckBox</tabstop>
362+
<tabstop>mAtlasFeatureFilterEdit</tabstop>
363+
<tabstop>mAtlasFeatureFilterButton</tabstop>
364+
<tabstop>mAtlasSortFeatureCheckBox</tabstop>
365+
<tabstop>mAtlasSortFeatureKeyComboBox</tabstop>
366+
<tabstop>mAtlasSortFeatureDirectionButton</tabstop>
367+
<tabstop>mOutputGroup</tabstop>
368+
<tabstop>mAtlasFilenamePatternEdit</tabstop>
369+
<tabstop>mAtlasFilenameExpressionButton</tabstop>
370+
<tabstop>mAtlasSingleFileCheckBox</tabstop>
371+
<tabstop>scrollArea</tabstop>
372+
</tabstops>
373+
<resources>
374+
<include location="../../../images/images.qrc"/>
375+
<include location="../../../images/images.qrc"/>
376+
<include location="../../../images/images.qrc"/>
377+
<include location="../../../images/images.qrc"/>
378+
<include location="../../../images/images.qrc"/>
379+
<include location="../../../images/images.qrc"/>
380+
<include location="../../../images/images.qrc"/>
381+
<include location="../../../images/images.qrc"/>
382+
<include location="../../../images/images.qrc"/>
383+
<include location="../../../images/images.qrc"/>
384+
<include location="../../../images/images.qrc"/>
385+
<include location="../../../images/images.qrc"/>
386+
<include location="../../../images/images.qrc"/>
387+
<include location="../../../images/images.qrc"/>
388+
<include location="../../../images/images.qrc"/>
389+
<include location="../../../images/images.qrc"/>
390+
<include location="../../../images/images.qrc"/>
391+
<include location="../../../images/images.qrc"/>
392+
<include location="../../../images/images.qrc"/>
393+
<include location="../../../images/images.qrc"/>
394+
<include location="../../../images/images.qrc"/>
395+
<include location="../../../images/images.qrc"/>
396+
<include location="../../../images/images.qrc"/>
397+
<include location="../../../images/images.qrc"/>
398+
<include location="../../../images/images.qrc"/>
399+
<include location="../../../images/images.qrc"/>
400+
<include location="../../../images/images.qrc"/>
401+
<include location="../../../images/images.qrc"/>
402+
</resources>
403+
<connections/>
404+
</ui>

0 commit comments

Comments
 (0)
Please sign in to comment.