Color comboboxs in dialogs.

--HG--
branch : feature
This commit is contained in:
Roman Telezhynskyi 2015-02-02 13:06:58 +02:00
parent e2fab3345a
commit c06938272f
12 changed files with 207 additions and 89 deletions

View File

@ -7,7 +7,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>428</width> <width>428</width>
<height>499</height> <height>532</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
@ -223,6 +223,9 @@
<layout class="QVBoxLayout" name="verticalLayout_3"> <layout class="QVBoxLayout" name="verticalLayout_3">
<item> <item>
<layout class="QFormLayout" name="formLayout"> <layout class="QFormLayout" name="formLayout">
<property name="fieldGrowthPolicy">
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
</property>
<item row="0" column="0"> <item row="0" column="0">
<widget class="QLabel" name="labelEditNamePoint"> <widget class="QLabel" name="labelEditNamePoint">
<property name="text"> <property name="text">
@ -230,9 +233,6 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="1">
<widget class="QLineEdit" name="lineEditNamePoint"/>
</item>
<item row="1" column="0"> <item row="1" column="0">
<widget class="QLabel" name="labelFirstPoint"> <widget class="QLabel" name="labelFirstPoint">
<property name="text"> <property name="text">
@ -299,6 +299,19 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="4" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Line color</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QComboBox" name="comboBoxLineColor"/>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="lineEditNamePoint"/>
</item>
</layout> </layout>
</item> </item>
<item> <item>

View File

@ -6,8 +6,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>423</width> <width>425</width>
<height>544</height> <height>577</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
@ -583,32 +583,42 @@
<layout class="QHBoxLayout" name="horizontalLayout_4"> <layout class="QHBoxLayout" name="horizontalLayout_4">
<item> <item>
<layout class="QVBoxLayout" name="verticalLayout_2"> <layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_5">
<item>
<widget class="QLabel" name="label_4">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Center point</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="comboBoxBasePoint">
<property name="toolTip">
<string>Select point of center of arc</string>
</property>
</widget>
</item>
</layout>
</item>
<item> <item>
<layout class="QVBoxLayout" name="verticalLayout_3"> <layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<layout class="QFormLayout" name="formLayout">
<item row="0" column="0">
<widget class="QLabel" name="label_4">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Center point</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QComboBox" name="comboBoxBasePoint">
<property name="toolTip">
<string>Select point of center of arc</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QComboBox" name="comboBoxColor"/>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Color</string>
</property>
</widget>
</item>
</layout>
</item>
<item> <item>
<widget class="QLabel" name="label_8"> <widget class="QLabel" name="label_8">
<property name="text"> <property name="text">
@ -782,7 +792,6 @@
<tabstop>pushButtonGrowLengthF1</tabstop> <tabstop>pushButtonGrowLengthF1</tabstop>
<tabstop>toolButtonPutHereF2</tabstop> <tabstop>toolButtonPutHereF2</tabstop>
<tabstop>toolButtonEqualF2</tabstop> <tabstop>toolButtonEqualF2</tabstop>
<tabstop>comboBoxBasePoint</tabstop>
<tabstop>radioButtonSizeGrowth</tabstop> <tabstop>radioButtonSizeGrowth</tabstop>
<tabstop>radioButtonStandardTable</tabstop> <tabstop>radioButtonStandardTable</tabstop>
<tabstop>radioButtonIncrements</tabstop> <tabstop>radioButtonIncrements</tabstop>

View File

@ -7,7 +7,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>428</width> <width>428</width>
<height>532</height> <height>565</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
@ -325,6 +325,16 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="5" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Line color</string>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QComboBox" name="comboBoxLineColor"/>
</item>
</layout> </layout>
</item> </item>
<item> <item>

View File

@ -7,7 +7,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>419</width> <width>419</width>
<height>499</height> <height>532</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
@ -308,6 +308,16 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="4" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Line color</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QComboBox" name="comboBoxLineColor"/>
</item>
</layout> </layout>
</item> </item>
<item> <item>

View File

@ -7,7 +7,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>285</width> <width>285</width>
<height>212</height> <height>245</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
@ -134,6 +134,16 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="5" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Line color</string>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QComboBox" name="comboBoxLineColor"/>
</item>
</layout> </layout>
</item> </item>
<item> <item>

View File

@ -10,19 +10,19 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>286</width> <width>286</width>
<height>151</height> <height>179</height>
</rect> </rect>
</property> </property>
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>286</width> <width>286</width>
<height>151</height> <height>179</height>
</size> </size>
</property> </property>
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
<width>286</width> <width>286</width>
<height>151</height> <height>179</height>
</size> </size>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
@ -143,6 +143,16 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="3" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Line color</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QComboBox" name="comboBoxLineColor"/>
</item>
</layout> </layout>
</item> </item>
<item> <item>

View File

@ -7,7 +7,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>457</width> <width>457</width>
<height>532</height> <height>565</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
@ -325,6 +325,16 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="5" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Line color</string>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QComboBox" name="comboBoxLineColor"/>
</item>
</layout> </layout>
</item> </item>
<item> <item>

View File

@ -7,7 +7,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>517</width> <width>517</width>
<height>645</height> <height>678</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
@ -472,44 +472,54 @@
</item> </item>
</layout> </layout>
</item> </item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_7">
<item>
<widget class="QLabel" name="label_7">
<property name="text">
<string>Type of line</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="comboBoxLineType">
<property name="minimumSize">
<size>
<width>80</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>110</width>
<height>16777215</height>
</size>
</property>
<property name="toolTip">
<string>Show line from first point to this point</string>
</property>
<property name="iconSize">
<size>
<width>80</width>
<height>14</height>
</size>
</property>
</widget>
</item>
</layout>
</item>
<item> <item>
<layout class="QVBoxLayout" name="verticalLayout_3"> <layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<layout class="QFormLayout" name="formLayout_2">
<item row="0" column="0">
<widget class="QLabel" name="label_7">
<property name="text">
<string>Type of line</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QComboBox" name="comboBoxLineType">
<property name="minimumSize">
<size>
<width>80</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>110</width>
<height>16777215</height>
</size>
</property>
<property name="toolTip">
<string>Show line from first point to this point</string>
</property>
<property name="iconSize">
<size>
<width>80</width>
<height>14</height>
</size>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QComboBox" name="comboBoxLineColor"/>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Line color</string>
</property>
</widget>
</item>
</layout>
</item>
<item> <item>
<widget class="QLabel" name="label_2"> <widget class="QLabel" name="label_2">
<property name="text"> <property name="text">
@ -689,7 +699,6 @@
<tabstop>toolButtonArrowLeftDown</tabstop> <tabstop>toolButtonArrowLeftDown</tabstop>
<tabstop>toolButtonArrowLeft</tabstop> <tabstop>toolButtonArrowLeft</tabstop>
<tabstop>toolButtonArrowLeftUp</tabstop> <tabstop>toolButtonArrowLeftUp</tabstop>
<tabstop>comboBoxLineType</tabstop>
<tabstop>radioButtonSizeGrowth</tabstop> <tabstop>radioButtonSizeGrowth</tabstop>
<tabstop>radioButtonStandardTable</tabstop> <tabstop>radioButtonStandardTable</tabstop>
<tabstop>radioButtonIncrements</tabstop> <tabstop>radioButtonIncrements</tabstop>

View File

@ -7,7 +7,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>488</width> <width>488</width>
<height>532</height> <height>565</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
@ -364,6 +364,16 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="5" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Line color</string>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QComboBox" name="comboBoxLineColor"/>
</item>
</layout> </layout>
</item> </item>
<item> <item>

View File

@ -6,8 +6,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>524</width> <width>540</width>
<height>254</height> <height>233</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
@ -152,8 +152,11 @@
</layout> </layout>
</item> </item>
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout_8"> <layout class="QFormLayout" name="formLayout">
<item> <property name="fieldGrowthPolicy">
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
</property>
<item row="0" column="0">
<widget class="QLabel" name="label_4"> <widget class="QLabel" name="label_4">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
@ -172,7 +175,7 @@
</property> </property>
</widget> </widget>
</item> </item>
<item> <item row="0" column="1">
<widget class="QDoubleSpinBox" name="doubleSpinBoxKcurve"> <widget class="QDoubleSpinBox" name="doubleSpinBoxKcurve">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed"> <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
@ -194,6 +197,16 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Color</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QComboBox" name="comboBoxColor"/>
</item>
</layout> </layout>
</item> </item>
<item> <item>
@ -215,7 +228,6 @@
<tabstop>comboBoxP4</tabstop> <tabstop>comboBoxP4</tabstop>
<tabstop>doubleSpinBoxKasm2</tabstop> <tabstop>doubleSpinBoxKasm2</tabstop>
<tabstop>spinBoxAngle2</tabstop> <tabstop>spinBoxAngle2</tabstop>
<tabstop>doubleSpinBoxKcurve</tabstop>
<tabstop>buttonBox</tabstop> <tabstop>buttonBox</tabstop>
</tabstops> </tabstops>
<resources> <resources>

View File

@ -6,8 +6,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>524</width> <width>528</width>
<height>321</height> <height>322</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
@ -141,8 +141,11 @@
</layout> </layout>
</item> </item>
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout_8"> <layout class="QFormLayout" name="formLayout">
<item> <property name="fieldGrowthPolicy">
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
</property>
<item row="0" column="0">
<widget class="QLabel" name="label_4"> <widget class="QLabel" name="label_4">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
@ -161,7 +164,7 @@
</property> </property>
</widget> </widget>
</item> </item>
<item> <item row="0" column="1">
<widget class="QDoubleSpinBox" name="doubleSpinBoxKcurve"> <widget class="QDoubleSpinBox" name="doubleSpinBoxKcurve">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed"> <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
@ -183,6 +186,16 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="0">
<widget class="QLabel" name="label_5">
<property name="text">
<string>Color</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QComboBox" name="comboBoxColor"/>
</item>
</layout> </layout>
</item> </item>
<item> <item>
@ -204,7 +217,6 @@
<tabstop>doubleSpinBoxKasm2</tabstop> <tabstop>doubleSpinBoxKasm2</tabstop>
<tabstop>doubleSpinBoxAngle2</tabstop> <tabstop>doubleSpinBoxAngle2</tabstop>
<tabstop>listWidget</tabstop> <tabstop>listWidget</tabstop>
<tabstop>doubleSpinBoxKcurve</tabstop>
<tabstop>buttonBox</tabstop> <tabstop>buttonBox</tabstop>
</tabstops> </tabstops>
<resources> <resources>

View File

@ -209,6 +209,7 @@ protected:
virtual void closeEvent ( QCloseEvent * event ); virtual void closeEvent ( QCloseEvent * event );
virtual void showEvent( QShowEvent *event ); virtual void showEvent( QShowEvent *event );
void FillComboBoxPoints(QComboBox *box)const; void FillComboBoxPoints(QComboBox *box)const;
void FillComboBoxArcs(QComboBox *box, ComboBoxCutArc cut = ComboBoxCutArc::NoCutArc)const; void FillComboBoxArcs(QComboBox *box, ComboBoxCutArc cut = ComboBoxCutArc::NoCutArc)const;
void FillComboBoxSplines(QComboBox *box, ComboBoxCutSpline cut = ComboBoxCutSpline::NoCutSpline)const; void FillComboBoxSplines(QComboBox *box, ComboBoxCutSpline cut = ComboBoxCutSpline::NoCutSpline)const;
@ -217,8 +218,10 @@ protected:
void FillComboBoxCurves(QComboBox *box)const; void FillComboBoxCurves(QComboBox *box)const;
void FillComboBoxTypeLine(QComboBox *box, const QMap<QString, QIcon> &stylesPics) const; void FillComboBoxTypeLine(QComboBox *box, const QMap<QString, QIcon> &stylesPics) const;
void FillComboBoxLineColors(QComboBox *box)const; void FillComboBoxLineColors(QComboBox *box)const;
virtual void CheckState(); virtual void CheckState();
QString GetTypeLine(const QComboBox *box)const; QString GetTypeLine(const QComboBox *box)const;
QString GetLineColor(const QComboBox *box)const;
template <class key, class val> template <class key, class val>
void ShowVariable(const QMap<key, val> var); void ShowVariable(const QMap<key, val> var);
void SetupTypeLine(QComboBox *box, const QString &value); void SetupTypeLine(QComboBox *box, const QString &value);