mirror of
https://github.com/KLayout/klayout.git
synced 2026-09-04 08:43:42 +02:00
WIP: added streamers plugin structure (partially)
This commit is contained in:
@@ -1,219 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>CIFReaderOptionPage</class>
|
||||
<widget class="QWidget" name="CIFReaderOptionPage">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>629</width>
|
||||
<height>385</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="title">
|
||||
<string>Input Options</string>
|
||||
</property>
|
||||
<layout class="QGridLayout">
|
||||
<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>
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="0" column="1" colspan="2">
|
||||
<widget class="QComboBox" name="wire_mode_cb">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Square-ended paths</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Flush paths</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Round-ended paths</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Database unit </string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Micron</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="dbu_le">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Wire objects</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1" colspan="2">
|
||||
<widget class="QCheckBox" name="keep_names_cbx">
|
||||
<property name="text">
|
||||
<string>Don't attempt to translate into layer/datatype numbers</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>Keep layer names</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="layer_subset_grp">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>1</horstretch>
|
||||
<verstretch>1</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Layer Subset And Layer Mapping</string>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="_2">
|
||||
<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>
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="0" column="0" colspan="2">
|
||||
<widget class="QCheckBox" name="read_all_cbx">
|
||||
<property name="text">
|
||||
<string>Read all layers (additionally to the ones in the mapping table)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" colspan="2">
|
||||
<widget class="Line" name="line">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" rowspan="10" colspan="2">
|
||||
<widget class="lay::LayerMappingWidget" name="layer_map">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>lay::LayerMappingWidget</class>
|
||||
<extends>QFrame</extends>
|
||||
<header>layLayerMappingWidget.h</header>
|
||||
<container>1</container>
|
||||
<slots>
|
||||
<signal>enable_all_layers(bool)</signal>
|
||||
</slots>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<tabstops>
|
||||
<tabstop>wire_mode_cb</tabstop>
|
||||
<tabstop>dbu_le</tabstop>
|
||||
</tabstops>
|
||||
<resources/>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>layer_map</sender>
|
||||
<signal>enable_all_layers(bool)</signal>
|
||||
<receiver>read_all_cbx</receiver>
|
||||
<slot>setChecked(bool)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>122</x>
|
||||
<y>186</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>109</x>
|
||||
<y>147</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
||||
@@ -1,87 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>CIFWriterOptionPage</class>
|
||||
<widget class="QWidget" name="CIFWriterOptionPage">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>619</width>
|
||||
<height>209</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout">
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="margin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="title">
|
||||
<string>CIF Writer Options</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<property name="margin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<item row="0" column="1">
|
||||
<widget class="QCheckBox" name="blank_separator_cbx">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>If checked, a blank character is used as x/y coordinate
|
||||
separator. Otherweise a comma is used.</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Blank as x/y separator</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Dummy cell calls</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QCheckBox" name="dummy_calls_cbx">
|
||||
<property name="text">
|
||||
<string>If checked, dummy cell calls are added on global level</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>601</width>
|
||||
<height>16</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
@@ -1,433 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>DXFReaderOptionPage</class>
|
||||
<widget class="QWidget" name="DXFReaderOptionPage">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>644</width>
|
||||
<height>629</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="title">
|
||||
<string>Input Options</string>
|
||||
</property>
|
||||
<layout class="QGridLayout">
|
||||
<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>
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="unit_le">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>LINE / POLYLINE</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QLineEdit" name="circle_accuracy_le">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Specify this value to choose the number of points based on the accuracy requirement. If given, less points will be chosen if this choice is sufficient to fulfil the accuracy requirements.</p></body></html></string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="1" colspan="2">
|
||||
<widget class="QComboBox" name="polyline2poly_cbx">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Automatic</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Keep lines</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Create polygons from closed polylines with width = 0</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Merge lines with width 0 into polygons</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Merge lines and auto-close open contours</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<widget class="QLineEdit" name="text_scaling_le">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="2" colspan="2">
|
||||
<widget class="QLabel" name="label_12">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>1</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string># of points</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2" colspan="2">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||
<horstretch>1</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>µm</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1" colspan="3">
|
||||
<widget class="QCheckBox" name="render_texts_as_polygons_cbx">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Render texts as polygons and do not create text objects</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="text">
|
||||
<string>Arc interpolation</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<widget class="QLabel" name="label_9">
|
||||
<property name="text">
|
||||
<string>Keep all cells</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="dbu_le">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="2" colspan="2">
|
||||
<widget class="QLabel" name="label_15">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>1</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Line merge accuracy in DXF units</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="2" colspan="2">
|
||||
<widget class="QLabel" name="label_7">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>1</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Interpolation accuracy in DXF units</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="2" colspan="2">
|
||||
<widget class="QLabel" name="label_11">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>1</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Scaling factor in percent</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2" colspan="2">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||
<horstretch>1</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>µm</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="1">
|
||||
<widget class="QLineEdit" name="contour_accuracy_le">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string>DXF file unit</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="label_8">
|
||||
<property name="text">
|
||||
<string>Text to polygon</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="1" colspan="3">
|
||||
<widget class="QCheckBox" name="keep_names_cbx">
|
||||
<property name="text">
|
||||
<string>Don't attempt to translate into layer/datatype numbers</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="0" colspan="4">
|
||||
<widget class="Line" name="line">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="1" colspan="3">
|
||||
<widget class="QCheckBox" name="keep_other_cells_cbx">
|
||||
<property name="text">
|
||||
<string>Check this box to keep all cells, not only the top cell and it's children</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="0">
|
||||
<widget class="QLabel" name="label_13">
|
||||
<property name="text">
|
||||
<string>Keep layer names</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="0">
|
||||
<widget class="QLabel" name="label_14">
|
||||
<property name="text">
|
||||
<string>Merge accuracy</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<widget class="QLabel" name="label_10">
|
||||
<property name="text">
|
||||
<string>Text scaling</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Database unit </string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QLineEdit" name="circle_points_le">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Number of points per full circle used for arc interpolation (the accuracy may reduce the number if less are required)</p></body></html></string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_16">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="layer_subset_grp">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>1</horstretch>
|
||||
<verstretch>1</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Layer Subset And Layer Mapping</string>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="_2">
|
||||
<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>
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="0" column="0" colspan="2">
|
||||
<widget class="QCheckBox" name="read_all_cbx">
|
||||
<property name="text">
|
||||
<string>Read all layers (additionally to the ones in the mapping table)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" colspan="2">
|
||||
<widget class="Line" name="line_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" rowspan="10" colspan="2">
|
||||
<widget class="lay::LayerMappingWidget" name="layer_map">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>lay::LayerMappingWidget</class>
|
||||
<extends>QFrame</extends>
|
||||
<header>layLayerMappingWidget.h</header>
|
||||
<container>1</container>
|
||||
<slots>
|
||||
<signal>enable_all_layers(bool)</signal>
|
||||
</slots>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<tabstops>
|
||||
<tabstop>dbu_le</tabstop>
|
||||
<tabstop>unit_le</tabstop>
|
||||
<tabstop>circle_points_le</tabstop>
|
||||
<tabstop>render_texts_as_polygons_cbx</tabstop>
|
||||
<tabstop>text_scaling_le</tabstop>
|
||||
<tabstop>keep_other_cells_cbx</tabstop>
|
||||
</tabstops>
|
||||
<resources/>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>layer_map</sender>
|
||||
<signal>enable_all_layers(bool)</signal>
|
||||
<receiver>read_all_cbx</receiver>
|
||||
<slot>setChecked(bool)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>120</x>
|
||||
<y>329</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>110</x>
|
||||
<y>293</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
||||
@@ -1,98 +0,0 @@
|
||||
<ui version="4.0" >
|
||||
<class>DXFWriterOptionPage</class>
|
||||
<widget class="QWidget" name="DXFWriterOptionPage" >
|
||||
<property name="geometry" >
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>637</width>
|
||||
<height>164</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle" >
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" >
|
||||
<property name="margin" >
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="spacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox" >
|
||||
<property name="title" >
|
||||
<string>DXF Writer Options</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="margin" >
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="spacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="0" column="0" >
|
||||
<widget class="QLabel" name="label" >
|
||||
<property name="text" >
|
||||
<string>Polygon handling</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2" >
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<size>
|
||||
<width>371</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="0" column="1" >
|
||||
<widget class="QComboBox" name="polygon_mode_cbx" >
|
||||
<item>
|
||||
<property name="text" >
|
||||
<string>Write POLYLINE entity</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text" >
|
||||
<string>Write LWPOLYLINE entity</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text" >
|
||||
<string>Decompose into SOLID entities</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text" >
|
||||
<string>Write HATCH entity</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<size>
|
||||
<width>601</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
@@ -1,334 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>OASISWriterOptionPage</class>
|
||||
<widget class="QWidget" name="OASISWriterOptionPage">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>590</width>
|
||||
<height>248</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout">
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</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>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="title">
|
||||
<string>OASIS Writer Options</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout">
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</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>
|
||||
<widget class="QFrame" name="frame">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QGridLayout">
|
||||
<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>
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="4" column="2" colspan="3">
|
||||
<widget class="QComboBox" name="std_prop_mode">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>No standard properties</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Global standard properties</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Global + per-cell bounding boxes</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="2" colspan="3">
|
||||
<widget class="QCheckBox" name="strict_mode">
|
||||
<property name="text">
|
||||
<string>Write strict-mode OASIS files</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="text">
|
||||
<string>Strict mode</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" 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="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="QLineEdit" name="subst_char">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>50</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_8">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Used instead of invalid characters if not empty</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="label_9">
|
||||
<property name="text">
|
||||
<string>Standard properties</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<widget class="QLabel" name="label_7">
|
||||
<property name="text">
|
||||
<string>Substitution character</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<spacer>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>10</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>0 (low)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2" colspan="3">
|
||||
<widget class="QSlider" name="compression_slider">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>10</number>
|
||||
</property>
|
||||
<property name="pageStep">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="tickPosition">
|
||||
<enum>QSlider::TicksBelow</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string>CBLOCK compression</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0" rowspan="2">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Compaction level
|
||||
(repetition detection)</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="2" colspan="3">
|
||||
<widget class="QCheckBox" name="write_cblocks">
|
||||
<property name="text">
|
||||
<string>Use CBLOCK compression for each cell (RFC1951)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="4">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>(high) 10</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="2" colspan="3">
|
||||
<widget class="QCheckBox" name="permissive">
|
||||
<property name="text">
|
||||
<string>Don't fail on paths with odd width and other odd shapes</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<widget class="QLabel" name="label_10">
|
||||
<property name="text">
|
||||
<string>Permissive mode</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>524</width>
|
||||
<height>51</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<tabstops>
|
||||
<tabstop>compression_slider</tabstop>
|
||||
<tabstop>write_cblocks</tabstop>
|
||||
<tabstop>strict_mode</tabstop>
|
||||
<tabstop>subst_char</tabstop>
|
||||
</tabstops>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
@@ -1,272 +0,0 @@
|
||||
|
||||
/*
|
||||
|
||||
KLayout Layout Viewer
|
||||
Copyright (C) 2006-2018 Matthias Koefferlein
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#include "dbCIF.h"
|
||||
#include "dbCIFReader.h"
|
||||
#include "dbLoadLayoutOptions.h"
|
||||
#include "layCIFReaderPlugin.h"
|
||||
#include "ui_CIFReaderOptionPage.h"
|
||||
#include "gsiDecl.h"
|
||||
|
||||
#include <QFrame>
|
||||
|
||||
namespace lay
|
||||
{
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// CIFReaderOptionPage definition and implementation
|
||||
|
||||
CIFReaderOptionPage::CIFReaderOptionPage (QWidget *parent)
|
||||
: StreamReaderOptionsPage (parent)
|
||||
{
|
||||
mp_ui = new Ui::CIFReaderOptionPage ();
|
||||
mp_ui->setupUi (this);
|
||||
}
|
||||
|
||||
CIFReaderOptionPage::~CIFReaderOptionPage ()
|
||||
{
|
||||
delete mp_ui;
|
||||
mp_ui = 0;
|
||||
}
|
||||
|
||||
void
|
||||
CIFReaderOptionPage::setup (const db::FormatSpecificReaderOptions *o, const lay::Technology * /*tech*/)
|
||||
{
|
||||
static const db::CIFReaderOptions default_options;
|
||||
const db::CIFReaderOptions *options = dynamic_cast<const db::CIFReaderOptions *> (o);
|
||||
if (!options) {
|
||||
options = &default_options;
|
||||
}
|
||||
|
||||
mp_ui->dbu_le->setText (tl::to_qstring (tl::to_string (options->dbu)));
|
||||
mp_ui->layer_map->set_layer_map (options->layer_map);
|
||||
mp_ui->read_all_cbx->setChecked (options->create_other_layers);
|
||||
mp_ui->keep_names_cbx->setChecked (options->keep_layer_names);
|
||||
mp_ui->wire_mode_cb->setCurrentIndex (options->wire_mode);
|
||||
}
|
||||
|
||||
void
|
||||
CIFReaderOptionPage::commit (db::FormatSpecificReaderOptions *o, const lay::Technology * /*tech*/)
|
||||
{
|
||||
db::CIFReaderOptions *options = dynamic_cast<db::CIFReaderOptions *> (o);
|
||||
if (options) {
|
||||
tl::from_string (tl::to_string (mp_ui->dbu_le->text ()), options->dbu);
|
||||
if (options->dbu > 1000.0 || options->dbu < 1e-9) {
|
||||
throw tl::Exception (tl::to_string (QObject::tr ("Invalid value for database unit")));
|
||||
}
|
||||
options->wire_mode = mp_ui->wire_mode_cb->currentIndex ();
|
||||
options->layer_map = mp_ui->layer_map->get_layer_map ();
|
||||
options->create_other_layers = mp_ui->read_all_cbx->isChecked ();
|
||||
options->keep_layer_names = mp_ui->keep_names_cbx->isChecked ();
|
||||
}
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// CIFReaderPluginDeclaration definition and implementation
|
||||
|
||||
class CIFReaderPluginDeclaration
|
||||
: public StreamReaderPluginDeclaration
|
||||
{
|
||||
public:
|
||||
CIFReaderPluginDeclaration ()
|
||||
: StreamReaderPluginDeclaration (db::CIFReaderOptions ().format_name ())
|
||||
{
|
||||
// .. nothing yet ..
|
||||
}
|
||||
|
||||
StreamReaderOptionsPage *format_specific_options_page (QWidget *parent) const
|
||||
{
|
||||
return new CIFReaderOptionPage (parent);
|
||||
}
|
||||
|
||||
db::FormatSpecificReaderOptions *create_specific_options () const
|
||||
{
|
||||
return new db::CIFReaderOptions ();
|
||||
}
|
||||
|
||||
virtual tl::XMLElementBase *xml_element () const
|
||||
{
|
||||
return new lay::ReaderOptionsXMLElement<db::CIFReaderOptions> ("cif",
|
||||
tl::make_member (&db::CIFReaderOptions::wire_mode, "wire-mode") +
|
||||
tl::make_member (&db::CIFReaderOptions::dbu, "dbu") +
|
||||
tl::make_member (&db::CIFReaderOptions::layer_map, "layer-map") +
|
||||
tl::make_member (&db::CIFReaderOptions::create_other_layers, "create-other-layers") +
|
||||
tl::make_member (&db::CIFReaderOptions::keep_layer_names, "keep-layer-names")
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
static tl::RegisteredClass<lay::PluginDeclaration> plugin_decl (new lay::CIFReaderPluginDeclaration (), 10000, "CIFReader");
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// gsi Implementation of specific methods
|
||||
|
||||
static void set_cif_wire_mode (db::LoadLayoutOptions *options, unsigned int n)
|
||||
{
|
||||
options->get_options<db::CIFReaderOptions> ().wire_mode = n;
|
||||
}
|
||||
|
||||
static unsigned int get_cif_wire_mode (const db::LoadLayoutOptions *options)
|
||||
{
|
||||
return options->get_options<db::CIFReaderOptions> ().wire_mode;
|
||||
}
|
||||
|
||||
static void set_cif_dbu (db::LoadLayoutOptions *options, double dbu)
|
||||
{
|
||||
options->get_options<db::CIFReaderOptions> ().dbu = dbu;
|
||||
}
|
||||
|
||||
static double get_cif_dbu (const db::LoadLayoutOptions *options)
|
||||
{
|
||||
return options->get_options<db::CIFReaderOptions> ().dbu;
|
||||
}
|
||||
|
||||
static void set_layer_map (db::LoadLayoutOptions *options, const db::LayerMap &lm, bool f)
|
||||
{
|
||||
options->get_options<db::CIFReaderOptions> ().layer_map = lm;
|
||||
options->get_options<db::CIFReaderOptions> ().create_other_layers = f;
|
||||
}
|
||||
|
||||
static db::LayerMap &get_layer_map (db::LoadLayoutOptions *options)
|
||||
{
|
||||
return options->get_options<db::CIFReaderOptions> ().layer_map;
|
||||
}
|
||||
|
||||
static void select_all_layers (db::LoadLayoutOptions *options)
|
||||
{
|
||||
options->get_options<db::CIFReaderOptions> ().layer_map = db::LayerMap ();
|
||||
options->get_options<db::CIFReaderOptions> ().create_other_layers = true;
|
||||
}
|
||||
|
||||
static bool create_other_layers (const db::LoadLayoutOptions *options)
|
||||
{
|
||||
return options->get_options<db::CIFReaderOptions> ().create_other_layers;
|
||||
}
|
||||
|
||||
static void set_create_other_layers (db::LoadLayoutOptions *options, bool l)
|
||||
{
|
||||
options->get_options<db::CIFReaderOptions> ().create_other_layers = l;
|
||||
}
|
||||
|
||||
static bool keep_layer_names (const db::LoadLayoutOptions *options)
|
||||
{
|
||||
return options->get_options<db::CIFReaderOptions> ().keep_layer_names;
|
||||
}
|
||||
|
||||
static void set_keep_layer_names (db::LoadLayoutOptions *options, bool l)
|
||||
{
|
||||
options->get_options<db::CIFReaderOptions> ().keep_layer_names = l;
|
||||
}
|
||||
|
||||
// extend lay::LoadLayoutOptions with the CIF options
|
||||
static
|
||||
gsi::ClassExt<db::LoadLayoutOptions> cif_reader_options (
|
||||
gsi::method_ext ("cif_set_layer_map", &set_layer_map, gsi::arg ("map"), gsi::arg ("create_other_layers"),
|
||||
"@brief Sets the layer map\n"
|
||||
"This sets a layer mapping for the reader. The \"create_other_layers\" specifies whether to create layers that are not "
|
||||
"in the mapping and automatically assign layers to them.\n"
|
||||
"@param map The layer map to set."
|
||||
"@param create_other_layers The flag telling whether other layer should be created also. Set to false if just the layers in the mapping table should be read.\n"
|
||||
"\n"
|
||||
"This method has been added in version 0.25 and replaces the respective global option in \\LoadLayoutOptions "
|
||||
"in a format-specific fashion."
|
||||
) +
|
||||
gsi::method_ext ("cif_select_all_layers", &select_all_layers,
|
||||
"@brief Selects all layers and disables the layer map\n"
|
||||
"\n"
|
||||
"This disables any layer map and enables reading of all layers.\n"
|
||||
"New layers will be created when required.\n"
|
||||
"\n"
|
||||
"This method has been added in version 0.25 and replaces the respective global option in \\LoadLayoutOptions "
|
||||
"in a format-specific fashion."
|
||||
) +
|
||||
gsi::method_ext ("cif_layer_map", &get_layer_map,
|
||||
"@brief Gets the layer map\n"
|
||||
"@return A reference to the layer map\n"
|
||||
"\n"
|
||||
"This method has been added in version 0.25 and replaces the respective global option in \\LoadLayoutOptions "
|
||||
"in a format-specific fashion."
|
||||
) +
|
||||
gsi::method_ext ("cif_create_other_layers?", &create_other_layers,
|
||||
"@brief Gets a value indicating whether other layers shall be created\n"
|
||||
"@return True, if other layers should be created.\n"
|
||||
"\n"
|
||||
"This method has been added in version 0.25 and replaces the respective global option in \\LoadLayoutOptions "
|
||||
"in a format-specific fashion."
|
||||
) +
|
||||
gsi::method_ext ("cif_create_other_layers=", &set_create_other_layers, gsi::arg ("create"),
|
||||
"@brief Specifies whether other layers shall be created\n"
|
||||
"@param create True, if other layers should be created.\n"
|
||||
"\n"
|
||||
"This method has been added in version 0.25 and replaces the respective global option in \\LoadLayoutOptions "
|
||||
"in a format-specific fashion."
|
||||
) +
|
||||
gsi::method_ext ("cif_keep_layer_names?", &keep_layer_names,
|
||||
"@brief Gets a value indicating whether layer names are kept\n"
|
||||
"@return True, if layer names are kept.\n"
|
||||
"\n"
|
||||
"When set to true, no attempt is made to translate "
|
||||
"layer names to GDS layer/datatype numbers. If set to false (the default), a layer named \"L2D15\" will be translated "
|
||||
"to GDS layer 2, datatype 15.\n"
|
||||
"\n"
|
||||
"This method has been added in version 0.25.3."
|
||||
) +
|
||||
gsi::method_ext ("cif_keep_layer_names=", &set_keep_layer_names, gsi::arg ("keep"),
|
||||
"@brief Gets a value indicating whether layer names are kept\n"
|
||||
"@param keep True, if layer names are to be kept.\n"
|
||||
"\n"
|
||||
"See \\cif_keep_layer_names? for a description of this property.\n"
|
||||
"\n"
|
||||
"This method has been added in version 0.25.3."
|
||||
) +
|
||||
gsi::method_ext ("cif_wire_mode=", &set_cif_wire_mode,
|
||||
"@brief How to read 'W' objects\n"
|
||||
"\n"
|
||||
"This property specifies how to read 'W' (wire) objects.\n"
|
||||
"Allowed values are 0 (as square ended paths), 1 (as flush ended paths), 2 (as round paths)\n"
|
||||
"\nThis property has been added in version 0.21.\n"
|
||||
) +
|
||||
gsi::method_ext ("cif_wire_mode", &get_cif_wire_mode,
|
||||
"@brief Specifies how to read 'W' objects\n"
|
||||
"See \\cif_wire_mode= method for a description of this mode."
|
||||
"\nThis property has been added in version 0.21 and was renamed to cif_wire_mode in 0.25.\n"
|
||||
) +
|
||||
gsi::method_ext ("cif_dbu=", &set_cif_dbu,
|
||||
"@brief Specifies the database unit which the reader uses and produces\n"
|
||||
"\nThis property has been added in version 0.21.\n"
|
||||
) +
|
||||
gsi::method_ext ("cif_dbu", &get_cif_dbu,
|
||||
"@brief Specifies the database unit which the reader uses and produces\n"
|
||||
"See \\cif_dbu= method for a description of this property."
|
||||
"\nThis property has been added in version 0.21.\n"
|
||||
),
|
||||
""
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,59 +0,0 @@
|
||||
|
||||
/*
|
||||
|
||||
KLayout Layout Viewer
|
||||
Copyright (C) 2006-2018 Matthias Koefferlein
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#ifndef HDR_layCIFReaderPlugin_h
|
||||
#define HDR_layCIFReaderPlugin_h
|
||||
|
||||
#include "layStream.h"
|
||||
#include <QObject>
|
||||
|
||||
namespace Ui
|
||||
{
|
||||
class CIFReaderOptionPage;
|
||||
}
|
||||
|
||||
namespace lay
|
||||
{
|
||||
|
||||
class CIFReaderOptionPage
|
||||
: public StreamReaderOptionsPage
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
CIFReaderOptionPage (QWidget *parent);
|
||||
~CIFReaderOptionPage ();
|
||||
|
||||
void setup (const db::FormatSpecificReaderOptions *options, const lay::Technology *tech);
|
||||
void commit (db::FormatSpecificReaderOptions *options, const lay::Technology *tech);
|
||||
|
||||
private:
|
||||
Ui::CIFReaderOptionPage *mp_ui;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,163 +0,0 @@
|
||||
|
||||
/*
|
||||
|
||||
KLayout Layout Viewer
|
||||
Copyright (C) 2006-2018 Matthias Koefferlein
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#include "dbCIF.h"
|
||||
#include "dbCIFWriter.h"
|
||||
#include "dbSaveLayoutOptions.h"
|
||||
#include "layCIFWriterPlugin.h"
|
||||
#include "ui_CIFWriterOptionPage.h"
|
||||
#include "gsiDecl.h"
|
||||
|
||||
#include <QFrame>
|
||||
|
||||
namespace lay
|
||||
{
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// CIFWriterOptionPage definition and implementation
|
||||
|
||||
CIFWriterOptionPage::CIFWriterOptionPage (QWidget *parent)
|
||||
: StreamWriterOptionsPage (parent)
|
||||
{
|
||||
mp_ui = new Ui::CIFWriterOptionPage ();
|
||||
mp_ui->setupUi (this);
|
||||
|
||||
// .. nothing yet ..
|
||||
}
|
||||
|
||||
CIFWriterOptionPage::~CIFWriterOptionPage ()
|
||||
{
|
||||
delete mp_ui;
|
||||
mp_ui = 0;
|
||||
}
|
||||
|
||||
void
|
||||
CIFWriterOptionPage::setup (const db::FormatSpecificWriterOptions *o, const lay::Technology * /*tech*/)
|
||||
{
|
||||
const db::CIFWriterOptions *options = dynamic_cast<const db::CIFWriterOptions *> (o);
|
||||
if (options) {
|
||||
mp_ui->dummy_calls_cbx->setChecked (options->dummy_calls);
|
||||
mp_ui->blank_separator_cbx->setChecked (options->blank_separator);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
CIFWriterOptionPage::commit (db::FormatSpecificWriterOptions *o, const lay::Technology * /*tech*/, bool /*gzip*/)
|
||||
{
|
||||
db::CIFWriterOptions *options = dynamic_cast<db::CIFWriterOptions *> (o);
|
||||
if (options) {
|
||||
options->dummy_calls = mp_ui->dummy_calls_cbx->isChecked ();
|
||||
options->blank_separator = mp_ui->blank_separator_cbx->isChecked ();
|
||||
}
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// CIFWriterPluginDeclaration definition and implementation
|
||||
|
||||
class CIFWriterPluginDeclaration
|
||||
: public StreamWriterPluginDeclaration
|
||||
{
|
||||
public:
|
||||
CIFWriterPluginDeclaration ()
|
||||
: StreamWriterPluginDeclaration (db::CIFWriterOptions ().format_name ())
|
||||
{
|
||||
// .. nothing yet ..
|
||||
}
|
||||
|
||||
StreamWriterOptionsPage *format_specific_options_page (QWidget *parent) const
|
||||
{
|
||||
return new CIFWriterOptionPage (parent);
|
||||
}
|
||||
|
||||
db::FormatSpecificWriterOptions *create_specific_options () const
|
||||
{
|
||||
return new db::CIFWriterOptions ();
|
||||
}
|
||||
|
||||
virtual tl::XMLElementBase *xml_element () const
|
||||
{
|
||||
return new lay::WriterOptionsXMLElement<db::CIFWriterOptions> ("cif",
|
||||
tl::make_member (&db::CIFWriterOptions::dummy_calls, "dummy-calls") +
|
||||
tl::make_member (&db::CIFWriterOptions::blank_separator, "blank-separator")
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
static tl::RegisteredClass<lay::PluginDeclaration> plugin_decl (new lay::CIFWriterPluginDeclaration (), 10000, "CIFWriter");
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// gsi Implementation of specific methods
|
||||
|
||||
static void set_cif_dummy_calls (db::SaveLayoutOptions *options, bool f)
|
||||
{
|
||||
options->get_options<db::CIFWriterOptions> ().dummy_calls = f;
|
||||
}
|
||||
|
||||
static bool get_cif_dummy_calls (const db::SaveLayoutOptions *options)
|
||||
{
|
||||
return options->get_options<db::CIFWriterOptions> ().dummy_calls;
|
||||
}
|
||||
|
||||
static void set_cif_blank_separator (db::SaveLayoutOptions *options, bool f)
|
||||
{
|
||||
options->get_options<db::CIFWriterOptions> ().blank_separator = f;
|
||||
}
|
||||
|
||||
static bool get_cif_blank_separator (const db::SaveLayoutOptions *options)
|
||||
{
|
||||
return options->get_options<db::CIFWriterOptions> ().blank_separator;
|
||||
}
|
||||
|
||||
// extend lay::SaveLayoutOptions with the GDS2 options
|
||||
static
|
||||
gsi::ClassExt<db::SaveLayoutOptions> cif_writer_options (
|
||||
gsi::method_ext ("cif_dummy_calls=", &set_cif_dummy_calls,
|
||||
"@brief Sets a flag indicating whether dummy calls shall be written\n"
|
||||
"If this property is set to true, dummy calls will be written in the top level entity "
|
||||
"of the CIF file calling every top cell.\n"
|
||||
"This option is useful for enhanced compatibility with other tools.\n"
|
||||
"\nThis property has been added in version 0.23.10.\n"
|
||||
) +
|
||||
gsi::method_ext ("cif_dummy_calls?|#cif_dummy_calls", &get_cif_dummy_calls,
|
||||
"@brief Gets a flag indicating whether dummy calls shall be written\n"
|
||||
"See \\cif_dummy_calls= method for a description of that property."
|
||||
"\nThis property has been added in version 0.23.10.\n"
|
||||
"\nThe predicate version (cif_blank_separator?) has been added in version 0.25.1.\n"
|
||||
) +
|
||||
gsi::method_ext ("cif_blank_separator=", &set_cif_blank_separator,
|
||||
"@brief Sets a flag indicating whether blanks shall be used as x/y separator characters\n"
|
||||
"If this property is set to true, the x and y coordinates are separated with blank characters "
|
||||
"rather than comma characters."
|
||||
"\nThis property has been added in version 0.23.10.\n"
|
||||
) +
|
||||
gsi::method_ext ("cif_blank_separator?|#cif_blank_separator", &get_cif_blank_separator,
|
||||
"@brief Gets a flag indicating whether blanks shall be used as x/y separator characters\n"
|
||||
"See \\cif_blank_separator= method for a description of that property."
|
||||
"\nThis property has been added in version 0.23.10.\n"
|
||||
"\nThe predicate version (cif_blank_separator?) has been added in version 0.25.1.\n"
|
||||
),
|
||||
""
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
@@ -1,58 +0,0 @@
|
||||
|
||||
/*
|
||||
|
||||
KLayout Layout Viewer
|
||||
Copyright (C) 2006-2018 Matthias Koefferlein
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#ifndef HDR_layCIFWriterPlugin_h
|
||||
#define HDR_layCIFWriterPlugin_h
|
||||
|
||||
#include "layStream.h"
|
||||
#include <QObject>
|
||||
|
||||
namespace Ui
|
||||
{
|
||||
class CIFWriterOptionPage;
|
||||
}
|
||||
|
||||
namespace lay
|
||||
{
|
||||
|
||||
class CIFWriterOptionPage
|
||||
: public StreamWriterOptionsPage
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
CIFWriterOptionPage (QWidget *parent);
|
||||
~CIFWriterOptionPage ();
|
||||
|
||||
void setup (const db::FormatSpecificWriterOptions *options, const lay::Technology *tech);
|
||||
void commit (db::FormatSpecificWriterOptions *options, const lay::Technology *tech, bool gzip);
|
||||
|
||||
private:
|
||||
Ui::CIFWriterOptionPage *mp_ui;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,469 +0,0 @@
|
||||
|
||||
/*
|
||||
|
||||
KLayout Layout Viewer
|
||||
Copyright (C) 2006-2018 Matthias Koefferlein
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#include "dbDXF.h"
|
||||
#include "dbDXFReader.h"
|
||||
#include "dbLoadLayoutOptions.h"
|
||||
#include "layDXFReaderPlugin.h"
|
||||
#include "ui_DXFReaderOptionPage.h"
|
||||
#include "gsiDecl.h"
|
||||
|
||||
#include <QFrame>
|
||||
|
||||
namespace lay
|
||||
{
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// DXFReaderOptionPage definition and implementation
|
||||
|
||||
DXFReaderOptionPage::DXFReaderOptionPage (QWidget *parent)
|
||||
: StreamReaderOptionsPage (parent)
|
||||
{
|
||||
mp_ui = new Ui::DXFReaderOptionPage ();
|
||||
mp_ui->setupUi (this);
|
||||
}
|
||||
|
||||
DXFReaderOptionPage::~DXFReaderOptionPage ()
|
||||
{
|
||||
delete mp_ui;
|
||||
mp_ui = 0;
|
||||
}
|
||||
|
||||
void
|
||||
DXFReaderOptionPage::setup (const db::FormatSpecificReaderOptions *o, const lay::Technology * /*tech*/)
|
||||
{
|
||||
static const db::DXFReaderOptions default_options;
|
||||
const db::DXFReaderOptions *options = dynamic_cast<const db::DXFReaderOptions *> (o);
|
||||
if (!options) {
|
||||
options = &default_options;
|
||||
}
|
||||
|
||||
mp_ui->dbu_le->setText (tl::to_qstring (tl::to_string (options->dbu)));
|
||||
mp_ui->unit_le->setText (tl::to_qstring (tl::to_string (options->unit)));
|
||||
mp_ui->text_scaling_le->setText (tl::to_qstring (tl::to_string (options->text_scaling)));
|
||||
mp_ui->circle_points_le->setText (tl::to_qstring (tl::to_string (options->circle_points)));
|
||||
mp_ui->circle_accuracy_le->setText (tl::to_qstring (tl::to_string (options->circle_accuracy)));
|
||||
mp_ui->contour_accuracy_le->setText (tl::to_qstring (tl::to_string (options->contour_accuracy)));
|
||||
mp_ui->render_texts_as_polygons_cbx->setChecked (options->render_texts_as_polygons);
|
||||
mp_ui->keep_other_cells_cbx->setChecked (options->keep_other_cells);
|
||||
mp_ui->polyline2poly_cbx->setCurrentIndex (options->polyline_mode);
|
||||
mp_ui->layer_map->set_layer_map (options->layer_map);
|
||||
mp_ui->read_all_cbx->setChecked (options->create_other_layers);
|
||||
mp_ui->keep_names_cbx->setChecked (options->keep_layer_names);
|
||||
}
|
||||
|
||||
void
|
||||
DXFReaderOptionPage::commit (db::FormatSpecificReaderOptions *o, const lay::Technology * /*tech*/)
|
||||
{
|
||||
db::DXFReaderOptions *options = dynamic_cast<db::DXFReaderOptions *> (o);
|
||||
if (options) {
|
||||
tl::from_string (tl::to_string (mp_ui->dbu_le->text ()), options->dbu);
|
||||
if (options->dbu > 1000.0 || options->dbu < 1e-9) {
|
||||
throw tl::Exception (tl::to_string (QObject::tr ("Invalid value for database unit")));
|
||||
}
|
||||
tl::from_string (tl::to_string (mp_ui->unit_le->text ()), options->unit);
|
||||
if (options->unit > 1e9 || options->unit < 1e-9) {
|
||||
throw tl::Exception (tl::to_string (QObject::tr ("Invalid value for the unit")));
|
||||
}
|
||||
tl::from_string (tl::to_string (mp_ui->text_scaling_le->text ()), options->text_scaling);
|
||||
if (options->text_scaling > 10000 || options->text_scaling < 1) {
|
||||
throw tl::Exception (tl::to_string (QObject::tr ("Invalid value for the text scaling")));
|
||||
}
|
||||
tl::from_string (tl::to_string(mp_ui->circle_points_le->text ()), options->circle_points);
|
||||
if (options->circle_points < 4 || options->circle_points > 1000000) {
|
||||
throw tl::Exception (tl::to_string (QObject::tr ("Invalid value for the number of points for arc interpolation")));
|
||||
}
|
||||
tl::from_string (tl::to_string(mp_ui->circle_accuracy_le->text ()), options->circle_accuracy);
|
||||
tl::from_string (tl::to_string(mp_ui->contour_accuracy_le->text ()), options->contour_accuracy);
|
||||
options->polyline_mode = mp_ui->polyline2poly_cbx->currentIndex ();
|
||||
options->render_texts_as_polygons = mp_ui->render_texts_as_polygons_cbx->isChecked ();
|
||||
options->keep_other_cells = mp_ui->keep_other_cells_cbx->isChecked ();
|
||||
options->layer_map = mp_ui->layer_map->get_layer_map ();
|
||||
options->create_other_layers = mp_ui->read_all_cbx->isChecked ();
|
||||
options->keep_layer_names = mp_ui->keep_names_cbx->isChecked ();
|
||||
}
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// DXFReaderPluginDeclaration definition and implementation
|
||||
|
||||
class DXFReaderPluginDeclaration
|
||||
: public StreamReaderPluginDeclaration
|
||||
{
|
||||
public:
|
||||
DXFReaderPluginDeclaration ()
|
||||
: StreamReaderPluginDeclaration (db::DXFReaderOptions ().format_name ())
|
||||
{
|
||||
// .. nothing yet ..
|
||||
}
|
||||
|
||||
StreamReaderOptionsPage *format_specific_options_page (QWidget *parent) const
|
||||
{
|
||||
return new DXFReaderOptionPage (parent);
|
||||
}
|
||||
|
||||
db::FormatSpecificReaderOptions *create_specific_options () const
|
||||
{
|
||||
return new db::DXFReaderOptions ();
|
||||
}
|
||||
|
||||
virtual tl::XMLElementBase *xml_element () const
|
||||
{
|
||||
return new lay::ReaderOptionsXMLElement<db::DXFReaderOptions> ("dxf",
|
||||
tl::make_member (&db::DXFReaderOptions::dbu, "dbu") +
|
||||
tl::make_member (&db::DXFReaderOptions::unit, "unit") +
|
||||
tl::make_member (&db::DXFReaderOptions::text_scaling, "text-scaling") +
|
||||
tl::make_member (&db::DXFReaderOptions::circle_points, "circle-points") +
|
||||
tl::make_member (&db::DXFReaderOptions::circle_accuracy, "circle-accuracy") +
|
||||
tl::make_member (&db::DXFReaderOptions::contour_accuracy, "contour-accuracy") +
|
||||
tl::make_member (&db::DXFReaderOptions::polyline_mode, "polyline-mode") +
|
||||
tl::make_member (&db::DXFReaderOptions::render_texts_as_polygons, "render-texts-as-polygons") +
|
||||
tl::make_member (&db::DXFReaderOptions::keep_other_cells, "keep-other-cells") +
|
||||
tl::make_member (&db::DXFReaderOptions::keep_layer_names, "keep-layer-names") +
|
||||
tl::make_member (&db::DXFReaderOptions::create_other_layers, "create-other-layers") +
|
||||
tl::make_member (&db::DXFReaderOptions::layer_map, "layer-map")
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
static tl::RegisteredClass<lay::PluginDeclaration> plugin_decl (new lay::DXFReaderPluginDeclaration (), 10000, "DXFReader");
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// gsi Implementation of specific methods
|
||||
|
||||
static void set_dxf_dbu (db::LoadLayoutOptions *options, double dbu)
|
||||
{
|
||||
options->get_options<db::DXFReaderOptions> ().dbu = dbu;
|
||||
}
|
||||
|
||||
static double get_dxf_dbu (const db::LoadLayoutOptions *options)
|
||||
{
|
||||
return options->get_options<db::DXFReaderOptions> ().dbu;
|
||||
}
|
||||
|
||||
static void set_dxf_text_scaling (db::LoadLayoutOptions *options, double text_scaling)
|
||||
{
|
||||
options->get_options<db::DXFReaderOptions> ().text_scaling = text_scaling;
|
||||
}
|
||||
|
||||
static double get_dxf_text_scaling (const db::LoadLayoutOptions *options)
|
||||
{
|
||||
return options->get_options<db::DXFReaderOptions> ().text_scaling;
|
||||
}
|
||||
|
||||
static void set_dxf_unit (db::LoadLayoutOptions *options, double unit)
|
||||
{
|
||||
options->get_options<db::DXFReaderOptions> ().unit = unit;
|
||||
}
|
||||
|
||||
static double get_dxf_unit (const db::LoadLayoutOptions *options)
|
||||
{
|
||||
return options->get_options<db::DXFReaderOptions> ().unit;
|
||||
}
|
||||
|
||||
static void set_dxf_render_texts_as_polygons (db::LoadLayoutOptions *options, bool value)
|
||||
{
|
||||
options->get_options<db::DXFReaderOptions> ().render_texts_as_polygons = value;
|
||||
}
|
||||
|
||||
static bool get_dxf_render_texts_as_polygons (const db::LoadLayoutOptions *options)
|
||||
{
|
||||
return options->get_options<db::DXFReaderOptions> ().render_texts_as_polygons;
|
||||
}
|
||||
|
||||
static void set_dxf_keep_other_cells (db::LoadLayoutOptions *options, bool value)
|
||||
{
|
||||
options->get_options<db::DXFReaderOptions> ().keep_other_cells = value;
|
||||
}
|
||||
|
||||
static bool get_dxf_keep_other_cells (const db::LoadLayoutOptions *options)
|
||||
{
|
||||
return options->get_options<db::DXFReaderOptions> ().keep_other_cells;
|
||||
}
|
||||
|
||||
static void set_dxf_circle_points (db::LoadLayoutOptions *options, int circle_points)
|
||||
{
|
||||
options->get_options<db::DXFReaderOptions> ().circle_points = circle_points;
|
||||
}
|
||||
|
||||
static int get_dxf_circle_points (const db::LoadLayoutOptions *options)
|
||||
{
|
||||
return options->get_options<db::DXFReaderOptions> ().circle_points;
|
||||
}
|
||||
|
||||
static void set_dxf_circle_accuracy (db::LoadLayoutOptions *options, double circle_accuracy)
|
||||
{
|
||||
options->get_options<db::DXFReaderOptions> ().circle_accuracy = circle_accuracy;
|
||||
}
|
||||
|
||||
static double get_dxf_circle_accuracy (const db::LoadLayoutOptions *options)
|
||||
{
|
||||
return options->get_options<db::DXFReaderOptions> ().circle_accuracy;
|
||||
}
|
||||
|
||||
static void set_dxf_contour_accuracy (db::LoadLayoutOptions *options, double contour_accuracy)
|
||||
{
|
||||
options->get_options<db::DXFReaderOptions> ().contour_accuracy = contour_accuracy;
|
||||
}
|
||||
|
||||
static double get_dxf_contour_accuracy (const db::LoadLayoutOptions *options)
|
||||
{
|
||||
return options->get_options<db::DXFReaderOptions> ().contour_accuracy;
|
||||
}
|
||||
|
||||
static void set_dxf_polyline_mode (db::LoadLayoutOptions *options, int mode)
|
||||
{
|
||||
if (mode < 0 || mode > 4) {
|
||||
throw tl::Exception (tl::to_string (QObject::tr ("Invalid polygon mode")));
|
||||
}
|
||||
|
||||
options->get_options<db::DXFReaderOptions> ().polyline_mode = mode;
|
||||
}
|
||||
|
||||
static int get_dxf_polyline_mode (const db::LoadLayoutOptions *options)
|
||||
{
|
||||
return options->get_options<db::DXFReaderOptions> ().polyline_mode;
|
||||
}
|
||||
|
||||
static void set_layer_map (db::LoadLayoutOptions *options, const db::LayerMap &lm, bool f)
|
||||
{
|
||||
options->get_options<db::DXFReaderOptions> ().layer_map = lm;
|
||||
options->get_options<db::DXFReaderOptions> ().create_other_layers = f;
|
||||
}
|
||||
|
||||
static db::LayerMap &get_layer_map (db::LoadLayoutOptions *options)
|
||||
{
|
||||
return options->get_options<db::DXFReaderOptions> ().layer_map;
|
||||
}
|
||||
|
||||
static void select_all_layers (db::LoadLayoutOptions *options)
|
||||
{
|
||||
options->get_options<db::DXFReaderOptions> ().layer_map = db::LayerMap ();
|
||||
options->get_options<db::DXFReaderOptions> ().create_other_layers = true;
|
||||
}
|
||||
|
||||
static bool create_other_layers (const db::LoadLayoutOptions *options)
|
||||
{
|
||||
return options->get_options<db::DXFReaderOptions> ().create_other_layers;
|
||||
}
|
||||
|
||||
static void set_create_other_layers (db::LoadLayoutOptions *options, bool l)
|
||||
{
|
||||
options->get_options<db::DXFReaderOptions> ().create_other_layers = l;
|
||||
}
|
||||
|
||||
static bool keep_layer_names (const db::LoadLayoutOptions *options)
|
||||
{
|
||||
return options->get_options<db::DXFReaderOptions> ().keep_layer_names;
|
||||
}
|
||||
|
||||
static void set_keep_layer_names (db::LoadLayoutOptions *options, bool l)
|
||||
{
|
||||
options->get_options<db::DXFReaderOptions> ().keep_layer_names = l;
|
||||
}
|
||||
|
||||
// extend lay::LoadLayoutOptions with the DXF options
|
||||
static
|
||||
gsi::ClassExt<db::LoadLayoutOptions> dxf_reader_options (
|
||||
gsi::method_ext ("dxf_set_layer_map", &set_layer_map, gsi::arg ("map"), gsi::arg ("create_other_layers"),
|
||||
"@brief Sets the layer map\n"
|
||||
"This sets a layer mapping for the reader. The \"create_other_layers\" specifies whether to create layers that are not "
|
||||
"in the mapping and automatically assign layers to them.\n"
|
||||
"@param map The layer map to set."
|
||||
"@param create_other_layers The flag telling whether other layer should be created also. Set to false if just the layers in the mapping table should be read.\n"
|
||||
"\n"
|
||||
"This method has been added in version 0.25 and replaces the respective global option in \\LoadLayoutOptions "
|
||||
"in a format-specific fashion."
|
||||
) +
|
||||
gsi::method_ext ("dxf_select_all_layers", &select_all_layers,
|
||||
"@brief Selects all layers and disables the layer map\n"
|
||||
"\n"
|
||||
"This disables any layer map and enables reading of all layers.\n"
|
||||
"New layers will be created when required.\n"
|
||||
"\n"
|
||||
"This method has been added in version 0.25 and replaces the respective global option in \\LoadLayoutOptions "
|
||||
"in a format-specific fashion."
|
||||
) +
|
||||
gsi::method_ext ("dxf_layer_map", &get_layer_map,
|
||||
"@brief Gets the layer map\n"
|
||||
"@return A reference to the layer map\n"
|
||||
"\n"
|
||||
"This method has been added in version 0.25 and replaces the respective global option in \\LoadLayoutOptions "
|
||||
"in a format-specific fashion."
|
||||
) +
|
||||
gsi::method_ext ("dxf_create_other_layers?", &create_other_layers,
|
||||
"@brief Gets a value indicating whether other layers shall be created\n"
|
||||
"@return True, if other layers should be created.\n"
|
||||
"\n"
|
||||
"This method has been added in version 0.25 and replaces the respective global option in \\LoadLayoutOptions "
|
||||
"in a format-specific fashion."
|
||||
) +
|
||||
gsi::method_ext ("dxf_create_other_layers=", &set_create_other_layers, gsi::arg ("create"),
|
||||
"@brief Specifies whether other layers shall be created\n"
|
||||
"@param create True, if other layers should be created.\n"
|
||||
"\n"
|
||||
"This method has been added in version 0.25 and replaces the respective global option in \\LoadLayoutOptions "
|
||||
"in a format-specific fashion."
|
||||
) +
|
||||
gsi::method_ext ("dxf_dbu=", &set_dxf_dbu,
|
||||
"@brief Specifies the database unit which the reader uses and produces\n"
|
||||
"@args dbu\n"
|
||||
"\nThis property has been added in version 0.21.\n"
|
||||
) +
|
||||
gsi::method_ext ("dxf_dbu", &get_dxf_dbu,
|
||||
"@brief Specifies the database unit which the reader uses and produces\n"
|
||||
"\nThis property has been added in version 0.21.\n"
|
||||
) +
|
||||
gsi::method_ext ("dxf_text_scaling=", &set_dxf_text_scaling,
|
||||
"@brief Specifies the text scaling in percent of the default scaling\n"
|
||||
"@args unit\n"
|
||||
"\n"
|
||||
"The default value 100, meaning that the letter pitch is roughly 92 percent of the specified text height. "
|
||||
"Decrease this value to get smaller fonts and increase it to get larger fonts.\n"
|
||||
"\nThis property has been added in version 0.21.20.\n"
|
||||
) +
|
||||
gsi::method_ext ("dxf_text_scaling", &get_dxf_text_scaling,
|
||||
"@brief Gets the text scaling factor (see \\dxf_text_scaling=)\n"
|
||||
"\nThis property has been added in version 0.21.20.\n"
|
||||
) +
|
||||
gsi::method_ext ("dxf_unit=", &set_dxf_unit,
|
||||
"@brief Specifies the unit in which the DXF file is drawn.\n"
|
||||
"@args unit\n"
|
||||
"\nThis property has been added in version 0.21.3.\n"
|
||||
) +
|
||||
gsi::method_ext ("dxf_unit", &get_dxf_unit,
|
||||
"@brief Specifies the unit in which the DXF file is drawn\n"
|
||||
"\nThis property has been added in version 0.21.3.\n"
|
||||
) +
|
||||
gsi::method_ext ("dxf_circle_points=", &set_dxf_circle_points,
|
||||
"@brief Specifies the number of points used per full circle for arc interpolation\n"
|
||||
"@args points\n"
|
||||
"See also \\dxf_circle_accuracy for how to specify the number of points based on "
|
||||
"an approximation accuracy.\n"
|
||||
"\n"
|
||||
"\\dxf_circle_points and \\dxf_circle_accuracy also apply to other \"round\" structures "
|
||||
"such as arcs, ellipses and splines in the same sense than for circles.\n"
|
||||
"\n"
|
||||
"\nThis property has been added in version 0.21.6.\n"
|
||||
) +
|
||||
gsi::method_ext ("dxf_circle_points", &get_dxf_circle_points,
|
||||
"@brief Gets the number of points used per full circle for arc interpolation\n"
|
||||
"\nThis property has been added in version 0.21.6.\n"
|
||||
) +
|
||||
gsi::method_ext ("dxf_circle_accuracy=", &set_dxf_circle_accuracy,
|
||||
"@brief Specifies the accuracy of the circle approximation\n"
|
||||
"@args accuracy\n"
|
||||
"\n"
|
||||
"In addition to the number of points per circle, the circle accuracy can be specified. "
|
||||
"If set to a value larger than the database unit, the number of points per circle will "
|
||||
"be chosen such that the deviation from the ideal circle becomes less than this value.\n"
|
||||
"\n"
|
||||
"The actual number of points will not become bigger than the points specified through "
|
||||
"\\dxf_circle_points=. The accuracy value is given in the DXF file units (see \\dxf_unit) which is usually micrometers.\n"
|
||||
"\n"
|
||||
"\\dxf_circle_points and \\dxf_circle_accuracy also apply to other \"round\" structures "
|
||||
"such as arcs, ellipses and splines in the same sense than for circles.\n"
|
||||
"\n"
|
||||
"\nThis property has been added in version 0.24.9.\n"
|
||||
) +
|
||||
gsi::method_ext ("dxf_circle_accuracy", &get_dxf_circle_accuracy,
|
||||
"@brief Gets the accuracy of the circle approximation\n"
|
||||
"\nThis property has been added in version 0.24.9.\n"
|
||||
) +
|
||||
gsi::method_ext ("dxf_contour_accuracy=", &set_dxf_contour_accuracy,
|
||||
"@brief Specifies the accuracy for contour closing\n"
|
||||
"@args accuracy\n"
|
||||
"\n"
|
||||
"When polylines need to be connected or closed, this\n"
|
||||
"value is used to indicate the accuracy. This is the value (in DXF units)\n"
|
||||
"by which points may be separated and still be considered\n"
|
||||
"connected. The default is 0.0 which implies exact\n"
|
||||
"(within one DBU) closing.\n"
|
||||
"\n"
|
||||
"This value is effective in polyline mode 3 and 4.\n"
|
||||
"\n"
|
||||
"\nThis property has been added in version 0.25.3.\n"
|
||||
) +
|
||||
gsi::method_ext ("dxf_contour_accuracy", &get_dxf_contour_accuracy,
|
||||
"@brief Gets the accuracy for contour closing\n"
|
||||
"\n"
|
||||
"\nThis property has been added in version 0.25.3.\n"
|
||||
) +
|
||||
gsi::method_ext ("dxf_render_texts_as_polygons=", &set_dxf_render_texts_as_polygons,
|
||||
"@brief If this option is set to true, text objects are rendered as polygons\n"
|
||||
"@args value\n"
|
||||
"\nThis property has been added in version 0.21.15.\n"
|
||||
) +
|
||||
gsi::method_ext ("dxf_render_texts_as_polygons?|#dxf_render_texts_as_polygons", &get_dxf_render_texts_as_polygons,
|
||||
"@brief If this option is true, text objects are rendered as polygons\n"
|
||||
"\nThis property has been added in version 0.21.15.\n"
|
||||
) +
|
||||
gsi::method_ext ("dxf_keep_layer_names?", &keep_layer_names,
|
||||
"@brief Gets a value indicating whether layer names are kept\n"
|
||||
"@return True, if layer names are kept.\n"
|
||||
"\n"
|
||||
"When set to true, no attempt is made to translate "
|
||||
"layer names to GDS layer/datatype numbers. If set to false (the default), a layer named \"L2D15\" will be translated "
|
||||
"to GDS layer 2, datatype 15.\n"
|
||||
"\n"
|
||||
"This method has been added in version 0.25.3."
|
||||
) +
|
||||
gsi::method_ext ("dxf_keep_layer_names=", &set_keep_layer_names, gsi::arg ("keep"),
|
||||
"@brief Gets a value indicating whether layer names are kept\n"
|
||||
"@param keep True, if layer names are to be kept.\n"
|
||||
"\n"
|
||||
"See \\cif_keep_layer_names? for a description of this property.\n"
|
||||
"\n"
|
||||
"This method has been added in version 0.25.3."
|
||||
) +
|
||||
gsi::method_ext ("dxf_keep_other_cells=", &set_dxf_keep_other_cells,
|
||||
"@brief If this option is set to true, all cells are kept, not only the top cell and it's children\n"
|
||||
"@args value\n"
|
||||
"\nThis property has been added in version 0.21.15.\n"
|
||||
) +
|
||||
gsi::method_ext ("dxf_keep_other_cells?|#dxf_keep_other_cells", &get_dxf_keep_other_cells,
|
||||
"@brief If this option is true, all cells are kept, not only the top cell and it's children\n"
|
||||
"\nThis property has been added in version 0.21.15.\n"
|
||||
) +
|
||||
gsi::method_ext ("dxf_polyline_mode=", &set_dxf_polyline_mode,
|
||||
"@brief Specifies how to treat POLYLINE/LWPOLYLINE entities.\n"
|
||||
"@args mode\n"
|
||||
"The mode is 0 (automatic), 1 (keep lines), 2 (create polygons from closed polylines with width = 0), "
|
||||
"3 (merge all lines with width = 0 into polygons), 4 (as 3 plus auto-close open contours).\n"
|
||||
"\nThis property has been added in version 0.21.3.\n"
|
||||
) +
|
||||
gsi::method_ext ("dxf_polyline_mode", &get_dxf_polyline_mode,
|
||||
"@brief Specifies whether closed POLYLINE and LWPOLYLINE entities with width 0 are converted to polygons.\n"
|
||||
"See \\dxf_polyline_mode= for a description of this property.\n"
|
||||
"\nThis property has been added in version 0.21.3.\n"
|
||||
),
|
||||
""
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,57 +0,0 @@
|
||||
|
||||
/*
|
||||
|
||||
KLayout Layout Viewer
|
||||
Copyright (C) 2006-2018 Matthias Koefferlein
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#ifndef HDR_layDXFReaderPlugin_h
|
||||
#define HDR_layDXFReaderPlugin_h
|
||||
|
||||
#include "layStream.h"
|
||||
#include <QObject>
|
||||
|
||||
namespace Ui
|
||||
{
|
||||
class DXFReaderOptionPage;
|
||||
}
|
||||
|
||||
namespace lay
|
||||
{
|
||||
|
||||
class DXFReaderOptionPage
|
||||
: public StreamReaderOptionsPage
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
DXFReaderOptionPage (QWidget *parent);
|
||||
~DXFReaderOptionPage ();
|
||||
|
||||
void setup (const db::FormatSpecificReaderOptions *options, const lay::Technology *tech);
|
||||
void commit (db::FormatSpecificReaderOptions *options, const lay::Technology *tech);
|
||||
|
||||
private:
|
||||
Ui::DXFReaderOptionPage *mp_ui;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -1,143 +0,0 @@
|
||||
|
||||
/*
|
||||
|
||||
KLayout Layout Viewer
|
||||
Copyright (C) 2006-2018 Matthias Koefferlein
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#include "dbDXF.h"
|
||||
#include "dbDXFWriter.h"
|
||||
#include "dbSaveLayoutOptions.h"
|
||||
#include "layDXFWriterPlugin.h"
|
||||
#include "ui_DXFWriterOptionPage.h"
|
||||
#include "gsiDecl.h"
|
||||
|
||||
#include <QFrame>
|
||||
|
||||
namespace lay
|
||||
{
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// DXFWriterOptionPage definition and implementation
|
||||
|
||||
DXFWriterOptionPage::DXFWriterOptionPage (QWidget *parent)
|
||||
: StreamWriterOptionsPage (parent)
|
||||
{
|
||||
mp_ui = new Ui::DXFWriterOptionPage ();
|
||||
mp_ui->setupUi (this);
|
||||
}
|
||||
|
||||
DXFWriterOptionPage::~DXFWriterOptionPage ()
|
||||
{
|
||||
delete mp_ui;
|
||||
mp_ui = 0;
|
||||
}
|
||||
|
||||
void
|
||||
DXFWriterOptionPage::setup (const db::FormatSpecificWriterOptions *o, const lay::Technology * /*tech*/)
|
||||
{
|
||||
const db::DXFWriterOptions *options = dynamic_cast<const db::DXFWriterOptions *> (o);
|
||||
if (options) {
|
||||
mp_ui->polygon_mode_cbx->setCurrentIndex (options->polygon_mode);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
DXFWriterOptionPage::commit (db::FormatSpecificWriterOptions *o, const lay::Technology * /*tech*/, bool /*gzip*/)
|
||||
{
|
||||
db::DXFWriterOptions *options = dynamic_cast<db::DXFWriterOptions *> (o);
|
||||
if (options) {
|
||||
options->polygon_mode = mp_ui->polygon_mode_cbx->currentIndex ();
|
||||
}
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// DXFWriterPluginDeclaration definition and implementation
|
||||
|
||||
class DXFWriterPluginDeclaration
|
||||
: public StreamWriterPluginDeclaration
|
||||
{
|
||||
public:
|
||||
DXFWriterPluginDeclaration ()
|
||||
: StreamWriterPluginDeclaration (db::DXFWriterOptions ().format_name ())
|
||||
{
|
||||
// .. nothing yet ..
|
||||
}
|
||||
|
||||
StreamWriterOptionsPage *format_specific_options_page (QWidget *parent) const
|
||||
{
|
||||
return new DXFWriterOptionPage (parent);
|
||||
}
|
||||
|
||||
db::FormatSpecificWriterOptions *create_specific_options () const
|
||||
{
|
||||
return new db::DXFWriterOptions ();
|
||||
}
|
||||
|
||||
virtual tl::XMLElementBase *xml_element () const
|
||||
{
|
||||
return new lay::WriterOptionsXMLElement<db::DXFWriterOptions> ("cif",
|
||||
tl::make_member (&db::DXFWriterOptions::polygon_mode, "polygon-mode")
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
static tl::RegisteredClass<lay::PluginDeclaration> plugin_decl (new lay::DXFWriterPluginDeclaration (), 10000, "DXFWriter");
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// gsi Implementation of specific methods
|
||||
|
||||
static void set_dxf_polygon_mode (db::SaveLayoutOptions *options, int mode)
|
||||
{
|
||||
if (mode < 0 || mode > 3) {
|
||||
throw tl::Exception (tl::to_string (QObject::tr ("Invalid polygon mode")));
|
||||
}
|
||||
|
||||
options->get_options<db::DXFWriterOptions> ().polygon_mode = mode;
|
||||
}
|
||||
|
||||
static int get_dxf_polygon_mode (const db::SaveLayoutOptions *options)
|
||||
{
|
||||
return options->get_options<db::DXFWriterOptions> ().polygon_mode;
|
||||
}
|
||||
|
||||
// extend lay::SaveLayoutOptions with the DXF options
|
||||
static
|
||||
gsi::ClassExt<db::SaveLayoutOptions> dxf_writer_options (
|
||||
gsi::method_ext ("dxf_polygon_mode=", &set_dxf_polygon_mode,
|
||||
"@brief Specifies how to write polygons.\n"
|
||||
"@args mode\n"
|
||||
"The mode is 0 (write POLYLINE entities), 1 (write LWPOLYLINE entities), 2 (decompose into SOLID entities) or "
|
||||
"or 3 (write HATCH entities).\n"
|
||||
"\nThis property has been added in version 0.21.3.\n"
|
||||
) +
|
||||
gsi::method_ext ("dxf_polygon_mode", &get_dxf_polygon_mode,
|
||||
"@brief Specifies how to write polygons.\n"
|
||||
"See \\dxf_polygon_mode= for a description of this property.\n"
|
||||
"\nThis property has been added in version 0.21.3.\n"
|
||||
),
|
||||
""
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,59 +0,0 @@
|
||||
|
||||
/*
|
||||
|
||||
KLayout Layout Viewer
|
||||
Copyright (C) 2006-2018 Matthias Koefferlein
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#ifndef HDR_layDXFWriterPlugin_h
|
||||
#define HDR_layDXFWriterPlugin_h
|
||||
|
||||
#include "layStream.h"
|
||||
#include <QObject>
|
||||
|
||||
namespace Ui
|
||||
{
|
||||
class DXFWriterOptionPage;
|
||||
}
|
||||
|
||||
namespace lay
|
||||
{
|
||||
|
||||
class DXFWriterOptionPage
|
||||
: public StreamWriterOptionsPage
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
DXFWriterOptionPage (QWidget *parent);
|
||||
~DXFWriterOptionPage ();
|
||||
|
||||
void setup (const db::FormatSpecificWriterOptions *options, const lay::Technology *tech);
|
||||
void commit (db::FormatSpecificWriterOptions *options, const lay::Technology *tech, bool gzip);
|
||||
|
||||
private:
|
||||
Ui::DXFWriterOptionPage *mp_ui;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,68 +0,0 @@
|
||||
|
||||
/*
|
||||
|
||||
KLayout Layout Viewer
|
||||
Copyright (C) 2006-2018 Matthias Koefferlein
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#include "dbOASIS.h"
|
||||
#include "dbOASISReader.h"
|
||||
#include "dbLoadLayoutOptions.h"
|
||||
#include "layOASISReaderPlugin.h"
|
||||
#include "layStream.h"
|
||||
#include "gsiDecl.h"
|
||||
|
||||
#include <QFrame>
|
||||
|
||||
namespace lay
|
||||
{
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// OASISReaderPluginDeclaration definition and implementation
|
||||
|
||||
class OASISReaderPluginDeclaration
|
||||
: public StreamReaderPluginDeclaration
|
||||
{
|
||||
public:
|
||||
OASISReaderPluginDeclaration ()
|
||||
: StreamReaderPluginDeclaration (db::OASISReaderOptions ().format_name ())
|
||||
{
|
||||
// .. nothing yet ..
|
||||
}
|
||||
|
||||
StreamReaderOptionsPage *format_specific_options_page (QWidget * /*parent*/) const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
db::FormatSpecificReaderOptions *create_specific_options () const
|
||||
{
|
||||
return new db::OASISReaderOptions ();
|
||||
}
|
||||
};
|
||||
|
||||
static tl::RegisteredClass<lay::PluginDeclaration> plugin_decl (new lay::OASISReaderPluginDeclaration (), 10000, "OASISReader");
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
|
||||
/*
|
||||
|
||||
KLayout Layout Viewer
|
||||
Copyright (C) 2006-2018 Matthias Koefferlein
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#ifndef HDR_layOASISReaderPlugin_h
|
||||
#define HDR_layOASISReaderPlugin_h
|
||||
|
||||
// .. nothing yet ..
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,351 +0,0 @@
|
||||
|
||||
/*
|
||||
|
||||
KLayout Layout Viewer
|
||||
Copyright (C) 2006-2018 Matthias Koefferlein
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#include "dbOASIS.h"
|
||||
#include "dbOASISWriter.h"
|
||||
#include "dbSaveLayoutOptions.h"
|
||||
#include "layStream.h"
|
||||
#include "gsiDecl.h"
|
||||
|
||||
#include "ui_OASISWriterOptionPage.h"
|
||||
|
||||
#include <QFrame>
|
||||
|
||||
namespace lay
|
||||
{
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// OASISWriterOptionPage definition and implementation
|
||||
|
||||
class OASISWriterOptionPage
|
||||
: public StreamWriterOptionsPage
|
||||
{
|
||||
public:
|
||||
OASISWriterOptionPage (QWidget *parent);
|
||||
~OASISWriterOptionPage ();
|
||||
|
||||
void setup (const db::FormatSpecificWriterOptions *options, const lay::Technology *tech);
|
||||
void commit (db::FormatSpecificWriterOptions *options, const lay::Technology *tech, bool gzip);
|
||||
|
||||
private:
|
||||
Ui::OASISWriterOptionPage *mp_ui;
|
||||
};
|
||||
|
||||
OASISWriterOptionPage::OASISWriterOptionPage (QWidget *parent)
|
||||
: StreamWriterOptionsPage (parent)
|
||||
{
|
||||
mp_ui = new Ui::OASISWriterOptionPage ();
|
||||
mp_ui->setupUi (this);
|
||||
}
|
||||
|
||||
OASISWriterOptionPage::~OASISWriterOptionPage ()
|
||||
{
|
||||
delete mp_ui;
|
||||
}
|
||||
|
||||
void
|
||||
OASISWriterOptionPage::setup (const db::FormatSpecificWriterOptions *o, const lay::Technology * /*tech*/)
|
||||
{
|
||||
const db::OASISWriterOptions *options = dynamic_cast<const db::OASISWriterOptions *> (o);
|
||||
if (options) {
|
||||
mp_ui->compression_slider->setValue (options->compression_level);
|
||||
mp_ui->write_cblocks->setChecked (options->write_cblocks);
|
||||
mp_ui->strict_mode->setChecked (options->strict_mode);
|
||||
mp_ui->std_prop_mode->setCurrentIndex (options->write_std_properties);
|
||||
mp_ui->subst_char->setText (tl::to_qstring (options->subst_char));
|
||||
mp_ui->permissive->setChecked (options->permissive);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
OASISWriterOptionPage::commit (db::FormatSpecificWriterOptions *o, const lay::Technology * /*tech*/, bool gzip)
|
||||
{
|
||||
if (gzip && mp_ui->write_cblocks->isChecked ()) {
|
||||
throw tl::Exception (tl::to_string (QObject::tr ("gzip compression cannot be used with CBLOCK compression")));
|
||||
}
|
||||
|
||||
if (mp_ui->subst_char->text ().size () > 1) {
|
||||
throw tl::Exception (tl::to_string (QObject::tr ("Substitution character must be either empty or exactly one character")));
|
||||
}
|
||||
|
||||
db::OASISWriterOptions *options = dynamic_cast<db::OASISWriterOptions *> (o);
|
||||
if (options) {
|
||||
options->compression_level = mp_ui->compression_slider->value ();
|
||||
options->write_cblocks = mp_ui->write_cblocks->isChecked ();
|
||||
options->strict_mode = mp_ui->strict_mode->isChecked ();
|
||||
options->write_std_properties = mp_ui->std_prop_mode->currentIndex ();
|
||||
options->subst_char = tl::to_string (mp_ui->subst_char->text ());
|
||||
options->permissive = mp_ui->permissive->isChecked ();
|
||||
}
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// OASISWriterPluginDeclaration definition and implementation
|
||||
|
||||
class OASISWriterPluginDeclaration
|
||||
: public StreamWriterPluginDeclaration
|
||||
{
|
||||
public:
|
||||
OASISWriterPluginDeclaration ()
|
||||
: StreamWriterPluginDeclaration (db::OASISWriterOptions ().format_name ())
|
||||
{
|
||||
// .. nothing yet ..
|
||||
}
|
||||
|
||||
StreamWriterOptionsPage *format_specific_options_page (QWidget *parent) const
|
||||
{
|
||||
return new OASISWriterOptionPage (parent);
|
||||
}
|
||||
|
||||
db::FormatSpecificWriterOptions *create_specific_options () const
|
||||
{
|
||||
return new db::OASISWriterOptions ();
|
||||
}
|
||||
|
||||
virtual tl::XMLElementBase *xml_element () const
|
||||
{
|
||||
return new lay::WriterOptionsXMLElement<db::OASISWriterOptions> ("oasis",
|
||||
tl::make_member (&db::OASISWriterOptions::compression_level, "compression-level") +
|
||||
tl::make_member (&db::OASISWriterOptions::write_cblocks, "write-cblocks") +
|
||||
tl::make_member (&db::OASISWriterOptions::strict_mode, "strict-mode") +
|
||||
tl::make_member (&db::OASISWriterOptions::write_std_properties, "write-std-properties") +
|
||||
tl::make_member (&db::OASISWriterOptions::subst_char, "subst-char") +
|
||||
tl::make_member (&db::OASISWriterOptions::permissive, "permissive")
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
static tl::RegisteredClass<lay::PluginDeclaration> plugin_decl (new lay::OASISWriterPluginDeclaration (), 10000, "OASISWriter");
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// gsi Implementation of specific methods
|
||||
|
||||
static void set_oasis_compression (db::SaveLayoutOptions *options, int comp)
|
||||
{
|
||||
options->get_options<db::OASISWriterOptions> ().compression_level = comp;
|
||||
}
|
||||
|
||||
static int get_oasis_compression (const db::SaveLayoutOptions *options)
|
||||
{
|
||||
return options->get_options<db::OASISWriterOptions> ().compression_level;
|
||||
}
|
||||
|
||||
static void set_oasis_recompress (db::SaveLayoutOptions *options, bool f)
|
||||
{
|
||||
options->get_options<db::OASISWriterOptions> ().recompress = f;
|
||||
}
|
||||
|
||||
static bool get_oasis_recompress (const db::SaveLayoutOptions *options)
|
||||
{
|
||||
return options->get_options<db::OASISWriterOptions> ().recompress;
|
||||
}
|
||||
|
||||
static void set_oasis_permissive (db::SaveLayoutOptions *options, bool f)
|
||||
{
|
||||
options->get_options<db::OASISWriterOptions> ().permissive = f;
|
||||
}
|
||||
|
||||
static bool get_oasis_permissive (const db::SaveLayoutOptions *options)
|
||||
{
|
||||
return options->get_options<db::OASISWriterOptions> ().permissive;
|
||||
}
|
||||
|
||||
static void set_oasis_write_std_properties (db::SaveLayoutOptions *options, bool f)
|
||||
{
|
||||
db::OASISWriterOptions &oasis_options = options->get_options<db::OASISWriterOptions> ();
|
||||
if (f && oasis_options.write_std_properties == 0) {
|
||||
oasis_options.write_std_properties = 1;
|
||||
} else if (!f && oasis_options.write_std_properties != 0) {
|
||||
oasis_options.write_std_properties = 0;
|
||||
}
|
||||
}
|
||||
|
||||
static bool get_oasis_write_std_properties (const db::SaveLayoutOptions *options)
|
||||
{
|
||||
return options->get_options<db::OASISWriterOptions> ().write_std_properties != 0;
|
||||
}
|
||||
|
||||
static void set_oasis_write_cell_bounding_boxes (db::SaveLayoutOptions *options, bool f)
|
||||
{
|
||||
db::OASISWriterOptions &oasis_options = options->get_options<db::OASISWriterOptions> ();
|
||||
if (f && oasis_options.write_std_properties < 2) {
|
||||
oasis_options.write_std_properties = 2;
|
||||
} else if (!f && oasis_options.write_std_properties >= 2) {
|
||||
oasis_options.write_std_properties = 1;
|
||||
}
|
||||
}
|
||||
|
||||
static bool get_oasis_write_cell_bounding_boxes (const db::SaveLayoutOptions *options)
|
||||
{
|
||||
return options->get_options<db::OASISWriterOptions> ().write_std_properties >= 2;
|
||||
}
|
||||
|
||||
static void set_oasis_write_cblocks (db::SaveLayoutOptions *options, bool f)
|
||||
{
|
||||
options->get_options<db::OASISWriterOptions> ().write_cblocks = f;
|
||||
}
|
||||
|
||||
static bool get_oasis_write_cblocks (const db::SaveLayoutOptions *options)
|
||||
{
|
||||
return options->get_options<db::OASISWriterOptions> ().write_cblocks;
|
||||
}
|
||||
|
||||
static void set_oasis_strict_mode (db::SaveLayoutOptions *options, bool f)
|
||||
{
|
||||
options->get_options<db::OASISWriterOptions> ().strict_mode = f;
|
||||
}
|
||||
|
||||
static bool get_oasis_strict_mode (const db::SaveLayoutOptions *options)
|
||||
{
|
||||
return options->get_options<db::OASISWriterOptions> ().strict_mode;
|
||||
}
|
||||
|
||||
static void set_oasis_subst_char (db::SaveLayoutOptions *options, const std::string &sc)
|
||||
{
|
||||
options->get_options<db::OASISWriterOptions> ().subst_char = sc;
|
||||
}
|
||||
|
||||
static std::string get_oasis_subst_char (const db::SaveLayoutOptions *options)
|
||||
{
|
||||
return options->get_options<db::OASISWriterOptions> ().subst_char;
|
||||
}
|
||||
|
||||
// extend lay::SaveLayoutOptions with the OASIS options
|
||||
static
|
||||
gsi::ClassExt<db::SaveLayoutOptions> oasis_writer_options (
|
||||
gsi::method_ext ("oasis_write_cblocks=", &set_oasis_write_cblocks,
|
||||
"@brief Sets a value indicating whether to write compressed CBLOCKS per cell\n"
|
||||
"@args flag\n"
|
||||
"Setting this property clears all format specific options for other formats such as GDS.\n"
|
||||
) +
|
||||
gsi::method_ext ("oasis_write_cblocks?", &get_oasis_write_cblocks,
|
||||
"@brief Gets a value indicating whether to write compressed CBLOCKS per cell\n"
|
||||
) +
|
||||
gsi::method_ext ("oasis_strict_mode=", &set_oasis_strict_mode,
|
||||
"@brief Sets a value indicating whether to write strict-mode OASIS files\n"
|
||||
"@args flag\n"
|
||||
"Setting this property clears all format specific options for other formats such as GDS.\n"
|
||||
) +
|
||||
gsi::method_ext ("oasis_strict_mode?", &get_oasis_strict_mode,
|
||||
"@brief Gets a value indicating whether to write strict-mode OASIS files\n"
|
||||
) +
|
||||
gsi::method_ext ("oasis_substitution_char=", &set_oasis_subst_char,
|
||||
"@brief Sets the substitution character for a-strings and n-strings\n"
|
||||
"@args char\n"
|
||||
"The substitution character is used in place of invalid characters. The value of this "
|
||||
"attribute is a string which is either empty or a single character. If the string is "
|
||||
"empty, no substitution is made at the risk of producing invalid OASIS files.\n"
|
||||
"\n"
|
||||
"This attribute has been introduce in version 0.23.\n"
|
||||
) +
|
||||
gsi::method_ext ("oasis_substitution_char", &get_oasis_subst_char,
|
||||
"@brief Gets the substitution character\n"
|
||||
"\n"
|
||||
"See \\oasis_substitution_char for details. This attribute has been introduced in version 0.23.\n"
|
||||
) +
|
||||
gsi::method_ext ("oasis_recompress=", &set_oasis_recompress,
|
||||
"@brief Sets OASIS recompression mode\n"
|
||||
"@args flag\n"
|
||||
"If this flag is true, shape arrays already existing will be resolved and compression is applied "
|
||||
"to the individual shapes again. If this flag is false (the default), shape arrays already existing "
|
||||
"will be written as such.\n"
|
||||
"\n"
|
||||
"This method has been introduced in version 0.23."
|
||||
) +
|
||||
gsi::method_ext ("oasis_recompress?", &get_oasis_recompress,
|
||||
"@brief Gets the OASIS recompression mode\n"
|
||||
"See \\oasis_recompress= method for a description of this predicate."
|
||||
"\n"
|
||||
"This method has been introduced in version 0.23."
|
||||
) +
|
||||
gsi::method_ext ("oasis_permissive=", &set_oasis_permissive,
|
||||
"@brief Sets OASIS permissive mode\n"
|
||||
"@args flag\n"
|
||||
"If this flag is true, certain shapes which cannot be written to OASIS are reported as warnings, "
|
||||
"not as errors. For example, paths with odd width (are rounded) or polygons with less than three points (are skipped).\n"
|
||||
"\n"
|
||||
"This method has been introduced in version 0.25.1."
|
||||
) +
|
||||
gsi::method_ext ("oasis_permissive?", &get_oasis_permissive,
|
||||
"@brief Gets the OASIS permissive mode\n"
|
||||
"See \\oasis_permissive= method for a description of this predicate."
|
||||
"\n"
|
||||
"This method has been introduced in version 0.25.1."
|
||||
) +
|
||||
gsi::method_ext ("oasis_write_cell_bounding_boxes=", &set_oasis_write_cell_bounding_boxes,
|
||||
"@brief Sets a value indicating whether cell bounding boxes are written\n"
|
||||
"@args flag\n"
|
||||
"If this value is set to true, cell bounding boxes are written (S_BOUNDING_BOX). "
|
||||
"The S_BOUNDING_BOX properties will be attached to the CELLNAME records.\n"
|
||||
"\n"
|
||||
"Setting this value to true will also enable writing of other standard properties like "
|
||||
"S_TOP_CELL (see \\oasis_write_std_properties=).\n"
|
||||
"By default, cell bounding boxes are not written, but standard properties are.\n"
|
||||
"\n"
|
||||
"This method has been introduced in version 0.24.3."
|
||||
) +
|
||||
gsi::method_ext ("oasis_write_cell_bounding_boxes?", &get_oasis_write_cell_bounding_boxes,
|
||||
"@brief Gets a value indicating whether cell bounding boxes are written\n"
|
||||
"See \\oasis_write_cell_bounding_boxes= method for a description of this flag."
|
||||
"\n"
|
||||
"This method has been introduced in version 0.24.3."
|
||||
) +
|
||||
gsi::method_ext ("oasis_write_std_properties=", &set_oasis_write_std_properties,
|
||||
"@brief Sets a value indicating whether standard properties will be written\n"
|
||||
"@args flag\n"
|
||||
"If this value is false, no standard properties are written. If true, S_TOP_CELL and some other global "
|
||||
"standard properties are written. In addition, \\oasis_write_cell_bounding_boxes= can be used to "
|
||||
"write cell bounding boxes using S_BOUNDING_BOX.\n"
|
||||
"\n"
|
||||
"By default, this flag is true and standard properties are written.\n"
|
||||
"\n"
|
||||
"Setting this property to false clears the oasis_write_cell_bounding_boxes flag too.\n"
|
||||
"\n"
|
||||
"This method has been introduced in version 0.24."
|
||||
) +
|
||||
gsi::method_ext ("oasis_write_std_properties?", &get_oasis_write_std_properties,
|
||||
"@brief Gets a value indicating whether standard properties will be written\n"
|
||||
"See \\oasis_write_std_properties= method for a description of this flag."
|
||||
"\n"
|
||||
"This method has been introduced in version 0.24."
|
||||
) +
|
||||
gsi::method_ext ("oasis_compression_level=", &set_oasis_compression,
|
||||
"@brief Set the OASIS compression level\n"
|
||||
"@args level\n"
|
||||
"The OASIS compression level is an integer number between 0 and 10. 0 basically is no compression, "
|
||||
"1 produces shape arrays in a simple fashion. 2 and higher compression levels will use a more elaborate "
|
||||
"algorithm to find shape arrays which uses 2nd and futher neighbor distances. The higher the level, the "
|
||||
"higher the memory requirements and run times.\n"
|
||||
) +
|
||||
gsi::method_ext ("oasis_compression_level", &get_oasis_compression,
|
||||
"@brief Get the OASIS compression level\n"
|
||||
"See \\oasis_compression_level= method for a description of the OASIS compression level."
|
||||
),
|
||||
""
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
|
||||
/*
|
||||
|
||||
KLayout Layout Viewer
|
||||
Copyright (C) 2006-2018 Matthias Koefferlein
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#ifndef HDR_layOASISWriterPlugin_h
|
||||
#define HDR_layOASISWriterPlugin_h
|
||||
|
||||
namespace lay
|
||||
{
|
||||
|
||||
// .. nothing yet (but needed for MOC) ..
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user