mirror of https://github.com/KLayout/klayout.git
WIP: distribute selected objects feature
This commit is contained in:
parent
4389196000
commit
8e4e5cde12
|
|
@ -1,7 +1,8 @@
|
|||
<ui version="4.0" >
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>AlignOptionsDialog</class>
|
||||
<widget class="QDialog" name="AlignOptionsDialog" >
|
||||
<property name="geometry" >
|
||||
<widget class="QDialog" name="AlignOptionsDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
|
|
@ -9,26 +10,26 @@
|
|||
<height>392</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle" >
|
||||
<property name="windowTitle">
|
||||
<string>Alignment Options</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout" >
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox" >
|
||||
<property name="title" >
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="title">
|
||||
<string>Horizontal alignment</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_3" >
|
||||
<item row="0" column="0" >
|
||||
<widget class="QRadioButton" name="h_none_rb" >
|
||||
<property name="text" >
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
<item row="0" column="0">
|
||||
<widget class="QRadioButton" name="h_none_rb">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon" >
|
||||
<iconset resource="layResources.qrc" >
|
||||
<property name="icon">
|
||||
<iconset resource="../../lay/lay/layResources.qrc">
|
||||
<normaloff>:/align_none.png</normaloff>:/align_none.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize" >
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>32</width>
|
||||
<height>32</height>
|
||||
|
|
@ -36,16 +37,16 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2" >
|
||||
<widget class="QRadioButton" name="h_left_rb" >
|
||||
<property name="text" >
|
||||
<item row="0" column="2">
|
||||
<widget class="QRadioButton" name="h_left_rb">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon" >
|
||||
<iconset resource="layResources.qrc" >
|
||||
<property name="icon">
|
||||
<iconset resource="../../lay/lay/layResources.qrc">
|
||||
<normaloff>:/align_left.png</normaloff>:/align_left.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize" >
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>32</width>
|
||||
<height>32</height>
|
||||
|
|
@ -53,16 +54,16 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="4" >
|
||||
<widget class="QRadioButton" name="h_center_rb" >
|
||||
<property name="text" >
|
||||
<item row="0" column="4">
|
||||
<widget class="QRadioButton" name="h_center_rb">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon" >
|
||||
<iconset resource="layResources.qrc" >
|
||||
<property name="icon">
|
||||
<iconset resource="../../lay/lay/layResources.qrc">
|
||||
<normaloff>:/align_hcenter.png</normaloff>:/align_hcenter.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize" >
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>32</width>
|
||||
<height>32</height>
|
||||
|
|
@ -70,16 +71,16 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="6" >
|
||||
<widget class="QRadioButton" name="h_right_rb" >
|
||||
<property name="text" >
|
||||
<item row="0" column="6">
|
||||
<widget class="QRadioButton" name="h_right_rb">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon" >
|
||||
<iconset resource="layResources.qrc" >
|
||||
<property name="icon">
|
||||
<iconset resource="../../lay/lay/layResources.qrc">
|
||||
<normaloff>:/align_right.png</normaloff>:/align_right.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize" >
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>32</width>
|
||||
<height>32</height>
|
||||
|
|
@ -87,12 +88,12 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="7" >
|
||||
<spacer name="horizontalSpacer_3" >
|
||||
<property name="orientation" >
|
||||
<item row="0" column="7">
|
||||
<spacer name="horizontalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>243</width>
|
||||
<height>20</height>
|
||||
|
|
@ -100,55 +101,55 @@
|
|||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="1" column="0" >
|
||||
<widget class="QLabel" name="label_5" >
|
||||
<property name="text" >
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string>none</string>
|
||||
</property>
|
||||
<property name="alignment" >
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2" >
|
||||
<widget class="QLabel" name="label_6" >
|
||||
<property name="text" >
|
||||
<item row="1" column="2">
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="text">
|
||||
<string>left</string>
|
||||
</property>
|
||||
<property name="alignment" >
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="4" >
|
||||
<widget class="QLabel" name="label_7" >
|
||||
<property name="text" >
|
||||
<item row="1" column="4">
|
||||
<widget class="QLabel" name="label_7">
|
||||
<property name="text">
|
||||
<string>center</string>
|
||||
</property>
|
||||
<property name="alignment" >
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="6" >
|
||||
<widget class="QLabel" name="label_8" >
|
||||
<property name="text" >
|
||||
<item row="1" column="6">
|
||||
<widget class="QLabel" name="label_8">
|
||||
<property name="text">
|
||||
<string>right</string>
|
||||
</property>
|
||||
<property name="alignment" >
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1" >
|
||||
<spacer name="horizontalSpacer" >
|
||||
<property name="orientation" >
|
||||
<item row="0" column="1">
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType" >
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
|
|
@ -156,15 +157,15 @@
|
|||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="0" column="3" >
|
||||
<spacer name="horizontalSpacer_4" >
|
||||
<property name="orientation" >
|
||||
<item row="0" column="3">
|
||||
<spacer name="horizontalSpacer_4">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType" >
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
|
|
@ -172,15 +173,15 @@
|
|||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="0" column="5" >
|
||||
<spacer name="horizontalSpacer_5" >
|
||||
<property name="orientation" >
|
||||
<item row="0" column="5">
|
||||
<spacer name="horizontalSpacer_5">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType" >
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
|
|
@ -192,21 +193,21 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_2" >
|
||||
<property name="title" >
|
||||
<widget class="QGroupBox" name="groupBox_2">
|
||||
<property name="title">
|
||||
<string>Vertical alignment</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2" >
|
||||
<item row="0" column="0" >
|
||||
<widget class="QRadioButton" name="v_none_rb" >
|
||||
<property name="text" >
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="0" column="0">
|
||||
<widget class="QRadioButton" name="v_none_rb">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon" >
|
||||
<iconset resource="layResources.qrc" >
|
||||
<property name="icon">
|
||||
<iconset resource="../../lay/lay/layResources.qrc">
|
||||
<normaloff>:/align_none.png</normaloff>:/align_none.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize" >
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>32</width>
|
||||
<height>32</height>
|
||||
|
|
@ -214,16 +215,16 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2" >
|
||||
<widget class="QRadioButton" name="v_top_rb" >
|
||||
<property name="text" >
|
||||
<item row="0" column="2">
|
||||
<widget class="QRadioButton" name="v_top_rb">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon" >
|
||||
<iconset resource="layResources.qrc" >
|
||||
<property name="icon">
|
||||
<iconset resource="../../lay/lay/layResources.qrc">
|
||||
<normaloff>:/align_top.png</normaloff>:/align_top.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize" >
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>32</width>
|
||||
<height>32</height>
|
||||
|
|
@ -231,16 +232,16 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="4" >
|
||||
<widget class="QRadioButton" name="v_center_rb" >
|
||||
<property name="text" >
|
||||
<item row="0" column="4">
|
||||
<widget class="QRadioButton" name="v_center_rb">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon" >
|
||||
<iconset resource="layResources.qrc" >
|
||||
<property name="icon">
|
||||
<iconset resource="../../lay/lay/layResources.qrc">
|
||||
<normaloff>:/align_vcenter.png</normaloff>:/align_vcenter.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize" >
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>32</width>
|
||||
<height>32</height>
|
||||
|
|
@ -248,12 +249,12 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="7" >
|
||||
<spacer name="horizontalSpacer_2" >
|
||||
<property name="orientation" >
|
||||
<item row="0" column="7">
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>243</width>
|
||||
<height>34</height>
|
||||
|
|
@ -261,56 +262,56 @@
|
|||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="1" column="0" >
|
||||
<widget class="QLabel" name="label" >
|
||||
<property name="text" >
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>none</string>
|
||||
</property>
|
||||
<property name="alignment" >
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2" >
|
||||
<widget class="QLabel" name="label_2" >
|
||||
<property name="text" >
|
||||
<item row="1" column="2">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>top</string>
|
||||
</property>
|
||||
<property name="alignment" >
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="4" >
|
||||
<widget class="QLabel" name="label_3" >
|
||||
<property name="text" >
|
||||
<item row="1" column="4">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>center</string>
|
||||
</property>
|
||||
<property name="alignment" >
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="6" >
|
||||
<widget class="QLabel" name="label_4" >
|
||||
<property name="text" >
|
||||
<item row="1" column="6">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>bottom</string>
|
||||
</property>
|
||||
<property name="alignment" >
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="6" >
|
||||
<widget class="QRadioButton" name="v_bottom_rb" >
|
||||
<property name="text" >
|
||||
<item row="0" column="6">
|
||||
<widget class="QRadioButton" name="v_bottom_rb">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon" >
|
||||
<iconset resource="layResources.qrc" >
|
||||
<property name="icon">
|
||||
<iconset resource="../../lay/lay/layResources.qrc">
|
||||
<normaloff>:/align_bottom.png</normaloff>:/align_bottom.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize" >
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>32</width>
|
||||
<height>32</height>
|
||||
|
|
@ -318,15 +319,15 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1" >
|
||||
<spacer name="horizontalSpacer_6" >
|
||||
<property name="orientation" >
|
||||
<item row="0" column="1">
|
||||
<spacer name="horizontalSpacer_6">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType" >
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
|
|
@ -334,15 +335,15 @@
|
|||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="0" column="3" >
|
||||
<spacer name="horizontalSpacer_7" >
|
||||
<property name="orientation" >
|
||||
<item row="0" column="3">
|
||||
<spacer name="horizontalSpacer_7">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType" >
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
|
|
@ -350,15 +351,15 @@
|
|||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="0" column="5" >
|
||||
<spacer name="horizontalSpacer_8" >
|
||||
<property name="orientation" >
|
||||
<item row="0" column="5">
|
||||
<spacer name="horizontalSpacer_8">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType" >
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
|
|
@ -370,21 +371,21 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_3" >
|
||||
<property name="title" >
|
||||
<widget class="QGroupBox" name="groupBox_3">
|
||||
<property name="title">
|
||||
<string>Layers for alignment of instances</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout" >
|
||||
<item row="1" column="0" >
|
||||
<widget class="QRadioButton" name="visible_layers_rb" >
|
||||
<property name="text" >
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="1" column="0">
|
||||
<widget class="QRadioButton" name="visible_layers_rb">
|
||||
<property name="text">
|
||||
<string>Use visible layers only</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0" >
|
||||
<widget class="QRadioButton" name="all_layers_rb" >
|
||||
<property name="text" >
|
||||
<item row="0" column="0">
|
||||
<widget class="QRadioButton" name="all_layers_rb">
|
||||
<property name="text">
|
||||
<string>Use all layers</string>
|
||||
</property>
|
||||
</widget>
|
||||
|
|
@ -393,11 +394,11 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer" >
|
||||
<property name="orientation" >
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>488</width>
|
||||
<height>16</height>
|
||||
|
|
@ -406,11 +407,11 @@
|
|||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QDialogButtonBox" name="buttonBox" >
|
||||
<property name="orientation" >
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="standardButtons" >
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||
</property>
|
||||
</widget>
|
||||
|
|
@ -431,7 +432,7 @@
|
|||
<tabstop>buttonBox</tabstop>
|
||||
</tabstops>
|
||||
<resources>
|
||||
<include location="layResources.qrc" />
|
||||
<include location="../../lay/lay/layResources.qrc"/>
|
||||
</resources>
|
||||
<connections>
|
||||
<connection>
|
||||
|
|
@ -440,11 +441,11 @@
|
|||
<receiver>AlignOptionsDialog</receiver>
|
||||
<slot>accept()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel" >
|
||||
<hint type="sourcelabel">
|
||||
<x>248</x>
|
||||
<y>254</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel" >
|
||||
<hint type="destinationlabel">
|
||||
<x>157</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
|
|
@ -456,11 +457,11 @@
|
|||
<receiver>AlignOptionsDialog</receiver>
|
||||
<slot>reject()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel" >
|
||||
<hint type="sourcelabel">
|
||||
<x>316</x>
|
||||
<y>260</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel" >
|
||||
<hint type="destinationlabel">
|
||||
<x>286</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,638 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>DistributeOptionsDialog</class>
|
||||
<widget class="QDialog" name="DistributeOptionsDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>716</width>
|
||||
<height>574</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Distribution Options</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="h_distribute">
|
||||
<property name="title">
|
||||
<string>Horizontal distribution</string>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
<item row="3" column="0" colspan="2">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string>Alignment</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="5">
|
||||
<widget class="QLabel" name="label_8">
|
||||
<property name="text">
|
||||
<string>right</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="4">
|
||||
<spacer name="horizontalSpacer_5">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="4" column="2">
|
||||
<spacer name="horizontalSpacer_4">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="5" column="3">
|
||||
<widget class="QLabel" name="label_7">
|
||||
<property name="text">
|
||||
<string>center</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="6">
|
||||
<spacer name="horizontalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>243</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="4" column="0" colspan="2">
|
||||
<widget class="QRadioButton" name="h_left_rb">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../../lay/lay/layResources.qrc">
|
||||
<normaloff>:/align_left.png</normaloff>:/align_left.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>32</width>
|
||||
<height>32</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="5">
|
||||
<widget class="QRadioButton" name="h_right_rb">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../../lay/lay/layResources.qrc">
|
||||
<normaloff>:/align_right.png</normaloff>:/align_right.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>32</width>
|
||||
<height>32</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" colspan="7">
|
||||
<widget class="Line" name="line">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="3">
|
||||
<widget class="QRadioButton" name="h_center_rb">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../../lay/lay/layResources.qrc">
|
||||
<normaloff>:/align_hcenter.png</normaloff>:/align_hcenter.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>32</width>
|
||||
<height>32</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="text">
|
||||
<string>left</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0" colspan="7">
|
||||
<widget class="QFrame" name="frame">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_10">
|
||||
<property name="text">
|
||||
<string>Pitch</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="h_pitch">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_12">
|
||||
<property name="text">
|
||||
<string>µm</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_9">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_11">
|
||||
<property name="text">
|
||||
<string>Space</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="h_space">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_13">
|
||||
<property name="text">
|
||||
<string>µm</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<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>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" colspan="7">
|
||||
<widget class="QLabel" name="label_9">
|
||||
<property name="text">
|
||||
<string>The pitch specifies the offset at which the objects are placed relative to each other. The space is the minimum distance between the objects.</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="v_distribute">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>200</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Vertical distribution</string>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="3" column="4">
|
||||
<spacer name="horizontalSpacer_8">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="3" column="2">
|
||||
<spacer name="horizontalSpacer_7">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>top</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="3">
|
||||
<widget class="QRadioButton" name="v_center_rb">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../../lay/lay/layResources.qrc">
|
||||
<normaloff>:/align_vcenter.png</normaloff>:/align_vcenter.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>32</width>
|
||||
<height>32</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="6">
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>243</width>
|
||||
<height>34</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="2" column="0" colspan="7">
|
||||
<widget class="Line" name="line_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0" colspan="7">
|
||||
<widget class="QFrame" name="frame_2">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_18">
|
||||
<property name="text">
|
||||
<string>Pitch</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="v_pitch">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_19">
|
||||
<property name="text">
|
||||
<string>µm</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_12">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_20">
|
||||
<property name="text">
|
||||
<string>Space</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="v_space">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_21">
|
||||
<property name="text">
|
||||
<string>µm</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_13">
|
||||
<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>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="3">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>center</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="5">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>bottom</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="5">
|
||||
<widget class="QRadioButton" name="v_bottom_rb">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../../lay/lay/layResources.qrc">
|
||||
<normaloff>:/align_bottom.png</normaloff>:/align_bottom.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>32</width>
|
||||
<height>32</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" colspan="7">
|
||||
<widget class="QLabel" name="label_22">
|
||||
<property name="text">
|
||||
<string>The pitch specifies the offset at which the objects are placed relative to each other. The space is the minimum distance between the objects.</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0" colspan="2">
|
||||
<widget class="QRadioButton" name="v_top_rb">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../../lay/lay/layResources.qrc">
|
||||
<normaloff>:/align_top.png</normaloff>:/align_top.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>32</width>
|
||||
<height>32</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_3">
|
||||
<property name="title">
|
||||
<string>Layers for distribution of instances</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="1" column="0">
|
||||
<widget class="QRadioButton" name="visible_layers_rb">
|
||||
<property name="text">
|
||||
<string>Use visible layers only</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QRadioButton" name="all_layers_rb">
|
||||
<property name="text">
|
||||
<string>Use all layers</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>488</width>
|
||||
<height>16</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<tabstops>
|
||||
<tabstop>all_layers_rb</tabstop>
|
||||
<tabstop>visible_layers_rb</tabstop>
|
||||
<tabstop>h_left_rb</tabstop>
|
||||
<tabstop>h_center_rb</tabstop>
|
||||
<tabstop>h_right_rb</tabstop>
|
||||
<tabstop>v_top_rb</tabstop>
|
||||
<tabstop>v_center_rb</tabstop>
|
||||
<tabstop>v_bottom_rb</tabstop>
|
||||
<tabstop>buttonBox</tabstop>
|
||||
</tabstops>
|
||||
<resources>
|
||||
<include location="../../lay/lay/layResources.qrc"/>
|
||||
</resources>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>accepted()</signal>
|
||||
<receiver>DistributeOptionsDialog</receiver>
|
||||
<slot>accept()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>248</x>
|
||||
<y>254</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>157</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>rejected()</signal>
|
||||
<receiver>DistributeOptionsDialog</receiver>
|
||||
<slot>reject()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>316</x>
|
||||
<y>260</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>286</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
||||
|
|
@ -42,7 +42,8 @@ FORMS = \
|
|||
PolygonPropertiesPage.ui \
|
||||
RoundCornerOptionsDialog.ui \
|
||||
TextPropertiesPage.ui \
|
||||
PCellParametersDialog.ui
|
||||
PCellParametersDialog.ui \
|
||||
DistributeOptionsDialog.ui
|
||||
|
||||
SOURCES = \
|
||||
edtConfig.cc \
|
||||
|
|
|
|||
|
|
@ -326,6 +326,93 @@ AlignOptionsDialog::exec_dialog (lay::LayoutView * /*view*/, int &hmode, int &vm
|
|||
}
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------------
|
||||
// DistributeOptionsDialog implementation
|
||||
|
||||
DistributeOptionsDialog::DistributeOptionsDialog (QWidget *parent)
|
||||
: QDialog (parent)
|
||||
{
|
||||
setObjectName (QString::fromUtf8 ("change_layer_options_dialog"));
|
||||
|
||||
Ui::DistributeOptionsDialog::setupUi (this);
|
||||
}
|
||||
|
||||
DistributeOptionsDialog::~DistributeOptionsDialog ()
|
||||
{
|
||||
// .. nothing yet ..
|
||||
}
|
||||
|
||||
bool
|
||||
DistributeOptionsDialog::exec_dialog (lay::LayoutView *view, bool &hdistribute, int &hmode, double &hpitch, double &hspace, bool &vdistribute, int &vmode, double &vpitch, double &vspace, bool &visible_layers)
|
||||
{
|
||||
QRadioButton *hmode_buttons [] = { (QRadioButton *) 0, this->h_left_rb, this->h_center_rb, this->h_right_rb };
|
||||
QRadioButton *vmode_buttons [] = { (QRadioButton *) 0, this->v_top_rb, this->v_center_rb, this->v_bottom_rb };
|
||||
QRadioButton *layers_buttons [] = { this->all_layers_rb, this->visible_layers_rb };
|
||||
|
||||
this->h_distribute->setChecked (hdistribute);
|
||||
for (int i = 1; i < 4; ++i) {
|
||||
hmode_buttons [i]->setChecked (hmode == i);
|
||||
}
|
||||
|
||||
this->h_space->setText (tl::to_qstring (tl::micron_to_string (hspace)));
|
||||
this->h_pitch->setText (tl::to_qstring (tl::micron_to_string (hpitch)));
|
||||
|
||||
this->v_distribute->setChecked (vdistribute);
|
||||
for (int i = 1; i < 4; ++i) {
|
||||
vmode_buttons [i]->setChecked (vmode == i);
|
||||
}
|
||||
|
||||
this->v_space->setText (tl::to_qstring (tl::micron_to_string (vspace)));
|
||||
this->v_pitch->setText (tl::to_qstring (tl::micron_to_string (vpitch)));
|
||||
|
||||
for (int i = 0; i < 2; ++i) {
|
||||
layers_buttons [i]->setChecked (int (visible_layers) == i);
|
||||
}
|
||||
|
||||
if (QDialog::exec ()) {
|
||||
|
||||
hdistribute = this->h_distribute->isChecked ();
|
||||
hmode = -1;
|
||||
for (int i = 1; i < 4; ++i) {
|
||||
if (hmode_buttons [i]->isChecked ()) {
|
||||
hmode = i;
|
||||
}
|
||||
}
|
||||
|
||||
hspace = 0.0;
|
||||
tl::from_string (tl::to_string (this->h_space->text ()), hspace);
|
||||
|
||||
hpitch = 0.0;
|
||||
tl::from_string (tl::to_string (this->h_pitch->text ()), hpitch);
|
||||
|
||||
vdistribute = this->v_distribute->isChecked ();
|
||||
vmode = -1;
|
||||
for (int i = 1; i < 4; ++i) {
|
||||
if (vmode_buttons [i]->isChecked ()) {
|
||||
vmode = i;
|
||||
}
|
||||
}
|
||||
|
||||
vspace = 0.0;
|
||||
tl::from_string (tl::to_string (this->v_space->text ()), vspace);
|
||||
|
||||
vpitch = 0.0;
|
||||
tl::from_string (tl::to_string (this->v_pitch->text ()), vpitch);
|
||||
|
||||
visible_layers = false;
|
||||
for (int i = 0; i < 2; ++i) {
|
||||
if (layers_buttons [i]->isChecked ()) {
|
||||
visible_layers = (i != 0);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------------
|
||||
// MakeCellOptionsDialog implementation
|
||||
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@
|
|||
#include "ui_InstantiationForm.h"
|
||||
#include "ui_ChangeLayerOptionsDialog.h"
|
||||
#include "ui_AlignOptionsDialog.h"
|
||||
#include "ui_DistributeOptionsDialog.h"
|
||||
#include "ui_CopyModeDialog.h"
|
||||
#include "ui_MakeCellOptionsDialog.h"
|
||||
#include "ui_MakeArrayOptionsDialog.h"
|
||||
|
|
@ -127,6 +128,22 @@ public:
|
|||
bool exec_dialog (lay::LayoutView *view, int &hmode, int &vmode, bool &visible_layers);
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Distribute function options dialog
|
||||
*/
|
||||
class DistributeOptionsDialog
|
||||
: public QDialog,
|
||||
public Ui::DistributeOptionsDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
DistributeOptionsDialog (QWidget *parent);
|
||||
virtual ~DistributeOptionsDialog ();
|
||||
|
||||
bool exec_dialog (lay::LayoutView *view, bool &hdistribute, int &hmode, double &hpitch, double &hspace, bool &vdistribute, int &vmode, double &vpitch, double &vspace, bool &visible_layers);
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Options dialog for the "make cell" function
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -64,12 +64,18 @@ MainService::MainService (db::Manager *manager, lay::LayoutView *view, lay::Disp
|
|||
m_flatten_insts_levels (std::numeric_limits<int>::max ()),
|
||||
m_flatten_prune (false),
|
||||
m_align_hmode (0), m_align_vmode (0), m_align_visible_layers (false),
|
||||
m_hdistribute (true),
|
||||
m_distribute_hmode (1), m_distribute_hpitch (0.0), m_distribute_hspace (0.0),
|
||||
m_vdistribute (true),
|
||||
m_distribute_vmode (1), m_distribute_vpitch (0.0), m_distribute_vspace (0.0),
|
||||
m_distribute_visible_layers (false),
|
||||
m_origin_mode_x (-1), m_origin_mode_y (-1), m_origin_visible_layers_for_bbox (false),
|
||||
m_array_a (0.0, 1.0), m_array_b (1.0, 0.0),
|
||||
m_array_na (1), m_array_nb (1),
|
||||
m_router (0.0), m_rinner (0.0), m_npoints (64), m_undo_before_apply (true),
|
||||
mp_round_corners_dialog (0),
|
||||
mp_align_options_dialog (0),
|
||||
mp_distribute_options_dialog (0),
|
||||
mp_flatten_inst_options_dialog (0),
|
||||
mp_make_cell_options_dialog (0),
|
||||
mp_make_array_options_dialog (0)
|
||||
|
|
@ -100,6 +106,15 @@ MainService::align_options_dialog ()
|
|||
return mp_align_options_dialog;
|
||||
}
|
||||
|
||||
edt::DistributeOptionsDialog *
|
||||
MainService::distribute_options_dialog ()
|
||||
{
|
||||
if (! mp_distribute_options_dialog) {
|
||||
mp_distribute_options_dialog = new edt::DistributeOptionsDialog (view ());
|
||||
}
|
||||
return mp_distribute_options_dialog;
|
||||
}
|
||||
|
||||
lay::FlattenInstOptionsDialog *
|
||||
MainService::flatten_inst_options_dialog ()
|
||||
{
|
||||
|
|
@ -138,6 +153,8 @@ MainService::menu_activated (const std::string &symbol)
|
|||
cm_edit_options ();
|
||||
} else if (symbol == "edt::sel_align") {
|
||||
cm_align ();
|
||||
} else if (symbol == "edt::sel_distribute") {
|
||||
cm_distribute ();
|
||||
} else if (symbol == "edt::sel_tap") {
|
||||
cm_tap ();
|
||||
} else if (symbol == "edt::sel_round_corners") {
|
||||
|
|
@ -1841,7 +1858,99 @@ MainService::cm_align ()
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
void
|
||||
MainService::cm_distribute ()
|
||||
{
|
||||
tl_assert (view ()->is_editable ());
|
||||
check_no_guiding_shapes ();
|
||||
|
||||
std::vector<edt::Service *> edt_services = view ()->get_plugins <edt::Service> ();
|
||||
|
||||
if (! distribute_options_dialog ()->exec_dialog (view (), m_hdistribute, m_distribute_hmode, m_distribute_hpitch, m_distribute_hspace,
|
||||
m_vdistribute, m_distribute_vmode, m_distribute_vpitch, m_distribute_vspace,
|
||||
m_align_visible_layers)) {
|
||||
return;
|
||||
}
|
||||
|
||||
db::DBox prim_box;
|
||||
bool has_secondary = false;
|
||||
|
||||
// get (common) bbox index of the primary selection
|
||||
for (std::vector<edt::Service *>::const_iterator es = edt_services.begin (); es != edt_services.end (); ++es) {
|
||||
for (edt::Service::obj_iterator s = (*es)->selection ().begin (); s != (*es)->selection ().end (); ++s) {
|
||||
|
||||
if (s->seq () == 0) {
|
||||
|
||||
const db::Layout &layout = view ()->cellview (s->cv_index ())->layout ();
|
||||
db::CplxTrans tr = db::CplxTrans (layout.dbu ()) * s->trans ();
|
||||
|
||||
if (! s->is_cell_inst ()) {
|
||||
prim_box += tr * s->shape ().bbox ();
|
||||
} else {
|
||||
prim_box += inst_bbox (tr, view (), s->cv_index (), s->back (), m_distribute_visible_layers);
|
||||
}
|
||||
|
||||
} else {
|
||||
has_secondary = true;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if (! prim_box.empty ()) {
|
||||
|
||||
view ()->cancel_edits ();
|
||||
manager ()->transaction (tl::to_string (QObject::tr ("Alignment")));
|
||||
|
||||
|
||||
|
||||
// do the alignment
|
||||
for (std::vector<edt::Service *>::const_iterator es = edt_services.begin (); es != edt_services.end (); ++es) {
|
||||
|
||||
// create a transformation vector that describes each shape's transformation
|
||||
std::vector <db::DCplxTrans> tv;
|
||||
tv.reserve ((*es)->selection ().size ());
|
||||
|
||||
for (edt::Service::obj_iterator s = (*es)->selection ().begin (); s != (*es)->selection ().end (); ++s) {
|
||||
|
||||
db::DVector v;
|
||||
|
||||
// @@@
|
||||
if (s->seq () > 0 || !has_secondary) {
|
||||
|
||||
db::Layout &layout = view ()->cellview (s->cv_index ())->layout ();
|
||||
db::CplxTrans tr = db::CplxTrans (layout.dbu ()) * s->trans ();
|
||||
|
||||
if (! s->is_cell_inst ()) {
|
||||
|
||||
db::DBox box = tr * s->shape ().bbox ();
|
||||
v = compute_alignment_vector (prim_box, box, m_distribute_hmode, m_distribute_vmode);
|
||||
|
||||
} else {
|
||||
|
||||
db::DBox box = inst_bbox (tr, view (), s->cv_index (), s->back (), m_distribute_visible_layers);
|
||||
v = compute_alignment_vector (prim_box, box, m_distribute_hmode, m_distribute_vmode);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
// @@@
|
||||
|
||||
tv.push_back (db::DCplxTrans (db::DTrans (v)));
|
||||
|
||||
}
|
||||
|
||||
// use the "transform" method to transform the shapes and instances (with individual transformations)
|
||||
(*es)->transform (db::DCplxTrans () /*dummy*/, &tv);
|
||||
|
||||
}
|
||||
|
||||
manager ()->commit ();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
MainService::cm_make_array ()
|
||||
{
|
||||
size_t n = 0;
|
||||
|
|
@ -2010,129 +2119,6 @@ MainService::cm_tap ()
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief An iterator for the selected objects of all edt services in a layout view
|
||||
*/
|
||||
class EDT_PUBLIC SelectionIterator
|
||||
{
|
||||
public:
|
||||
typedef lay::ObjectInstPath value_type;
|
||||
typedef const lay::ObjectInstPath &reference;
|
||||
typedef const lay::ObjectInstPath *pointer;
|
||||
|
||||
/**
|
||||
* @brief Creates a new iterator iterating over all selected edt objects from the given view
|
||||
*
|
||||
* If "including_transient" is true, the transient selection will be used as fallback.
|
||||
*/
|
||||
SelectionIterator (lay::LayoutView *view, bool including_transient = true)
|
||||
: m_transient_mode (false)
|
||||
{
|
||||
mp_edt_services = view->get_plugins <edt::Service> ();
|
||||
|
||||
m_current_service = mp_edt_services.begin ();
|
||||
if (m_current_service != mp_edt_services.end ()) {
|
||||
m_current_object = (*m_current_service)->selection ().begin ();
|
||||
}
|
||||
|
||||
next ();
|
||||
|
||||
if (at_end () && including_transient) {
|
||||
|
||||
m_transient_mode = true;
|
||||
|
||||
m_current_service = mp_edt_services.begin ();
|
||||
if (m_current_service != mp_edt_services.end ()) {
|
||||
m_current_object = (*m_current_service)->transient_selection ().begin ();
|
||||
}
|
||||
|
||||
next ();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Returns a value indicating whether the transient selection is taken
|
||||
*/
|
||||
bool is_transient () const
|
||||
{
|
||||
return m_transient_mode;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Increments the iterator
|
||||
*/
|
||||
void operator++ ()
|
||||
{
|
||||
inc ();
|
||||
next ();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Dereferencing
|
||||
*/
|
||||
const lay::ObjectInstPath &operator* () const
|
||||
{
|
||||
tl_assert (! at_end ());
|
||||
return *m_current_object;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Arrow operator
|
||||
*/
|
||||
const lay::ObjectInstPath *operator-> () const
|
||||
{
|
||||
return & operator* ();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Returns a value indicating whether the iterator has finished
|
||||
*/
|
||||
bool at_end () const
|
||||
{
|
||||
return m_current_service == mp_edt_services.end ();
|
||||
}
|
||||
|
||||
private:
|
||||
void inc ()
|
||||
{
|
||||
tl_assert (! at_end ());
|
||||
++m_current_object;
|
||||
}
|
||||
|
||||
void next ()
|
||||
{
|
||||
if (at_end ()) {
|
||||
return;
|
||||
}
|
||||
|
||||
const edt::Service::objects *sel = m_transient_mode ? &(*m_current_service)->transient_selection () : &(*m_current_service)->selection ();
|
||||
|
||||
while (m_current_object == sel->end ()) {
|
||||
|
||||
++m_current_service;
|
||||
|
||||
if (m_current_service != mp_edt_services.end ()) {
|
||||
|
||||
sel = m_transient_mode ? &(*m_current_service)->transient_selection () : &(*m_current_service)->selection ();
|
||||
m_current_object = sel->begin ();
|
||||
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
std::vector<edt::Service *> mp_edt_services;
|
||||
std::vector<edt::Service *>::const_iterator m_current_service;
|
||||
edt::Service::obj_iterator m_current_object;
|
||||
bool m_transient_mode;
|
||||
};
|
||||
|
||||
|
||||
void
|
||||
MainService::cm_change_layer ()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -51,6 +51,7 @@ class RoundCornerOptionsDialog;
|
|||
class MakeCellOptionsDialog;
|
||||
class MakeArrayOptionsDialog;
|
||||
class AlignOptionsDialog;
|
||||
class DistributeOptionsDialog;
|
||||
|
||||
// -------------------------------------------------------------
|
||||
|
||||
|
|
@ -153,6 +154,11 @@ public:
|
|||
*/
|
||||
void cm_align ();
|
||||
|
||||
/**
|
||||
* @brief Distribute the selected shapes and instances
|
||||
*/
|
||||
void cm_distribute ();
|
||||
|
||||
/**
|
||||
* @brief Flatten instances
|
||||
*/
|
||||
|
|
@ -205,6 +211,13 @@ private:
|
|||
int m_align_hmode;
|
||||
int m_align_vmode;
|
||||
bool m_align_visible_layers;
|
||||
bool m_hdistribute;
|
||||
int m_distribute_hmode;
|
||||
double m_distribute_hpitch, m_distribute_hspace;
|
||||
bool m_vdistribute;
|
||||
int m_distribute_vmode;
|
||||
double m_distribute_vpitch, m_distribute_vspace;
|
||||
bool m_distribute_visible_layers;
|
||||
std::string m_make_cell_name;
|
||||
int m_origin_mode_x, m_origin_mode_y;
|
||||
bool m_origin_visible_layers_for_bbox;
|
||||
|
|
@ -215,6 +228,7 @@ private:
|
|||
bool m_undo_before_apply;
|
||||
edt::RoundCornerOptionsDialog *mp_round_corners_dialog;
|
||||
edt::AlignOptionsDialog *mp_align_options_dialog;
|
||||
edt::DistributeOptionsDialog *mp_distribute_options_dialog;
|
||||
lay::FlattenInstOptionsDialog *mp_flatten_inst_options_dialog;
|
||||
edt::MakeCellOptionsDialog *mp_make_cell_options_dialog;
|
||||
edt::MakeArrayOptionsDialog *mp_make_array_options_dialog;
|
||||
|
|
@ -223,6 +237,7 @@ private:
|
|||
void check_no_guiding_shapes ();
|
||||
edt::RoundCornerOptionsDialog *round_corners_dialog ();
|
||||
edt::AlignOptionsDialog *align_options_dialog ();
|
||||
edt::DistributeOptionsDialog *distribute_options_dialog ();
|
||||
lay::FlattenInstOptionsDialog *flatten_inst_options_dialog ();
|
||||
edt::MakeCellOptionsDialog *make_cell_options_dialog ();
|
||||
edt::MakeArrayOptionsDialog *make_array_options_dialog ();
|
||||
|
|
|
|||
|
|
@ -225,6 +225,7 @@ public:
|
|||
menu_entries.push_back (lay::menu_item ("edt::sel_change_layer", "change_layer:edit_mode", "edit_menu.selection_menu.end", tl::to_string (QObject::tr ("Change Layer"))));
|
||||
menu_entries.push_back (lay::menu_item ("edt::sel_tap", "tap:edit_mode", "edit_menu.selection_menu.end", tl::to_string (QObject::tr ("Tap")) + "(T)"));
|
||||
menu_entries.push_back (lay::menu_item ("edt::sel_align", "align:edit_mode", "edit_menu.selection_menu.end", tl::to_string (QObject::tr ("Align"))));
|
||||
menu_entries.push_back (lay::menu_item ("edt::sel_distribute", "distribute:edit_mode", "edit_menu.selection_menu.end", tl::to_string (QObject::tr ("Distribute"))));
|
||||
menu_entries.push_back (lay::menu_item ("edt::sel_round_corners", "round_corners:edit_mode", "edit_menu.selection_menu.end", tl::to_string (QObject::tr ("Round Corners"))));
|
||||
menu_entries.push_back (lay::menu_item ("edt::sel_size", "size:edit_mode", "edit_menu.selection_menu.end", tl::to_string (QObject::tr ("Size Shapes"))));
|
||||
menu_entries.push_back (lay::menu_item ("edt::sel_union", "union:edit_mode", "edit_menu.selection_menu.end", tl::to_string (QObject::tr ("Merge Shapes"))));
|
||||
|
|
|
|||
|
|
@ -26,12 +26,82 @@
|
|||
#include "dbLibrary.h"
|
||||
|
||||
#include "edtUtils.h"
|
||||
#include "edtService.h"
|
||||
|
||||
#include "layCellView.h"
|
||||
#include "layLayoutView.h"
|
||||
#include "layEditable.h"
|
||||
#include "tlException.h"
|
||||
|
||||
namespace edt {
|
||||
|
||||
// -------------------------------------------------------------
|
||||
// SelectionIterator implementation
|
||||
|
||||
SelectionIterator::SelectionIterator (lay::LayoutView *view, bool including_transient)
|
||||
: m_transient_mode (false)
|
||||
{
|
||||
mp_edt_services = view->get_plugins <edt::Service> ();
|
||||
|
||||
m_current_service = mp_edt_services.begin ();
|
||||
if (m_current_service != mp_edt_services.end ()) {
|
||||
m_current_object = (*m_current_service)->selection ().begin ();
|
||||
}
|
||||
|
||||
next ();
|
||||
|
||||
if (at_end () && including_transient) {
|
||||
|
||||
m_transient_mode = true;
|
||||
|
||||
m_current_service = mp_edt_services.begin ();
|
||||
if (m_current_service != mp_edt_services.end ()) {
|
||||
m_current_object = (*m_current_service)->transient_selection ().begin ();
|
||||
}
|
||||
|
||||
next ();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
bool
|
||||
SelectionIterator::at_end () const
|
||||
{
|
||||
return m_current_service == mp_edt_services.end ();
|
||||
}
|
||||
|
||||
void
|
||||
SelectionIterator::inc ()
|
||||
{
|
||||
tl_assert (! at_end ());
|
||||
++m_current_object;
|
||||
}
|
||||
|
||||
void
|
||||
SelectionIterator::next ()
|
||||
{
|
||||
if (at_end ()) {
|
||||
return;
|
||||
}
|
||||
|
||||
const edt::Service::objects *sel = m_transient_mode ? &(*m_current_service)->transient_selection () : &(*m_current_service)->selection ();
|
||||
|
||||
while (m_current_object == sel->end ()) {
|
||||
|
||||
++m_current_service;
|
||||
|
||||
if (m_current_service != mp_edt_services.end ()) {
|
||||
|
||||
sel = m_transient_mode ? &(*m_current_service)->transient_selection () : &(*m_current_service)->selection ();
|
||||
m_current_object = sel->begin ();
|
||||
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------
|
||||
// TransformationsVariants implementation
|
||||
// for a lay::LayoutView
|
||||
|
|
|
|||
|
|
@ -27,9 +27,12 @@
|
|||
#include <limits>
|
||||
#include <list>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
#include "layObjectInstPath.h"
|
||||
|
||||
#include "dbInstElement.h"
|
||||
#include "dbClipboardData.h"
|
||||
#include "dbClipboard.h"
|
||||
|
|
@ -42,6 +45,8 @@ namespace lay
|
|||
|
||||
namespace edt {
|
||||
|
||||
class Service;
|
||||
|
||||
/**
|
||||
* @brief Fetch PCell parameters from a cell and merge the guiding shapes into them
|
||||
*
|
||||
|
|
@ -79,6 +84,73 @@ private:
|
|||
std::map < std::pair<unsigned int, unsigned int>, std::vector<db::DCplxTrans> > m_per_cv_and_layer_tv;
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief An iterator for the selected objects of all edt services in a layout view
|
||||
*/
|
||||
class SelectionIterator
|
||||
{
|
||||
public:
|
||||
typedef lay::ObjectInstPath value_type;
|
||||
typedef const lay::ObjectInstPath &reference;
|
||||
typedef const lay::ObjectInstPath *pointer;
|
||||
|
||||
/**
|
||||
* @brief Creates a new iterator iterating over all selected edt objects from the given view
|
||||
*
|
||||
* If "including_transient" is true, the transient selection will be used as fallback.
|
||||
*/
|
||||
SelectionIterator (lay::LayoutView *view, bool including_transient = true);
|
||||
|
||||
/**
|
||||
* @brief Returns a value indicating whether the transient selection is taken
|
||||
*/
|
||||
bool is_transient () const
|
||||
{
|
||||
return m_transient_mode;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Increments the iterator
|
||||
*/
|
||||
void operator++ ()
|
||||
{
|
||||
inc ();
|
||||
next ();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Dereferencing
|
||||
*/
|
||||
const lay::ObjectInstPath &operator* () const
|
||||
{
|
||||
tl_assert (! at_end ());
|
||||
return *m_current_object;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Arrow operator
|
||||
*/
|
||||
const lay::ObjectInstPath *operator-> () const
|
||||
{
|
||||
return & operator* ();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Returns a value indicating whether the iterator has finished
|
||||
*/
|
||||
bool at_end () const;
|
||||
|
||||
private:
|
||||
void inc ();
|
||||
void next ();
|
||||
|
||||
private:
|
||||
std::vector<edt::Service *> mp_edt_services;
|
||||
std::vector<edt::Service *>::const_iterator m_current_service;
|
||||
std::set<lay::ObjectInstPath>::const_iterator m_current_object;
|
||||
bool m_transient_mode;
|
||||
};
|
||||
|
||||
} // namespace edt
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in New Issue