mirror of
https://github.com/KLayout/klayout.git
synced 2026-08-30 09:49:21 +02:00
D25 tech component editor: line numbers shown, more syntax variants
This commit is contained in:
@@ -13,15 +13,31 @@
|
||||
<property name="windowTitle">
|
||||
<string>Settings</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>2.5d Vertical Stack Information</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLabel" name="lnum_label">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Line</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" colspan="2">
|
||||
<widget class="QTextEdit" name="src_te">
|
||||
<property name="font">
|
||||
<font>
|
||||
|
||||
@@ -52,6 +52,15 @@ D25TechnologyComponentEditor::D25TechnologyComponentEditor (QWidget *parent)
|
||||
input.close ();
|
||||
|
||||
hl->setDocument (src_te->document ());
|
||||
|
||||
connect (src_te, SIGNAL (cursorPositionChanged ()), this, SLOT (cursor_position_changed ()));
|
||||
}
|
||||
|
||||
void
|
||||
D25TechnologyComponentEditor::cursor_position_changed ()
|
||||
{
|
||||
int line = src_te->textCursor ().block ().firstLineNumber () + 1;
|
||||
lnum_label->setText (tl::to_qstring (tl::sprintf (tl::to_string (tr ("Line %d")), line)));
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -44,6 +44,9 @@ public:
|
||||
void commit ();
|
||||
void setup ();
|
||||
|
||||
private slots:
|
||||
void cursor_position_changed ();
|
||||
|
||||
private:
|
||||
std::auto_ptr<lay::GenericSyntaxHighlighterAttributes> mp_hl_attributes, mp_hl_basic_attributes;
|
||||
};
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
<itemData name="Comment" defStyleNum="dsComment"/>
|
||||
<itemData name="Float" defStyleNum="dsFloat"/>
|
||||
<itemData name="Dec" defStyleNum="dsDecVal"/>
|
||||
<itemData name="Symbol" defStyleNum="dsString" color="#D40000"/>
|
||||
<itemData name="Symbol" defStyleNum="dsKeyword"/>
|
||||
<itemData name="String" defStyleNum="dsString"/>
|
||||
<itemData name="Raw String" defStyleNum="dsString" color="#DD4A4A" selColor="#DD4A4A"/>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user