mirror of https://github.com/KLayout/klayout.git
WIP: enhanced annotations - ellipses, text alignment etc. Some things aren't working yet!
This commit is contained in:
parent
61ef30f9ad
commit
9398b5373a
|
|
@ -1,3 +1,4 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<ui version="4.0">
|
<ui version="4.0">
|
||||||
<class>RulerConfigPage</class>
|
<class>RulerConfigPage</class>
|
||||||
<widget class="QFrame" name="RulerConfigPage">
|
<widget class="QFrame" name="RulerConfigPage">
|
||||||
|
|
@ -13,19 +14,37 @@
|
||||||
<string>Settings</string>
|
<string>Settings</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout">
|
<layout class="QVBoxLayout">
|
||||||
<property name="margin" >
|
|
||||||
<number>9</number>
|
|
||||||
</property>
|
|
||||||
<property name="spacing">
|
<property name="spacing">
|
||||||
<number>6</number>
|
<number>6</number>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="leftMargin">
|
||||||
|
<number>9</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>9</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>9</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
|
<number>9</number>
|
||||||
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QGroupBox" name="groupBox">
|
<widget class="QGroupBox" name="groupBox">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>Snapping</string>
|
<string>Snapping</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout">
|
<layout class="QGridLayout">
|
||||||
<property name="margin" >
|
<property name="leftMargin">
|
||||||
|
<number>9</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>9</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>9</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
<number>9</number>
|
<number>9</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="spacing">
|
<property name="spacing">
|
||||||
|
|
@ -54,9 +73,7 @@
|
||||||
<item row="3" column="0">
|
<item row="3" column="0">
|
||||||
<widget class="QFrame" name="frame">
|
<widget class="QFrame" name="frame">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy>
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
<hsizetype>5</hsizetype>
|
|
||||||
<vsizetype>5</vsizetype>
|
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
|
|
@ -65,12 +82,21 @@
|
||||||
<enum>QFrame::Raised</enum>
|
<enum>QFrame::Raised</enum>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QHBoxLayout">
|
<layout class="QHBoxLayout">
|
||||||
<property name="margin" >
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="spacing">
|
<property name="spacing">
|
||||||
<number>6</number>
|
<number>6</number>
|
||||||
</property>
|
</property>
|
||||||
|
<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>
|
<item>
|
||||||
<widget class="QLabel" name="textLabel1_2">
|
<widget class="QLabel" name="textLabel1_2">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
|
|
@ -81,9 +107,7 @@
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLineEdit" name="ruler_snap_range_edit">
|
<widget class="QLineEdit" name="ruler_snap_range_edit">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy>
|
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||||
<hsizetype>5</hsizetype>
|
|
||||||
<vsizetype>0</vsizetype>
|
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
|
|
@ -102,9 +126,7 @@
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="textLabel2">
|
<widget class="QLabel" name="textLabel2">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy>
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
<hsizetype>5</hsizetype>
|
|
||||||
<vsizetype>5</vsizetype>
|
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
|
|
@ -122,7 +144,7 @@
|
||||||
<property name="sizeType">
|
<property name="sizeType">
|
||||||
<enum>QSizePolicy::Expanding</enum>
|
<enum>QSizePolicy::Expanding</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizeHint" >
|
<property name="sizeHint" stdset="0">
|
||||||
<size>
|
<size>
|
||||||
<width>111</width>
|
<width>111</width>
|
||||||
<height>21</height>
|
<height>21</height>
|
||||||
|
|
@ -141,7 +163,7 @@
|
||||||
<property name="sizeType">
|
<property name="sizeType">
|
||||||
<enum>QSizePolicy::Fixed</enum>
|
<enum>QSizePolicy::Fixed</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizeHint" >
|
<property name="sizeHint" stdset="0">
|
||||||
<size>
|
<size>
|
||||||
<width>597</width>
|
<width>597</width>
|
||||||
<height>10</height>
|
<height>10</height>
|
||||||
|
|
@ -155,8 +177,6 @@
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<layoutdefault spacing="6" margin="11"/>
|
<layoutdefault spacing="6" margin="11"/>
|
||||||
<resources>
|
<resources/>
|
||||||
<include location="layResources.qrc" />
|
|
||||||
</resources>
|
|
||||||
<connections/>
|
<connections/>
|
||||||
</ui>
|
</ui>
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<ui version="4.0">
|
<ui version="4.0">
|
||||||
<class>RulerConfigPage2</class>
|
<class>RulerConfigPage2</class>
|
||||||
<widget class="QFrame" name="RulerConfigPage2">
|
<widget class="QFrame" name="RulerConfigPage2">
|
||||||
|
|
@ -13,19 +14,37 @@
|
||||||
<string>Settings</string>
|
<string>Settings</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout">
|
<layout class="QVBoxLayout">
|
||||||
<property name="margin" >
|
|
||||||
<number>9</number>
|
|
||||||
</property>
|
|
||||||
<property name="spacing">
|
<property name="spacing">
|
||||||
<number>6</number>
|
<number>6</number>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="leftMargin">
|
||||||
|
<number>9</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>9</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>9</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
|
<number>9</number>
|
||||||
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QGroupBox" name="groupBox">
|
<widget class="QGroupBox" name="groupBox">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>Appearance</string>
|
<string>Appearance</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout">
|
<layout class="QGridLayout">
|
||||||
<property name="margin" >
|
<property name="leftMargin">
|
||||||
|
<number>9</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>9</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>9</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
<number>9</number>
|
<number>9</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="spacing">
|
<property name="spacing">
|
||||||
|
|
@ -34,9 +53,7 @@
|
||||||
<item row="0" column="1">
|
<item row="0" column="1">
|
||||||
<widget class="QFrame" name="frame_2">
|
<widget class="QFrame" name="frame_2">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy>
|
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||||
<hsizetype>7</hsizetype>
|
|
||||||
<vsizetype>5</vsizetype>
|
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
|
|
@ -48,12 +65,21 @@
|
||||||
<enum>QFrame::Raised</enum>
|
<enum>QFrame::Raised</enum>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QHBoxLayout">
|
<layout class="QHBoxLayout">
|
||||||
<property name="margin" >
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="spacing">
|
<property name="spacing">
|
||||||
<number>6</number>
|
<number>6</number>
|
||||||
</property>
|
</property>
|
||||||
|
<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>
|
<item>
|
||||||
<widget class="lay::ColorButton" name="ruler_color_pb">
|
<widget class="lay::ColorButton" name="ruler_color_pb">
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
|
|
@ -72,7 +98,7 @@
|
||||||
<property name="sizeType">
|
<property name="sizeType">
|
||||||
<enum>QSizePolicy::Fixed</enum>
|
<enum>QSizePolicy::Fixed</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizeHint" >
|
<property name="sizeHint" stdset="0">
|
||||||
<size>
|
<size>
|
||||||
<width>16</width>
|
<width>16</width>
|
||||||
<height>21</height>
|
<height>21</height>
|
||||||
|
|
@ -83,9 +109,7 @@
|
||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="halo_cb">
|
<widget class="QCheckBox" name="halo_cb">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy>
|
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||||
<hsizetype>7</hsizetype>
|
|
||||||
<vsizetype>0</vsizetype>
|
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
|
|
@ -101,9 +125,7 @@
|
||||||
<item row="1" column="1">
|
<item row="1" column="1">
|
||||||
<widget class="QFrame" name="frame">
|
<widget class="QFrame" name="frame">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy>
|
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||||
<hsizetype>7</hsizetype>
|
|
||||||
<vsizetype>5</vsizetype>
|
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
|
|
@ -115,18 +137,25 @@
|
||||||
<enum>QFrame::Raised</enum>
|
<enum>QFrame::Raised</enum>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QHBoxLayout">
|
<layout class="QHBoxLayout">
|
||||||
<property name="margin" >
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="spacing">
|
<property name="spacing">
|
||||||
<number>6</number>
|
<number>6</number>
|
||||||
</property>
|
</property>
|
||||||
|
<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>
|
<item>
|
||||||
<widget class="QLineEdit" name="num_rulers_edit">
|
<widget class="QLineEdit" name="num_rulers_edit">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy>
|
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||||
<hsizetype>5</hsizetype>
|
|
||||||
<vsizetype>0</vsizetype>
|
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
|
|
@ -184,8 +213,6 @@
|
||||||
<tabstop>halo_cb</tabstop>
|
<tabstop>halo_cb</tabstop>
|
||||||
<tabstop>num_rulers_edit</tabstop>
|
<tabstop>num_rulers_edit</tabstop>
|
||||||
</tabstops>
|
</tabstops>
|
||||||
<resources>
|
<resources/>
|
||||||
<include location="layResources.qrc" />
|
|
||||||
</resources>
|
|
||||||
<connections/>
|
<connections/>
|
||||||
</ui>
|
</ui>
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<ui version="4.0">
|
<ui version="4.0">
|
||||||
<class>RulerConfigPage3</class>
|
<class>RulerConfigPage3</class>
|
||||||
<widget class="QFrame" name="RulerConfigPage3">
|
<widget class="QFrame" name="RulerConfigPage3">
|
||||||
|
|
@ -13,18 +14,25 @@
|
||||||
<string>Settings</string>
|
<string>Settings</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout">
|
<layout class="QVBoxLayout">
|
||||||
<property name="margin" >
|
|
||||||
<number>9</number>
|
|
||||||
</property>
|
|
||||||
<property name="spacing">
|
<property name="spacing">
|
||||||
<number>6</number>
|
<number>6</number>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="leftMargin">
|
||||||
|
<number>9</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>9</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>9</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
|
<number>9</number>
|
||||||
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QGroupBox" name="buttonGroup2">
|
<widget class="QGroupBox" name="buttonGroup2">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy>
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
<hsizetype>5</hsizetype>
|
|
||||||
<vsizetype>5</vsizetype>
|
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
|
|
@ -33,7 +41,16 @@
|
||||||
<string> Angle constraint (unless disabled in template)</string>
|
<string> Angle constraint (unless disabled in template)</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout">
|
<layout class="QGridLayout">
|
||||||
<property name="margin" >
|
<property name="leftMargin">
|
||||||
|
<number>9</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>9</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>9</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
<number>9</number>
|
<number>9</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="spacing">
|
<property name="spacing">
|
||||||
|
|
@ -42,7 +59,7 @@
|
||||||
<item row="0" column="2">
|
<item row="0" column="2">
|
||||||
<widget class="QRadioButton" name="ruler_hor_rb">
|
<widget class="QRadioButton" name="ruler_hor_rb">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Horizontal only</string>
|
<string>Hori&zontal only</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
|
@ -87,8 +104,6 @@
|
||||||
<tabstop>ruler_hor_rb</tabstop>
|
<tabstop>ruler_hor_rb</tabstop>
|
||||||
<tabstop>ruler_vert_rb</tabstop>
|
<tabstop>ruler_vert_rb</tabstop>
|
||||||
</tabstops>
|
</tabstops>
|
||||||
<resources>
|
<resources/>
|
||||||
<include location="layResources.qrc" />
|
|
||||||
</resources>
|
|
||||||
<connections/>
|
<connections/>
|
||||||
</ui>
|
</ui>
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<ui version="4.0">
|
<ui version="4.0">
|
||||||
<class>RulerConfigPage4</class>
|
<class>RulerConfigPage4</class>
|
||||||
<widget class="QFrame" name="RulerConfigPage4">
|
<widget class="QFrame" name="RulerConfigPage4">
|
||||||
|
|
@ -13,18 +14,25 @@
|
||||||
<string>Settings</string>
|
<string>Settings</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout">
|
<layout class="QVBoxLayout">
|
||||||
<property name="margin" >
|
|
||||||
<number>9</number>
|
|
||||||
</property>
|
|
||||||
<property name="spacing">
|
<property name="spacing">
|
||||||
<number>6</number>
|
<number>6</number>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="leftMargin">
|
||||||
|
<number>9</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>9</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>9</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
|
<number>9</number>
|
||||||
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QGroupBox" name="groupBox">
|
<widget class="QGroupBox" name="groupBox">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy>
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
<hsizetype>5</hsizetype>
|
|
||||||
<vsizetype>5</vsizetype>
|
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
|
|
@ -33,12 +41,21 @@
|
||||||
<string>Ruler / annotation templates</string>
|
<string>Ruler / annotation templates</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QHBoxLayout">
|
<layout class="QHBoxLayout">
|
||||||
<property name="margin" >
|
|
||||||
<number>9</number>
|
|
||||||
</property>
|
|
||||||
<property name="spacing">
|
<property name="spacing">
|
||||||
<number>16</number>
|
<number>16</number>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="leftMargin">
|
||||||
|
<number>9</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>9</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>9</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
|
<number>9</number>
|
||||||
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QFrame" name="frame_3">
|
<widget class="QFrame" name="frame_3">
|
||||||
<property name="frameShape">
|
<property name="frameShape">
|
||||||
|
|
@ -48,7 +65,16 @@
|
||||||
<enum>QFrame::Raised</enum>
|
<enum>QFrame::Raised</enum>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout">
|
<layout class="QGridLayout">
|
||||||
<property name="margin" >
|
<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>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="spacing">
|
<property name="spacing">
|
||||||
|
|
@ -63,7 +89,8 @@
|
||||||
<string>...</string>
|
<string>...</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="layResources.qrc" >:/up.png</iconset>
|
<iconset resource="../lay/layResources.qrc">
|
||||||
|
<normaloff>:/up.png</normaloff>:/up.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
|
@ -76,7 +103,8 @@
|
||||||
<string>...</string>
|
<string>...</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="layResources.qrc" >:/add.png</iconset>
|
<iconset resource="../lay/layResources.qrc">
|
||||||
|
<normaloff>:/add.png</normaloff>:/add.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
|
@ -89,7 +117,8 @@
|
||||||
<string>...</string>
|
<string>...</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="layResources.qrc" >:/del.png</iconset>
|
<iconset resource="../lay/layResources.qrc">
|
||||||
|
<normaloff>:/del.png</normaloff>:/del.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
|
@ -102,7 +131,8 @@
|
||||||
<string>...</string>
|
<string>...</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="layResources.qrc" >:/down.png</iconset>
|
<iconset resource="../lay/layResources.qrc">
|
||||||
|
<normaloff>:/down.png</normaloff>:/down.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
|
@ -119,9 +149,7 @@
|
||||||
<item row="0" column="0" colspan="4">
|
<item row="0" column="0" colspan="4">
|
||||||
<widget class="QListWidget" name="template_list">
|
<widget class="QListWidget" name="template_list">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy>
|
<sizepolicy hsizetype="Expanding" vsizetype="Ignored">
|
||||||
<hsizetype>7</hsizetype>
|
|
||||||
<vsizetype>13</vsizetype>
|
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>1</verstretch>
|
<verstretch>1</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
|
|
@ -149,7 +177,16 @@
|
||||||
<enum>QFrame::Raised</enum>
|
<enum>QFrame::Raised</enum>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout">
|
<layout class="QGridLayout">
|
||||||
<property name="margin" >
|
<property name="leftMargin">
|
||||||
|
<number>9</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>9</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>9</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
<number>9</number>
|
<number>9</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="spacing">
|
<property name="spacing">
|
||||||
|
|
@ -337,7 +374,7 @@
|
||||||
<item row="7" column="0" colspan="2">
|
<item row="7" column="0" colspan="2">
|
||||||
<widget class="QLabel" name="help_label">
|
<widget class="QLabel" name="help_label">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string><html>(See <a href="int:/manual/ruler_properties.xml">here</a> for a description of the properties)</html></string>
|
<string><html>(See <a href="int:/manual/ruler_properties.xml">here</a> for a description of the properties)</html></string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
|
@ -365,7 +402,7 @@
|
||||||
<tabstop>t_snap_cbx</tabstop>
|
<tabstop>t_snap_cbx</tabstop>
|
||||||
</tabstops>
|
</tabstops>
|
||||||
<resources>
|
<resources>
|
||||||
<include location="layResources.qrc" />
|
<include location="../lay/layResources.qrc"/>
|
||||||
</resources>
|
</resources>
|
||||||
<connections/>
|
<connections/>
|
||||||
</ui>
|
</ui>
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<ui version="4.0">
|
<ui version="4.0">
|
||||||
<class>RulerPropertiesPage</class>
|
<class>RulerPropertiesPage</class>
|
||||||
<widget class="QWidget" name="RulerPropertiesPage">
|
<widget class="QWidget" name="RulerPropertiesPage">
|
||||||
|
|
@ -5,20 +6,29 @@
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>525</width>
|
<width>622</width>
|
||||||
<height>414</height>
|
<height>502</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>Form</string>
|
<string>Form</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout">
|
<layout class="QVBoxLayout">
|
||||||
<property name="margin" >
|
|
||||||
<number>9</number>
|
|
||||||
</property>
|
|
||||||
<property name="spacing">
|
<property name="spacing">
|
||||||
<number>6</number>
|
<number>6</number>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="leftMargin">
|
||||||
|
<number>9</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>9</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>9</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
|
<number>9</number>
|
||||||
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QFrame" name="frame">
|
<widget class="QFrame" name="frame">
|
||||||
<property name="frameShape">
|
<property name="frameShape">
|
||||||
|
|
@ -28,25 +38,82 @@
|
||||||
<enum>QFrame::Raised</enum>
|
<enum>QFrame::Raised</enum>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout">
|
<layout class="QGridLayout">
|
||||||
<property name="margin" >
|
<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>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="spacing">
|
<property name="spacing">
|
||||||
<number>6</number>
|
<number>6</number>
|
||||||
</property>
|
</property>
|
||||||
<item row="11" column="1" >
|
<item row="3" column="0" colspan="5">
|
||||||
<widget class="QLabel" name="label_9" >
|
<spacer name="verticalSpacer">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>5</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item row="6" column="0" colspan="5">
|
||||||
|
<spacer name="verticalSpacer_2">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>5</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item row="15" column="2">
|
||||||
|
<widget class="QLineEdit" name="x2">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||||
|
<horstretch>1</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="15" column="1">
|
||||||
|
<widget class="QLabel" name="label_6">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>x = </string>
|
<string>x = </string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="11" column="4" >
|
<item row="11" column="0" colspan="2">
|
||||||
<widget class="QLineEdit" name="dy" >
|
<widget class="QLabel" name="label_17">
|
||||||
|
<property name="text">
|
||||||
|
<string>Outline</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="12" column="2" colspan="3">
|
||||||
|
<widget class="QLabel" name="help_label">
|
||||||
|
<property name="text">
|
||||||
|
<string><html>(See <a href="int:/manual/ruler_properties.xml">here</a> for a description of the properties)</html></string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="17" column="2">
|
||||||
|
<widget class="QLineEdit" name="dx">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy>
|
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||||
<hsizetype>7</hsizetype>
|
|
||||||
<vsizetype>0</vsizetype>
|
|
||||||
<horstretch>1</horstretch>
|
<horstretch>1</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
|
|
@ -57,120 +124,34 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="0" colspan="2">
|
<item row="4" column="0" colspan="2">
|
||||||
<widget class="QLabel" name="label_16" >
|
|
||||||
<property name="text" >
|
|
||||||
<string>Style</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="0" colspan="5" >
|
|
||||||
<widget class="QLabel" name="label_12" >
|
|
||||||
<property name="sizePolicy" >
|
|
||||||
<sizepolicy>
|
|
||||||
<hsizetype>5</hsizetype>
|
|
||||||
<vsizetype>0</vsizetype>
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="font" >
|
|
||||||
<font>
|
|
||||||
<family>Sans Serif</family>
|
|
||||||
<pointsize>12</pointsize>
|
|
||||||
<weight>75</weight>
|
|
||||||
<italic>false</italic>
|
|
||||||
<bold>true</bold>
|
|
||||||
<underline>false</underline>
|
|
||||||
<strikeout>false</strikeout>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text" >
|
|
||||||
<string>Ruler Properties</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="2" colspan="3" >
|
|
||||||
<widget class="QLineEdit" name="fmt_y_le" />
|
|
||||||
</item>
|
|
||||||
<item row="5" column="0" colspan="2" >
|
|
||||||
<widget class="QLabel" name="label_17" >
|
|
||||||
<property name="text" >
|
|
||||||
<string>Outline</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="9" column="3" >
|
|
||||||
<widget class="QLabel" name="label_8" >
|
|
||||||
<property name="text" >
|
|
||||||
<string>y = </string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="8" column="2" >
|
|
||||||
<widget class="QLineEdit" name="x1" >
|
|
||||||
<property name="sizePolicy" >
|
|
||||||
<sizepolicy>
|
|
||||||
<hsizetype>7</hsizetype>
|
|
||||||
<vsizetype>0</vsizetype>
|
|
||||||
<horstretch>1</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="0" colspan="2" >
|
|
||||||
<widget class="QLabel" name="label_14">
|
<widget class="QLabel" name="label_14">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>X label format</string>
|
<string>X label format</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="8" column="4" >
|
<item row="14" column="3">
|
||||||
<widget class="QLineEdit" name="y1" >
|
<widget class="QLabel" name="label_7">
|
||||||
<property name="sizePolicy" >
|
|
||||||
<sizepolicy>
|
|
||||||
<hsizetype>7</hsizetype>
|
|
||||||
<vsizetype>0</vsizetype>
|
|
||||||
<horstretch>1</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="8" column="1" >
|
|
||||||
<widget class="QLabel" name="label_5" >
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>x = </string>
|
<string>y = </string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="12" column="1" >
|
<item row="15" column="3">
|
||||||
|
<widget class="QLabel" name="label_8">
|
||||||
|
<property name="text">
|
||||||
|
<string>y = </string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="18" column="1">
|
||||||
<widget class="QLabel" name="label_11">
|
<widget class="QLabel" name="label_11">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>d = </string>
|
<string>d = </string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0" colspan="2" >
|
<item row="10" column="2" colspan="3">
|
||||||
<widget class="QLabel" name="label_13" >
|
|
||||||
<property name="text" >
|
|
||||||
<string>Label format</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="9" column="2" >
|
|
||||||
<widget class="QLineEdit" name="x2" >
|
|
||||||
<property name="sizePolicy" >
|
|
||||||
<sizepolicy>
|
|
||||||
<hsizetype>7</hsizetype>
|
|
||||||
<vsizetype>0</vsizetype>
|
|
||||||
<horstretch>1</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="4" column="2" colspan="3" >
|
|
||||||
<widget class="QComboBox" name="style_cb">
|
<widget class="QComboBox" name="style_cb">
|
||||||
<item>
|
<item>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
|
|
@ -197,63 +178,405 @@
|
||||||
<string>Plain line</string>
|
<string>Plain line</string>
|
||||||
</property>
|
</property>
|
||||||
</item>
|
</item>
|
||||||
</widget>
|
<item>
|
||||||
</item>
|
|
||||||
<item row="7" column="0" colspan="5" >
|
|
||||||
<spacer>
|
|
||||||
<property name="orientation" >
|
|
||||||
<enum>Qt::Vertical</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeType" >
|
|
||||||
<enum>QSizePolicy::Fixed</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" >
|
|
||||||
<size>
|
|
||||||
<width>456</width>
|
|
||||||
<height>16</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item row="11" column="3" >
|
|
||||||
<widget class="QLabel" name="label_10" >
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>y = </string>
|
<string>Cross at end</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
|
||||||
</item>
|
</item>
|
||||||
<item row="8" column="3" >
|
<item>
|
||||||
<widget class="QLabel" name="label_7" >
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>y = </string>
|
<string>Cross at start</string>
|
||||||
</property>
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Cross at both ends</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="12" column="0" >
|
<item row="18" column="0">
|
||||||
<widget class="QLabel" name="label_4">
|
<widget class="QLabel" name="label_4">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Length</string>
|
<string>Length</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="2" column="2" colspan="3">
|
||||||
|
<widget class="QFrame" name="frame_2">
|
||||||
|
<property name="frameShape">
|
||||||
|
<enum>QFrame::NoFrame</enum>
|
||||||
|
</property>
|
||||||
|
<property name="frameShadow">
|
||||||
|
<enum>QFrame::Raised</enum>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
|
<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 row="1" column="4">
|
||||||
|
<widget class="QComboBox" name="main_xalign">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Auto</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>H. center</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Left</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Right</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="2">
|
||||||
|
<spacer name="horizontalSpacer">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="3">
|
||||||
|
<widget class="QLabel" name="label_20">
|
||||||
|
<property name="text">
|
||||||
|
<string>H</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="6">
|
||||||
|
<widget class="QComboBox" name="main_yalign">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Auto</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>V. center</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Bottom</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Top</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<widget class="QComboBox" name="main_position">
|
||||||
|
<property name="sizeAdjustPolicy">
|
||||||
|
<enum>QComboBox::AdjustToContentsOnFirstShow</enum>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Auto</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>At first point</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>At second point</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>At center</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QLabel" name="label_19">
|
||||||
|
<property name="text">
|
||||||
|
<string>P</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="5">
|
||||||
|
<widget class="QLabel" name="label_21">
|
||||||
|
<property name="text">
|
||||||
|
<string>V</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="18" column="2">
|
||||||
|
<widget class="QLineEdit" name="dd">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||||
|
<horstretch>1</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="readOnly">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="16" column="0" colspan="5">
|
||||||
|
<widget class="Line" name="line">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="15" column="4">
|
||||||
|
<widget class="QLineEdit" name="y2">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||||
|
<horstretch>1</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="2" colspan="3">
|
||||||
|
<widget class="QLineEdit" name="fmt_x_le"/>
|
||||||
|
</item>
|
||||||
|
<item row="17" column="1">
|
||||||
|
<widget class="QLabel" name="label_9">
|
||||||
|
<property name="text">
|
||||||
|
<string>x = </string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="17" column="4">
|
||||||
|
<widget class="QLineEdit" name="dy">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||||
|
<horstretch>1</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="readOnly">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="14" column="2">
|
||||||
|
<widget class="QLineEdit" name="x1">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||||
|
<horstretch>1</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item row="1" column="2" colspan="3">
|
<item row="1" column="2" colspan="3">
|
||||||
<widget class="QLineEdit" name="fmt_le"/>
|
<widget class="QLineEdit" name="fmt_le"/>
|
||||||
</item>
|
</item>
|
||||||
<item row="11" column="0" >
|
<item row="17" column="3">
|
||||||
|
<widget class="QLabel" name="label_10">
|
||||||
|
<property name="text">
|
||||||
|
<string>y = </string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="5" column="0">
|
||||||
|
<widget class="QLabel" name="label_25">
|
||||||
|
<property name="text">
|
||||||
|
<string> ... position</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="5" column="2" colspan="3">
|
||||||
|
<widget class="QFrame" name="frame_3">
|
||||||
|
<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>
|
||||||
|
<spacer name="horizontalSpacer_2">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>223</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_22">
|
||||||
|
<property name="text">
|
||||||
|
<string>H</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QComboBox" name="xlabel_xalign">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Auto</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>H. center</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Left</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Right</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_23">
|
||||||
|
<property name="text">
|
||||||
|
<string>V</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QComboBox" name="xlabel_yalign">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Auto</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>V. center</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Bottom</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Top</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="14" column="1">
|
||||||
|
<widget class="QLabel" name="label_5">
|
||||||
|
<property name="text">
|
||||||
|
<string>x = </string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="0" colspan="5">
|
||||||
|
<widget class="QLabel" name="label_12">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Sans Serif</family>
|
||||||
|
<pointsize>12</pointsize>
|
||||||
|
<weight>75</weight>
|
||||||
|
<italic>false</italic>
|
||||||
|
<bold>true</bold>
|
||||||
|
<underline>false</underline>
|
||||||
|
<strikeout>false</strikeout>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Ruler Properties</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="17" column="0">
|
||||||
<widget class="QLabel" name="label_3">
|
<widget class="QLabel" name="label_3">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Delta (x/y)</string>
|
<string>Delta (x/y)</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="8" column="0" >
|
<item row="11" column="2" colspan="3">
|
||||||
<widget class="QLabel" name="label" >
|
|
||||||
<property name="text" >
|
|
||||||
<string>First point (x/y)</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="5" column="2" colspan="3" >
|
|
||||||
<widget class="QComboBox" name="outline_cb">
|
<widget class="QComboBox" name="outline_cb">
|
||||||
<item>
|
<item>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
|
|
@ -285,86 +608,213 @@
|
||||||
<string>Box</string>
|
<string>Box</string>
|
||||||
</property>
|
</property>
|
||||||
</item>
|
</item>
|
||||||
</widget>
|
<item>
|
||||||
</item>
|
|
||||||
<item row="3" column="0" colspan="2" >
|
|
||||||
<widget class="QLabel" name="label_15" >
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Y label format</string>
|
<string>Ellipse</string>
|
||||||
</property>
|
</property>
|
||||||
|
</item>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="2" colspan="3" >
|
<item row="15" column="0">
|
||||||
<widget class="QLineEdit" name="fmt_x_le" />
|
|
||||||
</item>
|
|
||||||
<item row="11" column="2" >
|
|
||||||
<widget class="QLineEdit" name="dx" >
|
|
||||||
<property name="sizePolicy" >
|
|
||||||
<sizepolicy>
|
|
||||||
<hsizetype>7</hsizetype>
|
|
||||||
<vsizetype>0</vsizetype>
|
|
||||||
<horstretch>1</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="readOnly" >
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="9" column="0" >
|
|
||||||
<widget class="QLabel" name="label_2">
|
<widget class="QLabel" name="label_2">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Second point (x/y) </string>
|
<string>Second point (x/y) </string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="12" column="2" >
|
<item row="1" column="0">
|
||||||
<widget class="QLineEdit" name="dd" >
|
<widget class="QLabel" name="label_13">
|
||||||
|
<property name="text">
|
||||||
|
<string>Label format</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="14" column="0">
|
||||||
|
<widget class="QLabel" name="label">
|
||||||
|
<property name="text">
|
||||||
|
<string>First point (x/y)</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="13" column="0" colspan="5">
|
||||||
|
<spacer>
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeType">
|
||||||
|
<enum>QSizePolicy::Fixed</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>456</width>
|
||||||
|
<height>16</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item row="8" column="0">
|
||||||
|
<widget class="QLabel" name="label_26">
|
||||||
|
<property name="text">
|
||||||
|
<string> ... position</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="14" column="4">
|
||||||
|
<widget class="QLineEdit" name="y1">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy>
|
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||||
<hsizetype>7</hsizetype>
|
|
||||||
<vsizetype>0</vsizetype>
|
|
||||||
<horstretch>1</horstretch>
|
<horstretch>1</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="readOnly" >
|
</widget>
|
||||||
<bool>true</bool>
|
</item>
|
||||||
|
<item row="10" column="0" colspan="2">
|
||||||
|
<widget class="QLabel" name="label_16">
|
||||||
|
<property name="text">
|
||||||
|
<string>Style</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="10" column="0" colspan="5" >
|
<item row="7" column="2" colspan="3">
|
||||||
<widget class="Line" name="line" >
|
<widget class="QLineEdit" name="fmt_y_le"/>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QLabel" name="label_18">
|
||||||
|
<property name="text">
|
||||||
|
<string> ... position</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="7" column="0" colspan="2">
|
||||||
|
<widget class="QLabel" name="label_15">
|
||||||
|
<property name="text">
|
||||||
|
<string>Y label format</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="9" column="0" colspan="5">
|
||||||
|
<spacer name="verticalSpacer_3">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>5</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item row="8" column="2" colspan="3">
|
||||||
|
<widget class="QFrame" name="frame_4">
|
||||||
|
<property name="frameShape">
|
||||||
|
<enum>QFrame::NoFrame</enum>
|
||||||
|
</property>
|
||||||
|
<property name="frameShadow">
|
||||||
|
<enum>QFrame::Raised</enum>
|
||||||
|
</property>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||||
|
<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>
|
||||||
|
<spacer name="horizontalSpacer_3">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Horizontal</enum>
|
<enum>Qt::Horizontal</enum>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>223</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_28">
|
||||||
|
<property name="text">
|
||||||
|
<string>H</string>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="9" column="4" >
|
<item>
|
||||||
<widget class="QLineEdit" name="y2" >
|
<widget class="QComboBox" name="ylabel_xalign">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy>
|
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||||
<hsizetype>7</hsizetype>
|
<horstretch>0</horstretch>
|
||||||
<vsizetype>0</vsizetype>
|
|
||||||
<horstretch>1</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Auto</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>H. center</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Left</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Right</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="9" column="1" >
|
<item>
|
||||||
<widget class="QLabel" name="label_6" >
|
<widget class="QLabel" name="label_27">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>x = </string>
|
<string>V</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="6" column="2" colspan="3" >
|
<item>
|
||||||
<widget class="QLabel" name="help_label" >
|
<widget class="QComboBox" name="ylabel_yalign">
|
||||||
<property name="text" >
|
<property name="sizePolicy">
|
||||||
<string><html>(See <a href="int:/manual/ruler_properties.xml">here</a> for a description of the properties)</html></string>
|
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Auto</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>V. center</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Bottom</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Top</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
|
|
@ -375,7 +825,7 @@
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Vertical</enum>
|
<enum>Qt::Vertical</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizeHint" >
|
<property name="sizeHint" stdset="0">
|
||||||
<size>
|
<size>
|
||||||
<width>20</width>
|
<width>20</width>
|
||||||
<height>0</height>
|
<height>0</height>
|
||||||
|
|
@ -386,7 +836,6 @@
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<tabstops>
|
<tabstops>
|
||||||
<tabstop>fmt_le</tabstop>
|
|
||||||
<tabstop>fmt_x_le</tabstop>
|
<tabstop>fmt_x_le</tabstop>
|
||||||
<tabstop>fmt_y_le</tabstop>
|
<tabstop>fmt_y_le</tabstop>
|
||||||
<tabstop>style_cb</tabstop>
|
<tabstop>style_cb</tabstop>
|
||||||
|
|
|
||||||
|
|
@ -81,6 +81,12 @@ StyleConverter::to_string (ant::Object::style_type s)
|
||||||
return "arrow_start";
|
return "arrow_start";
|
||||||
} else if (s == ant::Object::STY_arrow_both) {
|
} else if (s == ant::Object::STY_arrow_both) {
|
||||||
return "arrow_both";
|
return "arrow_both";
|
||||||
|
} else if (s == ant::Object::STY_cross_start) {
|
||||||
|
return "cross_start";
|
||||||
|
} else if (s == ant::Object::STY_cross_end) {
|
||||||
|
return "cross_end";
|
||||||
|
} else if (s == ant::Object::STY_cross_both) {
|
||||||
|
return "cross_both";
|
||||||
} else if (s == ant::Object::STY_line) {
|
} else if (s == ant::Object::STY_line) {
|
||||||
return "line";
|
return "line";
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -100,6 +106,12 @@ StyleConverter::from_string (const std::string &tt, ant::Object::style_type &s)
|
||||||
s = ant::Object::STY_arrow_start;
|
s = ant::Object::STY_arrow_start;
|
||||||
} else if (t == "arrow_both") {
|
} else if (t == "arrow_both") {
|
||||||
s = ant::Object::STY_arrow_both;
|
s = ant::Object::STY_arrow_both;
|
||||||
|
} else if (t == "cross_start") {
|
||||||
|
s = ant::Object::STY_cross_start;
|
||||||
|
} else if (t == "cross_end") {
|
||||||
|
s = ant::Object::STY_cross_end;
|
||||||
|
} else if (t == "cross_both") {
|
||||||
|
s = ant::Object::STY_cross_both;
|
||||||
} else if (t == "line") {
|
} else if (t == "line") {
|
||||||
s = ant::Object::STY_line;
|
s = ant::Object::STY_line;
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -122,6 +134,8 @@ OutlineConverter::to_string (ant::Object::outline_type o)
|
||||||
return "diag_yx";
|
return "diag_yx";
|
||||||
} else if (o == ant::Object::OL_box) {
|
} else if (o == ant::Object::OL_box) {
|
||||||
return "box";
|
return "box";
|
||||||
|
} else if (o == ant::Object::OL_ellipse) {
|
||||||
|
return "ellipse";
|
||||||
} else {
|
} else {
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
@ -143,11 +157,79 @@ OutlineConverter::from_string (const std::string &s, ant::Object::outline_type &
|
||||||
o = ant::Object::OL_diag_yx;
|
o = ant::Object::OL_diag_yx;
|
||||||
} else if (t == "box") {
|
} else if (t == "box") {
|
||||||
o = ant::Object::OL_box;
|
o = ant::Object::OL_box;
|
||||||
|
} else if (t == "ellipse") {
|
||||||
|
o = ant::Object::OL_ellipse;
|
||||||
} else {
|
} else {
|
||||||
o = ant::Object::OL_diag;
|
o = ant::Object::OL_diag;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string
|
||||||
|
PositionConverter::to_string (ant::Object::position_type p)
|
||||||
|
{
|
||||||
|
if (p == ant::Object::POS_auto) {
|
||||||
|
return "auto";
|
||||||
|
} else if (p == ant::Object::POS_p1) {
|
||||||
|
return "p1";
|
||||||
|
} else if (p == ant::Object::POS_p2) {
|
||||||
|
return "p2";
|
||||||
|
} else if (p == ant::Object::POS_center) {
|
||||||
|
return "center";
|
||||||
|
} else {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
PositionConverter::from_string (const std::string &s, ant::Object::position_type &p)
|
||||||
|
{
|
||||||
|
std::string t (tl::trim (s));
|
||||||
|
if (t == "auto") {
|
||||||
|
p = ant::Object::POS_auto;
|
||||||
|
} else if (t == "p1") {
|
||||||
|
p = ant::Object::POS_p1;
|
||||||
|
} else if (t == "p2") {
|
||||||
|
p = ant::Object::POS_p2;
|
||||||
|
} else if (t == "center") {
|
||||||
|
p = ant::Object::POS_center;
|
||||||
|
} else {
|
||||||
|
p = ant::Object::POS_auto;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string
|
||||||
|
AlignmentConverter::to_string (ant::Object::alignment_type a)
|
||||||
|
{
|
||||||
|
if (a == ant::Object::AL_auto) {
|
||||||
|
return "auto";
|
||||||
|
} else if (a == ant::Object::AL_center) {
|
||||||
|
return "center";
|
||||||
|
} else if (a == ant::Object::AL_down) {
|
||||||
|
return "down";
|
||||||
|
} else if (a == ant::Object::AL_up) {
|
||||||
|
return "up";
|
||||||
|
} else {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
AlignmentConverter::from_string (const std::string &s, ant::Object::alignment_type &a)
|
||||||
|
{
|
||||||
|
std::string t (tl::trim (s));
|
||||||
|
if (t == "auto") {
|
||||||
|
a = ant::Object::AL_auto;
|
||||||
|
} else if (t == "center") {
|
||||||
|
a = ant::Object::AL_center;
|
||||||
|
} else if (t == "down") {
|
||||||
|
a = ant::Object::AL_down;
|
||||||
|
} else if (t == "up") {
|
||||||
|
a = ant::Object::AL_up;
|
||||||
|
} else {
|
||||||
|
a = ant::Object::AL_auto;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
std::string
|
std::string
|
||||||
TemplatesConverter::to_string (const std::vector <ant::Template> &t)
|
TemplatesConverter::to_string (const std::vector <ant::Template> &t)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -69,6 +69,18 @@ struct OutlineConverter
|
||||||
void from_string (const std::string &s, ant::Object::outline_type &outline);
|
void from_string (const std::string &s, ant::Object::outline_type &outline);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct PositionConverter
|
||||||
|
{
|
||||||
|
std::string to_string (ant::Object::position_type p);
|
||||||
|
void from_string (const std::string &s, ant::Object::position_type &pos);
|
||||||
|
};
|
||||||
|
|
||||||
|
struct AlignmentConverter
|
||||||
|
{
|
||||||
|
std::string to_string (ant::Object::alignment_type a);
|
||||||
|
void from_string (const std::string &s, ant::Object::alignment_type &a);
|
||||||
|
};
|
||||||
|
|
||||||
struct TemplatesConverter
|
struct TemplatesConverter
|
||||||
{
|
{
|
||||||
std::string to_string (const std::vector <ant::Template> &t);
|
std::string to_string (const std::vector <ant::Template> &t);
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,11 @@ Object::Object ()
|
||||||
: m_p1 (), m_p2 (), m_id (-1),
|
: m_p1 (), m_p2 (), m_id (-1),
|
||||||
m_fmt_x ("$X"), m_fmt_y ("$Y"), m_fmt ("$D"),
|
m_fmt_x ("$X"), m_fmt_y ("$Y"), m_fmt ("$D"),
|
||||||
m_style (STY_ruler), m_outline (OL_diag),
|
m_style (STY_ruler), m_outline (OL_diag),
|
||||||
m_snap (true), m_angle_constraint (lay::AC_Global)
|
m_snap (true), m_angle_constraint (lay::AC_Global),
|
||||||
|
m_main_position (POS_auto),
|
||||||
|
m_main_xalign (AL_auto), m_main_yalign (AL_auto),
|
||||||
|
m_xlabel_xalign (AL_auto), m_xlabel_yalign (AL_auto),
|
||||||
|
m_ylabel_xalign (AL_auto), m_ylabel_yalign (AL_auto)
|
||||||
{
|
{
|
||||||
// .. nothing yet ..
|
// .. nothing yet ..
|
||||||
}
|
}
|
||||||
|
|
@ -45,7 +49,11 @@ Object::Object (const db::DPoint &p1, const db::DPoint &p2, int id, const std::s
|
||||||
: m_p1 (p1), m_p2 (p2), m_id (id),
|
: m_p1 (p1), m_p2 (p2), m_id (id),
|
||||||
m_fmt_x (fmt_x), m_fmt_y (fmt_y), m_fmt (fmt),
|
m_fmt_x (fmt_x), m_fmt_y (fmt_y), m_fmt (fmt),
|
||||||
m_style (style), m_outline (outline),
|
m_style (style), m_outline (outline),
|
||||||
m_snap (snap), m_angle_constraint (angle_constraint)
|
m_snap (snap), m_angle_constraint (angle_constraint),
|
||||||
|
m_main_position (POS_auto),
|
||||||
|
m_main_xalign (AL_auto), m_main_yalign (AL_auto),
|
||||||
|
m_xlabel_xalign (AL_auto), m_xlabel_yalign (AL_auto),
|
||||||
|
m_ylabel_xalign (AL_auto), m_ylabel_yalign (AL_auto)
|
||||||
{
|
{
|
||||||
// .. nothing else ..
|
// .. nothing else ..
|
||||||
}
|
}
|
||||||
|
|
@ -54,7 +62,12 @@ Object::Object (const db::DPoint &p1, const db::DPoint &p2, int id, const ant::T
|
||||||
: m_p1 (p1), m_p2 (p2), m_id (id),
|
: m_p1 (p1), m_p2 (p2), m_id (id),
|
||||||
m_fmt_x (t.fmt_x ()), m_fmt_y (t.fmt_y ()), m_fmt (t.fmt ()),
|
m_fmt_x (t.fmt_x ()), m_fmt_y (t.fmt_y ()), m_fmt (t.fmt ()),
|
||||||
m_style (t.style ()), m_outline (t.outline ()),
|
m_style (t.style ()), m_outline (t.outline ()),
|
||||||
m_snap (t.snap ()), m_angle_constraint (t.angle_constraint ())
|
m_snap (t.snap ()), m_angle_constraint (t.angle_constraint ()),
|
||||||
|
// TODO: make this part of the template
|
||||||
|
m_main_position (POS_auto),
|
||||||
|
m_main_xalign (AL_auto), m_main_yalign (AL_auto),
|
||||||
|
m_xlabel_xalign (AL_auto), m_xlabel_yalign (AL_auto),
|
||||||
|
m_ylabel_xalign (AL_auto), m_ylabel_yalign (AL_auto)
|
||||||
{
|
{
|
||||||
// .. nothing else ..
|
// .. nothing else ..
|
||||||
}
|
}
|
||||||
|
|
@ -63,7 +76,12 @@ Object::Object (const ant::Object &d)
|
||||||
: m_p1 (d.m_p1), m_p2 (d.m_p2), m_id (d.m_id),
|
: m_p1 (d.m_p1), m_p2 (d.m_p2), m_id (d.m_id),
|
||||||
m_fmt_x (d.m_fmt_x), m_fmt_y (d.m_fmt_y), m_fmt (d.m_fmt),
|
m_fmt_x (d.m_fmt_x), m_fmt_y (d.m_fmt_y), m_fmt (d.m_fmt),
|
||||||
m_style (d.m_style), m_outline (d.m_outline),
|
m_style (d.m_style), m_outline (d.m_outline),
|
||||||
m_snap (d.m_snap), m_angle_constraint (d.m_angle_constraint)
|
m_snap (d.m_snap), m_angle_constraint (d.m_angle_constraint),
|
||||||
|
m_category (d.m_category),
|
||||||
|
m_main_position (d.m_main_position),
|
||||||
|
m_main_xalign (d.m_main_xalign), m_main_yalign (d.m_main_yalign),
|
||||||
|
m_xlabel_xalign (d.m_xlabel_xalign), m_xlabel_yalign (d.m_xlabel_yalign),
|
||||||
|
m_ylabel_xalign (d.m_ylabel_xalign), m_ylabel_yalign (d.m_ylabel_yalign)
|
||||||
{
|
{
|
||||||
// .. nothing else ..
|
// .. nothing else ..
|
||||||
}
|
}
|
||||||
|
|
@ -82,6 +100,14 @@ Object::operator= (const ant::Object &d)
|
||||||
m_outline = d.m_outline;
|
m_outline = d.m_outline;
|
||||||
m_snap = d.m_snap;
|
m_snap = d.m_snap;
|
||||||
m_angle_constraint = d.m_angle_constraint;
|
m_angle_constraint = d.m_angle_constraint;
|
||||||
|
m_category = d.m_category;
|
||||||
|
m_main_position = d.m_main_position;
|
||||||
|
m_main_xalign = d.m_main_xalign;
|
||||||
|
m_main_yalign = d.m_main_yalign;
|
||||||
|
m_xlabel_xalign = d.m_xlabel_xalign;
|
||||||
|
m_xlabel_yalign = d.m_xlabel_yalign;
|
||||||
|
m_ylabel_xalign = d.m_ylabel_xalign;
|
||||||
|
m_ylabel_yalign = d.m_ylabel_yalign;
|
||||||
property_changed ();
|
property_changed ();
|
||||||
}
|
}
|
||||||
return *this;
|
return *this;
|
||||||
|
|
@ -120,6 +146,30 @@ Object::operator< (const ant::Object &b) const
|
||||||
if (m_angle_constraint != b.m_angle_constraint) {
|
if (m_angle_constraint != b.m_angle_constraint) {
|
||||||
return m_angle_constraint < b.m_angle_constraint;
|
return m_angle_constraint < b.m_angle_constraint;
|
||||||
}
|
}
|
||||||
|
if (m_category != b.m_category) {
|
||||||
|
return m_category < b.m_category;
|
||||||
|
}
|
||||||
|
if (m_main_position != b.m_main_position) {
|
||||||
|
return m_main_position < b.m_main_position;
|
||||||
|
}
|
||||||
|
if (m_main_xalign != b.m_main_xalign) {
|
||||||
|
return m_main_xalign < b.m_main_xalign;
|
||||||
|
}
|
||||||
|
if (m_main_yalign != b.m_main_yalign) {
|
||||||
|
return m_main_yalign < b.m_main_yalign;
|
||||||
|
}
|
||||||
|
if (m_xlabel_xalign != b.m_xlabel_xalign) {
|
||||||
|
return m_xlabel_xalign < b.m_xlabel_xalign;
|
||||||
|
}
|
||||||
|
if (m_xlabel_yalign != b.m_xlabel_yalign) {
|
||||||
|
return m_xlabel_yalign < b.m_xlabel_yalign;
|
||||||
|
}
|
||||||
|
if (m_ylabel_xalign != b.m_ylabel_xalign) {
|
||||||
|
return m_ylabel_xalign < b.m_ylabel_xalign;
|
||||||
|
}
|
||||||
|
if (m_ylabel_yalign != b.m_ylabel_yalign) {
|
||||||
|
return m_ylabel_yalign < b.m_ylabel_yalign;
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -140,46 +190,23 @@ Object::operator== (const ant::Object &d) const
|
||||||
return m_p1 == d.m_p1 && m_p2 == d.m_p2 && m_id == d.m_id &&
|
return m_p1 == d.m_p1 && m_p2 == d.m_p2 && m_id == d.m_id &&
|
||||||
m_fmt_x == d.m_fmt_x && m_fmt_y == d.m_fmt_y && m_fmt == d.m_fmt &&
|
m_fmt_x == d.m_fmt_x && m_fmt_y == d.m_fmt_y && m_fmt == d.m_fmt &&
|
||||||
m_style == d.m_style && m_outline == d.m_outline &&
|
m_style == d.m_style && m_outline == d.m_outline &&
|
||||||
m_snap == d.m_snap && m_angle_constraint == d.m_angle_constraint;
|
m_snap == d.m_snap && m_angle_constraint == d.m_angle_constraint &&
|
||||||
|
m_main_position == d.m_main_position &&
|
||||||
|
m_main_xalign == d.m_main_xalign && m_main_yalign == d.m_main_yalign &&
|
||||||
|
m_xlabel_xalign == d.m_xlabel_xalign && m_xlabel_yalign == d.m_xlabel_yalign &&
|
||||||
|
m_ylabel_xalign == d.m_ylabel_xalign && m_ylabel_yalign == d.m_ylabel_yalign
|
||||||
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
Object::less (const db::DUserObjectBase *d) const
|
Object::less (const db::DUserObjectBase *d) const
|
||||||
{
|
{
|
||||||
const ant::Object *ruler = dynamic_cast<const ant::Object *> (d);
|
const ant::Object *ruler = dynamic_cast<const ant::Object *> (d);
|
||||||
tl_assert (ruler != 0);
|
if (ruler) {
|
||||||
|
return *this < *ruler;
|
||||||
if (m_id != ruler->m_id) {
|
} else {
|
||||||
return m_id < ruler->m_id;
|
return class_id () < d->class_id ();
|
||||||
}
|
}
|
||||||
if (m_p1 != ruler->m_p1) {
|
|
||||||
return m_p1 < ruler->m_p1;
|
|
||||||
}
|
|
||||||
if (m_p2 != ruler->m_p2) {
|
|
||||||
return m_p2 < ruler->m_p2;
|
|
||||||
}
|
|
||||||
if (m_fmt_x != ruler->m_fmt_x) {
|
|
||||||
return m_fmt_x < ruler->m_fmt_x;
|
|
||||||
}
|
|
||||||
if (m_fmt_y != ruler->m_fmt_y) {
|
|
||||||
return m_fmt_y < ruler->m_fmt_y;
|
|
||||||
}
|
|
||||||
if (m_fmt != ruler->m_fmt) {
|
|
||||||
return m_fmt < ruler->m_fmt;
|
|
||||||
}
|
|
||||||
if (m_style != ruler->m_style) {
|
|
||||||
return m_style < ruler->m_style;
|
|
||||||
}
|
|
||||||
if (m_outline != ruler->m_outline) {
|
|
||||||
return m_outline < ruler->m_outline;
|
|
||||||
}
|
|
||||||
if (m_snap != ruler->m_snap) {
|
|
||||||
return m_snap < ruler->m_snap;
|
|
||||||
}
|
|
||||||
if (m_angle_constraint != ruler->m_angle_constraint) {
|
|
||||||
return m_angle_constraint < ruler->m_angle_constraint;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int
|
unsigned int
|
||||||
|
|
@ -324,6 +351,12 @@ Object::from_string (const char *s)
|
||||||
ex.read (i);
|
ex.read (i);
|
||||||
id (i);
|
id (i);
|
||||||
|
|
||||||
|
} else if (ex.test ("category=")) {
|
||||||
|
|
||||||
|
std::string s;
|
||||||
|
ex.read_word_or_quoted (s);
|
||||||
|
set_category (s);
|
||||||
|
|
||||||
} else if (ex.test ("fmt=")) {
|
} else if (ex.test ("fmt=")) {
|
||||||
|
|
||||||
std::string s;
|
std::string s;
|
||||||
|
|
@ -374,6 +407,76 @@ Object::from_string (const char *s)
|
||||||
p.set_y (q);
|
p.set_y (q);
|
||||||
p2 (p);
|
p2 (p);
|
||||||
|
|
||||||
|
} else if (ex.test ("position=")) {
|
||||||
|
|
||||||
|
std::string s;
|
||||||
|
ex.read_word (s);
|
||||||
|
ant::PositionConverter pc;
|
||||||
|
ant::Object::position_type pos;
|
||||||
|
pc.from_string (s, pos);
|
||||||
|
set_main_position (pos);
|
||||||
|
ex.test (",");
|
||||||
|
|
||||||
|
} else if (ex.test ("xalign=")) {
|
||||||
|
|
||||||
|
std::string s;
|
||||||
|
ex.read_word (s);
|
||||||
|
ant::AlignmentConverter ac;
|
||||||
|
ant::Object::alignment_type a;
|
||||||
|
ac.from_string (s, a);
|
||||||
|
set_main_xalign (a);
|
||||||
|
ex.test (",");
|
||||||
|
|
||||||
|
} else if (ex.test ("yalign=")) {
|
||||||
|
|
||||||
|
std::string s;
|
||||||
|
ex.read_word (s);
|
||||||
|
ant::AlignmentConverter ac;
|
||||||
|
ant::Object::alignment_type a;
|
||||||
|
ac.from_string (s, a);
|
||||||
|
set_main_yalign (a);
|
||||||
|
ex.test (",");
|
||||||
|
|
||||||
|
} else if (ex.test ("xlabel_xalign=")) {
|
||||||
|
|
||||||
|
std::string s;
|
||||||
|
ex.read_word (s);
|
||||||
|
ant::AlignmentConverter ac;
|
||||||
|
ant::Object::alignment_type a;
|
||||||
|
ac.from_string (s, a);
|
||||||
|
set_xlabel_xalign (a);
|
||||||
|
ex.test (",");
|
||||||
|
|
||||||
|
} else if (ex.test ("xlabel_yalign=")) {
|
||||||
|
|
||||||
|
std::string s;
|
||||||
|
ex.read_word (s);
|
||||||
|
ant::AlignmentConverter ac;
|
||||||
|
ant::Object::alignment_type a;
|
||||||
|
ac.from_string (s, a);
|
||||||
|
set_xlabel_yalign (a);
|
||||||
|
ex.test (",");
|
||||||
|
|
||||||
|
} else if (ex.test ("ylabel_xalign=")) {
|
||||||
|
|
||||||
|
std::string s;
|
||||||
|
ex.read_word (s);
|
||||||
|
ant::AlignmentConverter ac;
|
||||||
|
ant::Object::alignment_type a;
|
||||||
|
ac.from_string (s, a);
|
||||||
|
set_ylabel_xalign (a);
|
||||||
|
ex.test (",");
|
||||||
|
|
||||||
|
} else if (ex.test ("ylabel_yalign=")) {
|
||||||
|
|
||||||
|
std::string s;
|
||||||
|
ex.read_word (s);
|
||||||
|
ant::AlignmentConverter ac;
|
||||||
|
ant::Object::alignment_type a;
|
||||||
|
ac.from_string (s, a);
|
||||||
|
set_ylabel_yalign (a);
|
||||||
|
ex.test (",");
|
||||||
|
|
||||||
} else if (ex.test ("style=")) {
|
} else if (ex.test ("style=")) {
|
||||||
|
|
||||||
std::string s;
|
std::string s;
|
||||||
|
|
@ -438,6 +541,10 @@ Object::to_string () const
|
||||||
r += tl::to_string (p2 ().y ());
|
r += tl::to_string (p2 ().y ());
|
||||||
r += ",";
|
r += ",";
|
||||||
|
|
||||||
|
r += "category=";
|
||||||
|
r += tl::to_word_or_quoted_string (category ());
|
||||||
|
r += ",";
|
||||||
|
|
||||||
r += "fmt=";
|
r += "fmt=";
|
||||||
r += tl::to_word_or_quoted_string (fmt ());
|
r += tl::to_word_or_quoted_string (fmt ());
|
||||||
r += ",";
|
r += ",";
|
||||||
|
|
@ -448,6 +555,31 @@ Object::to_string () const
|
||||||
r += tl::to_word_or_quoted_string (fmt_y ());
|
r += tl::to_word_or_quoted_string (fmt_y ());
|
||||||
r += ",";
|
r += ",";
|
||||||
|
|
||||||
|
r += "pos=";
|
||||||
|
ant::PositionConverter pc;
|
||||||
|
r += pc.to_string (main_position ());
|
||||||
|
r += ",";
|
||||||
|
|
||||||
|
ant::AlignmentConverter ac;
|
||||||
|
r += "xalign=";
|
||||||
|
r += ac.to_string (main_xalign ());
|
||||||
|
r += ",";
|
||||||
|
r += "yalign=";
|
||||||
|
r += ac.to_string (main_yalign ());
|
||||||
|
r += ",";
|
||||||
|
r += "xlabel_xalign=";
|
||||||
|
r += ac.to_string (xlabel_xalign ());
|
||||||
|
r += ",";
|
||||||
|
r += "xlabel_yalign=";
|
||||||
|
r += ac.to_string (xlabel_yalign ());
|
||||||
|
r += ",";
|
||||||
|
r += "ylabel_xalign=";
|
||||||
|
r += ac.to_string (ylabel_xalign ());
|
||||||
|
r += ",";
|
||||||
|
r += "ylabel_yalign=";
|
||||||
|
r += ac.to_string (ylabel_yalign ());
|
||||||
|
r += ",";
|
||||||
|
|
||||||
r += "style=";
|
r += "style=";
|
||||||
ant::StyleConverter sc;
|
ant::StyleConverter sc;
|
||||||
r += sc.to_string (style ());
|
r += sc.to_string (style ());
|
||||||
|
|
@ -463,8 +595,8 @@ Object::to_string () const
|
||||||
r += ",";
|
r += ",";
|
||||||
|
|
||||||
r += "angle_constraint=";
|
r += "angle_constraint=";
|
||||||
ant::ACConverter ac;
|
ant::ACConverter acc;
|
||||||
r += ac.to_string (angle_constraint ());
|
r += acc.to_string (angle_constraint ());
|
||||||
|
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -58,9 +58,13 @@ public:
|
||||||
* STY_arrow_end: a line with an arrow at the end
|
* STY_arrow_end: a line with an arrow at the end
|
||||||
* STY_arrow_start: a line with a arrow at the start
|
* STY_arrow_start: a line with a arrow at the start
|
||||||
* STY_arrow_both: a line with an arrow at both ends
|
* STY_arrow_both: a line with an arrow at both ends
|
||||||
|
* STY_cross_end: a cross at the end
|
||||||
|
* STY_cross_start: a cross at the start
|
||||||
|
* STY_cross_both: a cross at both ends
|
||||||
* STY_line: a simple line
|
* STY_line: a simple line
|
||||||
|
* STY_none: used internally
|
||||||
*/
|
*/
|
||||||
enum style_type { STY_ruler, STY_arrow_end, STY_arrow_start, STY_arrow_both, STY_line };
|
enum style_type { STY_ruler = 0, STY_arrow_end = 1, STY_arrow_start = 2, STY_arrow_both = 3, STY_line = 4, STY_cross_end = 5, STY_cross_start = 6, STY_cross_both = 7, STY_none = 8 };
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief The outline modes
|
* @brief The outline modes
|
||||||
|
|
@ -71,274 +75,60 @@ public:
|
||||||
* OL_yx: connecting start and end point, vertical first then horizontal
|
* OL_yx: connecting start and end point, vertical first then horizontal
|
||||||
* OL_diag_yx: both OL_diag and OL_yx
|
* OL_diag_yx: both OL_diag and OL_yx
|
||||||
* OL_box: draw a box defined by start and end point
|
* OL_box: draw a box defined by start and end point
|
||||||
|
* OL_ellipse: draws an ellipse with p1 and p2 defining the extension (style is ignored)
|
||||||
*/
|
*/
|
||||||
enum outline_type { OL_diag, OL_xy, OL_diag_xy, OL_yx, OL_diag_yx, OL_box };
|
enum outline_type { OL_diag = 0, OL_xy = 1, OL_diag_xy = 2, OL_yx = 3, OL_diag_yx = 4, OL_box = 5, OL_ellipse = 6 };
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief The position type of the main label
|
||||||
|
*
|
||||||
|
* POS_auto: automatic
|
||||||
|
* POS_p1: at P1
|
||||||
|
* POS_p2: at P2
|
||||||
|
* POS_center: at mid point between P1 and P2
|
||||||
|
*/
|
||||||
|
enum position_type { POS_auto = 0, POS_p1 = 1, POS_p2 = 2, POS_center = 3 };
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief The alignment type
|
||||||
|
*
|
||||||
|
* AL_auto: automatic
|
||||||
|
* AL_center: centered
|
||||||
|
* AL_left, AL_bottom, AL_down: left or bottom
|
||||||
|
* AL_right, AL_top, AL_up: right or top
|
||||||
|
*/
|
||||||
|
enum alignment_type { AL_auto = 0, AL_center = 1, AL_down = 2, AL_left = 2, AL_bottom = 2, AL_up = 3, AL_right = 3, AL_top = 3 };
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Default constructor
|
||||||
|
*/
|
||||||
Object ();
|
Object ();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Parametrized constructor
|
||||||
|
*/
|
||||||
Object (const db::DPoint &p1, const db::DPoint &p2, int id, const std::string &fmt_x, const std::string &fmt_y, const std::string &fmt, style_type style, outline_type outline, bool snap, lay::angle_constraint_type angle_constraint);
|
Object (const db::DPoint &p1, const db::DPoint &p2, int id, const std::string &fmt_x, const std::string &fmt_y, const std::string &fmt, style_type style, outline_type outline, bool snap, lay::angle_constraint_type angle_constraint);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Parametrized constructor from a template
|
||||||
|
*/
|
||||||
Object (const db::DPoint &p1, const db::DPoint &p2, int id, const ant::Template &d);
|
Object (const db::DPoint &p1, const db::DPoint &p2, int id, const ant::Template &d);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Copy constructor
|
||||||
|
*/
|
||||||
Object (const ant::Object &d);
|
Object (const ant::Object &d);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Assignment
|
||||||
|
*/
|
||||||
Object &operator= (const ant::Object &d);
|
Object &operator= (const ant::Object &d);
|
||||||
|
|
||||||
virtual bool equals (const db::DUserObjectBase *d) const;
|
|
||||||
|
|
||||||
virtual bool less (const db::DUserObjectBase *d) const;
|
|
||||||
|
|
||||||
virtual unsigned int class_id () const;
|
|
||||||
|
|
||||||
virtual db::DUserObjectBase *clone () const;
|
|
||||||
|
|
||||||
virtual db::DBox box () const;
|
|
||||||
|
|
||||||
void transform (const db::ICplxTrans &t)
|
|
||||||
{
|
|
||||||
transform (db::DCplxTrans (t));
|
|
||||||
property_changed ();
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual void transform (const db::DCplxTrans &t)
|
|
||||||
{
|
|
||||||
*this = ant::Object (t * m_p1, t * m_p2, m_id, m_fmt_x, m_fmt_y, m_fmt, m_style, m_outline, m_snap, m_angle_constraint);
|
|
||||||
property_changed ();
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual void transform (const db::DTrans &t)
|
|
||||||
{
|
|
||||||
*this = ant::Object (t * m_p1, t * m_p2, m_id, m_fmt_x, m_fmt_y, m_fmt, m_style, m_outline, m_snap, m_angle_constraint);
|
|
||||||
property_changed ();
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual void transform (const db::DFTrans &t)
|
|
||||||
{
|
|
||||||
*this = ant::Object (t * m_p1, t * m_p2, m_id, m_fmt_x, m_fmt_y, m_fmt, m_style, m_outline, m_snap, m_angle_constraint);
|
|
||||||
property_changed ();
|
|
||||||
}
|
|
||||||
|
|
||||||
template <class Trans>
|
|
||||||
ant::Object transformed (const Trans &t) const
|
|
||||||
{
|
|
||||||
ant::Object obj (*this);
|
|
||||||
obj.transform (t);
|
|
||||||
return obj;
|
|
||||||
}
|
|
||||||
|
|
||||||
Object &move (const db::DVector &p)
|
|
||||||
{
|
|
||||||
m_p1 += p;
|
|
||||||
m_p2 += p;
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
|
|
||||||
Object moved (const db::DVector &p) const
|
|
||||||
{
|
|
||||||
ant::Object d (*this);
|
|
||||||
d.move (p);
|
|
||||||
return d;
|
|
||||||
}
|
|
||||||
|
|
||||||
const db::DPoint &p1 () const
|
|
||||||
{
|
|
||||||
return m_p1;
|
|
||||||
}
|
|
||||||
|
|
||||||
const db::DPoint &p2 () const
|
|
||||||
{
|
|
||||||
return m_p2;
|
|
||||||
}
|
|
||||||
|
|
||||||
void p1 (const db::DPoint &p)
|
|
||||||
{
|
|
||||||
if (!m_p1.equal (p)) {
|
|
||||||
m_p1 = p;
|
|
||||||
property_changed ();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void p2 (const db::DPoint &p)
|
|
||||||
{
|
|
||||||
if (!m_p2.equal (p)) {
|
|
||||||
m_p2 = p;
|
|
||||||
property_changed ();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
int id () const
|
|
||||||
{
|
|
||||||
return m_id;
|
|
||||||
}
|
|
||||||
|
|
||||||
void id (int _id)
|
|
||||||
{
|
|
||||||
m_id = _id;
|
|
||||||
}
|
|
||||||
|
|
||||||
const std::string &fmt () const
|
|
||||||
{
|
|
||||||
return m_fmt;
|
|
||||||
}
|
|
||||||
|
|
||||||
void fmt (const std::string &s)
|
|
||||||
{
|
|
||||||
if (m_fmt != s) {
|
|
||||||
m_fmt = s;
|
|
||||||
property_changed ();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const std::string &fmt_x () const
|
|
||||||
{
|
|
||||||
return m_fmt_x;
|
|
||||||
}
|
|
||||||
|
|
||||||
void fmt_x (const std::string &s)
|
|
||||||
{
|
|
||||||
if (m_fmt_x != s) {
|
|
||||||
m_fmt_x = s;
|
|
||||||
property_changed ();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const std::string &fmt_y () const
|
|
||||||
{
|
|
||||||
return m_fmt_y;
|
|
||||||
}
|
|
||||||
|
|
||||||
void fmt_y (const std::string &s)
|
|
||||||
{
|
|
||||||
if (m_fmt_y != s) {
|
|
||||||
m_fmt_y = s;
|
|
||||||
property_changed ();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
style_type style () const
|
|
||||||
{
|
|
||||||
return m_style;
|
|
||||||
}
|
|
||||||
|
|
||||||
void style (style_type s)
|
|
||||||
{
|
|
||||||
if (m_style != s) {
|
|
||||||
m_style = s;
|
|
||||||
property_changed ();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
outline_type outline () const
|
|
||||||
{
|
|
||||||
return m_outline;
|
|
||||||
}
|
|
||||||
|
|
||||||
void outline (outline_type s)
|
|
||||||
{
|
|
||||||
if (m_outline != s) {
|
|
||||||
m_outline = s;
|
|
||||||
property_changed ();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Angle constraint flag read accessor
|
* @brief Less operator
|
||||||
*/
|
*/
|
||||||
bool snap () const
|
|
||||||
{
|
|
||||||
return m_snap;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Snap flag write accessor
|
|
||||||
*
|
|
||||||
* The snap flag controls whether snapping to objects (edges and vertices)
|
|
||||||
* is active when this template is selected.
|
|
||||||
*/
|
|
||||||
void snap (bool s)
|
|
||||||
{
|
|
||||||
if (m_snap != s) {
|
|
||||||
m_snap = s;
|
|
||||||
property_changed ();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Angle constraint read accessor
|
|
||||||
*/
|
|
||||||
lay::angle_constraint_type angle_constraint () const
|
|
||||||
{
|
|
||||||
return m_angle_constraint;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Angle constraint write accessor
|
|
||||||
*
|
|
||||||
* The angle constraint flag controls which angle constraint is to be used
|
|
||||||
* for this ruler or the global setting should be used
|
|
||||||
* (if ant::Service::Global is used for the angle constraint).
|
|
||||||
*/
|
|
||||||
void angle_constraint (lay::angle_constraint_type a)
|
|
||||||
{
|
|
||||||
if (m_angle_constraint != a) {
|
|
||||||
m_angle_constraint = a;
|
|
||||||
property_changed ();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
bool operator< (const ant::Object &b) const;
|
bool operator< (const ant::Object &b) const;
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Obtain the formatted text for the x label
|
|
||||||
*/
|
|
||||||
std::string text_x () const
|
|
||||||
{
|
|
||||||
return formatted (m_fmt_x, db::DFTrans ());
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Obtain the formatted text for the y label
|
|
||||||
*/
|
|
||||||
std::string text_y () const
|
|
||||||
{
|
|
||||||
return formatted (m_fmt_y, db::DFTrans ());
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Obtain the formatted text for the main label
|
|
||||||
*/
|
|
||||||
std::string text () const
|
|
||||||
{
|
|
||||||
return formatted (m_fmt, db::DFTrans ());
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Obtain the formatted text for the x label
|
|
||||||
* @param t The transformation to apply to the vector before producing the text
|
|
||||||
*/
|
|
||||||
std::string text_x (const db::DFTrans &t) const
|
|
||||||
{
|
|
||||||
return formatted (m_fmt_x, t);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Obtain the formatted text for the y label
|
|
||||||
* @param t The transformation to apply to the vector before producing the text
|
|
||||||
*/
|
|
||||||
std::string text_y (const db::DFTrans &t) const
|
|
||||||
{
|
|
||||||
return formatted (m_fmt_y, t);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Obtain the formatted text for the main label
|
|
||||||
* @param t The transformation to apply to the vector before producing the text
|
|
||||||
*/
|
|
||||||
std::string text (const db::DFTrans &t) const
|
|
||||||
{
|
|
||||||
return formatted (m_fmt, t);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Equality
|
* @brief Equality
|
||||||
*/
|
*/
|
||||||
|
|
@ -353,12 +143,534 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief The class name for the generic user object factory
|
* @brief Equality check
|
||||||
|
* This is the generic equality that involves an other object
|
||||||
|
* of any kind.
|
||||||
|
*/
|
||||||
|
virtual bool equals (const db::DUserObjectBase *d) const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Less criterion
|
||||||
|
* This is the generic equality that involves an other object
|
||||||
|
* of any kind.
|
||||||
|
*/
|
||||||
|
virtual bool less (const db::DUserObjectBase *d) const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Gets the user object class ID
|
||||||
|
*/
|
||||||
|
virtual unsigned int class_id () const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Clones the user object
|
||||||
|
*/
|
||||||
|
virtual db::DUserObjectBase *clone () const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Returns the bounding box of the object
|
||||||
|
*/
|
||||||
|
virtual db::DBox box () const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Transforms the object (in place)
|
||||||
|
*/
|
||||||
|
void transform (const db::ICplxTrans &t)
|
||||||
|
{
|
||||||
|
transform (db::DCplxTrans (t));
|
||||||
|
property_changed ();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Transforms the object (in place)
|
||||||
|
*/
|
||||||
|
virtual void transform (const db::DCplxTrans &t)
|
||||||
|
{
|
||||||
|
*this = ant::Object (t * m_p1, t * m_p2, m_id, m_fmt_x, m_fmt_y, m_fmt, m_style, m_outline, m_snap, m_angle_constraint);
|
||||||
|
property_changed ();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Transforms the object (in place)
|
||||||
|
*/
|
||||||
|
virtual void transform (const db::DTrans &t)
|
||||||
|
{
|
||||||
|
*this = ant::Object (t * m_p1, t * m_p2, m_id, m_fmt_x, m_fmt_y, m_fmt, m_style, m_outline, m_snap, m_angle_constraint);
|
||||||
|
property_changed ();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Transforms the object (in place)
|
||||||
|
*/
|
||||||
|
virtual void transform (const db::DFTrans &t)
|
||||||
|
{
|
||||||
|
*this = ant::Object (t * m_p1, t * m_p2, m_id, m_fmt_x, m_fmt_y, m_fmt, m_style, m_outline, m_snap, m_angle_constraint);
|
||||||
|
property_changed ();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Returns the transformed object
|
||||||
|
*/
|
||||||
|
template <class Trans>
|
||||||
|
ant::Object transformed (const Trans &t) const
|
||||||
|
{
|
||||||
|
ant::Object obj (*this);
|
||||||
|
obj.transform (t);
|
||||||
|
return obj;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Moves the object by the given distance
|
||||||
|
*/
|
||||||
|
Object &move (const db::DVector &p)
|
||||||
|
{
|
||||||
|
m_p1 += p;
|
||||||
|
m_p2 += p;
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Returns the moved object
|
||||||
|
*/
|
||||||
|
Object moved (const db::DVector &p) const
|
||||||
|
{
|
||||||
|
ant::Object d (*this);
|
||||||
|
d.move (p);
|
||||||
|
return d;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Gets the category string
|
||||||
|
* The category string is an arbitrary string that can be used to identify an annotation for
|
||||||
|
* a particular purpose.
|
||||||
|
*/
|
||||||
|
|
||||||
|
const std::string &category () const
|
||||||
|
{
|
||||||
|
return m_category;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Sets the category string
|
||||||
|
* See \category for a description of this attribute.
|
||||||
|
*/
|
||||||
|
void set_category (const std::string &cat)
|
||||||
|
{
|
||||||
|
if (m_category != cat) {
|
||||||
|
m_category = cat;
|
||||||
|
property_changed ();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Gets the first definition point
|
||||||
|
*/
|
||||||
|
const db::DPoint &p1 () const
|
||||||
|
{
|
||||||
|
return m_p1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Gets the second definition point
|
||||||
|
*/
|
||||||
|
const db::DPoint &p2 () const
|
||||||
|
{
|
||||||
|
return m_p2;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Sets the first definition point
|
||||||
|
*/
|
||||||
|
void p1 (const db::DPoint &p)
|
||||||
|
{
|
||||||
|
if (!m_p1.equal (p)) {
|
||||||
|
m_p1 = p;
|
||||||
|
property_changed ();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Sets the second definition point
|
||||||
|
*/
|
||||||
|
void p2 (const db::DPoint &p)
|
||||||
|
{
|
||||||
|
if (!m_p2.equal (p)) {
|
||||||
|
m_p2 = p;
|
||||||
|
property_changed ();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Gets the ID of the annotation object
|
||||||
|
* The ID is a unique identifier for the annotation object. The ID is used
|
||||||
|
* by the layout view to identify the object.
|
||||||
|
*/
|
||||||
|
int id () const
|
||||||
|
{
|
||||||
|
return m_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Sets the ID of the annotation object
|
||||||
|
* This method is provided for use by the layout view.
|
||||||
|
*/
|
||||||
|
void id (int _id)
|
||||||
|
{
|
||||||
|
m_id = _id;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Sets the main format string
|
||||||
|
* The central label is placed either at the first or the second point.
|
||||||
|
* \main_position, \main_xalign, \main_yalign control how the
|
||||||
|
* main label is positioned.
|
||||||
|
*/
|
||||||
|
const std::string &fmt () const
|
||||||
|
{
|
||||||
|
return m_fmt;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Sets the main format string
|
||||||
|
* See \fmt for details.
|
||||||
|
*/
|
||||||
|
void fmt (const std::string &s)
|
||||||
|
{
|
||||||
|
if (m_fmt != s) {
|
||||||
|
m_fmt = s;
|
||||||
|
property_changed ();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Sets the position of the main label
|
||||||
|
* See the \position_type enum for details.
|
||||||
|
*/
|
||||||
|
void set_main_position (position_type pos)
|
||||||
|
{
|
||||||
|
if (m_main_position != pos) {
|
||||||
|
m_main_position = pos;
|
||||||
|
property_changed ();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Gets the position of the main label
|
||||||
|
*/
|
||||||
|
position_type main_position () const
|
||||||
|
{
|
||||||
|
return m_main_position;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Sets the x alignment flag of the main label
|
||||||
|
* See \alignment_type for details.
|
||||||
|
*/
|
||||||
|
void set_main_xalign (alignment_type a)
|
||||||
|
{
|
||||||
|
if (m_main_xalign != a) {
|
||||||
|
m_main_xalign = a;
|
||||||
|
property_changed ();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Gets the x alignment flag of the main label
|
||||||
|
*/
|
||||||
|
alignment_type main_xalign () const
|
||||||
|
{
|
||||||
|
return m_main_xalign;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Sets the y alignment flag of the main label
|
||||||
|
* See \alignment_type for details.
|
||||||
|
*/
|
||||||
|
void set_main_yalign (alignment_type a)
|
||||||
|
{
|
||||||
|
if (m_main_yalign != a) {
|
||||||
|
m_main_yalign = a;
|
||||||
|
property_changed ();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Gets the y alignment flag of the main label
|
||||||
|
*/
|
||||||
|
alignment_type main_yalign () const
|
||||||
|
{
|
||||||
|
return m_main_yalign;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Gets the x label format string
|
||||||
|
* The x label is drawn at the x axis for styles that support a x axis.
|
||||||
|
* \xlabel_xalign and \xlabel_yalign control how the x label is
|
||||||
|
* positioned.
|
||||||
|
*/
|
||||||
|
const std::string &fmt_x () const
|
||||||
|
{
|
||||||
|
return m_fmt_x;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Gets the x label format string
|
||||||
|
* See \fmt_x for a description of this attribute.
|
||||||
|
*/
|
||||||
|
void fmt_x (const std::string &s)
|
||||||
|
{
|
||||||
|
if (m_fmt_x != s) {
|
||||||
|
m_fmt_x = s;
|
||||||
|
property_changed ();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Sets the x alignment flag of the x axis label
|
||||||
|
* See \alignment_type for details.
|
||||||
|
*/
|
||||||
|
void set_xlabel_xalign (alignment_type a)
|
||||||
|
{
|
||||||
|
if (m_xlabel_xalign != a) {
|
||||||
|
m_xlabel_xalign = a;
|
||||||
|
property_changed ();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Gets the x alignment flag of the x axis label
|
||||||
|
*/
|
||||||
|
alignment_type xlabel_xalign () const
|
||||||
|
{
|
||||||
|
return m_xlabel_xalign;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Sets the y alignment flag of the x axis label
|
||||||
|
* See \alignment_type for details.
|
||||||
|
*/
|
||||||
|
void set_xlabel_yalign (alignment_type a)
|
||||||
|
{
|
||||||
|
if (m_xlabel_yalign != a) {
|
||||||
|
m_xlabel_yalign = a;
|
||||||
|
property_changed ();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Gets the y alignment flag of the x axis label
|
||||||
|
*/
|
||||||
|
alignment_type xlabel_yalign () const
|
||||||
|
{
|
||||||
|
return m_xlabel_yalign;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Gets the y label format string
|
||||||
|
* The y label is drawn at the y axis for styles that support a y axis.
|
||||||
|
* \ylabel_xalign and \ylabel_yalign control how the y label is
|
||||||
|
* positioned.
|
||||||
|
*/
|
||||||
|
const std::string &fmt_y () const
|
||||||
|
{
|
||||||
|
return m_fmt_y;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Gets the y label format string
|
||||||
|
* See \fmt_y for a description of this attribute.
|
||||||
|
*/
|
||||||
|
void fmt_y (const std::string &s)
|
||||||
|
{
|
||||||
|
if (m_fmt_y != s) {
|
||||||
|
m_fmt_y = s;
|
||||||
|
property_changed ();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Sets the x alignment flag of the y axis label
|
||||||
|
* See \alignment_type for details.
|
||||||
|
*/
|
||||||
|
void set_ylabel_xalign (alignment_type a)
|
||||||
|
{
|
||||||
|
if (m_ylabel_xalign != a) {
|
||||||
|
m_ylabel_xalign = a;
|
||||||
|
property_changed ();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Gets the x alignment flag of the y axis label
|
||||||
|
*/
|
||||||
|
alignment_type ylabel_xalign () const
|
||||||
|
{
|
||||||
|
return m_ylabel_xalign;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Sets the y alignment flag of the y axis label
|
||||||
|
* See \alignment_type for details.
|
||||||
|
*/
|
||||||
|
void set_ylabel_yalign (alignment_type a)
|
||||||
|
{
|
||||||
|
if (m_ylabel_yalign != a) {
|
||||||
|
m_ylabel_yalign = a;
|
||||||
|
property_changed ();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Gets the y alignment flag of the y axis label
|
||||||
|
*/
|
||||||
|
alignment_type ylabel_yalign () const
|
||||||
|
{
|
||||||
|
return m_ylabel_yalign;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Sets the style
|
||||||
|
* See \style_type enum for the various styles available.
|
||||||
|
*/
|
||||||
|
style_type style () const
|
||||||
|
{
|
||||||
|
return m_style;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Gets the style
|
||||||
|
*/
|
||||||
|
void style (style_type s)
|
||||||
|
{
|
||||||
|
if (m_style != s) {
|
||||||
|
m_style = s;
|
||||||
|
property_changed ();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Sets the outline type
|
||||||
|
* See \outline_type enum for the various outline types available.
|
||||||
|
*/
|
||||||
|
outline_type outline () const
|
||||||
|
{
|
||||||
|
return m_outline;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Gets the outline type
|
||||||
|
*/
|
||||||
|
void outline (outline_type s)
|
||||||
|
{
|
||||||
|
if (m_outline != s) {
|
||||||
|
m_outline = s;
|
||||||
|
property_changed ();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Gets the snap mode
|
||||||
|
* See \snap for details about this attribute
|
||||||
|
*/
|
||||||
|
bool snap () const
|
||||||
|
{
|
||||||
|
return m_snap;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Sets snap mode
|
||||||
|
*
|
||||||
|
* The snap flag controls whether snapping to objects (edges and vertices)
|
||||||
|
* is active when this template is selected.
|
||||||
|
*/
|
||||||
|
void snap (bool s)
|
||||||
|
{
|
||||||
|
if (m_snap != s) {
|
||||||
|
m_snap = s;
|
||||||
|
property_changed ();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Gets the angle constraint
|
||||||
|
*/
|
||||||
|
lay::angle_constraint_type angle_constraint () const
|
||||||
|
{
|
||||||
|
return m_angle_constraint;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Sets the angle constraint
|
||||||
|
*
|
||||||
|
* The angle constraint flag controls which angle constraint is to be used
|
||||||
|
* for this ruler or the global setting should be used
|
||||||
|
* (if ant::Service::Global is used for the angle constraint).
|
||||||
|
*/
|
||||||
|
void angle_constraint (lay::angle_constraint_type a)
|
||||||
|
{
|
||||||
|
if (m_angle_constraint != a) {
|
||||||
|
m_angle_constraint = a;
|
||||||
|
property_changed ();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Gets the formatted text for the x label
|
||||||
|
*/
|
||||||
|
std::string text_x () const
|
||||||
|
{
|
||||||
|
return formatted (m_fmt_x, db::DFTrans ());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Gets the formatted text for the y label
|
||||||
|
*/
|
||||||
|
std::string text_y () const
|
||||||
|
{
|
||||||
|
return formatted (m_fmt_y, db::DFTrans ());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Gets the formatted text for the main label
|
||||||
|
*/
|
||||||
|
std::string text () const
|
||||||
|
{
|
||||||
|
return formatted (m_fmt, db::DFTrans ());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Gets the formatted text for the x label
|
||||||
|
* @param t The transformation to apply to the vector before producing the text
|
||||||
|
*/
|
||||||
|
std::string text_x (const db::DFTrans &t) const
|
||||||
|
{
|
||||||
|
return formatted (m_fmt_x, t);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Gets the formatted text for the y label
|
||||||
|
* @param t The transformation to apply to the vector before producing the text
|
||||||
|
*/
|
||||||
|
std::string text_y (const db::DFTrans &t) const
|
||||||
|
{
|
||||||
|
return formatted (m_fmt_y, t);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Gets the formatted text for the main label
|
||||||
|
* @param t The transformation to apply to the vector before producing the text
|
||||||
|
*/
|
||||||
|
std::string text (const db::DFTrans &t) const
|
||||||
|
{
|
||||||
|
return formatted (m_fmt, t);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Gets the class name for the generic user object factory
|
||||||
*/
|
*/
|
||||||
virtual const char *class_name () const;
|
virtual const char *class_name () const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Fill from a string
|
* @brief Initializes the object from a string
|
||||||
*
|
*
|
||||||
* This method needs to be implemented mainly if the object is to be created from the
|
* This method needs to be implemented mainly if the object is to be created from the
|
||||||
* generic factory.
|
* generic factory.
|
||||||
|
|
@ -366,7 +678,7 @@ public:
|
||||||
virtual void from_string (const char *);
|
virtual void from_string (const char *);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Convert to a string
|
* @brief Converts the object to a string
|
||||||
*
|
*
|
||||||
* This method needs to be implemented mainly if the object is to be created from the
|
* This method needs to be implemented mainly if the object is to be created from the
|
||||||
* generic factory.
|
* generic factory.
|
||||||
|
|
@ -374,7 +686,7 @@ public:
|
||||||
virtual std::string to_string () const;
|
virtual std::string to_string () const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Return the memory used in bytes
|
* @brief Returns the memory used in bytes
|
||||||
*/
|
*/
|
||||||
virtual size_t mem_used () const
|
virtual size_t mem_used () const
|
||||||
{
|
{
|
||||||
|
|
@ -382,7 +694,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Return the memory required in bytes
|
* @brief Returns the memory required in bytes
|
||||||
*/
|
*/
|
||||||
virtual size_t mem_reqd () const
|
virtual size_t mem_reqd () const
|
||||||
{
|
{
|
||||||
|
|
@ -405,6 +717,11 @@ private:
|
||||||
outline_type m_outline;
|
outline_type m_outline;
|
||||||
bool m_snap;
|
bool m_snap;
|
||||||
lay::angle_constraint_type m_angle_constraint;
|
lay::angle_constraint_type m_angle_constraint;
|
||||||
|
std::string m_category;
|
||||||
|
position_type m_main_position;
|
||||||
|
alignment_type m_main_xalign, m_main_yalign;
|
||||||
|
alignment_type m_xlabel_xalign, m_xlabel_yalign;
|
||||||
|
alignment_type m_ylabel_xalign, m_ylabel_yalign;
|
||||||
|
|
||||||
std::string formatted (const std::string &fmt, const db::DFTrans &trans) const;
|
std::string formatted (const std::string &fmt, const db::DFTrans &trans) const;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -118,6 +118,14 @@ PropertiesPage::update ()
|
||||||
y2->setText (tl::to_qstring (tl::micron_to_string (current ().p2 ().y ())));
|
y2->setText (tl::to_qstring (tl::micron_to_string (current ().p2 ().y ())));
|
||||||
y2->setCursorPosition (0);
|
y2->setCursorPosition (0);
|
||||||
|
|
||||||
|
main_position->setCurrentIndex (current ().main_position ());
|
||||||
|
main_xalign->setCurrentIndex (current ().main_xalign ());
|
||||||
|
main_yalign->setCurrentIndex (current ().main_yalign ());
|
||||||
|
xlabel_xalign->setCurrentIndex (current ().xlabel_xalign ());
|
||||||
|
xlabel_yalign->setCurrentIndex (current ().xlabel_yalign ());
|
||||||
|
ylabel_xalign->setCurrentIndex (current ().ylabel_xalign ());
|
||||||
|
ylabel_yalign->setCurrentIndex (current ().ylabel_yalign ());
|
||||||
|
|
||||||
double sx = (current ().p2 ().x () - current ().p1 ().x ());
|
double sx = (current ().p2 ().x () - current ().p1 ().x ());
|
||||||
double sy = (current ().p2 ().y () - current ().p1 ().y ());
|
double sy = (current ().p2 ().y () - current ().p1 ().y ());
|
||||||
dx->setText (tl::to_qstring (tl::micron_to_string (sx)));
|
dx->setText (tl::to_qstring (tl::micron_to_string (sx)));
|
||||||
|
|
@ -162,6 +170,16 @@ PropertiesPage::apply ()
|
||||||
|
|
||||||
ant::Object ruler (db::DPoint (dx1, dy1), db::DPoint (dx2, dy2), current ().id (), fmt_x, fmt_y, fmt, style, outline, current ().snap (), current ().angle_constraint ());
|
ant::Object ruler (db::DPoint (dx1, dy1), db::DPoint (dx2, dy2), current ().id (), fmt_x, fmt_y, fmt, style, outline, current ().snap (), current ().angle_constraint ());
|
||||||
|
|
||||||
|
ruler.set_main_position (Object::position_type (main_position->currentIndex ()));
|
||||||
|
ruler.set_main_xalign (Object::alignment_type (main_xalign->currentIndex ()));
|
||||||
|
ruler.set_main_yalign (Object::alignment_type (main_yalign->currentIndex ()));
|
||||||
|
ruler.set_xlabel_xalign (Object::alignment_type (xlabel_xalign->currentIndex ()));
|
||||||
|
ruler.set_xlabel_yalign (Object::alignment_type (xlabel_yalign->currentIndex ()));
|
||||||
|
ruler.set_ylabel_xalign (Object::alignment_type (ylabel_xalign->currentIndex ()));
|
||||||
|
ruler.set_ylabel_yalign (Object::alignment_type (ylabel_yalign->currentIndex ()));
|
||||||
|
|
||||||
|
ruler.set_category (current ().category ());
|
||||||
|
|
||||||
mp_rulers->change_ruler (*m_pos, ruler);
|
mp_rulers->change_ruler (*m_pos, ruler);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -106,11 +106,27 @@ tick_spacings (double d, double min_d, int &minor_ticks, double &ticks)
|
||||||
* @param label The label text to draw
|
* @param label The label text to draw
|
||||||
* @param sel True to draw ruler in "selected" mode
|
* @param sel True to draw ruler in "selected" mode
|
||||||
* @param right True to draw the ruler with ticks to the right (as seem from p1 to p2 in transformed space)
|
* @param right True to draw the ruler with ticks to the right (as seem from p1 to p2 in transformed space)
|
||||||
|
* @param pos The position where to draw the text
|
||||||
* @param style The style with which to draw the ruler
|
* @param style The style with which to draw the ruler
|
||||||
|
* @param halign The text's horizonal alignment
|
||||||
|
* @param valign The text's vertical alignment
|
||||||
* @param bitmap The bitmap to draw the ruler on
|
* @param bitmap The bitmap to draw the ruler on
|
||||||
|
* @param renderer The renderer object
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
draw_ruler (const db::DPoint &q1, const db::DPoint &q2, double length_u, double min_spc_u, const std::string &label, bool sel, bool right, ant::Object::style_type style, lay::CanvasPlane *bitmap, lay::Renderer &renderer)
|
draw_ruler (const db::DPoint &q1,
|
||||||
|
const db::DPoint &q2,
|
||||||
|
double length_u,
|
||||||
|
double min_spc_u,
|
||||||
|
const std::string &label,
|
||||||
|
bool sel,
|
||||||
|
bool right,
|
||||||
|
ant::Object::style_type style,
|
||||||
|
ant::Object::position_type pos,
|
||||||
|
ant::Object::alignment_type halign,
|
||||||
|
ant::Object::alignment_type valign,
|
||||||
|
lay::CanvasPlane *bitmap,
|
||||||
|
lay::Renderer &renderer)
|
||||||
{
|
{
|
||||||
double arrow_width = 8 / renderer.resolution ();
|
double arrow_width = 8 / renderer.resolution ();
|
||||||
double arrow_length = 12 / renderer.resolution ();
|
double arrow_length = 12 / renderer.resolution ();
|
||||||
|
|
@ -160,17 +176,25 @@ draw_ruler (const db::DPoint &q1, const db::DPoint &q2, double length_u, double
|
||||||
}
|
}
|
||||||
|
|
||||||
db::DVector qq (q2.y () - q1.y (), q1.x () - q2.x ());
|
db::DVector qq (q2.y () - q1.y (), q1.x () - q2.x ());
|
||||||
|
if (len > 1e-10) {
|
||||||
qq *= 1.0 / len;
|
qq *= 1.0 / len;
|
||||||
|
} else {
|
||||||
|
qq = db::DVector (1.0, 0.0);
|
||||||
|
}
|
||||||
if (!right) {
|
if (!right) {
|
||||||
qq = -qq;
|
qq = -qq;
|
||||||
}
|
}
|
||||||
|
|
||||||
db::DVector qu = q2 - q1;
|
db::DVector qu = q2 - q1;
|
||||||
|
if (len > 1e-10) {
|
||||||
qu *= 1.0 / len;
|
qu *= 1.0 / len;
|
||||||
|
} else {
|
||||||
|
qu = db::DVector (1.0, 0.0);
|
||||||
|
}
|
||||||
|
|
||||||
// produce polygon stuff
|
// produce polygon stuff
|
||||||
|
|
||||||
if (sel) {
|
if (sel && style != ant::Object::STY_none) {
|
||||||
|
|
||||||
db::DVector qw = qq * (double (sel_width) * 0.5);
|
db::DVector qw = qq * (double (sel_width) * 0.5);
|
||||||
|
|
||||||
|
|
@ -195,6 +219,7 @@ draw_ruler (const db::DPoint &q1, const db::DPoint &q2, double length_u, double
|
||||||
}
|
}
|
||||||
|
|
||||||
if (style == ant::Object::STY_arrow_end || style == ant::Object::STY_arrow_both) {
|
if (style == ant::Object::STY_arrow_end || style == ant::Object::STY_arrow_both) {
|
||||||
|
|
||||||
db::DPolygon p;
|
db::DPolygon p;
|
||||||
db::DPoint points[] = {
|
db::DPoint points[] = {
|
||||||
db::DPoint (q2),
|
db::DPoint (q2),
|
||||||
|
|
@ -203,9 +228,25 @@ draw_ruler (const db::DPoint &q1, const db::DPoint &q2, double length_u, double
|
||||||
};
|
};
|
||||||
p.assign_hull (points, points + sizeof (points) / sizeof (points [0]));
|
p.assign_hull (points, points + sizeof (points) / sizeof (points [0]));
|
||||||
renderer.draw (p, bitmap, bitmap, 0, 0);
|
renderer.draw (p, bitmap, bitmap, 0, 0);
|
||||||
|
|
||||||
|
} else if (style == ant::Object::STY_cross_end || style == ant::Object::STY_cross_both) {
|
||||||
|
|
||||||
|
db::DPolygon p;
|
||||||
|
db::DPoint points[] = {
|
||||||
|
db::DPoint (q2),
|
||||||
|
db::DPoint (q2 + qq * double (arrow_width)),
|
||||||
|
db::DPoint (q2 - qq * double (arrow_width)),
|
||||||
|
db::DPoint (q2),
|
||||||
|
db::DPoint (q2 + qu * double (arrow_width)),
|
||||||
|
db::DPoint (q2 - qu * double (arrow_width)),
|
||||||
|
};
|
||||||
|
p.assign_hull (points, points + sizeof (points) / sizeof (points [0]), false /*don't compress*/);
|
||||||
|
renderer.draw (p, bitmap, bitmap, 0, 0);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (style == ant::Object::STY_arrow_start || style == ant::Object::STY_arrow_both) {
|
if (style == ant::Object::STY_arrow_start || style == ant::Object::STY_arrow_both) {
|
||||||
|
|
||||||
db::DPolygon p;
|
db::DPolygon p;
|
||||||
db::DPoint points[] = {
|
db::DPoint points[] = {
|
||||||
db::DPoint (q1),
|
db::DPoint (q1),
|
||||||
|
|
@ -214,36 +255,84 @@ draw_ruler (const db::DPoint &q1, const db::DPoint &q2, double length_u, double
|
||||||
};
|
};
|
||||||
p.assign_hull (points, points + sizeof (points) / sizeof (points [0]));
|
p.assign_hull (points, points + sizeof (points) / sizeof (points [0]));
|
||||||
renderer.draw (p, bitmap, bitmap, 0, 0);
|
renderer.draw (p, bitmap, bitmap, 0, 0);
|
||||||
|
|
||||||
|
} else if (style == ant::Object::STY_cross_start || style == ant::Object::STY_cross_both) {
|
||||||
|
|
||||||
|
db::DPolygon p;
|
||||||
|
db::DPoint points[] = {
|
||||||
|
db::DPoint (q1),
|
||||||
|
db::DPoint (q1 + qq * double (arrow_width)),
|
||||||
|
db::DPoint (q1 - qq * double (arrow_width)),
|
||||||
|
db::DPoint (q1),
|
||||||
|
db::DPoint (q1 + qu * double (arrow_width)),
|
||||||
|
db::DPoint (q1 - qu * double (arrow_width)),
|
||||||
|
};
|
||||||
|
p.assign_hull (points, points + sizeof (points) / sizeof (points [0]), false /*don't compress*/);
|
||||||
|
renderer.draw (p, bitmap, bitmap, 0, 0);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// produce edge and text stuff
|
// produce edge and text stuff
|
||||||
|
|
||||||
if (! sel) {
|
if (! sel && style != ant::Object::STY_none) {
|
||||||
renderer.draw (db::DEdge (q1, q2), 0, bitmap, 0, 0);
|
renderer.draw (db::DEdge (q1, q2), 0, bitmap, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// create three tick vectors in tv_text, tv_short and tv_long
|
// create three tick vectors in tv_text, tv_short and tv_long
|
||||||
|
|
||||||
double tf = tick_length;
|
double tf = tick_length;
|
||||||
db::DVector tv_text;
|
|
||||||
if (style == ant::Object::STY_arrow_start || style == ant::Object::STY_arrow_both || style == ant::Object::STY_arrow_end) {
|
|
||||||
tv_text = qq * (arrow_width * 0.5 + 2.0);
|
|
||||||
} else {
|
|
||||||
tv_text = qq * (tf + 2.0);
|
|
||||||
}
|
|
||||||
db::DVector tv_short = qq * tf * 0.5;
|
db::DVector tv_short = qq * tf * 0.5;
|
||||||
db::DVector tv_long = qq * tf;
|
db::DVector tv_long = qq * tf;
|
||||||
|
|
||||||
bool text_left;
|
db::HAlign text_halign = db::HAlignCenter;
|
||||||
|
if (halign == ant::Object::AL_auto) {
|
||||||
if (fabs (qq.x ()) > 1e-6) {
|
if (fabs (qq.x ()) > 1e-6) {
|
||||||
text_left = qq.x () > 0.0;
|
text_halign = qq.x () > 0.0 ? db::HAlignLeft : db::HAlignRight;
|
||||||
} else {
|
} else {
|
||||||
text_left = q2.x () < q1.x ();
|
text_halign = q2.x () < q1.x () ? db::HAlignLeft : db::HAlignRight;
|
||||||
}
|
}
|
||||||
bool text_bottom;
|
} else if (halign == ant::Object::AL_left) {
|
||||||
|
text_halign = db::HAlignLeft;
|
||||||
|
} else if (halign == ant::Object::AL_right) {
|
||||||
|
text_halign = db::HAlignRight;
|
||||||
|
}
|
||||||
|
|
||||||
|
db::VAlign text_valign = db::VAlignCenter;
|
||||||
|
if (valign == ant::Object::AL_auto) {
|
||||||
if (fabs (qq.y ()) > 1e-6) {
|
if (fabs (qq.y ()) > 1e-6) {
|
||||||
text_bottom = qq.y () > 0.0;
|
text_valign = qq.y () > 0.0 ? db::VAlignBottom : db::VAlignTop;
|
||||||
} else {
|
} else {
|
||||||
text_bottom = q1.y () > q2.y ();
|
text_valign = q1.y () > q2.y () ? db::VAlignBottom : db::VAlignTop;
|
||||||
|
}
|
||||||
|
} else if (valign == ant::Object::AL_bottom) {
|
||||||
|
text_valign = db::VAlignBottom;
|
||||||
|
} else if (valign == ant::Object::AL_top) {
|
||||||
|
text_valign = db::VAlignTop;
|
||||||
|
}
|
||||||
|
|
||||||
|
db::DVector tv_text;
|
||||||
|
if (style == ant::Object::STY_arrow_start || style == ant::Object::STY_arrow_both || style == ant::Object::STY_arrow_end) {
|
||||||
|
tv_text = qq * (arrow_width * 0.5 + 2.0);
|
||||||
|
} else if (style == ant::Object::STY_cross_start || style == ant::Object::STY_cross_both || style == ant::Object::STY_cross_end) {
|
||||||
|
tv_text = qq * (arrow_width + 2.0);
|
||||||
|
} else if (style == ant::Object::STY_ruler) {
|
||||||
|
tv_text = qq * (tf + 2.0);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (text_halign == db::HAlignCenter) {
|
||||||
|
tv_text.set_x (0);
|
||||||
|
} else if (text_halign == db::HAlignRight) {
|
||||||
|
tv_text.set_x (std::min (tv_text.x (), 0.0));
|
||||||
|
} else if (text_halign == db::HAlignLeft){
|
||||||
|
tv_text.set_x (std::max (tv_text.x (), 0.0));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (text_valign == db::VAlignCenter) {
|
||||||
|
tv_text.set_y (0);
|
||||||
|
} else if (text_valign == db::VAlignTop) {
|
||||||
|
tv_text.set_y (std::min (tv_text.y (), 0.0));
|
||||||
|
} else if (text_valign == db::VAlignBottom){
|
||||||
|
tv_text.set_y (std::max (tv_text.y (), 0.0));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tick_length > 0) {
|
if (tick_length > 0) {
|
||||||
|
|
@ -251,11 +340,18 @@ draw_ruler (const db::DPoint &q1, const db::DPoint &q2, double length_u, double
|
||||||
renderer.draw (db::DEdge (q2, q2 + tv_long), 0, bitmap, 0, 0);
|
renderer.draw (db::DEdge (q2, q2 + tv_long), 0, bitmap, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
renderer.draw (db::DBox (q2 + tv_text, q2 + tv_text),
|
db::DPoint tp = q2;
|
||||||
|
if (pos == ant::Object::POS_center) {
|
||||||
|
tp = q1 + (q2 - q1) * 0.5;
|
||||||
|
} else if (pos == ant::Object::POS_p1) {
|
||||||
|
tp = q1;
|
||||||
|
}
|
||||||
|
|
||||||
|
renderer.draw (db::DBox (tp + tv_text, tp + tv_text),
|
||||||
label,
|
label,
|
||||||
db::DefaultFont,
|
db::DefaultFont,
|
||||||
(text_left ? db::HAlignLeft : db::HAlignRight),
|
text_halign,
|
||||||
(text_bottom ? db::VAlignBottom : db::VAlignTop),
|
text_valign,
|
||||||
db::DFTrans (db::DFTrans::r0), 0, 0, 0, bitmap);
|
db::DFTrans (db::DFTrans::r0), 0, 0, 0, bitmap);
|
||||||
|
|
||||||
if (minor_ticks > 0 && ticks > 0.0) {
|
if (minor_ticks > 0 && ticks > 0.0) {
|
||||||
|
|
@ -283,6 +379,96 @@ draw_ruler (const db::DPoint &q1, const db::DPoint &q2, double length_u, double
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Draws an ellipse with the given parameters
|
||||||
|
*
|
||||||
|
* @param q1 The first point in pixel space
|
||||||
|
* @param q2 The second point in pixel space
|
||||||
|
* @param sel True to draw ruler in "selected" mode
|
||||||
|
* @param bitmap The bitmap to draw the ruler on
|
||||||
|
* @param renderer The renderer object
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
draw_ellipse (const db::DPoint &q1,
|
||||||
|
const db::DPoint &q2,
|
||||||
|
double length_u,
|
||||||
|
bool sel,
|
||||||
|
lay::CanvasPlane *bitmap,
|
||||||
|
lay::Renderer &renderer)
|
||||||
|
{
|
||||||
|
double sel_width = 2 / renderer.resolution ();
|
||||||
|
|
||||||
|
if (length_u < 1e-5 /*micron*/) {
|
||||||
|
|
||||||
|
if (sel) {
|
||||||
|
|
||||||
|
db::DBox b (q1 - db::DVector (sel_width * 0.5, sel_width * 0.5),
|
||||||
|
q2 + db::DVector (sel_width * 0.5, sel_width * 0.5));
|
||||||
|
|
||||||
|
renderer.draw (b, bitmap, bitmap, 0, 0);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
renderer.draw (db::DEdge (q1, q1), 0, bitmap, 0, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
int npoints = 200;
|
||||||
|
|
||||||
|
// produce polygon stuff
|
||||||
|
|
||||||
|
if (sel) {
|
||||||
|
|
||||||
|
double rx = fabs ((q2 - q1).x () * 0.5);
|
||||||
|
double ry = fabs ((q2 - q1).y () * 0.5);
|
||||||
|
db::DPoint c = q1 + (q2 - q1) * 0.5;
|
||||||
|
|
||||||
|
db::DPolygon p;
|
||||||
|
|
||||||
|
std::vector<db::DPoint> pts;
|
||||||
|
pts.reserve (npoints);
|
||||||
|
|
||||||
|
if (sel) {
|
||||||
|
rx += sel_width * 0.5;
|
||||||
|
ry += sel_width * 0.5;
|
||||||
|
}
|
||||||
|
|
||||||
|
double da = M_PI * 2.0 / double (npoints);
|
||||||
|
for (int i = 0; i < npoints; ++i) {
|
||||||
|
double a = da * i;
|
||||||
|
pts.push_back (c + db::DVector (rx * cos (a), ry * sin (a)));
|
||||||
|
}
|
||||||
|
|
||||||
|
p.assign_hull (pts.begin (), pts.end ());
|
||||||
|
|
||||||
|
if (sel) {
|
||||||
|
|
||||||
|
pts.clear ();
|
||||||
|
|
||||||
|
rx -= sel_width;
|
||||||
|
ry -= sel_width;
|
||||||
|
for (int i = 0; i < npoints; ++i) {
|
||||||
|
double a = da * i;
|
||||||
|
pts.push_back (c + db::DVector (rx * cos (a), ry * sin (a)));
|
||||||
|
}
|
||||||
|
|
||||||
|
p.insert_hole (pts.begin (), pts.end ());
|
||||||
|
|
||||||
|
renderer.draw (p, bitmap, bitmap, 0, 0);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
for (db::DPolygon::polygon_edge_iterator e = p.begin_edge (); ! e.at_end (); ++e) {
|
||||||
|
renderer.draw (*e, 0, bitmap, 0, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
draw_ruler (const ant::Object &ruler, const db::DCplxTrans &trans, bool sel, lay::CanvasPlane *bitmap, lay::Renderer &renderer)
|
draw_ruler (const ant::Object &ruler, const db::DCplxTrans &trans, bool sel, lay::CanvasPlane *bitmap, lay::Renderer &renderer)
|
||||||
{
|
{
|
||||||
|
|
@ -297,32 +483,38 @@ draw_ruler (const ant::Object &ruler, const db::DCplxTrans &trans, bool sel, lay
|
||||||
double mu = double (min_tick_spc) / trans.ctrans (1.0);
|
double mu = double (min_tick_spc) / trans.ctrans (1.0);
|
||||||
|
|
||||||
if (ruler.outline () == Object::OL_diag) {
|
if (ruler.outline () == Object::OL_diag) {
|
||||||
draw_ruler (q1, q2, lu, mu, ruler.text (), sel, q2.x () < q1.x (), ruler.style (), bitmap, renderer);
|
draw_ruler (q1, q2, lu, mu, ruler.text (), sel, q2.x () < q1.x (), ruler.style (), ruler.main_position (), ruler.main_xalign (), ruler.main_yalign (), bitmap, renderer);
|
||||||
}
|
}
|
||||||
if ((!xy_swapped && (ruler.outline () == Object::OL_xy || ruler.outline () == Object::OL_diag_xy)) ||
|
if ((!xy_swapped && (ruler.outline () == Object::OL_xy || ruler.outline () == Object::OL_diag_xy)) ||
|
||||||
( xy_swapped && (ruler.outline () == Object::OL_yx || ruler.outline () == Object::OL_diag_yx))) {
|
( xy_swapped && (ruler.outline () == Object::OL_yx || ruler.outline () == Object::OL_diag_yx))) {
|
||||||
bool r = (q2.x () > q1.x ()) ^ (q2.y () < q1.y ());
|
bool r = (q2.x () > q1.x ()) ^ (q2.y () < q1.y ());
|
||||||
if (ruler.outline () == Object::OL_diag_xy || ruler.outline () == Object::OL_diag_yx) {
|
if (ruler.outline () == Object::OL_diag_xy || ruler.outline () == Object::OL_diag_yx) {
|
||||||
draw_ruler (q1, q2, lu, mu, ruler.text (), sel, !r, ruler.style (), bitmap, renderer);
|
draw_ruler (q1, q2, lu, mu, ruler.text (), sel, !r, ruler.style (), ruler.main_position (), ruler.main_xalign (), ruler.main_yalign (), bitmap, renderer);
|
||||||
}
|
}
|
||||||
draw_ruler (q1, db::DPoint (q2.x (), q1.y ()), lu, mu, ruler.text_x (trans.fp_trans ()), sel, r, ruler.style (), bitmap, renderer);
|
draw_ruler (q1, db::DPoint (q2.x (), q1.y ()), lu, mu, ruler.text_x (trans.fp_trans ()), sel, r, ruler.style (), ant::Object::POS_auto, ruler.xlabel_xalign (), ruler.xlabel_yalign (), bitmap, renderer);
|
||||||
draw_ruler (db::DPoint (q2.x (), q1.y ()), q2, lu, mu, ruler.text_y (trans.fp_trans ()), sel, r, ruler.style (), bitmap, renderer);
|
draw_ruler (db::DPoint (q2.x (), q1.y ()), q2, lu, mu, ruler.text_y (trans.fp_trans ()), sel, r, ruler.style (), ant::Object::POS_auto, ruler.ylabel_xalign (), ruler.ylabel_yalign (), bitmap, renderer);
|
||||||
}
|
}
|
||||||
if ((!xy_swapped && (ruler.outline () == Object::OL_yx || ruler.outline () == Object::OL_diag_yx)) ||
|
if ((!xy_swapped && (ruler.outline () == Object::OL_yx || ruler.outline () == Object::OL_diag_yx)) ||
|
||||||
( xy_swapped && (ruler.outline () == Object::OL_xy || ruler.outline () == Object::OL_diag_xy))) {
|
( xy_swapped && (ruler.outline () == Object::OL_xy || ruler.outline () == Object::OL_diag_xy))) {
|
||||||
bool r = (q2.x () > q1.x ()) ^ (q2.y () > q1.y ());
|
bool r = (q2.x () > q1.x ()) ^ (q2.y () > q1.y ());
|
||||||
if (ruler.outline () == Object::OL_diag_xy || ruler.outline () == Object::OL_diag_yx) {
|
if (ruler.outline () == Object::OL_diag_xy || ruler.outline () == Object::OL_diag_yx) {
|
||||||
draw_ruler (q1, q2, lu, mu, ruler.text (), sel, !r, ruler.style (), bitmap, renderer);
|
draw_ruler (q1, q2, lu, mu, ruler.text (), sel, !r, ruler.style (), ruler.main_position (), ruler.main_xalign (), ruler.main_yalign (), bitmap, renderer);
|
||||||
}
|
}
|
||||||
draw_ruler (q1, db::DPoint (q1.x (), q2.y ()), lu, mu, ruler.text_y (trans.fp_trans ()), sel, r, ruler.style (), bitmap, renderer);
|
draw_ruler (q1, db::DPoint (q1.x (), q2.y ()), lu, mu, ruler.text_y (trans.fp_trans ()), sel, r, ruler.style (), ant::Object::POS_auto, ruler.ylabel_xalign (), ruler.ylabel_yalign (), bitmap, renderer);
|
||||||
draw_ruler (db::DPoint (q1.x (), q2.y ()), q2, lu, mu, ruler.text_x (trans.fp_trans ()), sel, r, ruler.style (), bitmap, renderer);
|
draw_ruler (db::DPoint (q1.x (), q2.y ()), q2, lu, mu, ruler.text_x (trans.fp_trans ()), sel, r, ruler.style (), ant::Object::POS_auto, ruler.xlabel_xalign (), ruler.xlabel_yalign (), bitmap, renderer);
|
||||||
}
|
}
|
||||||
if (ruler.outline () == Object::OL_box) {
|
if (ruler.outline () == Object::OL_box) {
|
||||||
bool r = (q2.x () > q1.x ()) ^ (q2.y () < q1.y ());
|
bool r = (q2.x () > q1.x ()) ^ (q2.y () < q1.y ());
|
||||||
draw_ruler (q1, db::DPoint (q2.x (), q1.y ()), lu, mu, ruler.text_x (trans.fp_trans ()), sel, r, ruler.style (), bitmap, renderer);
|
draw_ruler (q1, db::DPoint (q2.x (), q1.y ()), lu, mu, ruler.text_x (trans.fp_trans ()), sel, r, ruler.style (), ant::Object::POS_center, ruler.xlabel_xalign (), ruler.xlabel_yalign (), bitmap, renderer);
|
||||||
draw_ruler (db::DPoint (q2.x (), q1.y ()), q2, lu, mu, ruler.text_y (trans.fp_trans ()), sel, r, ruler.style (), bitmap, renderer);
|
draw_ruler (db::DPoint (q2.x (), q1.y ()), q2, lu, mu, ruler.text_y (trans.fp_trans ()), sel, r, ruler.style (), ant::Object::POS_center, ruler.ylabel_xalign (), ruler.ylabel_yalign (), bitmap, renderer);
|
||||||
draw_ruler (q1, db::DPoint (q1.x (), q2.y ()), lu, mu, "", sel, !r, ruler.style (), bitmap, renderer);
|
draw_ruler (q1, db::DPoint (q1.x (), q2.y ()), lu, mu, "", sel, !r, ruler.style (), ant::Object::POS_center, ant::Object::AL_auto, ant::Object::AL_auto, bitmap, renderer);
|
||||||
draw_ruler (db::DPoint (q1.x (), q2.y ()), q2, lu, mu, ruler.text (), sel, !r, ruler.style (), bitmap, renderer);
|
draw_ruler (db::DPoint (q1.x (), q2.y ()), q2, lu, mu, "", sel, !r, ruler.style (), ant::Object::POS_center, ant::Object::AL_auto, ant::Object::AL_auto, bitmap, renderer);
|
||||||
|
draw_ruler (q1, q2, lu, mu, ruler.text (), sel, !r, ant::Object::STY_none, ruler.main_position (), ruler.main_xalign (), ruler.main_yalign (), bitmap, renderer);
|
||||||
|
} else if (ruler.outline () == Object::OL_ellipse) {
|
||||||
|
draw_ruler (q1, db::DPoint (q2.x (), q1.y ()), lu, mu, ruler.text_x (trans.fp_trans ()), sel, false, ant::Object::STY_none, ant::Object::POS_center, ruler.xlabel_xalign (), ruler.xlabel_yalign (), bitmap, renderer);
|
||||||
|
draw_ruler (db::DPoint (q2.x (), q1.y ()), q2, lu, mu, ruler.text_y (trans.fp_trans ()), sel, false, ant::Object::STY_none, ant::Object::POS_center, ruler.ylabel_xalign (), ruler.ylabel_yalign (), bitmap, renderer);
|
||||||
|
draw_ruler (q1, q2, lu, mu, ruler.text (), sel, false, ant::Object::STY_none, ruler.main_position (), ruler.main_xalign (), ruler.main_yalign (), bitmap, renderer);
|
||||||
|
draw_ellipse (q1, q2, lu, sel, bitmap, renderer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,11 @@ Template::Template ()
|
||||||
: m_title (tl::to_string (QObject::tr ("Ruler"))),
|
: m_title (tl::to_string (QObject::tr ("Ruler"))),
|
||||||
m_fmt_x ("$X"), m_fmt_y ("$Y"), m_fmt ("$D"),
|
m_fmt_x ("$X"), m_fmt_y ("$Y"), m_fmt ("$D"),
|
||||||
m_style (ant::Object::STY_ruler), m_outline (ant::Object::OL_diag),
|
m_style (ant::Object::STY_ruler), m_outline (ant::Object::OL_diag),
|
||||||
m_snap (true), m_angle_constraint (lay::AC_Global)
|
m_snap (true), m_angle_constraint (lay::AC_Global),
|
||||||
|
m_main_position (ant::Object::POS_auto),
|
||||||
|
m_main_xalign (ant::Object::AL_auto), m_main_yalign (ant::Object::AL_auto),
|
||||||
|
m_xlabel_xalign (ant::Object::AL_auto), m_xlabel_yalign (ant::Object::AL_auto),
|
||||||
|
m_ylabel_xalign (ant::Object::AL_auto), m_ylabel_yalign (ant::Object::AL_auto)
|
||||||
{
|
{
|
||||||
// .. nothing yet ..
|
// .. nothing yet ..
|
||||||
}
|
}
|
||||||
|
|
@ -45,7 +49,11 @@ Template::Template (const std::string &title,
|
||||||
: m_title (title),
|
: m_title (title),
|
||||||
m_fmt_x (fmt_x), m_fmt_y (fmt_y), m_fmt (fmt),
|
m_fmt_x (fmt_x), m_fmt_y (fmt_y), m_fmt (fmt),
|
||||||
m_style (style), m_outline (outline),
|
m_style (style), m_outline (outline),
|
||||||
m_snap (snap), m_angle_constraint (angle_constraint)
|
m_snap (snap), m_angle_constraint (angle_constraint),
|
||||||
|
m_main_position (ant::Object::POS_auto),
|
||||||
|
m_main_xalign (ant::Object::AL_auto), m_main_yalign (ant::Object::AL_auto),
|
||||||
|
m_xlabel_xalign (ant::Object::AL_auto), m_xlabel_yalign (ant::Object::AL_auto),
|
||||||
|
m_ylabel_xalign (ant::Object::AL_auto), m_ylabel_yalign (ant::Object::AL_auto)
|
||||||
{
|
{
|
||||||
// .. nothing else ..
|
// .. nothing else ..
|
||||||
}
|
}
|
||||||
|
|
@ -54,7 +62,11 @@ Template::Template (const ant::Template &d)
|
||||||
: m_title (d.m_title),
|
: m_title (d.m_title),
|
||||||
m_fmt_x (d.m_fmt_x), m_fmt_y (d.m_fmt_y), m_fmt (d.m_fmt),
|
m_fmt_x (d.m_fmt_x), m_fmt_y (d.m_fmt_y), m_fmt (d.m_fmt),
|
||||||
m_style (d.m_style), m_outline (d.m_outline),
|
m_style (d.m_style), m_outline (d.m_outline),
|
||||||
m_snap (d.m_snap), m_angle_constraint (d.m_angle_constraint)
|
m_snap (d.m_snap), m_angle_constraint (d.m_angle_constraint),
|
||||||
|
m_main_position (d.m_main_position),
|
||||||
|
m_main_xalign (d.m_main_xalign), m_main_yalign (d.m_main_yalign),
|
||||||
|
m_xlabel_xalign (d.m_xlabel_xalign), m_xlabel_yalign (d.m_xlabel_yalign),
|
||||||
|
m_ylabel_xalign (d.m_ylabel_xalign), m_ylabel_yalign (d.m_ylabel_yalign)
|
||||||
{
|
{
|
||||||
// .. nothing else ..
|
// .. nothing else ..
|
||||||
}
|
}
|
||||||
|
|
@ -71,6 +83,13 @@ Template::operator= (const ant::Template &d)
|
||||||
m_outline = d.m_outline;
|
m_outline = d.m_outline;
|
||||||
m_snap = d.m_snap;
|
m_snap = d.m_snap;
|
||||||
m_angle_constraint = d.m_angle_constraint;
|
m_angle_constraint = d.m_angle_constraint;
|
||||||
|
m_main_position = d.m_main_position;
|
||||||
|
m_main_xalign = d.m_main_xalign;
|
||||||
|
m_main_yalign = d.m_main_yalign;
|
||||||
|
m_xlabel_xalign = d.m_xlabel_xalign;
|
||||||
|
m_xlabel_yalign = d.m_xlabel_yalign;
|
||||||
|
m_ylabel_xalign = d.m_ylabel_xalign;
|
||||||
|
m_ylabel_yalign = d.m_ylabel_yalign;
|
||||||
}
|
}
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
@ -118,6 +137,76 @@ Template::from_string (const std::string &s)
|
||||||
r.back ().fmt_y (s);
|
r.back ().fmt_y (s);
|
||||||
ex.test (",");
|
ex.test (",");
|
||||||
|
|
||||||
|
} else if (ex.test ("position=")) {
|
||||||
|
|
||||||
|
std::string s;
|
||||||
|
ex.read_word (s);
|
||||||
|
ant::PositionConverter pc;
|
||||||
|
ant::Object::position_type pos;
|
||||||
|
pc.from_string (s, pos);
|
||||||
|
r.back ().set_main_position (pos);
|
||||||
|
ex.test (",");
|
||||||
|
|
||||||
|
} else if (ex.test ("xalign=")) {
|
||||||
|
|
||||||
|
std::string s;
|
||||||
|
ex.read_word (s);
|
||||||
|
ant::AlignmentConverter ac;
|
||||||
|
ant::Object::alignment_type a;
|
||||||
|
ac.from_string (s, a);
|
||||||
|
r.back ().set_main_xalign (a);
|
||||||
|
ex.test (",");
|
||||||
|
|
||||||
|
} else if (ex.test ("yalign=")) {
|
||||||
|
|
||||||
|
std::string s;
|
||||||
|
ex.read_word (s);
|
||||||
|
ant::AlignmentConverter ac;
|
||||||
|
ant::Object::alignment_type a;
|
||||||
|
ac.from_string (s, a);
|
||||||
|
r.back ().set_main_yalign (a);
|
||||||
|
ex.test (",");
|
||||||
|
|
||||||
|
} else if (ex.test ("xlabel_xalign=")) {
|
||||||
|
|
||||||
|
std::string s;
|
||||||
|
ex.read_word (s);
|
||||||
|
ant::AlignmentConverter ac;
|
||||||
|
ant::Object::alignment_type a;
|
||||||
|
ac.from_string (s, a);
|
||||||
|
r.back ().set_xlabel_xalign (a);
|
||||||
|
ex.test (",");
|
||||||
|
|
||||||
|
} else if (ex.test ("xlabel_yalign=")) {
|
||||||
|
|
||||||
|
std::string s;
|
||||||
|
ex.read_word (s);
|
||||||
|
ant::AlignmentConverter ac;
|
||||||
|
ant::Object::alignment_type a;
|
||||||
|
ac.from_string (s, a);
|
||||||
|
r.back ().set_xlabel_yalign (a);
|
||||||
|
ex.test (",");
|
||||||
|
|
||||||
|
} else if (ex.test ("ylabel_xalign=")) {
|
||||||
|
|
||||||
|
std::string s;
|
||||||
|
ex.read_word (s);
|
||||||
|
ant::AlignmentConverter ac;
|
||||||
|
ant::Object::alignment_type a;
|
||||||
|
ac.from_string (s, a);
|
||||||
|
r.back ().set_ylabel_xalign (a);
|
||||||
|
ex.test (",");
|
||||||
|
|
||||||
|
} else if (ex.test ("ylabel_yalign=")) {
|
||||||
|
|
||||||
|
std::string s;
|
||||||
|
ex.read_word (s);
|
||||||
|
ant::AlignmentConverter ac;
|
||||||
|
ant::Object::alignment_type a;
|
||||||
|
ac.from_string (s, a);
|
||||||
|
r.back ().set_ylabel_yalign (a);
|
||||||
|
ex.test (",");
|
||||||
|
|
||||||
} else if (ex.test ("style=")) {
|
} else if (ex.test ("style=")) {
|
||||||
|
|
||||||
std::string s;
|
std::string s;
|
||||||
|
|
@ -200,6 +289,31 @@ Template::to_string (const std::vector<Template> &v)
|
||||||
r += tl::to_word_or_quoted_string (t->fmt_y ());
|
r += tl::to_word_or_quoted_string (t->fmt_y ());
|
||||||
r += ",";
|
r += ",";
|
||||||
|
|
||||||
|
r += "pos=";
|
||||||
|
ant::PositionConverter pc;
|
||||||
|
r += pc.to_string (t->main_position ());
|
||||||
|
r += ",";
|
||||||
|
|
||||||
|
ant::AlignmentConverter ac;
|
||||||
|
r += "xalign=";
|
||||||
|
r += ac.to_string (t->main_xalign ());
|
||||||
|
r += ",";
|
||||||
|
r += "yalign=";
|
||||||
|
r += ac.to_string (t->main_yalign ());
|
||||||
|
r += ",";
|
||||||
|
r += "xlabel_xalign=";
|
||||||
|
r += ac.to_string (t->xlabel_xalign ());
|
||||||
|
r += ",";
|
||||||
|
r += "xlabel_yalign=";
|
||||||
|
r += ac.to_string (t->xlabel_yalign ());
|
||||||
|
r += ",";
|
||||||
|
r += "ylabel_xalign=";
|
||||||
|
r += ac.to_string (t->ylabel_xalign ());
|
||||||
|
r += ",";
|
||||||
|
r += "ylabel_yalign=";
|
||||||
|
r += ac.to_string (t->ylabel_yalign ());
|
||||||
|
r += ",";
|
||||||
|
|
||||||
r += "style=";
|
r += "style=";
|
||||||
ant::StyleConverter sc;
|
ant::StyleConverter sc;
|
||||||
r += sc.to_string (t->style ());
|
r += sc.to_string (t->style ());
|
||||||
|
|
@ -215,8 +329,8 @@ Template::to_string (const std::vector<Template> &v)
|
||||||
r += ",";
|
r += ",";
|
||||||
|
|
||||||
r += "angle_constraint=";
|
r += "angle_constraint=";
|
||||||
ant::ACConverter ac;
|
ant::ACConverter acc;
|
||||||
r += ac.to_string (t->angle_constraint ());
|
r += acc.to_string (t->angle_constraint ());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -43,6 +43,8 @@ class ANT_PUBLIC Template
|
||||||
public:
|
public:
|
||||||
typedef ant::Object::style_type style_type;
|
typedef ant::Object::style_type style_type;
|
||||||
typedef ant::Object::outline_type outline_type;
|
typedef ant::Object::outline_type outline_type;
|
||||||
|
typedef ant::Object::position_type position_type;
|
||||||
|
typedef ant::Object::alignment_type alignment_type;
|
||||||
typedef lay::angle_constraint_type angle_constraint_type;
|
typedef lay::angle_constraint_type angle_constraint_type;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -104,6 +106,57 @@ public:
|
||||||
m_fmt = s;
|
m_fmt = s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Sets the position of the main label
|
||||||
|
* See the \position_type enum for details.
|
||||||
|
*/
|
||||||
|
void set_main_position (position_type pos)
|
||||||
|
{
|
||||||
|
m_main_position = pos;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Gets the position of the main label
|
||||||
|
*/
|
||||||
|
position_type main_position () const
|
||||||
|
{
|
||||||
|
return m_main_position;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Sets the x alignment flag of the main label
|
||||||
|
* See \alignment_type for details.
|
||||||
|
*/
|
||||||
|
void set_main_xalign (alignment_type a)
|
||||||
|
{
|
||||||
|
m_main_xalign = a;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Gets the x alignment flag of the main label
|
||||||
|
*/
|
||||||
|
alignment_type main_xalign () const
|
||||||
|
{
|
||||||
|
return m_main_xalign;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Sets the y alignment flag of the main label
|
||||||
|
* See \alignment_type for details.
|
||||||
|
*/
|
||||||
|
void set_main_yalign (alignment_type a)
|
||||||
|
{
|
||||||
|
m_main_yalign = a;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Gets the y alignment flag of the main label
|
||||||
|
*/
|
||||||
|
alignment_type main_yalign () const
|
||||||
|
{
|
||||||
|
return m_main_yalign;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief x axis format string read accessor
|
* @brief x axis format string read accessor
|
||||||
*/
|
*/
|
||||||
|
|
@ -123,6 +176,40 @@ public:
|
||||||
m_fmt_x = s;
|
m_fmt_x = s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Sets the x alignment flag of the x axis label
|
||||||
|
* See \alignment_type for details.
|
||||||
|
*/
|
||||||
|
void set_xlabel_xalign (alignment_type a)
|
||||||
|
{
|
||||||
|
m_xlabel_xalign = a;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Gets the x alignment flag of the x axis label
|
||||||
|
*/
|
||||||
|
alignment_type xlabel_xalign () const
|
||||||
|
{
|
||||||
|
return m_xlabel_xalign;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Sets the y alignment flag of the x axis label
|
||||||
|
* See \alignment_type for details.
|
||||||
|
*/
|
||||||
|
void set_xlabel_yalign (alignment_type a)
|
||||||
|
{
|
||||||
|
m_xlabel_yalign = a;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Gets the y alignment flag of the x axis label
|
||||||
|
*/
|
||||||
|
alignment_type xlabel_yalign () const
|
||||||
|
{
|
||||||
|
return m_xlabel_yalign;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief y axis format string read accessor
|
* @brief y axis format string read accessor
|
||||||
*/
|
*/
|
||||||
|
|
@ -142,6 +229,40 @@ public:
|
||||||
m_fmt_y = s;
|
m_fmt_y = s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Sets the x alignment flag of the y axis label
|
||||||
|
* See \alignment_type for details.
|
||||||
|
*/
|
||||||
|
void set_ylabel_xalign (alignment_type a)
|
||||||
|
{
|
||||||
|
m_ylabel_xalign = a;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Gets the x alignment flag of the y axis label
|
||||||
|
*/
|
||||||
|
alignment_type ylabel_xalign () const
|
||||||
|
{
|
||||||
|
return m_ylabel_xalign;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Sets the y alignment flag of the y axis label
|
||||||
|
* See \alignment_type for details.
|
||||||
|
*/
|
||||||
|
void set_ylabel_yalign (alignment_type a)
|
||||||
|
{
|
||||||
|
m_ylabel_yalign = a;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Gets the y alignment flag of the y axis label
|
||||||
|
*/
|
||||||
|
alignment_type ylabel_yalign () const
|
||||||
|
{
|
||||||
|
return m_ylabel_yalign;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Style read accessor
|
* @brief Style read accessor
|
||||||
*/
|
*/
|
||||||
|
|
@ -241,6 +362,10 @@ private:
|
||||||
outline_type m_outline;
|
outline_type m_outline;
|
||||||
bool m_snap;
|
bool m_snap;
|
||||||
lay::angle_constraint_type m_angle_constraint;
|
lay::angle_constraint_type m_angle_constraint;
|
||||||
|
position_type m_main_position;
|
||||||
|
alignment_type m_main_xalign, m_main_yalign;
|
||||||
|
alignment_type m_xlabel_xalign, m_xlabel_yalign;
|
||||||
|
alignment_type m_ylabel_xalign, m_ylabel_yalign;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -53,6 +53,20 @@ static int angle_horizontal () { return int (lay::AC_Horizontal); }
|
||||||
static int angle_vertical () { return int (lay::AC_Vertical); }
|
static int angle_vertical () { return int (lay::AC_Vertical); }
|
||||||
static int angle_global () { return int (lay::AC_Global); }
|
static int angle_global () { return int (lay::AC_Global); }
|
||||||
|
|
||||||
|
static int pos_auto () { return int (ant::Object::POS_auto); }
|
||||||
|
static int pos_p1 () { return int (ant::Object::POS_p1); }
|
||||||
|
static int pos_p2 () { return int (ant::Object::POS_p2); }
|
||||||
|
static int pos_center () { return int (ant::Object::POS_center); }
|
||||||
|
|
||||||
|
static int align_auto () { return int (ant::Object::AL_auto); }
|
||||||
|
static int align_center () { return int (ant::Object::AL_center); }
|
||||||
|
static int align_left () { return int (ant::Object::AL_left); }
|
||||||
|
static int align_bottom () { return int (ant::Object::AL_bottom); }
|
||||||
|
static int align_down () { return int (ant::Object::AL_down); }
|
||||||
|
static int align_right () { return int (ant::Object::AL_right); }
|
||||||
|
static int align_top () { return int (ant::Object::AL_top); }
|
||||||
|
static int align_up () { return int (ant::Object::AL_up); }
|
||||||
|
|
||||||
static void clear_annotations (lay::LayoutView *view);
|
static void clear_annotations (lay::LayoutView *view);
|
||||||
static void insert_annotation (lay::LayoutView *view, AnnotationRef *obj);
|
static void insert_annotation (lay::LayoutView *view, AnnotationRef *obj);
|
||||||
static void erase_annotation (lay::LayoutView *view, int id);
|
static void erase_annotation (lay::LayoutView *view, int id);
|
||||||
|
|
@ -221,6 +235,76 @@ static void set_angle_constraint (AnnotationRef *obj, int angle_constraint)
|
||||||
obj->angle_constraint (lay::angle_constraint_type (angle_constraint));
|
obj->angle_constraint (lay::angle_constraint_type (angle_constraint));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int get_main_position (const AnnotationRef *obj)
|
||||||
|
{
|
||||||
|
return int (obj->main_position ());
|
||||||
|
}
|
||||||
|
|
||||||
|
static void set_main_position (AnnotationRef *obj, int pos)
|
||||||
|
{
|
||||||
|
obj->set_main_position ((ant::Object::position_type) pos);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int get_main_xalign (const AnnotationRef *obj)
|
||||||
|
{
|
||||||
|
return int (obj->main_xalign ());
|
||||||
|
}
|
||||||
|
|
||||||
|
static void set_main_xalign (AnnotationRef *obj, int align)
|
||||||
|
{
|
||||||
|
obj->set_main_xalign ((ant::Object::alignment_type) align);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int get_main_yalign (const AnnotationRef *obj)
|
||||||
|
{
|
||||||
|
return int (obj->main_yalign ());
|
||||||
|
}
|
||||||
|
|
||||||
|
static void set_main_yalign (AnnotationRef *obj, int align)
|
||||||
|
{
|
||||||
|
obj->set_main_yalign ((ant::Object::alignment_type) align);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int get_xlabel_xalign (const AnnotationRef *obj)
|
||||||
|
{
|
||||||
|
return int (obj->xlabel_xalign ());
|
||||||
|
}
|
||||||
|
|
||||||
|
static void set_xlabel_xalign (AnnotationRef *obj, int align)
|
||||||
|
{
|
||||||
|
obj->set_xlabel_xalign ((ant::Object::alignment_type) align);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int get_xlabel_yalign (const AnnotationRef *obj)
|
||||||
|
{
|
||||||
|
return int (obj->xlabel_yalign ());
|
||||||
|
}
|
||||||
|
|
||||||
|
static void set_xlabel_yalign (AnnotationRef *obj, int align)
|
||||||
|
{
|
||||||
|
obj->set_xlabel_yalign ((ant::Object::alignment_type) align);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int get_ylabel_xalign (const AnnotationRef *obj)
|
||||||
|
{
|
||||||
|
return int (obj->ylabel_xalign ());
|
||||||
|
}
|
||||||
|
|
||||||
|
static void set_ylabel_xalign (AnnotationRef *obj, int align)
|
||||||
|
{
|
||||||
|
obj->set_ylabel_xalign ((ant::Object::alignment_type) align);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int get_ylabel_yalign (const AnnotationRef *obj)
|
||||||
|
{
|
||||||
|
return int (obj->ylabel_yalign ());
|
||||||
|
}
|
||||||
|
|
||||||
|
static void set_ylabel_yalign (AnnotationRef *obj, int align)
|
||||||
|
{
|
||||||
|
obj->set_ylabel_yalign ((ant::Object::alignment_type) align);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief An alternative iterator that returns "live" AnnotationRef objects
|
* @brief An alternative iterator that returns "live" AnnotationRef objects
|
||||||
*/
|
*/
|
||||||
|
|
@ -383,6 +467,79 @@ gsi::Class<AnnotationRef> decl_Annotation (decl_BasicAnnotation, "Annotation",
|
||||||
"@brief Gets the global angle code for use with the \\angle_constraint method.\n"
|
"@brief Gets the global angle code for use with the \\angle_constraint method.\n"
|
||||||
"This code will tell the ruler or marker to use the angle constraint defined globally."
|
"This code will tell the ruler or marker to use the angle constraint defined globally."
|
||||||
) +
|
) +
|
||||||
|
gsi::method ("PositionAuto", &gsi::pos_auto,
|
||||||
|
"@brief This code indicates automatic positioning.\n"
|
||||||
|
"The main label will be put either to p1 or p2, whichever the annotation considers best.\n"
|
||||||
|
"\n"
|
||||||
|
"This constant has been introduced in version 0.25."
|
||||||
|
) +
|
||||||
|
gsi::method ("PositionP1", &gsi::pos_p1,
|
||||||
|
"@brief This code indicates positioning of the main label at p1.\n"
|
||||||
|
"The main label will be put to p1.\n"
|
||||||
|
"\n"
|
||||||
|
"This constant has been introduced in version 0.25."
|
||||||
|
) +
|
||||||
|
gsi::method ("PositionP2", &gsi::pos_p2,
|
||||||
|
"@brief This code indicates positioning of the main label at p2.\n"
|
||||||
|
"The main label will be put to p2.\n"
|
||||||
|
"\n"
|
||||||
|
"This constant has been introduced in version 0.25."
|
||||||
|
) +
|
||||||
|
gsi::method ("PositionCenter", &gsi::pos_center,
|
||||||
|
"@brief This code indicates positioning of the main label at the mid point between p1 and p2.\n"
|
||||||
|
"The main label will be put to the center point.\n"
|
||||||
|
"\n"
|
||||||
|
"This constant has been introduced in version 0.25."
|
||||||
|
) +
|
||||||
|
gsi::method ("AlignAuto", &gsi::align_auto,
|
||||||
|
"@brief This code indicates automatic alignment.\n"
|
||||||
|
"This code makes the annotation align the label the way it thinks is best.\n"
|
||||||
|
"\n"
|
||||||
|
"This constant has been introduced in version 0.25."
|
||||||
|
) +
|
||||||
|
gsi::method ("AlignCenter", &gsi::align_center,
|
||||||
|
"@brief This code indicates automatic alignment.\n"
|
||||||
|
"This code makes the annotation align the label centered. When used in a horizontal context, "
|
||||||
|
"centering is in horizontal direction. If used in a vertical context, centering is in vertical direction.\n"
|
||||||
|
"\n"
|
||||||
|
"This constant has been introduced in version 0.25."
|
||||||
|
) +
|
||||||
|
gsi::method ("AlignLeft", &gsi::align_left,
|
||||||
|
"@brief This code indicates left alignment.\n"
|
||||||
|
"If used in a horizontal context, this alignment code makes the label aligned at the left side - i.e. it will appear right of the reference point.\n"
|
||||||
|
"\n"
|
||||||
|
"This constant has been introduced in version 0.25."
|
||||||
|
) +
|
||||||
|
gsi::method ("AlignBottom", &gsi::align_bottom,
|
||||||
|
"@brief This code indicates bottom alignment.\n"
|
||||||
|
"If used in a vertical context, this alignment code makes the label aligned at the bottom side - i.e. it will appear top of the reference point.\n"
|
||||||
|
"\n"
|
||||||
|
"This constant has been introduced in version 0.25."
|
||||||
|
) +
|
||||||
|
gsi::method ("AlignDown", &gsi::align_down,
|
||||||
|
"@brief This code indicates left or bottom alignment, depending on the context.\n"
|
||||||
|
"This code is equivalent to \\AlignLeft and \\AlignBottom.\n"
|
||||||
|
"\n"
|
||||||
|
"This constant has been introduced in version 0.25."
|
||||||
|
) +
|
||||||
|
gsi::method ("AlignRight", &gsi::align_right,
|
||||||
|
"@brief This code indicates right alignment.\n"
|
||||||
|
"If used in a horizontal context, this alignment code makes the label aligned at the right side - i.e. it will appear left of the reference point.\n"
|
||||||
|
"\n"
|
||||||
|
"This constant has been introduced in version 0.25."
|
||||||
|
) +
|
||||||
|
gsi::method ("AlignBottom", &gsi::align_top,
|
||||||
|
"@brief This code indicates top alignment.\n"
|
||||||
|
"If used in a vertical context, this alignment code makes the label aligned at the top side - i.e. it will appear bottom of the reference point.\n"
|
||||||
|
"\n"
|
||||||
|
"This constant has been introduced in version 0.25."
|
||||||
|
) +
|
||||||
|
gsi::method ("AlignUp", &gsi::align_up,
|
||||||
|
"@brief This code indicates right or top alignment, depending on the context.\n"
|
||||||
|
"This code is equivalent to \\AlignRight and \\AlignTop.\n"
|
||||||
|
"\n"
|
||||||
|
"This constant has been introduced in version 0.25."
|
||||||
|
) +
|
||||||
gsi::method ("detach", &AnnotationRef::detach,
|
gsi::method ("detach", &AnnotationRef::detach,
|
||||||
"@brief Detaches the annotation object from the view\n"
|
"@brief Detaches the annotation object from the view\n"
|
||||||
"If the annotation object was inserted into the view, property changes will be "
|
"If the annotation object was inserted into the view, property changes will be "
|
||||||
|
|
@ -516,6 +673,103 @@ gsi::Class<AnnotationRef> decl_Annotation (decl_BasicAnnotation, "Annotation",
|
||||||
gsi::method_ext ("outline", &gsi::get_outline,
|
gsi::method_ext ("outline", &gsi::get_outline,
|
||||||
"@brief Returns the outline style of the annotation object\n"
|
"@brief Returns the outline style of the annotation object\n"
|
||||||
) +
|
) +
|
||||||
|
gsi::method ("category=", &ant::Object::set_category, gsi::arg ("cat"),
|
||||||
|
"@brief Sets the category string of the annotation\n"
|
||||||
|
"The category string is an arbitrary string that can be used by various consumers "
|
||||||
|
"or generators to mark 'their' annotation.\n"
|
||||||
|
"\n"
|
||||||
|
"This method has been introduced in version 0.25"
|
||||||
|
) +
|
||||||
|
gsi::method ("category", &ant::Object::category,
|
||||||
|
"@brief Gets the category string\n"
|
||||||
|
"See \\category= for details.\n"
|
||||||
|
"\n"
|
||||||
|
"This method has been introduced in version 0.25"
|
||||||
|
) +
|
||||||
|
gsi::method_ext ("main_position=", &gsi::set_main_position, gsi::arg ("pos"),
|
||||||
|
"@brief Sets the position of the main label\n"
|
||||||
|
"This method accepts one of the Position... constants.\n"
|
||||||
|
"\n"
|
||||||
|
"This method has been introduced in version 0.25"
|
||||||
|
) +
|
||||||
|
gsi::method_ext ("main_position", &gsi::get_main_position,
|
||||||
|
"@brief Gets the position of the main label\n"
|
||||||
|
"See \\main_position= for details.\n"
|
||||||
|
"\n"
|
||||||
|
"This method has been introduced in version 0.25"
|
||||||
|
) +
|
||||||
|
gsi::method_ext ("main_xalign=", &gsi::set_main_xalign, gsi::arg ("align"),
|
||||||
|
"@brief Sets the horizontal alignment type of the main label\n"
|
||||||
|
"This method accepts one of the Align... constants.\n"
|
||||||
|
"\n"
|
||||||
|
"This method has been introduced in version 0.25"
|
||||||
|
) +
|
||||||
|
gsi::method_ext ("main_xalign", &gsi::get_main_xalign,
|
||||||
|
"@brief Gets the horizontal alignment type of the main label\n"
|
||||||
|
"See \\main_xalign= for details.\n"
|
||||||
|
"\n"
|
||||||
|
"This method has been introduced in version 0.25"
|
||||||
|
) +
|
||||||
|
gsi::method_ext ("main_yalign=", &gsi::set_main_yalign, gsi::arg ("align"),
|
||||||
|
"@brief Sets the vertical alignment type of the main label\n"
|
||||||
|
"This method accepts one of the Align... constants.\n"
|
||||||
|
"\n"
|
||||||
|
"This method has been introduced in version 0.25"
|
||||||
|
) +
|
||||||
|
gsi::method_ext ("main_yalign", &gsi::get_main_yalign,
|
||||||
|
"@brief Gets the vertical alignment type of the main label\n"
|
||||||
|
"See \\main_yalign= for details.\n"
|
||||||
|
"\n"
|
||||||
|
"This method has been introduced in version 0.25"
|
||||||
|
) +
|
||||||
|
gsi::method_ext ("xlabel_xalign=", &gsi::set_xlabel_xalign, gsi::arg ("align"),
|
||||||
|
"@brief Sets the horizontal alignment type of the x axis label\n"
|
||||||
|
"This method accepts one of the Align... constants.\n"
|
||||||
|
"\n"
|
||||||
|
"This method has been introduced in version 0.25"
|
||||||
|
) +
|
||||||
|
gsi::method_ext ("xlabel_xalign", &gsi::get_xlabel_xalign,
|
||||||
|
"@brief Gets the horizontal alignment type of the x axis label\n"
|
||||||
|
"See \\xlabel_xalign= for details.\n"
|
||||||
|
"\n"
|
||||||
|
"This method has been introduced in version 0.25"
|
||||||
|
) +
|
||||||
|
gsi::method_ext ("xlabel_yalign=", &gsi::set_xlabel_yalign, gsi::arg ("align"),
|
||||||
|
"@brief Sets the vertical alignment type of the x axis label\n"
|
||||||
|
"This method accepts one of the Align... constants.\n"
|
||||||
|
"\n"
|
||||||
|
"This method has been introduced in version 0.25"
|
||||||
|
) +
|
||||||
|
gsi::method_ext ("xlabel_yalign", &gsi::get_xlabel_yalign,
|
||||||
|
"@brief Gets the vertical alignment type of the x axis label\n"
|
||||||
|
"See \\xlabel_yalign= for details.\n"
|
||||||
|
"\n"
|
||||||
|
"This method has been introduced in version 0.25"
|
||||||
|
) +
|
||||||
|
gsi::method_ext ("ylabel_xalign=", &gsi::set_ylabel_xalign, gsi::arg ("align"),
|
||||||
|
"@brief Sets the horizontal alignment type of the y axis label\n"
|
||||||
|
"This method accepts one of the Align... constants.\n"
|
||||||
|
"\n"
|
||||||
|
"This method has been introduced in version 0.25"
|
||||||
|
) +
|
||||||
|
gsi::method_ext ("ylabel_xalign", &gsi::get_ylabel_xalign,
|
||||||
|
"@brief Gets the horizontal alignment type of the y axis label\n"
|
||||||
|
"See \\ylabel_xalign= for details.\n"
|
||||||
|
"\n"
|
||||||
|
"This method has been introduced in version 0.25"
|
||||||
|
) +
|
||||||
|
gsi::method_ext ("ylabel_yalign=", &gsi::set_ylabel_yalign, gsi::arg ("align"),
|
||||||
|
"@brief Sets the vertical alignment type of the y axis label\n"
|
||||||
|
"This method accepts one of the Align... constants.\n"
|
||||||
|
"\n"
|
||||||
|
"This method has been introduced in version 0.25"
|
||||||
|
) +
|
||||||
|
gsi::method_ext ("ylabel_yalign", &gsi::get_ylabel_yalign,
|
||||||
|
"@brief Gets the vertical alignment type of the y axis label\n"
|
||||||
|
"See \\ylabel_yalign= for details.\n"
|
||||||
|
"\n"
|
||||||
|
"This method has been introduced in version 0.25"
|
||||||
|
) +
|
||||||
gsi::method ("snap=", (void (AnnotationRef::*) (bool)) &AnnotationRef::snap,
|
gsi::method ("snap=", (void (AnnotationRef::*) (bool)) &AnnotationRef::snap,
|
||||||
"@brief Sets the 'snap to objects' attribute\n"
|
"@brief Sets the 'snap to objects' attribute\n"
|
||||||
"@args flag\n"
|
"@args flag\n"
|
||||||
|
|
|
||||||
|
|
@ -75,5 +75,6 @@ klayout_main.depends += lay ext lib plugins
|
||||||
unit_tests.depends += ut plugins
|
unit_tests.depends += ut plugins
|
||||||
|
|
||||||
RESOURCES += \
|
RESOURCES += \
|
||||||
laybasic/layResources.qrc
|
laybasic/layResources.qrc \
|
||||||
|
ant/layResources.qrc
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue