Skip to content

Commit

Permalink
Some tweaks to the "Export 3d scene" dialog
Browse files Browse the repository at this point in the history
reduce dialog minimal size and margins, fix tab order and add help button
  • Loading branch information
DelazJ authored and nyalldawson committed Aug 6, 2020
1 parent b02c5c0 commit dfbf9a5
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 7 deletions.
8 changes: 4 additions & 4 deletions src/app/3d/qgs3dmapcanvasdockwidget.cpp
Expand Up @@ -263,7 +263,7 @@ void Qgs3DMapCanvasDockWidget::configure()
QDialogButtonBox *buttons = new QDialogButtonBox( QDialogButtonBox::Ok | QDialogButtonBox::Cancel | QDialogButtonBox::Help, &dlg );
connect( buttons, &QDialogButtonBox::accepted, &dlg, &QDialog::accept );
connect( buttons, &QDialogButtonBox::rejected, &dlg, &QDialog::reject );
connect( buttons, &QDialogButtonBox::helpRequested, w, []() { QgsHelp::openHelp( QStringLiteral( "introduction/qgis_gui.html#d-map-view" ) ); } );
connect( buttons, &QDialogButtonBox::helpRequested, w, []() { QgsHelp::openHelp( QStringLiteral( "introduction/qgis_gui.html#scene-configuration" ) ); } );

QVBoxLayout *layout = new QVBoxLayout( &dlg );
layout->addWidget( w, 1 );
Expand Down Expand Up @@ -302,16 +302,16 @@ void Qgs3DMapCanvasDockWidget::exportScene()
QDialog dlg;
dlg.setWindowTitle( tr( "Export 3D Scene" ) );
dlg.setObjectName( QStringLiteral( "3DSceneExportDialog" ) );
dlg.setMinimumSize( 380, 460 );
// QgsGui::instance()->enableAutoGeometryRestore( &dlg );
QgsGui::instance()->enableAutoGeometryRestore( &dlg );

Qgs3DMapExportSettings exportSettings;
QgsMap3DExportWidget w( mCanvas->scene(), &exportSettings );

QDialogButtonBox *buttons = new QDialogButtonBox( QDialogButtonBox::Ok | QDialogButtonBox::Cancel, &dlg );
QDialogButtonBox *buttons = new QDialogButtonBox( QDialogButtonBox::Cancel | QDialogButtonBox::Help | QDialogButtonBox::Ok, &dlg );

connect( buttons, &QDialogButtonBox::accepted, &dlg, &QDialog::accept );
connect( buttons, &QDialogButtonBox::rejected, &dlg, &QDialog::reject );
connect( buttons, &QDialogButtonBox::helpRequested, &dlg, [ = ] { QgsHelp::openHelp( QStringLiteral( "introduction/qgis_gui.html#d-map-view" ) ); } );

QVBoxLayout *layout = new QVBoxLayout( &dlg );
layout->addWidget( &w, 1 );
Expand Down
27 changes: 24 additions & 3 deletions src/ui/3d/map3dexportwidget.ui
Expand Up @@ -7,10 +7,22 @@
<x>0</x>
<y>0</y>
<width>400</width>
<height>300</height>
<height>251</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item row="0" column="0">
<layout class="QGridLayout" name="gridLayout">
<item row="3" column="1" colspan="2">
Expand All @@ -29,7 +41,7 @@
<item row="5" column="0" colspan="3">
<widget class="QCheckBox" name="smoothEdgesCheckBox">
<property name="text">
<string>Smooth Edges</string>
<string>Smooth edges</string>
</property>
</widget>
</item>
Expand Down Expand Up @@ -93,7 +105,7 @@
<item row="6" column="0" colspan="3">
<widget class="QCheckBox" name="exportNormalsCheckBox">
<property name="text">
<string>Export Normals</string>
<string>Export normals</string>
</property>
<property name="checked">
<bool>true</bool>
Expand Down Expand Up @@ -145,6 +157,15 @@
<container>1</container>
</customwidget>
</customwidgets>
<tabstops>
<tabstop>sceneNameLineEdit</tabstop>
<tabstop>terrainResolutionSpinBox</tabstop>
<tabstop>terrainTextureResolutionSpinBox</tabstop>
<tabstop>scaleSpinBox</tabstop>
<tabstop>smoothEdgesCheckBox</tabstop>
<tabstop>exportNormalsCheckBox</tabstop>
<tabstop>exportTexturesCheckBox</tabstop>
</tabstops>
<resources/>
<connections/>
</ui>

0 comments on commit dfbf9a5

Please sign in to comment.