mirror of https://github.com/KLayout/klayout.git
WIP
This commit is contained in:
parent
646a207e00
commit
c3010745ec
|
|
@ -1,7 +1,8 @@
|
|||
<ui version="4.0" >
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>EditablePathPropertiesPage</class>
|
||||
<widget class="QWidget" name="EditablePathPropertiesPage" >
|
||||
<property name="geometry" >
|
||||
<widget class="QWidget" name="EditablePathPropertiesPage">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
|
|
@ -9,25 +10,34 @@
|
|||
<height>378</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle" >
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="margin" >
|
||||
<layout class="QGridLayout">
|
||||
<property name="leftMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="spacing" >
|
||||
<property name="topMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="5" column="0" colspan="3" >
|
||||
<item row="5" column="0" colspan="3">
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType" >
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>456</width>
|
||||
<height>16</height>
|
||||
|
|
@ -35,45 +45,54 @@
|
|||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="7" column="1" colspan="2" >
|
||||
<widget class="QCheckBox" name="abs_cb" >
|
||||
<property name="text" >
|
||||
<item row="7" column="1" colspan="2">
|
||||
<widget class="QCheckBox" name="abs_cb">
|
||||
<property name="text">
|
||||
<string>Absolute (accumulated) transformations</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="1" colspan="2" >
|
||||
<widget class="QCheckBox" name="dbu_cb" >
|
||||
<property name="text" >
|
||||
<item row="6" column="1" colspan="2">
|
||||
<widget class="QCheckBox" name="dbu_cb">
|
||||
<property name="text">
|
||||
<string>Coordinates in database units</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0" >
|
||||
<widget class="QLabel" name="label_4" >
|
||||
<property name="text" >
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>Extension type</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0" colspan="3" >
|
||||
<widget class="QFrame" name="frame1" >
|
||||
<property name="frameShape" >
|
||||
<item row="0" column="0" colspan="3">
|
||||
<widget class="QFrame" name="frame1">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<property name="frameShadow" >
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" >
|
||||
<property name="margin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="spacing" >
|
||||
<layout class="QHBoxLayout">
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</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>
|
||||
<widget class="QLabel" name="label_12" >
|
||||
<property name="font" >
|
||||
<widget class="QLabel" name="label_12">
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>Sans Serif</family>
|
||||
<pointsize>12</pointsize>
|
||||
|
|
@ -84,25 +103,23 @@
|
|||
<strikeout>false</strikeout>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<property name="text">
|
||||
<string>Path Properties</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="layer_lbl" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy>
|
||||
<hsizetype>7</hsizetype>
|
||||
<vsizetype>5</vsizetype>
|
||||
<widget class="QLabel" name="layer_lbl">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="alignment" >
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
|
|
@ -110,62 +127,66 @@
|
|||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" >
|
||||
<widget class="QLabel" name="label_2" >
|
||||
<property name="text" >
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Width</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" >
|
||||
<widget class="QLabel" name="label_3" >
|
||||
<property name="text" >
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>Points (x,y)</string>
|
||||
</property>
|
||||
<property name="alignment" >
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1" colspan="2" >
|
||||
<widget class="QTextEdit" name="ptlist_le" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy>
|
||||
<hsizetype>7</hsizetype>
|
||||
<vsizetype>7</vsizetype>
|
||||
<item row="2" column="1" colspan="2">
|
||||
<widget class="QTextEdit" name="ptlist_le">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||
<horstretch>1</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="lineWidth" >
|
||||
<property name="lineWidth">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="tabStopWidth" >
|
||||
<number>100</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="0" colspan="3" >
|
||||
<widget class="QFrame" name="frame2" >
|
||||
<property name="frameShape" >
|
||||
<item row="8" column="0" colspan="3">
|
||||
<widget class="QFrame" name="frame2">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<property name="frameShadow" >
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" >
|
||||
<property name="margin" >
|
||||
<layout class="QHBoxLayout">
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="spacing" >
|
||||
<number>6</number>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>211</width>
|
||||
<height>20</height>
|
||||
|
|
@ -174,15 +195,15 @@
|
|||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="prop_pb" >
|
||||
<property name="text" >
|
||||
<widget class="QPushButton" name="prop_pb">
|
||||
<property name="text">
|
||||
<string>User Properties</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="inst_pb" >
|
||||
<property name="text" >
|
||||
<widget class="QPushButton" name="inst_pb">
|
||||
<property name="text">
|
||||
<string>Instantiation</string>
|
||||
</property>
|
||||
</widget>
|
||||
|
|
@ -190,34 +211,41 @@
|
|||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1" colspan="2" >
|
||||
<widget class="QFrame" name="frame_2" >
|
||||
<property name="frameShape" >
|
||||
<item row="4" column="1" colspan="2">
|
||||
<widget class="QFrame" name="frame_2">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<property name="frameShadow" >
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" >
|
||||
<property name="margin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="spacing" >
|
||||
<layout class="QHBoxLayout">
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</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>
|
||||
<widget class="QLabel" name="label_6" >
|
||||
<property name="text" >
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="text">
|
||||
<string>start =</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="start_ext_le" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy>
|
||||
<hsizetype>7</hsizetype>
|
||||
<vsizetype>0</vsizetype>
|
||||
<widget class="QLineEdit" name="start_ext_le">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>1</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
|
|
@ -225,18 +253,16 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_8" >
|
||||
<property name="text" >
|
||||
<widget class="QLabel" name="label_8">
|
||||
<property name="text">
|
||||
<string> end =</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="end_ext_le" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy>
|
||||
<hsizetype>7</hsizetype>
|
||||
<vsizetype>0</vsizetype>
|
||||
<widget class="QLineEdit" name="end_ext_le">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>1</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
|
|
@ -246,24 +272,22 @@
|
|||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1" >
|
||||
<widget class="QLineEdit" name="width_le" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy>
|
||||
<hsizetype>7</hsizetype>
|
||||
<vsizetype>0</vsizetype>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="width_le">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2" >
|
||||
<item row="1" column="2">
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>191</width>
|
||||
<height>25</height>
|
||||
|
|
@ -271,40 +295,38 @@
|
|||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="4" column="0" >
|
||||
<widget class="QLabel" name="label" >
|
||||
<property name="text" >
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Var. extensions </string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1" colspan="2" >
|
||||
<widget class="QComboBox" name="type_cb" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy>
|
||||
<hsizetype>5</hsizetype>
|
||||
<vsizetype>0</vsizetype>
|
||||
<item row="3" column="1" colspan="2">
|
||||
<widget class="QComboBox" name="type_cb">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text" >
|
||||
<property name="text">
|
||||
<string>Flush</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text" >
|
||||
<property name="text">
|
||||
<string>Square</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text" >
|
||||
<property name="text">
|
||||
<string>Variable</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text" >
|
||||
<property name="text">
|
||||
<string>Round</string>
|
||||
</property>
|
||||
</item>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
<ui version="4.0" >
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>PathPropertiesPage</class>
|
||||
<widget class="QWidget" name="PathPropertiesPage" >
|
||||
<property name="geometry" >
|
||||
<widget class="QWidget" name="PathPropertiesPage">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
|
|
@ -9,44 +10,60 @@
|
|||
<height>368</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle" >
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="margin" >
|
||||
<layout class="QGridLayout">
|
||||
<property name="leftMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="spacing" >
|
||||
<property name="topMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="3" column="1" colspan="2" >
|
||||
<widget class="QFrame" name="frame_2" >
|
||||
<property name="frameShape" >
|
||||
<item row="3" column="1" colspan="2">
|
||||
<widget class="QFrame" name="frame_2">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<property name="frameShadow" >
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" >
|
||||
<property name="margin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="spacing" >
|
||||
<layout class="QHBoxLayout">
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</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>
|
||||
<widget class="QLabel" name="label_6" >
|
||||
<property name="text" >
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="text">
|
||||
<string>start =</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="start_ext_le" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy>
|
||||
<hsizetype>7</hsizetype>
|
||||
<vsizetype>0</vsizetype>
|
||||
<widget class="QLineEdit" name="start_ext_le">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>1</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
|
|
@ -54,18 +71,16 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_8" >
|
||||
<property name="text" >
|
||||
<widget class="QLabel" name="label_8">
|
||||
<property name="text">
|
||||
<string> end =</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="end_ext_le" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy>
|
||||
<hsizetype>7</hsizetype>
|
||||
<vsizetype>0</vsizetype>
|
||||
<widget class="QLineEdit" name="end_ext_le">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>1</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
|
|
@ -75,41 +90,50 @@
|
|||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="1" colspan="2" >
|
||||
<widget class="QCheckBox" name="abs_cb" >
|
||||
<property name="text" >
|
||||
<item row="7" column="1" colspan="2">
|
||||
<widget class="QCheckBox" name="abs_cb">
|
||||
<property name="text">
|
||||
<string>Absolute (accumulated) transformations</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="1" colspan="2" >
|
||||
<widget class="QCheckBox" name="dbu_cb" >
|
||||
<property name="text" >
|
||||
<item row="6" column="1" colspan="2">
|
||||
<widget class="QCheckBox" name="dbu_cb">
|
||||
<property name="text">
|
||||
<string>Coordinates in database units</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="0" colspan="3" >
|
||||
<widget class="QFrame" name="frame1" >
|
||||
<property name="frameShape" >
|
||||
<item row="8" column="0" colspan="3">
|
||||
<widget class="QFrame" name="frame1">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<property name="frameShadow" >
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" >
|
||||
<property name="margin" >
|
||||
<layout class="QHBoxLayout">
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="spacing" >
|
||||
<number>6</number>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>211</width>
|
||||
<height>20</height>
|
||||
|
|
@ -118,15 +142,15 @@
|
|||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="prop_pb" >
|
||||
<property name="text" >
|
||||
<widget class="QPushButton" name="prop_pb">
|
||||
<property name="text">
|
||||
<string>User Properties</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="inst_pb" >
|
||||
<property name="text" >
|
||||
<widget class="QPushButton" name="inst_pb">
|
||||
<property name="text">
|
||||
<string>Instantiation</string>
|
||||
</property>
|
||||
</widget>
|
||||
|
|
@ -134,33 +158,28 @@
|
|||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1" colspan="2" >
|
||||
<widget class="QTextEdit" name="ptlist_le" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy>
|
||||
<hsizetype>7</hsizetype>
|
||||
<vsizetype>7</vsizetype>
|
||||
<item row="2" column="1" colspan="2">
|
||||
<widget class="QTextEdit" name="ptlist_le">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||
<horstretch>1</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="lineWidth" >
|
||||
<property name="lineWidth">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="tabStopWidth" >
|
||||
<number>100</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0" colspan="3" >
|
||||
<item row="5" column="0" colspan="3">
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType" >
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>451</width>
|
||||
<height>8</height>
|
||||
|
|
@ -168,12 +187,12 @@
|
|||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="1" column="2" >
|
||||
<item row="1" column="2">
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>135</width>
|
||||
<height>20</height>
|
||||
|
|
@ -181,60 +200,67 @@
|
|||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="3" column="0" >
|
||||
<widget class="QLabel" name="label" >
|
||||
<property name="text" >
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Extensions</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1" >
|
||||
<widget class="QLineEdit" name="width_le" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy>
|
||||
<hsizetype>7</hsizetype>
|
||||
<vsizetype>0</vsizetype>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="width_le">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" >
|
||||
<widget class="QLabel" name="label_3" >
|
||||
<property name="text" >
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>Points (x,y)</string>
|
||||
</property>
|
||||
<property name="alignment" >
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" >
|
||||
<widget class="QLabel" name="label_2" >
|
||||
<property name="text" >
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Width</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0" colspan="3" >
|
||||
<widget class="QFrame" name="frame2" >
|
||||
<property name="frameShape" >
|
||||
<item row="0" column="0" colspan="3">
|
||||
<widget class="QFrame" name="frame2">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<property name="frameShadow" >
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" >
|
||||
<property name="margin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="spacing" >
|
||||
<layout class="QHBoxLayout">
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</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>
|
||||
<widget class="QLabel" name="label_12" >
|
||||
<property name="font" >
|
||||
<widget class="QLabel" name="label_12">
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>Sans Serif</family>
|
||||
<pointsize>12</pointsize>
|
||||
|
|
@ -245,25 +271,23 @@
|
|||
<strikeout>false</strikeout>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<property name="text">
|
||||
<string>Path Properties</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="layer_lbl" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy>
|
||||
<hsizetype>7</hsizetype>
|
||||
<vsizetype>5</vsizetype>
|
||||
<widget class="QLabel" name="layer_lbl">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="alignment" >
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
|
|
@ -271,9 +295,9 @@
|
|||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1" >
|
||||
<widget class="QCheckBox" name="round_cb" >
|
||||
<property name="text" >
|
||||
<item row="4" column="1">
|
||||
<widget class="QCheckBox" name="round_cb">
|
||||
<property name="text">
|
||||
<string>Round path ends</string>
|
||||
</property>
|
||||
</widget>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
<ui version="4.0" >
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>PolygonPropertiesPage</class>
|
||||
<widget class="QWidget" name="PolygonPropertiesPage" >
|
||||
<property name="geometry" >
|
||||
<widget class="QWidget" name="PolygonPropertiesPage">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
|
|
@ -9,22 +10,31 @@
|
|||
<height>282</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle" >
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="margin" >
|
||||
<layout class="QGridLayout">
|
||||
<property name="leftMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="spacing" >
|
||||
<property name="topMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="3" column="0" >
|
||||
<item row="3" column="0">
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
|
|
@ -32,63 +42,70 @@
|
|||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="2" column="0" >
|
||||
<widget class="QLabel" name="pointCountLabel" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy>
|
||||
<hsizetype>5</hsizetype>
|
||||
<vsizetype>5</vsizetype>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="pointCountLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" >
|
||||
<widget class="QLabel" name="label_3" >
|
||||
<property name="text" >
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>Points (x,y)</string>
|
||||
</property>
|
||||
<property name="alignment" >
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="1" >
|
||||
<widget class="QCheckBox" name="abs_cb" >
|
||||
<property name="text" >
|
||||
<item row="6" column="1">
|
||||
<widget class="QCheckBox" name="abs_cb">
|
||||
<property name="text">
|
||||
<string>Absolute (accumulated) transformations</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1" >
|
||||
<widget class="QCheckBox" name="dbu_cb" >
|
||||
<property name="text" >
|
||||
<item row="5" column="1">
|
||||
<widget class="QCheckBox" name="dbu_cb">
|
||||
<property name="text">
|
||||
<string>Coordinates in database units</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0" colspan="2" >
|
||||
<widget class="QFrame" name="frame" >
|
||||
<property name="frameShape" >
|
||||
<item row="0" column="0" colspan="2">
|
||||
<widget class="QFrame" name="frame">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<property name="frameShadow" >
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" >
|
||||
<property name="margin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="spacing" >
|
||||
<layout class="QHBoxLayout">
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</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>
|
||||
<widget class="QLabel" name="label_12" >
|
||||
<property name="font" >
|
||||
<widget class="QLabel" name="label_12">
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>Sans Serif</family>
|
||||
<pointsize>12</pointsize>
|
||||
|
|
@ -99,25 +116,23 @@
|
|||
<strikeout>false</strikeout>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<property name="text">
|
||||
<string>Polygon Properties</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="layer_lbl" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy>
|
||||
<hsizetype>7</hsizetype>
|
||||
<vsizetype>5</vsizetype>
|
||||
<widget class="QLabel" name="layer_lbl">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="alignment" >
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
|
|
@ -125,27 +140,36 @@
|
|||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="0" colspan="2" >
|
||||
<widget class="QFrame" name="frame1" >
|
||||
<property name="frameShape" >
|
||||
<item row="7" column="0" colspan="2">
|
||||
<widget class="QFrame" name="frame1">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<property name="frameShadow" >
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" >
|
||||
<property name="margin" >
|
||||
<layout class="QHBoxLayout">
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="spacing" >
|
||||
<number>6</number>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>211</width>
|
||||
<height>20</height>
|
||||
|
|
@ -154,15 +178,15 @@
|
|||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="prop_pb" >
|
||||
<property name="text" >
|
||||
<widget class="QPushButton" name="prop_pb">
|
||||
<property name="text">
|
||||
<string>User Properties</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="inst_pb" >
|
||||
<property name="text" >
|
||||
<widget class="QPushButton" name="inst_pb">
|
||||
<property name="text">
|
||||
<string>Instantiation</string>
|
||||
</property>
|
||||
</widget>
|
||||
|
|
@ -170,33 +194,28 @@
|
|||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item rowspan="3" row="1" column="1" >
|
||||
<widget class="QTextEdit" name="pointListEdit" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy>
|
||||
<hsizetype>7</hsizetype>
|
||||
<vsizetype>7</vsizetype>
|
||||
<item row="1" column="1" rowspan="3">
|
||||
<widget class="QTextEdit" name="pointListEdit">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||
<horstretch>1</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="lineWidth" >
|
||||
<property name="lineWidth">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="tabStopWidth" >
|
||||
<number>100</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0" colspan="2" >
|
||||
<item row="4" column="0" colspan="2">
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType" >
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>470</width>
|
||||
<height>16</height>
|
||||
|
|
|
|||
|
|
@ -388,6 +388,12 @@ PolygonPropertiesPage::PolygonPropertiesPage (edt::Service *service, db::Manager
|
|||
setupUi (this);
|
||||
setup ();
|
||||
|
||||
#if QT_VERSION >= 0x60000
|
||||
pointListEdit->setTabStopDistance (100);
|
||||
#else
|
||||
pointListEdit->setTabStopWidth (100);
|
||||
#endif
|
||||
|
||||
connect (inst_pb, SIGNAL (clicked ()), this, SLOT (show_inst ()));
|
||||
connect (prop_pb, SIGNAL (clicked ()), this, SLOT (show_props ()));
|
||||
|
||||
|
|
@ -905,6 +911,12 @@ PathPropertiesPage::PathPropertiesPage (edt::Service *service, db::Manager *mana
|
|||
setupUi (this);
|
||||
setup ();
|
||||
|
||||
#if QT_VERSION >= 0x60000
|
||||
ptlist_le->setTabStopDistance (100);
|
||||
#else
|
||||
ptlist_le->setTabStopWidth (100);
|
||||
#endif
|
||||
|
||||
connect (inst_pb, SIGNAL (clicked ()), this, SLOT (show_inst ()));
|
||||
connect (prop_pb, SIGNAL (clicked ()), this, SLOT (show_props ()));
|
||||
|
||||
|
|
@ -966,6 +978,12 @@ EditablePathPropertiesPage::EditablePathPropertiesPage (edt::Service *service, d
|
|||
setupUi (this);
|
||||
setup ();
|
||||
|
||||
#if QT_VERSION >= 0x60000
|
||||
ptlist_le->setTabStopDistance (100);
|
||||
#else
|
||||
ptlist_le->setTabStopWidth (100);
|
||||
#endif
|
||||
|
||||
connect (inst_pb, SIGNAL (clicked ()), this, SLOT (show_inst ()));
|
||||
connect (prop_pb, SIGNAL (clicked ()), this, SLOT (show_props ()));
|
||||
connect (type_cb, SIGNAL (currentIndexChanged (int)), this, SLOT (type_selected (int)));
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@
|
|||
#include <QColor>
|
||||
#include <QPalette>
|
||||
#include <QApplication>
|
||||
#include <QRegExp>
|
||||
|
||||
#include <cstdio>
|
||||
#include <cctype>
|
||||
|
|
|
|||
|
|
@ -1550,7 +1550,11 @@ int
|
|||
MacroEditorDialog::columns ()
|
||||
{
|
||||
QFontMetrics fm (mp_console_text->font ());
|
||||
#if QT_VERSION >= 0x60000
|
||||
int cw = fm.horizontalAdvance (QString::fromUtf8 ("X"));
|
||||
#else
|
||||
int cw = fm.width (QString::fromUtf8 ("X"));
|
||||
#endif
|
||||
if (cw > 0) {
|
||||
return mp_console_text->viewport ()->width () / cw;
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -343,7 +343,13 @@ void MacroEditorSidePanel::set_debugging_on (bool on)
|
|||
|
||||
QSize MacroEditorSidePanel::sizeHint () const
|
||||
{
|
||||
return QSize (QFontMetrics (mp_text->font ()).width (QString::fromUtf8 ("12345")) + 3 * sidePanelMargin + m_breakpoint_pixmap.width (), 0);
|
||||
int w;
|
||||
#if QT_VERSION >= 0x60000
|
||||
w = QFontMetrics (mp_text->font ()).horizontalAdvance (QString::fromUtf8 ("12345"));
|
||||
#else
|
||||
w = QFontMetrics (mp_text->font ()).width (QString::fromUtf8 ("12345"));
|
||||
#endif
|
||||
return QSize (w + 3 * sidePanelMargin + m_breakpoint_pixmap.width (), 0);
|
||||
}
|
||||
|
||||
void MacroEditorSidePanel::mousePressEvent (QMouseEvent *event)
|
||||
|
|
@ -502,7 +508,11 @@ MacroEditorPage::MacroEditorPage (QWidget * /*parent*/, MacroEditorHighlighters
|
|||
hlayout->addWidget (mp_text);
|
||||
|
||||
mp_text->setWordWrapMode(QTextOption::NoWrap);
|
||||
#if QT_VERSION >= 0x60000
|
||||
mp_text->setTabStopDistance (m_ntab * QFontMetrics (mp_text->font ()).horizontalAdvance (QString::fromUtf8 ("x")));
|
||||
#else
|
||||
mp_text->setTabStopWidth (m_ntab * QFontMetrics (mp_text->font ()).width (QString::fromUtf8 ("x")));
|
||||
#endif
|
||||
m_is_modified = false;
|
||||
|
||||
connect (mp_text, SIGNAL (textChanged ()), this, SLOT (text_changed ()));
|
||||
|
|
@ -959,7 +969,11 @@ void MacroEditorPage::set_ntab (int n)
|
|||
{
|
||||
if (n != m_ntab) {
|
||||
m_ntab = n;
|
||||
#if QT_VERSION >= 0x60000
|
||||
mp_text->setTabStopDistance (m_ntab * QFontMetrics (mp_text->font ()).horizontalAdvance (QString::fromUtf8 ("x")));
|
||||
#else
|
||||
mp_text->setTabStopWidth (m_ntab * QFontMetrics (mp_text->font ()).width (QString::fromUtf8 ("x")));
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -20,8 +20,6 @@
|
|||
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#ifndef HDR_layMacroEditorPage
|
||||
#define HDR_layMacroEditorPage
|
||||
|
||||
|
|
@ -32,6 +30,7 @@
|
|||
|
||||
#include <QDialog>
|
||||
#include <QPixmap>
|
||||
#include <QRegExp>
|
||||
|
||||
#include <set>
|
||||
|
||||
|
|
|
|||
|
|
@ -71,20 +71,17 @@ pretty_print (const tl::Variant &v)
|
|||
|
||||
} else if (v.is_double ()) {
|
||||
|
||||
QString res;
|
||||
res.sprintf ("%.12g", v.to_double ());
|
||||
QString res (QString::fromUtf8 ("%.12g").arg (v.to_double ()));
|
||||
return res;
|
||||
|
||||
} else if (v.is_char ()) {
|
||||
|
||||
QString details;
|
||||
details.sprintf ("#%d (0x%x)", v.to_int (), v.to_uint ());
|
||||
QString details (QString::fromUtf8 ("#%d (0x%x)").arg (v.to_int ()).arg (v.to_uint ()));
|
||||
return tl::to_qstring (std::string ("'") + v.to_string () + "' ") + details;
|
||||
|
||||
} else if (v.is_ulong () || v.is_long () || v.is_ulonglong () || v.is_longlong ()) {
|
||||
|
||||
QString details;
|
||||
details.sprintf (" (0x%llx)", v.to_ulonglong ());
|
||||
QString details (QString::fromUtf8 ("(0x%llx)").arg (v.to_ulonglong ()));
|
||||
return tl::to_qstring (v.to_string ()) + details;
|
||||
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -793,6 +793,15 @@ MainWindow::tech_message (const std::string &s)
|
|||
mp_tech_status_label->setText(tl::to_qstring (s));
|
||||
}
|
||||
|
||||
static int fm_width (const QFontMetrics &fm, const QString &s)
|
||||
{
|
||||
#if QT_VERSION >= 0x60000
|
||||
return fm.horizontalAdvance (s);
|
||||
#else
|
||||
return fm.width (QString::fromUtf8 (s));
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
MainWindow::format_message ()
|
||||
{
|
||||
|
|
@ -841,7 +850,7 @@ MainWindow::format_message ()
|
|||
|
||||
++ndrop;
|
||||
|
||||
} while (short_message.size () < prev_len && fm.width (QString::fromUtf8 (" ") + tl::to_qstring (short_message)) > mp_msg_label->width ());
|
||||
} while (short_message.size () < prev_len && fm_width (fm, QString::fromUtf8 (" ") + tl::to_qstring (short_message)) > mp_msg_label->width ());
|
||||
|
||||
mp_msg_label->setText (QString::fromUtf8 (" ") + tl::to_qstring (short_message));
|
||||
mp_msg_label->setToolTip (tl::to_qstring (full_message));
|
||||
|
|
@ -1579,7 +1588,11 @@ MainWindow::cm_print ()
|
|||
QFont header_font (QString::fromUtf8 ("Helvetica"), 8);
|
||||
int hh = QFontMetrics (header_font, mp_printer.get ()).height ();
|
||||
|
||||
QRect page_rect = mp_printer->pageRect ();
|
||||
#if QT_VERSION >= 0x60000
|
||||
QRectF page_rect = mp_printer->pageRect (QPrinter::DevicePixel);
|
||||
#else
|
||||
QRectF page_rect = mp_printer->pageRect ();
|
||||
#endif
|
||||
page_rect.moveTo (0, 0);
|
||||
|
||||
int b = std::min (page_rect.width (), page_rect.height ()) / 50;
|
||||
|
|
@ -1588,7 +1601,7 @@ MainWindow::cm_print ()
|
|||
page_rect.setTop (page_rect.top () + b);
|
||||
page_rect.setBottom (page_rect.bottom () - b);
|
||||
|
||||
QRect text_rect = page_rect;
|
||||
QRectF text_rect = page_rect;
|
||||
text_rect.setLeft (text_rect.left () + hh / 2);
|
||||
text_rect.setRight (text_rect.right () - hh / 2);
|
||||
text_rect.setBottom (text_rect.bottom () - hh / 2);
|
||||
|
|
|
|||
|
|
@ -90,7 +90,11 @@ QSize
|
|||
ProgressBarWidget::sizeHint () const
|
||||
{
|
||||
QFontMetrics fm (font ());
|
||||
#if QT_VERSION >= 0x60000
|
||||
return QSize (fm.horizontalAdvance (QString::fromUtf8("100%")) * 4, fm.height () + 2);
|
||||
#else
|
||||
return QSize (fm.width (QString::fromUtf8("100%")) * 4, fm.height () + 2);
|
||||
#endif
|
||||
}
|
||||
|
||||
QSize
|
||||
|
|
|
|||
|
|
@ -85,8 +85,8 @@ ConfirmationDialog::mark_fetching (const std::string &name)
|
|||
if (i != m_items_by_name.end ()) {
|
||||
list->scrollToItem (i->second);
|
||||
for (int c = 0; c < list->columnCount (); ++c) {
|
||||
i->second->setData (c, Qt::BackgroundColorRole, QColor (224, 244, 244));
|
||||
i->second->setData (c, Qt::TextColorRole, QColor (Qt::blue));
|
||||
i->second->setData (c, Qt::BackgroundRole, QColor (224, 244, 244));
|
||||
i->second->setData (c, Qt::ForegroundRole, QColor (Qt::blue));
|
||||
}
|
||||
i->second->setData (1, Qt::DisplayRole, tr ("FETCHING"));
|
||||
}
|
||||
|
|
@ -101,8 +101,8 @@ ConfirmationDialog::mark_error (const std::string &name)
|
|||
if (i != m_items_by_name.end ()) {
|
||||
list->scrollToItem (i->second);
|
||||
for (int c = 0; c < list->columnCount (); ++c) {
|
||||
i->second->setData (c, Qt::BackgroundColorRole, QColor (255, 224, 244));
|
||||
i->second->setData (c, Qt::TextColorRole, QColor (Qt::black));
|
||||
i->second->setData (c, Qt::BackgroundRole, QColor (255, 224, 244));
|
||||
i->second->setData (c, Qt::ForegroundRole, QColor (Qt::black));
|
||||
}
|
||||
i->second->setData (1, Qt::DisplayRole, tr ("ERROR"));
|
||||
}
|
||||
|
|
@ -117,8 +117,8 @@ ConfirmationDialog::mark_success (const std::string &name)
|
|||
if (i != m_items_by_name.end ()) {
|
||||
list->scrollToItem (i->second);
|
||||
for (int c = 0; c < list->columnCount (); ++c) {
|
||||
i->second->setData (c, Qt::BackgroundColorRole, QColor (160, 255, 160));
|
||||
i->second->setData (c, Qt::TextColorRole, QColor (Qt::black));
|
||||
i->second->setData (c, Qt::BackgroundRole, QColor (160, 255, 160));
|
||||
i->second->setData (c, Qt::ForegroundRole, QColor (Qt::black));
|
||||
}
|
||||
i->second->setData (1, Qt::DisplayRole, tr ("INSTALLED"));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -463,7 +463,11 @@ SaltGrain::load (const std::string &p)
|
|||
|
||||
QResource res (tl::to_qstring (p));
|
||||
QByteArray data;
|
||||
#if QT_VERSION >= 0x60000
|
||||
if (res.compressionAlgorithm () == QResource::ZlibCompression) {
|
||||
#else
|
||||
if (res.isCompressed ()) {
|
||||
#endif
|
||||
data = qUncompress ((const unsigned char *)res.data (), (int)res.size ());
|
||||
} else {
|
||||
data = QByteArray ((const char *)res.data (), (int)res.size ());
|
||||
|
|
|
|||
|
|
@ -181,7 +181,11 @@ SaltGrainDetailsTextWidget::details_text ()
|
|||
QBuffer buffer;
|
||||
buffer.open (QIODevice::WriteOnly);
|
||||
QTextStream stream (&buffer);
|
||||
#if QT_VERSION >= 0x60000
|
||||
stream.setEncoding (QStringConverter::Utf8);
|
||||
#else
|
||||
stream.setCodec ("UTF-8");
|
||||
#endif
|
||||
|
||||
stream << "<html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\"/></head><body>";
|
||||
|
||||
|
|
|
|||
|
|
@ -43,6 +43,7 @@
|
|||
#include <QMessageBox>
|
||||
#include <QAbstractItemModel>
|
||||
#include <QStyledItemDelegate>
|
||||
#include <QRegExp>
|
||||
|
||||
namespace lay
|
||||
{
|
||||
|
|
|
|||
|
|
@ -42,6 +42,7 @@
|
|||
|
||||
#include <QInputDialog>
|
||||
#include <QHeaderView>
|
||||
#include <QRegExp>
|
||||
|
||||
#include <fstream>
|
||||
|
||||
|
|
@ -1249,8 +1250,7 @@ SearchReplaceDialog::update_mru_list ()
|
|||
|
||||
for (std::vector<std::string>::const_iterator mru = m_mru.begin (); mru != m_mru.end (); ++mru) {
|
||||
QString text = tl::to_qstring (*mru);
|
||||
QString display_text = text;
|
||||
display_text.replace (QRegExp (QString::fromUtf8 ("\\s+")), QString::fromUtf8 (" "));
|
||||
QString display_text = text.simplified ();
|
||||
int nmax = 50;
|
||||
if (display_text.size () > nmax) {
|
||||
display_text = display_text.left (nmax) + QString::fromUtf8 ("...");
|
||||
|
|
|
|||
|
|
@ -65,7 +65,11 @@ split_path (const std::string &path, std::vector <std::string> &pc)
|
|||
sep = QString::fromUtf8 (":");
|
||||
#endif
|
||||
|
||||
#if QT_VERSION >= 0x60000
|
||||
QStringList pp = tl::to_qstring (path).split (sep, Qt::SkipEmptyParts);
|
||||
#else
|
||||
QStringList pp = tl::to_qstring (path).split (sep, QString::SkipEmptyParts);
|
||||
#endif
|
||||
for (QStringList::ConstIterator p = pp.begin (); p != pp.end (); ++p) {
|
||||
pc.push_back (tl::to_string (*p));
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue