[TD] use Gui::QuantitySpinBox in dialogs
as recently discussed - also add lost alignment properties
This commit is contained in:
@@ -120,7 +120,7 @@ bool TaskBalloon::accept()
|
||||
ac.setValue<QColor>(ui->textColor->color());
|
||||
m_balloonVP->Color.setValue(ac);
|
||||
m_balloonVP->Fontsize.setValue(ui->qsbFontSize->value().getValue());
|
||||
m_parent->dvBalloon->ShapeScale.setValue(ui->inputScale->value());
|
||||
m_parent->dvBalloon->ShapeScale.setValue(ui->inputScale->value().getValue());
|
||||
m_parent->dvBalloon->EndType.setValue(ui->comboEndType->currentIndex());
|
||||
m_parent->dvBalloon->Shape.setValue(ui->comboSymbol->currentIndex());
|
||||
m_balloonVP->LineWidth.setValue(ui->qsbLineWidth->value().getValue());
|
||||
@@ -170,7 +170,7 @@ void TaskBalloon::onShapeChanged()
|
||||
|
||||
void TaskBalloon::onShapeScaleChanged()
|
||||
{
|
||||
m_parent->dvBalloon->ShapeScale.setValue(ui->inputScale->value());
|
||||
m_parent->dvBalloon->ShapeScale.setValue(ui->inputScale->value().getValue());
|
||||
recomputeFeature();
|
||||
}
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
<property name="toolTip">
|
||||
<string>Color for 'Text'</string>
|
||||
</property>
|
||||
<property name="color" stdset="0">
|
||||
<property name="color">
|
||||
<color>
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
@@ -59,7 +59,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="Gui::QuantitySpinBox" name="qsbFontSize" native="true">
|
||||
<widget class="Gui::QuantitySpinBox" name="qsbFontSize">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
@@ -75,7 +75,10 @@
|
||||
<property name="toolTip">
|
||||
<string>Fontsize for 'Text'</string>
|
||||
</property>
|
||||
<property name="value" stdset="0">
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="value">
|
||||
<double>4.000000000000000</double>
|
||||
</property>
|
||||
<property name="prefEntry" stdset="0">
|
||||
@@ -171,10 +174,19 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QDoubleSpinBox" name="inputScale">
|
||||
<widget class="Gui::QuantitySpinBox" name="inputScale">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Scale factor for the 'Shape'</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<double>0.000000000000000</double>
|
||||
</property>
|
||||
@@ -208,7 +220,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="1">
|
||||
<widget class="Gui::QuantitySpinBox" name="qsbLineWidth" native="true">
|
||||
<widget class="Gui::QuantitySpinBox" name="qsbLineWidth">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
@@ -224,7 +236,10 @@
|
||||
<property name="toolTip">
|
||||
<string>Leader line width</string>
|
||||
</property>
|
||||
<property name="value" stdset="0">
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="value">
|
||||
<double>0.350000000000000</double>
|
||||
</property>
|
||||
<property name="prefEntry" stdset="0">
|
||||
@@ -243,7 +258,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="1">
|
||||
<widget class="Gui::QuantitySpinBox" name="qsbBalloonKink" native="true">
|
||||
<widget class="Gui::QuantitySpinBox" name="qsbBalloonKink">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
@@ -259,7 +274,10 @@
|
||||
<property name="toolTip">
|
||||
<string>Length of balloon leader line kink</string>
|
||||
</property>
|
||||
<property name="value" stdset="0">
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="value">
|
||||
<double>5.000000000000000</double>
|
||||
</property>
|
||||
<property name="prefEntry" stdset="0">
|
||||
@@ -275,16 +293,16 @@
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>Gui::ColorButton</class>
|
||||
<extends>QPushButton</extends>
|
||||
<header>Gui/Widgets.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>Gui::QuantitySpinBox</class>
|
||||
<extends>QWidget</extends>
|
||||
<header>Gui/QuantitySpinBox.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>Gui::ColorButton</class>
|
||||
<extends>QPushButton</extends>
|
||||
<header>Gui/Widgets.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources>
|
||||
<include location="Resources/TechDraw.qrc"/>
|
||||
|
||||
@@ -142,47 +142,76 @@ You can pick further points to get line segments.</string>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QFormLayout" name="formLayout">
|
||||
<property name="fieldGrowthPolicy">
|
||||
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
|
||||
</property>
|
||||
<item row="1" column="0">
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Start Symbol</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<item row="0" column="2">
|
||||
<widget class="QComboBox" name="cboxStartSym">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>22</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>-1</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>End Symbol</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QComboBox" name="cboxEndSym"/>
|
||||
<item row="1" column="1">
|
||||
<spacer name="horizontalSpacer_4">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<item row="1" column="2">
|
||||
<widget class="QComboBox" name="cboxEndSym">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>22</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Color</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<item row="2" column="2">
|
||||
<widget class="Gui::ColorButton" name="cpLineColor">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>22</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Line color</string>
|
||||
</property>
|
||||
<property name="color" stdset="0">
|
||||
<property name="color">
|
||||
<color>
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
@@ -191,38 +220,53 @@ You can pick further points to get line segments.</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string>Width</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="Gui::QuantitySpinBox" name="dsbWeight" native="true">
|
||||
<item row="3" column="2">
|
||||
<widget class="Gui::QuantitySpinBox" name="dsbWeight">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>22</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Line width</string>
|
||||
</property>
|
||||
<property name="singleStep" stdset="0">
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<double>0.100000000000000</double>
|
||||
</property>
|
||||
<property name="value" stdset="0">
|
||||
<property name="value">
|
||||
<double>0.500000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="text">
|
||||
<string>Style</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<item row="4" column="2">
|
||||
<widget class="QComboBox" name="cboxStyle">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>22</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Line style</string>
|
||||
</property>
|
||||
|
||||
@@ -171,7 +171,7 @@ void TaskLineDecor::onColorChanged(void)
|
||||
|
||||
void TaskLineDecor::onWeightChanged(void)
|
||||
{
|
||||
m_weight = ui->dsb_Weight->value();
|
||||
m_weight = ui->dsb_Weight->value().getValue();
|
||||
applyDecorations();
|
||||
m_partFeat->requestPaint();
|
||||
}
|
||||
|
||||
@@ -136,7 +136,7 @@
|
||||
</item>
|
||||
<item row="4" column="2">
|
||||
<widget class="Gui::ColorButton" name="cc_Color">
|
||||
<property name="color" stdset="0">
|
||||
<property name="color">
|
||||
<color>
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
@@ -153,10 +153,13 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="2">
|
||||
<widget class="QDoubleSpinBox" name="dsb_Weight">
|
||||
<widget class="Gui::QuantitySpinBox" name="dsb_Weight">
|
||||
<property name="toolTip">
|
||||
<string>Thickness of pattern lines.</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
<property name="value">
|
||||
<double>0.500000000000000</double>
|
||||
</property>
|
||||
@@ -200,6 +203,11 @@
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>Gui::QuantitySpinBox</class>
|
||||
<extends>QWidget</extends>
|
||||
<header>Gui/QuantitySpinBox.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>Gui::ColorButton</class>
|
||||
<extends>QPushButton</extends>
|
||||
|
||||
@@ -417,7 +417,7 @@ void TaskRichAnno::commonFeatureUpdate(void)
|
||||
// Base::Console().Message("TRA::commonFeatureUpdate()\n");
|
||||
m_annoFeat->setPosition(Rez::appX(m_attachPoint.x),Rez::appX(- m_attachPoint.y), true);
|
||||
m_annoFeat->AnnoText.setValue(ui->teAnnoText->toHtml().toUtf8());
|
||||
m_annoFeat->MaxWidth.setValue(ui->dsbMaxWidth->value());
|
||||
m_annoFeat->MaxWidth.setValue(ui->dsbMaxWidth->value().getValue());
|
||||
m_annoFeat->ShowFrame.setValue(ui->cbShowFrame->isChecked());
|
||||
}
|
||||
|
||||
|
||||
@@ -69,10 +69,13 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QDoubleSpinBox" name="dsbMaxWidth">
|
||||
<widget class="Gui::QuantitySpinBox" name="dsbMaxWidth">
|
||||
<property name="toolTip">
|
||||
<string>Maximal width, if -1 then automatic width</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<double>-1.000000000000000</double>
|
||||
</property>
|
||||
@@ -144,7 +147,7 @@
|
||||
<property name="toolTip">
|
||||
<string>Line color</string>
|
||||
</property>
|
||||
<property name="color" stdset="0">
|
||||
<property name="color">
|
||||
<color>
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
@@ -161,17 +164,20 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="Gui::QuantitySpinBox" name="dsbWidth" native="true">
|
||||
<widget class="Gui::QuantitySpinBox" name="dsbWidth">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Line width</string>
|
||||
</property>
|
||||
<property name="singleStep" stdset="0">
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<double>0.100000000000000</double>
|
||||
</property>
|
||||
<property name="value" stdset="0">
|
||||
<property name="value">
|
||||
<double>0.500000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
@@ -234,16 +240,16 @@
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>Gui::ColorButton</class>
|
||||
<extends>QPushButton</extends>
|
||||
<header>Gui/Widgets.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>Gui::QuantitySpinBox</class>
|
||||
<extends>QWidget</extends>
|
||||
<header>Gui/QuantitySpinBox.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>Gui::ColorButton</class>
|
||||
<extends>QPushButton</extends>
|
||||
<header>Gui/Widgets.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources>
|
||||
<include location="Resources/TechDraw.qrc"/>
|
||||
|
||||
Reference in New Issue
Block a user