mirror of https://github.com/KLayout/klayout.git
Advanced search features for the cell selection form too
* Case sensitive/insensitive (persistent) * Expressions yes/no (persistent) * Clear button * Tab keys to navigate between found cells
This commit is contained in:
parent
7ddc6bf9df
commit
5f6c6a3264
|
|
@ -1,7 +1,8 @@
|
|||
<ui version="4.0" >
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>CellSelectionForm</class>
|
||||
<widget class="QDialog" name="CellSelectionForm" >
|
||||
<property name="geometry" >
|
||||
<widget class="QDialog" name="CellSelectionForm">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
|
|
@ -9,66 +10,93 @@
|
|||
<height>612</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle" >
|
||||
<property name="windowTitle">
|
||||
<string>Select Cell</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" >
|
||||
<property name="margin" >
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="spacing" >
|
||||
<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="frame8" >
|
||||
<property name="frameShape" >
|
||||
<widget class="QFrame" name="frame8">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<property name="frameShadow" >
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="margin" >
|
||||
<layout class="QGridLayout">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="spacing" >
|
||||
<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="5" column="0" >
|
||||
<widget class="QFrame" name="tools_frame" >
|
||||
<property name="frameShape" >
|
||||
<item row="5" column="0">
|
||||
<widget class="QFrame" name="tools_frame">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<property name="frameShadow" >
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" >
|
||||
<property name="margin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="spacing" >
|
||||
<layout class="QHBoxLayout">
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pb_hide" >
|
||||
<property name="text" >
|
||||
<widget class="QPushButton" name="pb_hide">
|
||||
<property name="text">
|
||||
<string>Hide Cell</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pb_show" >
|
||||
<property name="text" >
|
||||
<widget class="QPushButton" name="pb_show">
|
||||
<property name="text">
|
||||
<string>Show Cell</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
|
|
@ -79,68 +107,71 @@
|
|||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item rowspan="2" row="3" column="0" >
|
||||
<widget class="QTreeView" name="lv_cells" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy>
|
||||
<hsizetype>7</hsizetype>
|
||||
<vsizetype>7</vsizetype>
|
||||
<item row="3" column="0" rowspan="2">
|
||||
<widget class="QTreeView" name="lv_cells">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||
<horstretch>1</horstretch>
|
||||
<verstretch>1</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="selectionMode" >
|
||||
<property name="selectionMode">
|
||||
<enum>QAbstractItemView::ExtendedSelection</enum>
|
||||
</property>
|
||||
<property name="uniformRowHeights" >
|
||||
<property name="uniformRowHeights">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item rowspan="2" row="4" column="2" >
|
||||
<widget class="QFrame" name="frame_6" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy>
|
||||
<hsizetype>5</hsizetype>
|
||||
<vsizetype>5</vsizetype>
|
||||
<item row="4" column="2" rowspan="2">
|
||||
<widget class="QFrame" name="frame_6">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>1</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="frameShape" >
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<property name="frameShadow" >
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="margin" >
|
||||
<layout class="QGridLayout">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="spacing" >
|
||||
<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="2" column="2" >
|
||||
<widget class="QToolButton" name="tb_set_child" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy>
|
||||
<hsizetype>5</hsizetype>
|
||||
<vsizetype>5</vsizetype>
|
||||
<item row="2" column="2">
|
||||
<widget class="QToolButton" name="tb_set_child">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<property name="text">
|
||||
<string>Select</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1" >
|
||||
<item row="2" column="1">
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
|
|
@ -148,50 +179,48 @@
|
|||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="1" column="1" colspan="2" >
|
||||
<widget class="QTreeView" name="lv_children" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy>
|
||||
<hsizetype>7</hsizetype>
|
||||
<vsizetype>7</vsizetype>
|
||||
<item row="1" column="1" colspan="2">
|
||||
<widget class="QTreeView" name="lv_children">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||
<horstretch>1</horstretch>
|
||||
<verstretch>1</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="uniformRowHeights" >
|
||||
<property name="uniformRowHeights">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1" >
|
||||
<widget class="QLabel" name="textLabel2" >
|
||||
<property name="text" >
|
||||
<item row="0" column="1">
|
||||
<widget class="QLabel" name="textLabel2">
|
||||
<property name="text">
|
||||
<string>Children</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0" >
|
||||
<widget class="QLabel" name="label_5" >
|
||||
<property name="text" >
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="pixmap" >
|
||||
<pixmap resource="layResources.qrc" >:/right.png</pixmap>
|
||||
<property name="pixmap">
|
||||
<pixmap resource="../lay/layResources.qrc">:/right.png</pixmap>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" colspan="3" >
|
||||
<item row="1" column="0" colspan="3">
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType" >
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>451</width>
|
||||
<height>16</height>
|
||||
|
|
@ -199,132 +228,87 @@
|
|||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="0" column="0" colspan="3" >
|
||||
<widget class="QFrame" name="frame_4" >
|
||||
<property name="frameShape" >
|
||||
<item row="0" column="0" colspan="3">
|
||||
<widget class="QFrame" name="frame_4">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<property name="frameShadow" >
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="margin" >
|
||||
<layout class="QGridLayout">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="spacing" >
|
||||
<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="1" column="0" >
|
||||
<widget class="QLabel" name="label_2" >
|
||||
<property name="text" >
|
||||
<string>Selected cell</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0" >
|
||||
<widget class="QLabel" name="layout_lbl" >
|
||||
<property name="text" >
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="layout_lbl">
|
||||
<property name="text">
|
||||
<string>Layout</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1" >
|
||||
<widget class="QLineEdit" name="le_cell_name" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy>
|
||||
<hsizetype>7</hsizetype>
|
||||
<vsizetype>0</vsizetype>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Search</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="lay::DecoratedLineEdit" name="le_cell_name">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>1</horstretch>
|
||||
<verstretch>1</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1" colspan="3" >
|
||||
<widget class="QComboBox" name="cb_views" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy>
|
||||
<hsizetype>7</hsizetype>
|
||||
<vsizetype>0</vsizetype>
|
||||
<horstretch>1</horstretch>
|
||||
<verstretch>1</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3" >
|
||||
<widget class="QLabel" name="label" >
|
||||
<property name="text" >
|
||||
<string>(* and ? can be used to match any text)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2" >
|
||||
<widget class="QToolButton" name="find_next" >
|
||||
<property name="toolTip" >
|
||||
<item row="1" column="2">
|
||||
<widget class="QToolButton" name="find_next">
|
||||
<property name="toolTip">
|
||||
<string>Find Next</string>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
</property>
|
||||
<property name="icon" >
|
||||
<iconset resource="layResources.qrc" >:/find.png</iconset>
|
||||
<property name="icon">
|
||||
<iconset resource="../lay/layResources.qrc">
|
||||
<normaloff>:/find.png</normaloff>:/find.png</iconset>
|
||||
</property>
|
||||
<property name="autoRaise" >
|
||||
<property name="autoRaise">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item rowspan="2" row="4" column="1" >
|
||||
<widget class="QFrame" name="frame_8" >
|
||||
<property name="frameShape" >
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<property name="frameShadow" >
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" >
|
||||
<property name="margin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="spacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="2" >
|
||||
<widget class="QFrame" name="frame_5" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy>
|
||||
<hsizetype>5</hsizetype>
|
||||
<vsizetype>5</vsizetype>
|
||||
<horstretch>1</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="frameShape" >
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<property name="frameShadow" >
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="margin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="spacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="2" column="1" >
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
<item row="0" column="1" colspan="4">
|
||||
<widget class="QComboBox" name="cb_views">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>1</horstretch>
|
||||
<verstretch>1</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3" colspan="2">
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
|
|
@ -332,59 +316,128 @@
|
|||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="2" column="2" >
|
||||
<widget class="QToolButton" name="tb_set_parent" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy>
|
||||
<hsizetype>5</hsizetype>
|
||||
<vsizetype>5</vsizetype>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1" rowspan="2">
|
||||
<widget class="QFrame" name="frame_8">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QVBoxLayout">
|
||||
<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>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="2">
|
||||
<widget class="QFrame" name="frame_5">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>1</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<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="2" column="1">
|
||||
<spacer>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="2" column="2">
|
||||
<widget class="QToolButton" name="tb_set_parent">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<property name="text">
|
||||
<string>Select</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1" colspan="2" >
|
||||
<widget class="QTreeView" name="lv_parents" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy>
|
||||
<hsizetype>7</hsizetype>
|
||||
<vsizetype>7</vsizetype>
|
||||
<item row="1" column="1" colspan="2">
|
||||
<widget class="QTreeView" name="lv_parents">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||
<horstretch>1</horstretch>
|
||||
<verstretch>1</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="uniformRowHeights" >
|
||||
<property name="uniformRowHeights">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1" colspan="2" >
|
||||
<widget class="QLabel" name="textLabel1" >
|
||||
<property name="text" >
|
||||
<item row="0" column="1" colspan="2">
|
||||
<widget class="QLabel" name="textLabel1">
|
||||
<property name="text">
|
||||
<string>Parents</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0" >
|
||||
<widget class="QLabel" name="label_4" >
|
||||
<property name="text" >
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="pixmap" >
|
||||
<pixmap resource="layResources.qrc" >:/right.png</pixmap>
|
||||
<property name="pixmap">
|
||||
<pixmap resource="../lay/layResources.qrc">:/right.png</pixmap>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" colspan="3" >
|
||||
<widget class="QLabel" name="label_3" >
|
||||
<property name="text" >
|
||||
<item row="2" column="0" colspan="3">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>Cell list</string>
|
||||
</property>
|
||||
</widget>
|
||||
|
|
@ -394,13 +447,13 @@
|
|||
</item>
|
||||
<item>
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType" >
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>10</height>
|
||||
|
|
@ -409,43 +462,52 @@
|
|||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Line" name="line_4" >
|
||||
<property name="orientation" >
|
||||
<widget class="Line" name="line_4">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QFrame" name="frame5" >
|
||||
<property name="frameShape" >
|
||||
<widget class="QFrame" name="frame5">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<property name="frameShadow" >
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" >
|
||||
<property name="margin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="spacing" >
|
||||
<layout class="QHBoxLayout">
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QPushButton" name="apply_button" >
|
||||
<property name="text" >
|
||||
<widget class="QPushButton" name="apply_button">
|
||||
<property name="text">
|
||||
<string>Show In Tree</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType" >
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>91</width>
|
||||
<height>31</height>
|
||||
|
|
@ -454,18 +516,18 @@
|
|||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="ok_button" >
|
||||
<property name="text" >
|
||||
<widget class="QPushButton" name="ok_button">
|
||||
<property name="text">
|
||||
<string>Ok</string>
|
||||
</property>
|
||||
<property name="default" >
|
||||
<property name="default">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="cancel_button" >
|
||||
<property name="text" >
|
||||
<widget class="QPushButton" name="cancel_button">
|
||||
<property name="text">
|
||||
<string>Cancel</string>
|
||||
</property>
|
||||
</widget>
|
||||
|
|
@ -475,9 +537,16 @@
|
|||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<layoutdefault spacing="6" margin="11" />
|
||||
<layoutdefault spacing="6" margin="11"/>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>lay::DecoratedLineEdit</class>
|
||||
<extends>QLineEdit</extends>
|
||||
<header>layWidgets.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources>
|
||||
<include location="layResources.qrc" />
|
||||
<include location="../lay/layResources.qrc"/>
|
||||
</resources>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
|
|
|||
|
|
@ -44,6 +44,9 @@
|
|||
namespace lay
|
||||
{
|
||||
|
||||
static const std::string cfg_cell_selection_search_case_sensitive ("cell-selection-search-case-sensitive");
|
||||
static const std::string cfg_cell_selection_search_use_expressions ("cell-selection-search-use-expression");
|
||||
|
||||
// ------------------------------------------------------------
|
||||
|
||||
CellSelectionForm::CellSelectionForm (QWidget *parent, lay::LayoutView *view, const char *name, bool simple_mode)
|
||||
|
|
@ -61,6 +64,38 @@ CellSelectionForm::CellSelectionForm (QWidget *parent, lay::LayoutView *view, co
|
|||
|
||||
Ui::CellSelectionForm::setupUi (this);
|
||||
|
||||
le_cell_name->set_tab_signal_enabled (true);
|
||||
|
||||
mp_use_regular_expressions = new QAction (this);
|
||||
mp_use_regular_expressions->setCheckable (true);
|
||||
mp_use_regular_expressions->setChecked (true);
|
||||
mp_use_regular_expressions->setText (tr ("Use expressions (use * and ? for any character)"));
|
||||
|
||||
mp_case_sensitive = new QAction (this);
|
||||
mp_case_sensitive->setCheckable (true);
|
||||
mp_case_sensitive->setChecked (true);
|
||||
mp_case_sensitive->setText (tr ("Case sensitive search"));
|
||||
|
||||
if (lay::PluginRoot::instance ()) {
|
||||
bool cs = true;
|
||||
lay::PluginRoot::instance ()->config_get (cfg_cell_selection_search_case_sensitive, cs);
|
||||
mp_case_sensitive->setChecked (cs);
|
||||
bool ue = true;
|
||||
lay::PluginRoot::instance ()->config_get (cfg_cell_selection_search_use_expressions, ue);
|
||||
mp_use_regular_expressions->setChecked (ue);
|
||||
}
|
||||
|
||||
QMenu *m = new QMenu (le_cell_name);
|
||||
m->addAction (mp_use_regular_expressions);
|
||||
m->addAction (mp_case_sensitive);
|
||||
connect (mp_use_regular_expressions, SIGNAL (triggered ()), this, SLOT (name_changed ()));
|
||||
connect (mp_case_sensitive, SIGNAL (triggered ()), this, SLOT (name_changed ()));
|
||||
|
||||
le_cell_name->set_clear_button_enabled (true);
|
||||
le_cell_name->set_options_button_enabled (true);
|
||||
le_cell_name->set_options_menu (m);
|
||||
|
||||
|
||||
// signals and slots connections
|
||||
connect (cancel_button, SIGNAL(clicked()), this, SLOT(reject()));
|
||||
connect (cb_views, SIGNAL(activated(int)), this, SLOT(view_changed(int)));
|
||||
|
|
@ -68,14 +103,17 @@ CellSelectionForm::CellSelectionForm (QWidget *parent, lay::LayoutView *view, co
|
|||
connect (tb_set_child, SIGNAL(clicked()), this, SLOT(set_child()));
|
||||
connect (pb_hide, SIGNAL(clicked()), this, SLOT(hide_cell()));
|
||||
connect (pb_show, SIGNAL(clicked()), this, SLOT(show_cell()));
|
||||
connect (le_cell_name, SIGNAL(textChanged(const QString&)), this, SLOT(name_changed(const QString&)));
|
||||
connect (le_cell_name, SIGNAL(textChanged(const QString&)), this, SLOT(name_changed()));
|
||||
connect (ok_button, SIGNAL(clicked()), this, SLOT(accept()));
|
||||
connect (apply_button, SIGNAL(clicked()), this, SLOT(apply_clicked()));
|
||||
connect (find_next, SIGNAL(clicked()), this, SLOT(find_next_clicked()));
|
||||
connect (le_cell_name, SIGNAL(tab_pressed()), this, SLOT(find_next_clicked()));
|
||||
connect (le_cell_name, SIGNAL(backtab_pressed()), this, SLOT(find_prev_clicked()));
|
||||
|
||||
connect (lv_parents, SIGNAL(doubleClicked(const QModelIndex &)), this, SLOT(parent_changed(const QModelIndex &)));
|
||||
connect (lv_children, SIGNAL(doubleClicked(const QModelIndex &)), this, SLOT(child_changed(const QModelIndex &)));
|
||||
|
||||
|
||||
m_cellviews.reserve (mp_view->cellviews ());
|
||||
for (unsigned int i = 0; i < mp_view->cellviews (); ++i) {
|
||||
m_cellviews.push_back (mp_view->cellview (i));
|
||||
|
|
@ -232,10 +270,27 @@ CellSelectionForm::view_changed (int cv)
|
|||
void
|
||||
CellSelectionForm::accept ()
|
||||
{
|
||||
store_config ();
|
||||
commit_cv ();
|
||||
QDialog::accept ();
|
||||
}
|
||||
|
||||
void
|
||||
CellSelectionForm::reject ()
|
||||
{
|
||||
store_config ();
|
||||
QDialog::reject ();
|
||||
}
|
||||
|
||||
void
|
||||
CellSelectionForm::store_config ()
|
||||
{
|
||||
if (lay::PluginRoot::instance ()) {
|
||||
lay::PluginRoot::instance ()->config_set (cfg_cell_selection_search_case_sensitive, mp_case_sensitive->isChecked ());
|
||||
lay::PluginRoot::instance ()->config_set (cfg_cell_selection_search_use_expressions, mp_use_regular_expressions->isChecked ());
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
CellSelectionForm::apply_clicked()
|
||||
{
|
||||
|
|
@ -384,11 +439,34 @@ CellSelectionForm::find_next_clicked ()
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
CellSelectionForm::name_changed (const QString &s)
|
||||
void
|
||||
CellSelectionForm::find_prev_clicked ()
|
||||
{
|
||||
lay::CellTreeModel *model = dynamic_cast<lay::CellTreeModel *> (lv_cells->model ());
|
||||
if (! model) {
|
||||
return;
|
||||
}
|
||||
|
||||
QModelIndex mi = model->locate_prev ();
|
||||
if (mi.isValid ()) {
|
||||
|
||||
m_cells_cb_enabled = false;
|
||||
lv_cells->selectionModel ()->setCurrentIndex (mi, QItemSelectionModel::SelectCurrent);
|
||||
lv_cells->scrollTo (mi);
|
||||
update_children_list ();
|
||||
update_parents_list ();
|
||||
m_cells_cb_enabled = true;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
CellSelectionForm::name_changed ()
|
||||
{
|
||||
if (m_name_cb_enabled) {
|
||||
|
||||
QString s = le_cell_name->text ();
|
||||
|
||||
lay::CellTreeModel *model = dynamic_cast<lay::CellTreeModel *> (lv_cells->model ());
|
||||
if (! model) {
|
||||
return;
|
||||
|
|
@ -396,7 +474,7 @@ CellSelectionForm::name_changed (const QString &s)
|
|||
|
||||
QModelIndex mi;
|
||||
if (!s.isEmpty ()) {
|
||||
mi = model->locate (tl::to_string (s).c_str (), true);
|
||||
mi = model->locate (tl::to_string (s).c_str (), mp_use_regular_expressions->isChecked (), mp_case_sensitive->isChecked ());
|
||||
} else {
|
||||
model->clear_locate ();
|
||||
}
|
||||
|
|
@ -459,264 +537,6 @@ CellSelectionForm::hide_cell ()
|
|||
|
||||
// ------------------------------------------------------------
|
||||
|
||||
SimpleCellSelectionForm::SimpleCellSelectionForm (QWidget *parent, db::Layout *layout, const char *name)
|
||||
: QDialog (parent), Ui::SimpleCellSelectionForm (),
|
||||
mp_layout (layout),
|
||||
m_name_cb_enabled (true),
|
||||
m_cells_cb_enabled (true),
|
||||
m_children_cb_enabled (true),
|
||||
m_parents_cb_enabled (true),
|
||||
m_update_all_dm (this, &SimpleCellSelectionForm::update_all),
|
||||
m_cell_index (-1)
|
||||
{
|
||||
setObjectName (QString::fromUtf8 (name));
|
||||
|
||||
Ui::SimpleCellSelectionForm::setupUi (this);
|
||||
|
||||
// signals and slots connections
|
||||
connect (cancel_button, SIGNAL(clicked()), this, SLOT(reject()));
|
||||
connect (tb_set_parent, SIGNAL(clicked()), this, SLOT(set_parent()));
|
||||
connect (tb_set_child, SIGNAL(clicked()), this, SLOT(set_child()));
|
||||
connect (le_cell_name, SIGNAL(textChanged(const QString&)), this, SLOT(name_changed(const QString&)));
|
||||
connect (ok_button, SIGNAL(clicked()), this, SLOT(accept()));
|
||||
connect (find_next, SIGNAL(clicked()), this, SLOT(find_next_clicked()));
|
||||
|
||||
connect (lv_parents, SIGNAL(doubleClicked(const QModelIndex &)), this, SLOT(parent_changed(const QModelIndex &)));
|
||||
connect (lv_children, SIGNAL(doubleClicked(const QModelIndex &)), this, SLOT(child_changed(const QModelIndex &)));
|
||||
|
||||
lv_cells->header ()->hide ();
|
||||
lv_cells->setRootIsDecorated (false);
|
||||
|
||||
lv_children->header ()->hide ();
|
||||
lv_children->setRootIsDecorated (false);
|
||||
|
||||
lv_parents->header ()->hide ();
|
||||
lv_parents->setRootIsDecorated (false);
|
||||
|
||||
ok_button->setText (QObject::tr ("Ok"));
|
||||
cancel_button->setText (QObject::tr ("Cancel"));
|
||||
|
||||
update_cell_list ();
|
||||
}
|
||||
|
||||
void
|
||||
SimpleCellSelectionForm::set_selected_cell_index (db::cell_index_type ci)
|
||||
{
|
||||
if (ci != m_cell_index) {
|
||||
m_cell_index = ci;
|
||||
select_entry (m_cell_index);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
SimpleCellSelectionForm::update_cell_list ()
|
||||
{
|
||||
if (lv_cells->model ()) {
|
||||
delete lv_cells->model ();
|
||||
}
|
||||
|
||||
lay::CellTreeModel *model = new lay::CellTreeModel (lv_cells, mp_layout, lay::CellTreeModel::Flat);
|
||||
|
||||
lv_cells->setModel (model);
|
||||
// connect can only happen after setModel()
|
||||
connect (lv_cells->selectionModel (), SIGNAL(currentChanged(const QModelIndex &, const QModelIndex &)), this, SLOT(cell_changed(const QModelIndex &, const QModelIndex &)));
|
||||
|
||||
select_entry (m_cell_index);
|
||||
}
|
||||
|
||||
void
|
||||
SimpleCellSelectionForm::update_parents_list ()
|
||||
{
|
||||
m_parents_cb_enabled = false;
|
||||
|
||||
if (lv_parents->model ()) {
|
||||
delete lv_parents->model ();
|
||||
}
|
||||
|
||||
if (mp_layout->is_valid_cell_index (m_cell_index)) {
|
||||
lv_parents->setModel (new lay::CellTreeModel (lv_parents, mp_layout, lay::CellTreeModel::Flat | lay::CellTreeModel::Parents, &mp_layout->cell (m_cell_index)));
|
||||
}
|
||||
|
||||
m_parents_cb_enabled = true;
|
||||
}
|
||||
|
||||
void
|
||||
SimpleCellSelectionForm::update_children_list ()
|
||||
{
|
||||
m_children_cb_enabled = false;
|
||||
|
||||
if (lv_children->model ()) {
|
||||
delete lv_children->model ();
|
||||
}
|
||||
|
||||
if (mp_layout->is_valid_cell_index (m_cell_index)) {
|
||||
lv_children->setModel (new lay::CellTreeModel (lv_children, mp_layout, lay::CellTreeModel::Flat | lay::CellTreeModel::Children, &mp_layout->cell (m_cell_index)));
|
||||
}
|
||||
|
||||
m_children_cb_enabled = true;
|
||||
}
|
||||
|
||||
void
|
||||
SimpleCellSelectionForm::cell_changed (const QModelIndex ¤t, const QModelIndex &)
|
||||
{
|
||||
if (m_cells_cb_enabled) {
|
||||
|
||||
m_name_cb_enabled = false;
|
||||
|
||||
lay::CellTreeModel *model = dynamic_cast<lay::CellTreeModel *> (lv_cells->model ());
|
||||
if (model) {
|
||||
le_cell_name->setText (tl::to_qstring (model->cell_name (current)));
|
||||
m_cell_index = model->cell_index (current);
|
||||
model->clear_locate ();
|
||||
} else {
|
||||
m_cell_index = -1;
|
||||
}
|
||||
|
||||
m_name_cb_enabled = true;
|
||||
|
||||
update_children_list ();
|
||||
update_parents_list ();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
SimpleCellSelectionForm::set_child ()
|
||||
{
|
||||
child_changed (lv_children->selectionModel ()->currentIndex ());
|
||||
}
|
||||
|
||||
void
|
||||
SimpleCellSelectionForm::child_changed(const QModelIndex ¤t)
|
||||
{
|
||||
if (m_children_cb_enabled && current.isValid ()) {
|
||||
lay::CellTreeModel *model = dynamic_cast<lay::CellTreeModel *> (lv_children->model ());
|
||||
if (model) {
|
||||
select_entry (model->cell_index (lv_children->selectionModel ()->currentIndex ()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
SimpleCellSelectionForm::set_parent ()
|
||||
{
|
||||
parent_changed (lv_parents->selectionModel ()->currentIndex ());
|
||||
}
|
||||
|
||||
void
|
||||
SimpleCellSelectionForm::parent_changed(const QModelIndex ¤t)
|
||||
{
|
||||
if (m_parents_cb_enabled && current.isValid ()) {
|
||||
lay::CellTreeModel *model = dynamic_cast<lay::CellTreeModel *> (lv_parents->model ());
|
||||
if (model) {
|
||||
select_entry (model->cell_index (lv_parents->selectionModel ()->currentIndex ()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
SimpleCellSelectionForm::select_entry (lay::CellView::cell_index_type ci)
|
||||
{
|
||||
m_cells_cb_enabled = false;
|
||||
m_cell_index = ci;
|
||||
|
||||
lay::CellTreeModel *model = dynamic_cast<lay::CellTreeModel *> (lv_cells->model ());
|
||||
if (! model) {
|
||||
return;
|
||||
}
|
||||
|
||||
// select the current entry
|
||||
QModelIndex mi;
|
||||
for (int c = 0; c < model->toplevel_items (); ++c) {
|
||||
lay::CellTreeItem *item = model->toplevel_item (c);
|
||||
if (item->cell_index () == ci) {
|
||||
mi = model->model_index (item);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (mi.isValid ()) {
|
||||
|
||||
m_cells_cb_enabled = false;
|
||||
lv_cells->selectionModel ()->setCurrentIndex (mi, QItemSelectionModel::Clear | QItemSelectionModel::SelectCurrent);
|
||||
lv_cells->scrollTo (mi);
|
||||
m_cells_cb_enabled = true;
|
||||
|
||||
m_name_cb_enabled = false;
|
||||
le_cell_name->setText (tl::to_qstring (model->cell_name (mi)));
|
||||
model->clear_locate ();
|
||||
m_name_cb_enabled = true;
|
||||
|
||||
// do child list updates in a user event handler. Otherwise changing the models
|
||||
// immediately interferes with Qt's internal logic. So we do an deferred update.
|
||||
m_update_all_dm ();
|
||||
|
||||
}
|
||||
|
||||
m_cells_cb_enabled = true;
|
||||
}
|
||||
|
||||
void
|
||||
SimpleCellSelectionForm::update_all ()
|
||||
{
|
||||
update_children_list ();
|
||||
update_parents_list ();
|
||||
}
|
||||
|
||||
void
|
||||
SimpleCellSelectionForm::find_next_clicked ()
|
||||
{
|
||||
lay::CellTreeModel *model = dynamic_cast<lay::CellTreeModel *> (lv_cells->model ());
|
||||
if (! model) {
|
||||
return;
|
||||
}
|
||||
|
||||
QModelIndex mi = model->locate_next ();
|
||||
if (mi.isValid ()) {
|
||||
|
||||
m_cells_cb_enabled = false;
|
||||
lv_cells->selectionModel ()->setCurrentIndex (mi, QItemSelectionModel::SelectCurrent);
|
||||
lv_cells->scrollTo (mi);
|
||||
m_cell_index = model->cell_index (mi);
|
||||
update_children_list ();
|
||||
update_parents_list ();
|
||||
m_cells_cb_enabled = true;
|
||||
|
||||
} else {
|
||||
m_cell_index = -1;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
SimpleCellSelectionForm::name_changed (const QString &s)
|
||||
{
|
||||
if (m_name_cb_enabled) {
|
||||
|
||||
lay::CellTreeModel *model = dynamic_cast<lay::CellTreeModel *> (lv_cells->model ());
|
||||
if (! model) {
|
||||
return;
|
||||
}
|
||||
|
||||
QModelIndex mi = model->locate (tl::to_string (s).c_str (), true);
|
||||
if (mi.isValid ()) {
|
||||
|
||||
m_cells_cb_enabled = false;
|
||||
lv_cells->selectionModel ()->setCurrentIndex (mi, QItemSelectionModel::SelectCurrent);
|
||||
lv_cells->scrollTo (mi);
|
||||
m_cell_index = model->cell_index (mi);
|
||||
update_children_list ();
|
||||
update_parents_list ();
|
||||
m_cells_cb_enabled = true;
|
||||
|
||||
} else {
|
||||
m_cell_index = -1;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------
|
||||
|
||||
LibraryCellSelectionForm::LibraryCellSelectionForm (QWidget *parent, db::Layout *layout, const char *name, bool all_cells)
|
||||
: QDialog (parent), Ui::LibraryCellSelectionForm (),
|
||||
mp_lib (0), mp_layout (layout),
|
||||
|
|
|
|||
|
|
@ -24,7 +24,8 @@
|
|||
#ifndef HDR_layCellSelectionForm
|
||||
#define HDR_layCellSelectionForm
|
||||
|
||||
#include <QObject> // required during the dependency pass
|
||||
#include <QAction>
|
||||
|
||||
#include "ui_CellSelectionForm.h"
|
||||
#include "ui_SimpleCellSelectionForm.h"
|
||||
#include "ui_LibraryCellSelectionForm.h"
|
||||
|
|
@ -62,17 +63,18 @@ public:
|
|||
const lay::CellView &selected_cellview () const;
|
||||
|
||||
public slots:
|
||||
virtual void view_changed(int);
|
||||
virtual void cell_changed(const QModelIndex ¤t, const QModelIndex &);
|
||||
virtual void child_changed(const QModelIndex ¤t);
|
||||
virtual void parent_changed(const QModelIndex ¤t);
|
||||
virtual void name_changed(const QString &);
|
||||
virtual void set_parent();
|
||||
virtual void set_child();
|
||||
virtual void hide_cell();
|
||||
virtual void show_cell();
|
||||
virtual void apply_clicked();
|
||||
virtual void find_next_clicked();
|
||||
void view_changed(int);
|
||||
void cell_changed(const QModelIndex ¤t, const QModelIndex &);
|
||||
void child_changed(const QModelIndex ¤t);
|
||||
void parent_changed(const QModelIndex ¤t);
|
||||
void name_changed();
|
||||
void set_parent();
|
||||
void set_child();
|
||||
void hide_cell();
|
||||
void show_cell();
|
||||
void apply_clicked();
|
||||
void find_next_clicked();
|
||||
void find_prev_clicked();
|
||||
|
||||
private:
|
||||
lay::LayoutView *mp_view;
|
||||
|
|
@ -84,6 +86,8 @@ private:
|
|||
bool m_parents_cb_enabled;
|
||||
tl::DeferredMethod<CellSelectionForm> m_update_all_dm;
|
||||
bool m_simple_mode;
|
||||
QAction *mp_use_regular_expressions;
|
||||
QAction *mp_case_sensitive;
|
||||
|
||||
void update_cell_list ();
|
||||
void update_parents_list ();
|
||||
|
|
@ -91,56 +95,9 @@ private:
|
|||
void update_all ();
|
||||
void select_entry (lay::CellView::cell_index_type n);
|
||||
void commit_cv ();
|
||||
void store_config ();
|
||||
void accept ();
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief A form to select a cell from a layout
|
||||
*/
|
||||
class LAYBASIC_PUBLIC SimpleCellSelectionForm
|
||||
: public QDialog, private Ui::SimpleCellSelectionForm
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
SimpleCellSelectionForm (QWidget *parent, db::Layout *layout, const char *name);
|
||||
|
||||
/**
|
||||
* @brief Obtain the selected cell's index
|
||||
*/
|
||||
db::cell_index_type selected_cell_index () const
|
||||
{
|
||||
return m_cell_index;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Set the selected cell's index
|
||||
*/
|
||||
void set_selected_cell_index (db::cell_index_type ci);
|
||||
|
||||
public slots:
|
||||
virtual void cell_changed(const QModelIndex ¤t, const QModelIndex &);
|
||||
virtual void child_changed(const QModelIndex ¤t);
|
||||
virtual void parent_changed(const QModelIndex ¤t);
|
||||
virtual void name_changed(const QString &);
|
||||
virtual void set_parent();
|
||||
virtual void set_child();
|
||||
virtual void find_next_clicked();
|
||||
|
||||
private:
|
||||
db::Layout *mp_layout;
|
||||
bool m_name_cb_enabled;
|
||||
bool m_cells_cb_enabled;
|
||||
bool m_children_cb_enabled;
|
||||
bool m_parents_cb_enabled;
|
||||
tl::DeferredMethod<SimpleCellSelectionForm> m_update_all_dm;
|
||||
db::cell_index_type m_cell_index;
|
||||
|
||||
void update_cell_list ();
|
||||
void update_parents_list ();
|
||||
void update_children_list ();
|
||||
void update_all ();
|
||||
void select_entry (lay::CellView::cell_index_type n);
|
||||
void reject ();
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue