Skip to content
Browse files

applicationWindow: tool widget size policy, bug#3579280

more work needed
  • Loading branch information...
1 parent 77c1083 commit 62b9b84abe20767cab572bd4c763da36b16c0fe7 Dongxu Li committed
Showing with 383 additions and 211 deletions.
  1. +1 −1 librecad/src/main/qc_applicationwindow.cpp
  2. +382 −210 librecad/src/ui/forms/qg_insertoptions.ui
View
2 librecad/src/main/qc_applicationwindow.cpp
@@ -1612,7 +1612,7 @@ void QC_ApplicationWindow::initToolBar() {
optionWidget = new QToolBar("Tool Options", this);
- QSizePolicy optionWidgetBarPolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
+ QSizePolicy optionWidgetBarPolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
// optionWidget->setMinimumSize(440,30);
optionWidget->setSizePolicy(optionWidgetBarPolicy);
optionWidget->setObjectName ( "ToolTB" );
View
592 librecad/src/ui/forms/qg_insertoptions.ui
@@ -1,217 +1,389 @@
<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0" stdsetdef="1">
- <resources><include location="../../../res/extui/extui.qrc"/></resources><author></author>
- <comment></comment>
- <exportmacro></exportmacro>
- <class>QG_InsertOptions</class>
- <widget class="QWidget" name="QG_InsertOptions">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>550</width>
- <height>24</height>
- </rect>
- </property>
- <property name="sizePolicy">
- <sizepolicy>
- <hsizetype>4</hsizetype>
- <vsizetype>0</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
+<ui version="4.0">
+ <class>QG_InsertOptions</class>
+ <widget class="QWidget" name="QG_InsertOptions">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>450</width>
+ <height>26</height>
+ </rect>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>50</width>
+ <height>22</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>600</width>
+ <height>32</height>
+ </size>
+ </property>
+ <property name="windowTitle">
+ <string>Insert Options</string>
+ </property>
+ <property name="toolTip">
+ <string/>
+ </property>
+ <layout class="QHBoxLayout">
+ <property name="margin">
+ <number>1</number>
+ </property>
+ <item>
+ <widget class="QLabel" name="lAngle">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
</sizepolicy>
- </property>
- <property name="minimumSize">
+ </property>
+ <property name="minimumSize">
<size>
- <width>550</width>
- <height>22</height>
+ <width>36</width>
+ <height>0</height>
</size>
- </property>
- <property name="maximumSize">
+ </property>
+ <property name="text">
+ <string>Angle:</string>
+ </property>
+ <property name="wordWrap">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLineEdit" name="leAngle">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>32</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="toolTip">
+ <string>Rotation Angle</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="lFactor">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>40</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>Factor:</string>
+ </property>
+ <property name="wordWrap">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLineEdit" name="leFactor">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>32</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="toolTip">
+ <string>Scale Factor</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="Line" name="sep1_2">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="frameShape">
+ <enum>QFrame::VLine</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>QFrame::Sunken</enum>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="lArray">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>34</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>Array:</string>
+ </property>
+ <property name="wordWrap">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QSpinBox" name="sbColumns">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
<size>
- <width>600</width>
- <height>32767</height>
+ <width>34</width>
+ <height>0</height>
</size>
- </property>
- <property name="windowTitle">
- <string>Insert Options</string>
- </property>
- <property name="toolTip" stdset="0">
- <string/>
- </property>
- <layout class="QHBoxLayout">
- <property name="margin">
- <number>1</number>
- </property>
- <item>
- <widget class="QLabel" name="lAngle">
- <property name="text">
- <string>Angle:</string>
- </property>
- <property name="wordWrap">
- <bool>false</bool>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QLineEdit" name="leAngle">
- <property name="toolTip" stdset="0">
- <string>Rotation Angle</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QLabel" name="lFactor">
- <property name="text">
- <string>Factor:</string>
- </property>
- <property name="wordWrap">
- <bool>false</bool>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QLineEdit" name="leFactor">
- <property name="toolTip" stdset="0">
- <string>Scale Factor</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="Line" name="sep1_2">
- <property name="sizePolicy">
- <sizepolicy>
- <hsizetype>0</hsizetype>
- <vsizetype>1</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="frameShape">
- <enum>QFrame::VLine</enum>
- </property>
- <property name="frameShadow">
- <enum>QFrame::Sunken</enum>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QLabel" name="lArray">
- <property name="text">
- <string>Array:</string>
- </property>
- <property name="wordWrap">
- <bool>false</bool>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QSpinBox" name="sbColumns">
- <property name="maximum">
- <number>10000</number>
- </property>
- <property name="minimum">
- <number>1</number>
- </property>
- <property name="toolTip" stdset="0">
- <string>Number of Columns</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QSpinBox" name="sbRows">
- <property name="maximum">
- <number>10000</number>
- </property>
- <property name="minimum">
- <number>1</number>
- </property>
- <property name="toolTip" stdset="0">
- <string>Number of Rows</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QLabel" name="lSpacing">
- <property name="text">
- <string>Spacing:</string>
- </property>
- <property name="wordWrap">
- <bool>false</bool>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QLineEdit" name="leColumnSpacing">
- <property name="toolTip" stdset="0">
- <string>Column Spacing</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QLineEdit" name="leRowSpacing">
- <property name="toolTip" stdset="0">
- <string>Row Spacing</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="Line" name="sep1">
- <property name="sizePolicy">
- <sizepolicy>
- <hsizetype>0</hsizetype>
- <vsizetype>1</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="frameShape">
- <enum>QFrame::VLine</enum>
- </property>
- <property name="frameShadow">
- <enum>QFrame::Sunken</enum>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- <layoutdefault spacing="6" margin="11"/>
- <connections>
- <connection>
- <sender>leAngle</sender>
- <signal>textChanged(QString)</signal>
- <receiver>QG_InsertOptions</receiver>
- <slot>updateData()</slot>
- </connection>
- <connection>
- <sender>leFactor</sender>
- <signal>textChanged(QString)</signal>
- <receiver>QG_InsertOptions</receiver>
- <slot>updateData()</slot>
- </connection>
- <connection>
- <sender>sbColumns</sender>
- <signal>valueChanged(int)</signal>
- <receiver>QG_InsertOptions</receiver>
- <slot>updateData()</slot>
- </connection>
- <connection>
- <sender>sbRows</sender>
- <signal>valueChanged(int)</signal>
- <receiver>QG_InsertOptions</receiver>
- <slot>updateData()</slot>
- </connection>
- <connection>
- <sender>leColumnSpacing</sender>
- <signal>textChanged(QString)</signal>
- <receiver>QG_InsertOptions</receiver>
- <slot>updateData()</slot>
- </connection>
- <connection>
- <sender>leRowSpacing</sender>
- <signal>textChanged(QString)</signal>
- <receiver>QG_InsertOptions</receiver>
- <slot>updateData()</slot>
- </connection>
- </connections>
+ </property>
+ <property name="toolTip">
+ <string>Number of Columns</string>
+ </property>
+ <property name="minimum">
+ <number>1</number>
+ </property>
+ <property name="maximum">
+ <number>10000</number>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QSpinBox" name="sbRows">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>34</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="toolTip">
+ <string>Number of Rows</string>
+ </property>
+ <property name="minimum">
+ <number>1</number>
+ </property>
+ <property name="maximum">
+ <number>10000</number>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="lSpacing">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>50</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>Spacing:</string>
+ </property>
+ <property name="wordWrap">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLineEdit" name="leColumnSpacing">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>32</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="toolTip">
+ <string>Column Spacing</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLineEdit" name="leRowSpacing">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>32</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="toolTip">
+ <string>Row Spacing</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="Line" name="sep1">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="frameShape">
+ <enum>QFrame::VLine</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>QFrame::Sunken</enum>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <layoutdefault spacing="6" margin="11"/>
+ <resources/>
+ <connections>
+ <connection>
+ <sender>leAngle</sender>
+ <signal>textChanged(QString)</signal>
+ <receiver>QG_InsertOptions</receiver>
+ <slot>updateData()</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>20</x>
+ <y>20</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>20</x>
+ <y>20</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>leFactor</sender>
+ <signal>textChanged(QString)</signal>
+ <receiver>QG_InsertOptions</receiver>
+ <slot>updateData()</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>20</x>
+ <y>20</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>20</x>
+ <y>20</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>sbColumns</sender>
+ <signal>valueChanged(int)</signal>
+ <receiver>QG_InsertOptions</receiver>
+ <slot>updateData()</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>20</x>
+ <y>20</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>20</x>
+ <y>20</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>sbRows</sender>
+ <signal>valueChanged(int)</signal>
+ <receiver>QG_InsertOptions</receiver>
+ <slot>updateData()</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>20</x>
+ <y>20</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>20</x>
+ <y>20</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>leColumnSpacing</sender>
+ <signal>textChanged(QString)</signal>
+ <receiver>QG_InsertOptions</receiver>
+ <slot>updateData()</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>20</x>
+ <y>20</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>20</x>
+ <y>20</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>leRowSpacing</sender>
+ <signal>textChanged(QString)</signal>
+ <receiver>QG_InsertOptions</receiver>
+ <slot>updateData()</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>20</x>
+ <y>20</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>20</x>
+ <y>20</y>
+ </hint>
+ </hints>
+ </connection>
+ </connections>
</ui>

0 comments on commit 62b9b84

Please sign in to comment.
Something went wrong with that request. Please try again.