Files
leocad/common/lc_htmldialog.ui
T
Leonardo Zide 2125868dc6 Validate localized numeric input and unify image limits
Parse dialog numbers using their validator locale so localized decimals and grouped input round trip correctly, while displaying values without digit grouping. Keep invalid input open with a validation message instead of silently saving or clamping it, and serialize Blender settings in their canonical format.

Use a 1–32768 pixel range for image dimensions across Save Image, HTML export, command-line output, POV-Ray, and Blender. Bound export step edits by the model step count, grid spacing to 10000 studs, and area-light grids to 64 samples per axis. Preserve existing show/hide step bounds and avoid a total-pixel cap.

Validation: macOS Qt debug build and numeric dialog checks across ten locales, including localized input, validation messages, image dimension boundaries, and settings round trips.
2026-10-23 12:54:55 -07:00

328 lines
11 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>lcHTMLDialog</class>
<widget class="QDialog" name="lcHTMLDialog">
<property name="whatsThis">
<string>&lt;p&gt;&lt;b&gt;Export HTML&lt;/b&gt;&lt;/p&gt;&lt;p&gt;Create browser-viewable building instructions and PNG images in the output folder. Choose which models to include, how to organize the step pages, and where to show pieces lists.&lt;/p&gt;&lt;p&gt;Keep the generated HTML and image files together when copying or sharing the instructions.&lt;/p&gt;</string>
</property>
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>400</width>
<height>460</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="windowTitle">
<string>HTML Options</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QGroupBox" name="groupBox_3">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>General</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLabel" name="label_6">
<property name="toolTip">
<string>Folder for the generated HTML pages and images.</string>
</property>
<property name="whatsThis">
<string>&lt;p&gt;&lt;b&gt;Output Folder&lt;/b&gt;&lt;/p&gt;&lt;p&gt;The exporter creates this folder if needed and writes the instruction pages and their images into it. Use a separate folder for each export to keep the generated files together.&lt;/p&gt;</string>
</property>
<property name="text">
<string>Output Folder:</string>
</property>
<property name="buddy">
<cstring>outputFolder</cstring>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="outputFolder">
<property name="toolTip">
<string>Folder for the generated HTML pages and images.</string>
</property>
<property name="whatsThis">
<string>&lt;p&gt;&lt;b&gt;Output Folder&lt;/b&gt;&lt;/p&gt;&lt;p&gt;The exporter creates this folder if needed and writes the instruction pages and their images into it. Use a separate folder for each export to keep the generated files together.&lt;/p&gt;</string>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="outputFolderBrowse">
<property name="toolTip">
<string>Choose the folder for the exported instructions.</string>
</property>
<property name="accessibleName">
<string>Choose Output Folder</string>
</property>
<property name="text">
<string>...</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QCheckBox" name="transparentImages">
<property name="toolTip">
<string>Save step images with a transparent background.</string>
</property>
<property name="whatsThis">
<string>&lt;p&gt;&lt;b&gt;Transparent Image Background&lt;/b&gt;&lt;/p&gt;&lt;p&gt;When checked, the PNG step images have a transparent background so the page background can show through. When unchecked, they include the configured solid or gradient background with no transparency.&lt;/p&gt;</string>
</property>
<property name="text">
<string>Transparent image background</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_4">
<property name="whatsThis">
<string>&lt;p&gt;&lt;b&gt;Models&lt;/b&gt;&lt;/p&gt;&lt;p&gt;Export instructions for the model and all submodels, only the model or submodel being edited, or that entry with its referenced submodels. When several entries are exported, an overall index links to their instructions.&lt;/p&gt;</string>
</property>
<property name="title">
<string>Models</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<widget class="QRadioButton" name="allModels">
<property name="toolTip">
<string>Export instructions for the model and all submodels.</string>
</property>
<property name="text">
<string>All Models</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="currentModelSubmodels">
<property name="toolTip">
<string>Export the current model and the submodels it references.</string>
</property>
<property name="text">
<string>Current Model and Submodels</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="currentModelOnly">
<property name="toolTip">
<string>Export instructions only for the current model.</string>
</property>
<property name="text">
<string>Current Model Only</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox">
<property name="whatsThis">
<string>&lt;p&gt;&lt;b&gt;Steps&lt;/b&gt;&lt;/p&gt;&lt;p&gt;Single Page places all steps for each model on one HTML page. One Step per Page creates separate pages with navigation links. In that mode, Index page adds a page linking to the steps.&lt;/p&gt;&lt;p&gt;Width and Height set the step image size in pixels. Use dimensions from 1 to 32768 pixels.&lt;/p&gt;</string>
</property>
<property name="title">
<string>Steps</string>
</property>
<layout class="QFormLayout" name="formLayout_2">
<item row="0" column="0" colspan="2">
<widget class="QRadioButton" name="singlePage">
<property name="toolTip">
<string>Put all steps for each model on one HTML page.</string>
</property>
<property name="text">
<string>Single Page</string>
</property>
</widget>
</item>
<item row="1" column="0" colspan="2">
<widget class="QRadioButton" name="oneStepPerPage">
<property name="toolTip">
<string>Create a separate HTML page for each step.</string>
</property>
<property name="text">
<string>One Step per Page</string>
</property>
</widget>
</item>
<item row="2" column="0" colspan="2">
<widget class="QCheckBox" name="indexPage">
<property name="toolTip">
<string>Add a step index when using One Step per Page.</string>
</property>
<property name="text">
<string>Index page</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label">
<property name="toolTip">
<string>Width of each step image, in pixels.</string>
</property>
<property name="text">
<string>Width:</string>
</property>
<property name="buddy">
<cstring>stepWidth</cstring>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QLineEdit" name="stepWidth">
<property name="toolTip">
<string>Width of each step image, in pixels.</string>
</property>
<property name="maximumSize">
<size>
<width>75</width>
<height>16777215</height>
</size>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="label_2">
<property name="toolTip">
<string>Height of each step image, in pixels.</string>
</property>
<property name="text">
<string>Height:</string>
</property>
<property name="buddy">
<cstring>stepHeight</cstring>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QLineEdit" name="stepHeight">
<property name="toolTip">
<string>Height of each step image, in pixels.</string>
</property>
<property name="maximumSize">
<size>
<width>75</width>
<height>16777215</height>
</size>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_2">
<property name="whatsThis">
<string>&lt;p&gt;&lt;b&gt;Pieces List&lt;/b&gt;&lt;/p&gt;&lt;p&gt;After each step shows the pieces added in that step. At the end shows the complete model inventory after the instructions. You can enable either option, both, or neither.&lt;/p&gt;</string>
</property>
<property name="title">
<string>Pieces List</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_4">
<item>
<widget class="QCheckBox" name="partsAtTheEnd">
<property name="toolTip">
<string>Include a complete pieces list after each model's instructions.</string>
</property>
<property name="text">
<string>At the end</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="partsAfterEachStep">
<property name="toolTip">
<string>Include a list of the pieces added in each step.</string>
</property>
<property name="text">
<string>After each step</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Help|QDialogButtonBox::Ok</set>
</property>
</widget>
</item>
</layout>
</widget>
<tabstops>
<tabstop>outputFolder</tabstop>
<tabstop>outputFolderBrowse</tabstop>
<tabstop>transparentImages</tabstop>
<tabstop>allModels</tabstop>
<tabstop>currentModelSubmodels</tabstop>
<tabstop>currentModelOnly</tabstop>
<tabstop>singlePage</tabstop>
<tabstop>oneStepPerPage</tabstop>
<tabstop>indexPage</tabstop>
<tabstop>stepWidth</tabstop>
<tabstop>stepHeight</tabstop>
<tabstop>partsAtTheEnd</tabstop>
<tabstop>partsAfterEachStep</tabstop>
</tabstops>
<resources/>
<connections>
<connection>
<sender>buttonBox</sender>
<signal>accepted()</signal>
<receiver>lcHTMLDialog</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">
<x>252</x>
<y>564</y>
</hint>
<hint type="destinationlabel">
<x>157</x>
<y>274</y>
</hint>
</hints>
</connection>
<connection>
<sender>buttonBox</sender>
<signal>rejected()</signal>
<receiver>lcHTMLDialog</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
<x>320</x>
<y>564</y>
</hint>
<hint type="destinationlabel">
<x>286</x>
<y>274</y>
</hint>
</hints>
</connection>
</connections>
</ui>