[TD] sanitize Detail view dialog

- fix dialog layout (was broken for Windows) and simplify it
- enable so immediately the changes you make in the dialog -> necessary to fine-tune the right position
This commit is contained in:
donovaly
2020-04-13 19:10:57 +02:00
committed by WandererFan
parent 1f1043bf3c
commit 9e57caf2ec
2 changed files with 208 additions and 253 deletions

View File

@@ -97,7 +97,7 @@ TaskDetail::TaskDetail(TechDraw::DrawViewPart* baseFeat):
m_baseName = m_baseFeat->getNameInDocument();
m_doc = m_baseFeat->getDocument();
m_pageName = m_basePage->getNameInDocument();
m_pageName = m_basePage->getNameInDocument();
ui->setupUi(this);
@@ -114,12 +114,14 @@ TaskDetail::TaskDetail(TechDraw::DrawViewPart* baseFeat):
connect(ui->pbDragger, SIGNAL(clicked(bool)),
this, SLOT(onDraggerClicked(bool)));
connect(ui->qsbX, SIGNAL(editingFinished()),
connect(ui->qsbX, SIGNAL(valueChanged(double)),
this, SLOT(onXEdit()));
connect(ui->qsbY, SIGNAL(editingFinished()),
connect(ui->qsbY, SIGNAL(valueChanged(double)),
this, SLOT(onYEdit()));
connect(ui->qsbRadius, SIGNAL(editingFinished()),
connect(ui->qsbRadius, SIGNAL(valueChanged(double)),
this, SLOT(onRadiusEdit()));
connect(ui->aeReference, SIGNAL(textChanged(QString)),
this, SLOT(onReferenceEdit()));
m_ghost = new QGIGhostHighlight();
m_scene->addItem(m_ghost);
@@ -182,13 +184,13 @@ TaskDetail::TaskDetail(TechDraw::DrawViewDetail* detailFeat):
connect(ui->pbDragger, SIGNAL(clicked(bool)),
this, SLOT(onDraggerClicked(bool)));
connect(ui->qsbX, SIGNAL(editingFinished()),
connect(ui->qsbX, SIGNAL(valueChanged(double)),
this, SLOT(onXEdit()));
connect(ui->qsbY, SIGNAL(editingFinished()),
connect(ui->qsbY, SIGNAL(valueChanged(double)),
this, SLOT(onYEdit()));
connect(ui->qsbRadius, SIGNAL(editingFinished()),
connect(ui->qsbRadius, SIGNAL(valueChanged(double)),
this, SLOT(onRadiusEdit()));
connect(ui->aeReference, SIGNAL(editingFinished()),
connect(ui->aeReference, SIGNAL(textChanged(QString)),
this, SLOT(onReferenceEdit()));
m_ghost = new QGIGhostHighlight();

View File

@@ -6,12 +6,12 @@
<rect>
<x>0</x>
<y>0</y>
<width>381</width>
<height>405</height>
<width>304</width>
<height>244</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Expanding">
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
@@ -29,252 +29,205 @@
<iconset resource="Resources/TechDraw.qrc">
<normaloff>:/icons/actions/techdraw-DetailView.svg</normaloff>:/icons/actions/techdraw-DetailView.svg</iconset>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QFrame" name="frame">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="1">
<widget class="QLineEdit" name="leBaseView">
<property name="enabled">
<bool>false</bool>
</property>
<property name="mouseTracking">
<bool>false</bool>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="acceptDrops">
<bool>false</bool>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_4">
<property name="text">
<string>Base View</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Detail View</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLineEdit" name="leDetailView">
<property name="enabled">
<bool>false</bool>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<spacer name="horizontalSpacer">
<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>
<widget class="QPushButton" name="pbDragger">
<property name="toolTip">
<string>Click to drag detail highlight to new position</string>
</property>
<property name="text">
<string>Drag Highlight</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item>
<widget class="Line" name="line">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="minimumSize">
<size>
<width>300</width>
<height>300</height>
</size>
</property>
<property name="baseSize">
<size>
<width>300</width>
<height>300</height>
</size>
</property>
<property name="frameShape">
<enum>QFrame::Box</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<layout class="QVBoxLayout" name="verticalLayout_4">
<item>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="1">
<widget class="QLineEdit" name="leBaseView">
<property name="enabled">
<bool>false</bool>
</property>
<property name="mouseTracking">
<bool>false</bool>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="acceptDrops">
<bool>false</bool>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_4">
<property name="text">
<string>Base View</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Detail View</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLineEdit" name="leDetailView">
<property name="enabled">
<bool>false</bool>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<spacer name="horizontalSpacer">
<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>
<widget class="QPushButton" name="pbDragger">
<property name="toolTip">
<string>Click to drag detail highlight to new position</string>
</property>
<property name="text">
<string>Drag Highlight</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item>
<widget class="Line" name="line">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item>
<layout class="QGridLayout" name="gridLayout_2" columnstretch="2,1,2">
<item row="2" column="2">
<widget class="Gui::QuantitySpinBox" name="qsbRadius">
<property name="toolTip">
<string>size of detail view</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="unit" stdset="0">
<string notr="true"/>
</property>
<property name="value">
<double>10.000000000000000</double>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>X</string>
</property>
</widget>
</item>
<item row="0" column="1">
<spacer name="horizontalSpacer_3">
<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="1" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Y</string>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="label_5">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="Gui::QuantitySpinBox" name="qsbX">
<property name="toolTip">
<string>x position of detail highlight within view</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="unit" stdset="0">
<string notr="true"/>
</property>
<property name="value">
<double>0.000000000000000</double>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="Gui::QuantitySpinBox" name="qsbY">
<property name="toolTip">
<string>y position of detail highlight within view</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="unit" stdset="0">
<string notr="true"/>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_6">
<property name="text">
<string>Radius</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_7">
<property name="text">
<string>Reference</string>
</property>
</widget>
</item>
<item row="3" column="2">
<widget class="Gui::AccelLineEdit" name="aeReference">
<property name="toolTip">
<string>Detail identifier</string>
</property>
<property name="text">
<string>1</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
<item>
<layout class="QGridLayout" name="gridLayout_2" columnstretch="2,1,2">
<item row="2" column="2">
<widget class="Gui::QuantitySpinBox" name="qsbRadius">
<property name="toolTip">
<string>size of detail view</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="unit" stdset="0">
<string notr="true"/>
</property>
<property name="value">
<double>10.000000000000000</double>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>X</string>
</property>
</widget>
</item>
<item row="0" column="1">
<spacer name="horizontalSpacer_3">
<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="1" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Y</string>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="label_5">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="Gui::QuantitySpinBox" name="qsbX">
<property name="toolTip">
<string>x position of detail highlight within view</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="unit" stdset="0">
<string notr="true"/>
</property>
<property name="value">
<double>0.000000000000000</double>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="Gui::QuantitySpinBox" name="qsbY">
<property name="toolTip">
<string>y position of detail highlight within view</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="unit" stdset="0">
<string notr="true"/>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_6">
<property name="text">
<string>Radius</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_7">
<property name="text">
<string>Reference</string>
</property>
</widget>
</item>
<item row="3" column="2">
<widget class="Gui::AccelLineEdit" name="aeReference">
<property name="toolTip">
<string>Detail identifier</string>
</property>
<property name="text">
<string>1</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<customwidgets>