Fix problems with layouts in dialog tool Detail. Returned detail name by

default. Setted clear button for field Letter.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2016-08-07 23:41:49 +03:00
parent d9360f3c96
commit 67b18fbbde
2 changed files with 455 additions and 496 deletions

View File

@ -51,6 +51,7 @@ DialogDetail::DialogDetail(const VContainer *data, const quint32 &toolId, QWidge
#if QT_VERSION >= QT_VERSION_CHECK(5, 2, 0) #if QT_VERSION >= QT_VERSION_CHECK(5, 2, 0)
ui.lineEditName->setClearButtonEnabled(true); ui.lineEditName->setClearButtonEnabled(true);
ui.lineEditLetter->setClearButtonEnabled(true);
#endif #endif
labelEditNamePoint = ui.labelEditName; labelEditNamePoint = ui.labelEditName;

View File

@ -6,8 +6,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>522</width> <width>523</width>
<height>481</height> <height>442</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
@ -20,8 +20,8 @@
<property name="locale"> <property name="locale">
<locale language="English" country="UnitedStates"/> <locale language="English" country="UnitedStates"/>
</property> </property>
<layout class="QGridLayout" name="gridLayout"> <layout class="QVBoxLayout" name="verticalLayout_7">
<item row="0" column="0"> <item>
<widget class="QTabWidget" name="tabWidget"> <widget class="QTabWidget" name="tabWidget">
<property name="currentIndex"> <property name="currentIndex">
<number>1</number> <number>1</number>
@ -30,45 +30,38 @@
<attribute name="title"> <attribute name="title">
<string>General</string> <string>General</string>
</attribute> </attribute>
<widget class="QLabel" name="helpLabel"> <layout class="QVBoxLayout" name="verticalLayout_3">
<property name="geometry"> <item>
<rect> <layout class="QHBoxLayout" name="horizontalLayout_8">
<x>59</x> <item>
<y>468</y> <widget class="QLabel" name="label_3">
<width>504</width> <property name="sizePolicy">
<height>15</height> <sizepolicy hsizetype="Fixed" vsizetype="Preferred">
</rect> <horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property> </property>
<property name="text"> <property name="text">
<string>Ready!</string> <string/>
</property> </property>
<property name="textFormat"> <property name="pixmap">
<enum>Qt::RichText</enum> <pixmap resource="../../../vmisc/share/resources/icon.qrc">:/icon/32x32/clockwise.png</pixmap>
</property>
<property name="scaledContents">
<bool>false</bool>
</property> </property>
</widget> </widget>
<widget class="QWidget" name="layoutWidget"> </item>
<property name="geometry"> <item>
<rect> <widget class="QLabel" name="label_4">
<x>50</x> <property name="text">
<y>40</y> <string>All objects in path should follow in clockwise direction.</string>
<width>367</width> </property>
<height>34</height> <property name="wordWrap">
</rect> <bool>true</bool>
</property> </property>
<layout class="QHBoxLayout" name="horizontalLayout_7"/>
</widget> </widget>
<widget class="QWidget" name="layoutWidget_2"> </item>
<property name="geometry"> </layout>
<rect> </item>
<x>0</x> <item>
<y>30</y>
<width>561</width>
<height>361</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_5"> <layout class="QHBoxLayout" name="horizontalLayout_5">
<item> <item>
<layout class="QVBoxLayout" name="verticalLayout_2"> <layout class="QVBoxLayout" name="verticalLayout_2">
@ -190,9 +183,6 @@
<string>Options</string> <string>Options</string>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout"> <layout class="QVBoxLayout" name="verticalLayout">
<item>
<layout class="QHBoxLayout" name="horizontalLayout"/>
</item>
<item> <item>
<widget class="QCheckBox" name="checkBoxSeams"> <widget class="QCheckBox" name="checkBoxSeams">
<property name="text"> <property name="text">
@ -346,76 +336,82 @@
<widget class="QListWidget" name="listWidget"/> <widget class="QListWidget" name="listWidget"/>
</item> </item>
</layout> </layout>
</widget> </item>
<widget class="QLabel" name="label_4"> <item>
<property name="geometry"> <widget class="QLabel" name="helpLabel">
<rect>
<x>50</x>
<y>0</y>
<width>327</width>
<height>32</height>
</rect>
</property>
<property name="text"> <property name="text">
<string>All objects in path should follow in clockwise direction.</string> <string>Ready!</string>
</property> </property>
</widget> <property name="textFormat">
<widget class="QLabel" name="label_3"> <enum>Qt::RichText</enum>
<property name="geometry"> </property>
<rect> <property name="scaledContents">
<x>10</x> <bool>false</bool>
<y>0</y>
<width>32</width>
<height>32</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string/>
</property>
<property name="pixmap">
<pixmap resource="../../../vmisc/share/resources/icon.qrc">:/icon/32x32/clockwise.png</pixmap>
</property> </property>
</widget> </widget>
</item>
</layout>
</widget> </widget>
<widget class="QWidget" name="tab_2"> <widget class="QWidget" name="tab_2">
<attribute name="title"> <attribute name="title">
<string>Pattern piece data</string> <string>Pattern piece data</string>
</attribute> </attribute>
<layout class="QGridLayout" name="gridLayout_2"> <layout class="QVBoxLayout" name="verticalLayout_5">
<item row="0" column="0"> <item>
<widget class="QWidget" name="widget" native="true"> <layout class="QHBoxLayout" name="horizontalLayout">
<widget class="QListWidget" name="listWidgetMCP"> <item>
<property name="geometry"> <layout class="QVBoxLayout" name="verticalLayout_4">
<rect> <item>
<x>280</x> <layout class="QFormLayout" name="formLayout">
<y>0</y> <property name="fieldGrowthPolicy">
<width>201</width> <enum>QFormLayout::AllNonFixedFieldsGrow</enum>
<height>381</height>
</rect>
</property> </property>
<property name="focusPolicy"> <item row="0" column="0">
<enum>Qt::ClickFocus</enum> <widget class="QLabel" name="label_5">
<property name="text">
<string>Letter:</string>
</property> </property>
</widget> </widget>
<widget class="QGroupBox" name="groupBox_2"> </item>
<property name="geometry"> <item row="0" column="1">
<rect> <widget class="QLineEdit" name="lineEditLetter">
<x>0</x> <property name="maxLength">
<y>70</y> <number>3</number>
<width>271</width>
<height>153</height>
</rect>
</property> </property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="labelEditName">
<property name="text">
<string>Name of detail:</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLineEdit" name="lineEditName">
<property name="text">
<string>Detail</string>
</property>
<property name="maxLength">
<number>30</number>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QGroupBox" name="groupBox_2">
<property name="title"> <property name="title">
<string>Material/Cut number/Placement</string> <string>Material/Cut number/Placement</string>
</property> </property>
<layout class="QGridLayout" name="gridLayout_3"> <layout class="QGridLayout" name="gridLayout_3">
<item row="1" column="0">
<widget class="QLabel" name="label_8">
<property name="text">
<string>Cut number:</string>
</property>
</widget>
</item>
<item row="0" column="0" colspan="2"> <item row="0" column="0" colspan="2">
<widget class="QLabel" name="label_7"> <widget class="QLabel" name="label_7">
<property name="text"> <property name="text">
@ -430,13 +426,6 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="0">
<widget class="QLabel" name="label_8">
<property name="text">
<string>Cut number:</string>
</property>
</widget>
</item>
<item row="1" column="2" colspan="2"> <item row="1" column="2" colspan="2">
<widget class="QSpinBox" name="spinBoxCutNumber"> <widget class="QSpinBox" name="spinBoxCutNumber">
<property name="maximum"> <property name="maximum">
@ -477,64 +466,17 @@
</item> </item>
</layout> </layout>
</widget> </widget>
<widget class="QWidget" name="formLayoutWidget">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>271</width>
<height>61</height>
</rect>
</property>
<layout class="QFormLayout" name="formLayout">
<item row="0" column="0">
<widget class="QLabel" name="label_5">
<property name="text">
<string>Letter:</string>
</property>
</widget>
</item> </item>
<item row="0" column="1"> <item>
<widget class="QLineEdit" name="lineEditLetter"> <layout class="QVBoxLayout" name="verticalLayout_6">
<property name="maxLength"> <item>
<number>3</number>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="labelEditName">
<property name="text">
<string>Name of detail:</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLineEdit" name="lineEditName">
<property name="maxLength">
<number>15</number>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="formLayoutWidget_2">
<property name="geometry">
<rect>
<x>0</x>
<y>230</y>
<width>261</width>
<height>80</height>
</rect>
</property>
<layout class="QFormLayout" name="formLayout_2">
<item row="0" column="0">
<widget class="QCheckBox" name="checkBoxDetail"> <widget class="QCheckBox" name="checkBoxDetail">
<property name="text"> <property name="text">
<string>Detail label visible</string> <string>Detail label visible</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="0"> <item>
<widget class="QCheckBox" name="checkBoxPattern"> <widget class="QCheckBox" name="checkBoxPattern">
<property name="text"> <property name="text">
<string>Pattern label visible</string> <string>Pattern label visible</string>
@ -542,14 +484,29 @@
</widget> </widget>
</item> </item>
</layout> </layout>
</item>
</layout>
</item>
<item>
<widget class="QListWidget" name="listWidgetMCP">
<property name="minimumSize">
<size>
<width>180</width>
<height>0</height>
</size>
</property>
<property name="focusPolicy">
<enum>Qt::ClickFocus</enum>
</property>
</widget> </widget>
</widget> </item>
</layout>
</item> </item>
</layout> </layout>
</widget> </widget>
</widget> </widget>
</item> </item>
<item row="1" column="0"> <item>
<widget class="QDialogButtonBox" name="buttonBox"> <widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
@ -560,6 +517,8 @@
</widget> </widget>
</item> </item>
</layout> </layout>
<zorder>buttonBox</zorder>
<zorder>tabWidget</zorder>
</widget> </widget>
<tabstops> <tabstops>
<tabstop>lineEditLetter</tabstop> <tabstop>lineEditLetter</tabstop>
@ -570,7 +529,6 @@
<tabstop>pushButtonAdd</tabstop> <tabstop>pushButtonAdd</tabstop>
<tabstop>pushButtonCancel</tabstop> <tabstop>pushButtonCancel</tabstop>
<tabstop>pushButtonRemove</tabstop> <tabstop>pushButtonRemove</tabstop>
<tabstop>tabWidget</tabstop>
<tabstop>listWidgetMCP</tabstop> <tabstop>listWidgetMCP</tabstop>
<tabstop>buttonBox</tabstop> <tabstop>buttonBox</tabstop>
<tabstop>toolButtonUp</tabstop> <tabstop>toolButtonUp</tabstop>