Draft: Annotation editor

This commit is contained in:
Yorik van Havre
2020-04-22 13:38:17 +02:00
parent 9489776462
commit 5b3fea59e0
6 changed files with 443 additions and 357 deletions

View File

@@ -6,12 +6,12 @@
<rect>
<x>0</x>
<y>0</y>
<width>418</width>
<height>694</height>
<width>453</width>
<height>424</height>
</rect>
</property>
<property name="windowTitle">
<string>Dialog</string>
<string>Annotation Styles Editor</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
@@ -82,307 +82,314 @@
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_3">
<property name="title">
<string>Text</string>
<widget class="QScrollArea" name="scrollArea">
<property name="frameShadow">
<enum>QFrame::Plain</enum>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="1" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Font size</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Font name</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Line spacing</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="Gui::QuantitySpinBox" name="FontSize">
<property name="toolTip">
<string>The size of the text in real-world units</string>
</property>
<property name="unit" stdset="0">
<string notr="true"/>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="Gui::QuantitySpinBox" name="LineSpacing">
<property name="toolTip">
<string>The spacing between lines of text in real-world units</string>
</property>
<property name="unit" stdset="0">
<string notr="true"/>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QFontComboBox" name="FontName">
<property name="toolTip">
<string>The font to use for texts and dimensions</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_2">
<property name="title">
<string>Units</string>
<property name="verticalScrollBarPolicy">
<enum>Qt::ScrollBarAsNeeded</enum>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0">
<widget class="QLabel" name="label_4">
<property name="text">
<string>Scale multiplier</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_5">
<property name="text">
<string>Decimals</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_6">
<property name="text">
<string>Únit override</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_7">
<property name="text">
<string>Show unit</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QDoubleSpinBox" name="ScaleMultiplier">
<property name="toolTip">
<string>A multiplier value that affects distances shown by dimensions</string>
</property>
<property name="decimals">
<number>4</number>
</property>
<property name="value">
<double>1.000000000000000</double>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLineEdit" name="UnitOverride">
<property name="toolTip">
<string>Forces dimensions to be shown in a specific unit</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QSpinBox" name="Decimals">
<property name="toolTip">
<string>The number of decimals to show on dimensions</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QCheckBox" name="ShowUnit">
<property name="toolTip">
<string>Shows the units suffix on dimensions or not</string>
</property>
<property name="layoutDirection">
<enum>Qt::RightToLeft</enum>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_4">
<property name="title">
<string>Line and arrows</string>
<property name="widgetResizable">
<bool>true</bool>
</property>
<layout class="QGridLayout" name="gridLayout_3">
<item row="2" column="0">
<widget class="QLabel" name="label_14">
<property name="text">
<string>Line width</string>
</property>
</widget>
</item>
<item row="8" column="0">
<widget class="QLabel" name="label_12">
<property name="text">
<string>Extension overshoot</string>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QLabel" name="label_8">
<property name="text">
<string>Arrow size</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_13">
<property name="text">
<string>Show lines</string>
</property>
</widget>
</item>
<item row="6" column="0">
<widget class="QLabel" name="label_10">
<property name="text">
<string>Dimension overshoot</string>
</property>
</widget>
</item>
<item row="7" column="0">
<widget class="QLabel" name="label_11">
<property name="text">
<string>Extension lines</string>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="label_9">
<property name="text">
<string>Arrow type</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_15">
<property name="text">
<string>Line / text color</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QCheckBox" name="ShowLines">
<property name="toolTip">
<string>Shows the dimension line or not</string>
</property>
<property name="layoutDirection">
<enum>Qt::RightToLeft</enum>
</property>
<property name="text">
<string/>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QSpinBox" name="LineWidth">
<property name="toolTip">
<string>The width of the dimension lines</string>
</property>
<property name="suffix">
<string>px</string>
</property>
<property name="value">
<number>1</number>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="Gui::ColorButton" name="LineColor">
<property name="toolTip">
<string>The color of dimension lines, arrows and texts</string>
</property>
<property name="color">
<color>
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QComboBox" name="ArrowType">
<property name="toolTip">
<string>The typeof arrows to use for dimensions</string>
</property>
<item>
<property name="text">
<string>Dot</string>
<widget class="QWidget" name="scrollAreaWidgetContents">
<property name="geometry">
<rect>
<x>0</x>
<y>-110</y>
<width>420</width>
<height>589</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<widget class="QGroupBox" name="groupBox_3">
<property name="title">
<string>Text</string>
</property>
</item>
<item>
<property name="text">
<string>Arrow</string>
<layout class="QGridLayout" name="gridLayout">
<item row="2" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Font size</string>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Line spacing</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Font name</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QFontComboBox" name="FontName">
<property name="toolTip">
<string>The font to use for texts and dimensions</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="Gui::InputField" name="FontSize">
<property name="unit" stdset="0">
<string notr="true"/>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="Gui::InputField" name="LineSpacing">
<property name="unit" stdset="0">
<string notr="true"/>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_2">
<property name="title">
<string>Units</string>
</property>
</item>
<item>
<property name="text">
<string>Tick</string>
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0">
<widget class="QLabel" name="label_4">
<property name="text">
<string>Scale multiplier</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_5">
<property name="text">
<string>Decimals</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_6">
<property name="text">
<string>Unit override</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_7">
<property name="text">
<string>Show unit</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QDoubleSpinBox" name="ScaleMultiplier">
<property name="toolTip">
<string>A multiplier value that affects distances shown by dimensions</string>
</property>
<property name="decimals">
<number>4</number>
</property>
<property name="value">
<double>1.000000000000000</double>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLineEdit" name="UnitOverride">
<property name="toolTip">
<string>Forces dimensions to be shown in a specific unit</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QSpinBox" name="Decimals">
<property name="toolTip">
<string>The number of decimals to show on dimensions</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QCheckBox" name="ShowUnit">
<property name="toolTip">
<string>Shows the units suffix on dimensions or not</string>
</property>
<property name="layoutDirection">
<enum>Qt::RightToLeft</enum>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_4">
<property name="title">
<string>Line and arrows</string>
</property>
</item>
</widget>
</item>
<item row="5" column="1">
<widget class="Gui::QuantitySpinBox" name="ArrowSize">
<property name="toolTip">
<string>The size of dimension arrows</string>
</property>
<property name="unit" stdset="0">
<string notr="true"/>
</property>
</widget>
</item>
<item row="6" column="1">
<widget class="Gui::QuantitySpinBox" name="DimensionOvershoot">
<property name="toolTip">
<string>How far must the main dimension line extend pass the measured points</string>
</property>
<property name="unit" stdset="0">
<string notr="true"/>
</property>
</widget>
</item>
<item row="7" column="1">
<widget class="Gui::QuantitySpinBox" name="ExtensionLines">
<property name="toolTip">
<string>The length of extension lines</string>
</property>
<property name="unit" stdset="0">
<string notr="true"/>
</property>
</widget>
</item>
<item row="8" column="1">
<widget class="Gui::QuantitySpinBox" name="ExtensionOvershoot">
<property name="toolTip">
<string>How far must the extension lines extend above the main dimension line</string>
</property>
<property name="unit" stdset="0">
<string notr="true"/>
</property>
</widget>
</item>
</layout>
<layout class="QGridLayout" name="gridLayout_3">
<item row="2" column="0">
<widget class="QLabel" name="label_14">
<property name="text">
<string>Line width</string>
</property>
</widget>
</item>
<item row="8" column="0">
<widget class="QLabel" name="label_12">
<property name="text">
<string>Extension overshoot</string>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QLabel" name="label_8">
<property name="text">
<string>Arrow size</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_13">
<property name="text">
<string>Show lines</string>
</property>
</widget>
</item>
<item row="6" column="0">
<widget class="QLabel" name="label_10">
<property name="text">
<string>Dimension overshoot</string>
</property>
</widget>
</item>
<item row="7" column="0">
<widget class="QLabel" name="label_11">
<property name="text">
<string>Extension lines</string>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="label_9">
<property name="text">
<string>Arrow type</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_15">
<property name="text">
<string>Line / text color</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QCheckBox" name="ShowLines">
<property name="toolTip">
<string>Shows the dimension line or not</string>
</property>
<property name="layoutDirection">
<enum>Qt::RightToLeft</enum>
</property>
<property name="text">
<string/>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QSpinBox" name="LineWidth">
<property name="toolTip">
<string>The width of the dimension lines</string>
</property>
<property name="suffix">
<string>px</string>
</property>
<property name="value">
<number>1</number>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="Gui::ColorButton" name="LineColor">
<property name="toolTip">
<string>The color of dimension lines, arrows and texts</string>
</property>
<property name="color">
<color>
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QComboBox" name="ArrowType">
<property name="toolTip">
<string>The typeof arrows to use for dimensions</string>
</property>
<item>
<property name="text">
<string>Dot</string>
</property>
</item>
<item>
<property name="text">
<string>Arrow</string>
</property>
</item>
<item>
<property name="text">
<string>Tick</string>
</property>
</item>
</widget>
</item>
<item row="5" column="1">
<widget class="Gui::InputField" name="ArrowSize">
<property name="unit" stdset="0">
<string notr="true"/>
</property>
</widget>
</item>
<item row="6" column="1">
<widget class="Gui::InputField" name="DimensionOvershoot">
<property name="unit" stdset="0">
<string notr="true"/>
</property>
</widget>
</item>
<item row="7" column="1">
<widget class="Gui::InputField" name="ExtensionLines">
<property name="unit" stdset="0">
<string notr="true"/>
</property>
</widget>
</item>
<item row="8" column="1">
<widget class="Gui::InputField" name="ExtensionOvershoot">
<property name="unit" stdset="0">
<string notr="true"/>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
</widget>
</item>
<item>
@@ -399,9 +406,9 @@
</widget>
<customwidgets>
<customwidget>
<class>Gui::QuantitySpinBox</class>
<extends>QWidget</extends>
<header>Gui/QuantitySpinBox.h</header>
<class>Gui::InputField</class>
<extends>QLineEdit</extends>
<header>Gui/InputField.h</header>
</customwidget>
<customwidget>
<class>Gui::ColorButton</class>