mirror of https://github.com/KLayout/klayout.git
WIP: salt package manager
New features like properties editor, proper icon sizing, some styling etc.
This commit is contained in:
parent
3f9f06a9b9
commit
b34750f8cd
|
|
@ -0,0 +1,675 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>SaltGrainPropertiesDialog</class>
|
||||
<widget class="QDialog" name="SaltGrainPropertiesDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>754</width>
|
||||
<height>571</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Package Properties</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QFrame" name="frame">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>1</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="6" column="0">
|
||||
<widget class="QLabel" name="label_12">
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>License</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="0" colspan="4">
|
||||
<spacer name="verticalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>5</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="8" column="3">
|
||||
<widget class="QLabel" name="open_label">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string><a href="%1">Open link</a></string>
|
||||
</property>
|
||||
<property name="openExternalLinks">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="11" column="1" colspan="3">
|
||||
<widget class="QFrame" name="frame_2">
|
||||
<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" name="gridLayout_2">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="horizontalSpacing">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="verticalSpacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="2" column="1" rowspan="3">
|
||||
<spacer name="verticalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="1" column="3" rowspan="4">
|
||||
<widget class="QToolButton" name="screenshot_config_button">
|
||||
<property name="toolTip">
|
||||
<string>Select a Screenshot Image</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="layResources.qrc">
|
||||
<normaloff>:/add.png</normaloff>:/add.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>64</width>
|
||||
<height>64</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QToolButton" name="icon_delete_button">
|
||||
<property name="toolTip">
|
||||
<string>Reset Icon</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="layResources.qrc">
|
||||
<normaloff>:/clear_edit.png</normaloff>:/clear_edit.png</iconset>
|
||||
</property>
|
||||
<property name="autoRaise">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3" colspan="3">
|
||||
<widget class="QLabel" name="label_11">
|
||||
<property name="text">
|
||||
<string>Showcase image
|
||||
(max 1024x1024)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" rowspan="4">
|
||||
<widget class="QToolButton" name="icon_config_button">
|
||||
<property name="toolTip">
|
||||
<string>Select an Icon Image</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="layResources.qrc">
|
||||
<normaloff>:/salt_icon.png</normaloff>:/salt_icon.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>64</width>
|
||||
<height>64</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="4">
|
||||
<widget class="QToolButton" name="screenshot_delete_button">
|
||||
<property name="toolTip">
|
||||
<string>Reset Screenshot</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="layResources.qrc">
|
||||
<normaloff>:/clear_edit.png</normaloff>:/clear_edit.png</iconset>
|
||||
</property>
|
||||
<property name="autoRaise">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0" colspan="3">
|
||||
<widget class="QLabel" name="label_10">
|
||||
<property name="text">
|
||||
<string>Icon
|
||||
(64x64)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2" rowspan="4">
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="1" column="5">
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1" colspan="3">
|
||||
<widget class="QLineEdit" name="author_contact"/>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Title</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1" colspan="3">
|
||||
<widget class="QLineEdit" name="author"/>
|
||||
</item>
|
||||
<item row="8" column="1" colspan="2">
|
||||
<widget class="QLineEdit" name="doc_url">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2" colspan="2">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="font">
|
||||
<font>
|
||||
<italic>true</italic>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>(use numeric versions like "1.5" or "2.1.3")</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="1" colspan="3">
|
||||
<widget class="QTextEdit" name="doc">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>80</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="0">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Documentation</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="11" column="0">
|
||||
<widget class="QLabel" name="label_9">
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>
|
||||
Images</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTop|Qt::AlignTrailing</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1" colspan="3">
|
||||
<widget class="QLineEdit" name="title"/>
|
||||
</item>
|
||||
<item row="7" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>
|
||||
Description</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTop|Qt::AlignTrailing</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="label_7">
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Author</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<widget class="QLabel" name="label_8">
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Author contact</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="1">
|
||||
<widget class="QLineEdit" name="license">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="14" column="0" colspan="4">
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>736</width>
|
||||
<height>32</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="9" column="1" colspan="3">
|
||||
<widget class="QLabel" name="label_13">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<italic>true</italic>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>(enter an URL to provide a documentation link)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="version">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="2" colspan="2">
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="font">
|
||||
<font>
|
||||
<italic>true</italic>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>(license information like "GPLv3" or "MIT")</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Version</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="12" column="0" colspan="4">
|
||||
<spacer name="verticalSpacer_4">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>5</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="13" column="0">
|
||||
<widget class="QLabel" name="label_14">
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>
|
||||
Depends on</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTop|Qt::AlignTrailing</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="13" column="1" colspan="3">
|
||||
<widget class="QFrame" name="frame_3">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="0" column="1">
|
||||
<widget class="QToolButton" name="add_dependency">
|
||||
<property name="toolTip">
|
||||
<string>Add new dependency</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="layResources.qrc">
|
||||
<normaloff>:/add.png</normaloff>:/add.png</iconset>
|
||||
</property>
|
||||
<property name="autoRaise">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QToolButton" name="remove_dependency">
|
||||
<property name="toolTip">
|
||||
<string>Delete dependency</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="layResources.qrc">
|
||||
<normaloff>:/clear.png</normaloff>:/clear.png</iconset>
|
||||
</property>
|
||||
<property name="autoRaise">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<spacer name="verticalSpacer_5">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="0" column="0" rowspan="3">
|
||||
<widget class="QTreeWidget" name="dependencies">
|
||||
<property name="tabKeyNavigation">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="rootIsDecorated">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="allColumnsShowFocus">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string notr="true">Name</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Version</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>URL</string>
|
||||
</property>
|
||||
</column>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<tabstops>
|
||||
<tabstop>version</tabstop>
|
||||
<tabstop>title</tabstop>
|
||||
<tabstop>author</tabstop>
|
||||
<tabstop>author_contact</tabstop>
|
||||
<tabstop>license</tabstop>
|
||||
<tabstop>doc</tabstop>
|
||||
<tabstop>doc_url</tabstop>
|
||||
<tabstop>icon_config_button</tabstop>
|
||||
<tabstop>icon_delete_button</tabstop>
|
||||
<tabstop>screenshot_config_button</tabstop>
|
||||
<tabstop>screenshot_delete_button</tabstop>
|
||||
<tabstop>dependencies</tabstop>
|
||||
<tabstop>add_dependency</tabstop>
|
||||
<tabstop>remove_dependency</tabstop>
|
||||
</tabstops>
|
||||
<resources>
|
||||
<include location="layResources.qrc"/>
|
||||
</resources>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>accepted()</signal>
|
||||
<receiver>SaltGrainPropertiesDialog</receiver>
|
||||
<slot>accept()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>546</x>
|
||||
<y>425</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>561</x>
|
||||
<y>435</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>rejected()</signal>
|
||||
<receiver>SaltGrainPropertiesDialog</receiver>
|
||||
<slot>reject()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>638</x>
|
||||
<y>418</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>649</x>
|
||||
<y>433</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
||||
|
|
@ -50,7 +50,8 @@ HEADERS = \
|
|||
laySaltGrain.h \
|
||||
laySaltGrains.h \
|
||||
laySaltManagerDialog.h \
|
||||
laySaltGrainDetailsTextWidget.h
|
||||
laySaltGrainDetailsTextWidget.h \
|
||||
laySaltGrainPropertiesDialog.h
|
||||
|
||||
FORMS = \
|
||||
ClipDialog.ui \
|
||||
|
|
@ -96,7 +97,8 @@ FORMS = \
|
|||
TechLoadOptionsEditorPage.ui \
|
||||
TechSaveOptionsEditorPage.ui \
|
||||
MainConfigPage7.ui \
|
||||
SaltManagerDialog.ui
|
||||
SaltManagerDialog.ui \
|
||||
SaltGrainPropertiesDialog.ui
|
||||
|
||||
SOURCES = \
|
||||
gsiDeclLayApplication.cc \
|
||||
|
|
@ -144,7 +146,8 @@ SOURCES = \
|
|||
laySaltGrain.cc \
|
||||
laySaltGrains.cc \
|
||||
laySaltManagerDialog.cc \
|
||||
laySaltGrainDetailsTextWidget.cc
|
||||
laySaltGrainDetailsTextWidget.cc \
|
||||
laySaltGrainPropertiesDialog.cc
|
||||
|
||||
RESOURCES = layBuildInMacros.qrc \
|
||||
layHelpResources.qrc \
|
||||
|
|
|
|||
|
|
@ -40,10 +40,8 @@ SaltGrainDetailsTextWidget::SaltGrainDetailsTextWidget (QWidget *w)
|
|||
|
||||
void SaltGrainDetailsTextWidget::set_grain (SaltGrain *g)
|
||||
{
|
||||
if (mp_grain != g) {
|
||||
mp_grain = g;
|
||||
setHtml (details_text ());
|
||||
}
|
||||
mp_grain = g;
|
||||
setHtml (details_text ());
|
||||
}
|
||||
|
||||
QVariant
|
||||
|
|
@ -51,15 +49,30 @@ SaltGrainDetailsTextWidget::loadResource (int type, const QUrl &url)
|
|||
{
|
||||
if (url.path () == QString::fromUtf8 ("/icon")) {
|
||||
|
||||
int icon_dim = 64;
|
||||
|
||||
if (!mp_grain || mp_grain->icon ().isNull ()) {
|
||||
|
||||
return QImage (":/salt_icon.png");
|
||||
|
||||
} else {
|
||||
|
||||
QImage img = mp_grain->icon ();
|
||||
if (img.width () != 64) {
|
||||
return img.scaled (QSize (64, 64), Qt::KeepAspectRatioByExpanding, Qt::SmoothTransformation);
|
||||
if (img.width () != icon_dim || img.height () != icon_dim) {
|
||||
|
||||
img = img.scaled (QSize (icon_dim, icon_dim), Qt::KeepAspectRatio, Qt::SmoothTransformation);
|
||||
|
||||
QImage final_img (icon_dim, icon_dim, QImage::Format_ARGB32);
|
||||
final_img.fill (QColor (0, 0, 0, 0));
|
||||
QPainter painter (&final_img);
|
||||
painter.drawImage ((icon_dim - img.width ()) / 2, (icon_dim - img.height ()) / 2, img);
|
||||
|
||||
return final_img;
|
||||
|
||||
} else {
|
||||
return img;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
} else if (url.path () == QString::fromUtf8 ("/screenshot")) {
|
||||
|
|
@ -69,7 +82,7 @@ SaltGrainDetailsTextWidget::loadResource (int type, const QUrl &url)
|
|||
QImage smask (s.size (), QImage::Format_ARGB32_Premultiplied);
|
||||
smask.fill (QColor (0, 0, 0, 0));
|
||||
{
|
||||
int border = 4;
|
||||
int border = 0;
|
||||
int radius = 6;
|
||||
|
||||
QPainter painter (&smask);
|
||||
|
|
@ -210,9 +223,11 @@ SaltGrainDetailsTextWidget::details_text ()
|
|||
stream << "<p><b>" << QObject::tr ("Installed: ") << "</b>" << g->installed_time ().toString () << "</p>";
|
||||
}
|
||||
if (! g->dependencies ().empty ()) {
|
||||
stream << "<p><b>" << QObject::tr ("Depends on: ") << "</b></p><p>";
|
||||
stream << "<p><b>" << QObject::tr ("Depends on: ") << "</b><br/>";
|
||||
for (std::vector<lay::SaltGrain::Dependency>::const_iterator d = g->dependencies ().begin (); d != g->dependencies ().end (); ++d) {
|
||||
stream << " " << tl::to_qstring (tl::escaped_to_html (d->name)) << " " << tl::to_qstring (tl::escaped_to_html (d->url)) << "<br/>";
|
||||
stream << " " << tl::to_qstring (tl::escaped_to_html (d->name)) << " ";
|
||||
stream << tl::to_qstring (tl::escaped_to_html (d->version)) << " - ";
|
||||
stream << "[" << tl::to_qstring (tl::escaped_to_html (d->url)) << "]<br/>";
|
||||
}
|
||||
stream << "</p>";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,268 @@
|
|||
|
||||
/*
|
||||
|
||||
KLayout Layout Viewer
|
||||
Copyright (C) 2006-2017 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 "laySaltGrainPropertiesDialog.h"
|
||||
#include "laySalt.h"
|
||||
#include "tlString.h"
|
||||
#include "tlExceptions.h"
|
||||
|
||||
#include <QFileDialog>
|
||||
#include <QFileInfo>
|
||||
#include <QTreeWidgetItem>
|
||||
|
||||
namespace lay
|
||||
{
|
||||
|
||||
SaltGrainPropertiesDialog::SaltGrainPropertiesDialog (QWidget *parent)
|
||||
: QDialog (parent), mp_salt (0)
|
||||
{
|
||||
Ui::SaltGrainPropertiesDialog::setupUi (this);
|
||||
|
||||
m_title = windowTitle ();
|
||||
m_open_label = open_label->text ();
|
||||
|
||||
connect (icon_delete_button, SIGNAL (clicked ()), this, SLOT (reset_icon ()));
|
||||
connect (icon_config_button, SIGNAL (clicked ()), this, SLOT (set_icon ()));
|
||||
connect (screenshot_delete_button, SIGNAL (clicked ()), this, SLOT (reset_screenshot ()));
|
||||
connect (screenshot_config_button, SIGNAL (clicked ()), this, SLOT (set_screenshot ()));
|
||||
connect (doc_url, SIGNAL (textChanged (const QString &)), this, SLOT (url_changed (const QString &)));
|
||||
connect (add_dependency, SIGNAL (clicked ()), this, SLOT (add_dependency_clicked ()));
|
||||
connect (remove_dependency, SIGNAL (clicked ()), this, SLOT (remove_dependency_clicked ()));
|
||||
connect (dependencies, SIGNAL (itemChanged (QTreeWidgetItem *, int)), this, SLOT (dependency_changed (QTreeWidgetItem *, int)));
|
||||
}
|
||||
|
||||
void
|
||||
SaltGrainPropertiesDialog::update_controls ()
|
||||
{
|
||||
setWindowTitle (m_title + tl::to_qstring (" - " + m_grain.name ()));
|
||||
|
||||
version->setText (tl::to_qstring (m_grain.version ()));
|
||||
title->setText (tl::to_qstring (m_grain.title ()));
|
||||
author->setText (tl::to_qstring (m_grain.author ()));
|
||||
author_contact->setText (tl::to_qstring (m_grain.author_contact ()));
|
||||
doc->setText (tl::to_qstring (m_grain.doc ()));
|
||||
doc_url->setText (tl::to_qstring (m_grain.doc_url ()));
|
||||
license->setText (tl::to_qstring (m_grain.license ()));
|
||||
|
||||
dependencies->clear ();
|
||||
for (std::vector<SaltGrain::Dependency>::const_iterator d = m_grain.dependencies ().begin (); d != m_grain.dependencies ().end (); ++d) {
|
||||
QTreeWidgetItem *item = new QTreeWidgetItem (dependencies);
|
||||
item->setFlags (item->flags () | Qt::ItemIsEditable);
|
||||
item->setText (0, tl::to_qstring (d->name));
|
||||
item->setText (1, tl::to_qstring (d->version));
|
||||
item->setText (2, tl::to_qstring (d->url));
|
||||
dependencies->addTopLevelItem (item);
|
||||
}
|
||||
|
||||
update_icon ();
|
||||
update_screenshot ();
|
||||
}
|
||||
|
||||
void
|
||||
SaltGrainPropertiesDialog::update_icon ()
|
||||
{
|
||||
if (m_grain.icon ().isNull ()) {
|
||||
icon_config_button->setIcon (QIcon (":/salt_icon.png"));
|
||||
} else {
|
||||
QImage img = m_grain.icon ();
|
||||
if (img.width () == icon_config_button->iconSize ().width ()) {
|
||||
icon_config_button->setIcon (QIcon (QPixmap::fromImage (img)));
|
||||
} else {
|
||||
icon_config_button->setIcon (QIcon (QPixmap::fromImage (img.scaled (icon_config_button->iconSize (), Qt::KeepAspectRatio, Qt::SmoothTransformation))));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
SaltGrainPropertiesDialog::update_screenshot ()
|
||||
{
|
||||
if (m_grain.screenshot ().isNull ()) {
|
||||
screenshot_config_button->setIcon (QIcon (":/add.png"));
|
||||
} else {
|
||||
QImage img = m_grain.screenshot ();
|
||||
if (img.width () == screenshot_config_button->iconSize ().width ()) {
|
||||
screenshot_config_button->setIcon (QIcon (QPixmap::fromImage (img)));
|
||||
} else {
|
||||
screenshot_config_button->setIcon (QIcon (QPixmap::fromImage (img.scaled (screenshot_config_button->iconSize (), Qt::KeepAspectRatio, Qt::SmoothTransformation))));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
SaltGrainPropertiesDialog::update_data ()
|
||||
{
|
||||
m_grain.set_version (tl::to_string (version->text ()));
|
||||
m_grain.set_title (tl::to_string (title->text ()));
|
||||
m_grain.set_author (tl::to_string (author->text ()));
|
||||
m_grain.set_author_contact (tl::to_string (author_contact->text ()));
|
||||
m_grain.set_doc (tl::to_string (doc->toPlainText ()));
|
||||
m_grain.set_doc_url (tl::to_string (doc_url->text ()));
|
||||
m_grain.set_license (tl::to_string (license->text ()));
|
||||
|
||||
m_grain.dependencies ().clear ();
|
||||
for (int i = 0; i < dependencies->topLevelItemCount (); ++i) {
|
||||
QTreeWidgetItem *item = dependencies->topLevelItem (i);
|
||||
QString name = item->text (0).simplified ();
|
||||
QString version = item->text (1).simplified ();
|
||||
QString url = item->text (2).simplified ();
|
||||
if (! name.isEmpty ()) {
|
||||
lay::SaltGrain::Dependency dep = lay::SaltGrain::Dependency ();
|
||||
dep.name = tl::to_string (name);
|
||||
dep.version = tl::to_string (version);
|
||||
dep.url = tl::to_string (url);
|
||||
m_grain.dependencies ().push_back (dep);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
SaltGrainPropertiesDialog::dependency_changed (QTreeWidgetItem *item, int column)
|
||||
{
|
||||
if (column == 0 && mp_salt) {
|
||||
|
||||
// set URL and version for known grains
|
||||
std::string name = tl::to_string (item->text (0).simplified ());
|
||||
if (name == m_grain.name ()) {
|
||||
|
||||
item->setText (1, QString ());
|
||||
item->setText (2, tr ("(must not depend on itself)"));
|
||||
|
||||
} else {
|
||||
|
||||
SaltGrain *g = 0;
|
||||
for (lay::Salt::flat_iterator i = mp_salt->begin_flat (); i != mp_salt->end_flat (); ++i) {
|
||||
if ((*i)->name () == name) {
|
||||
g = *i;
|
||||
}
|
||||
}
|
||||
if (g) {
|
||||
item->setText (1, tl::to_qstring (g->version ()));
|
||||
item->setText (2, tl::to_qstring (g->url ()));
|
||||
} else {
|
||||
item->setText (1, QString ());
|
||||
item->setText (2, tr ("(unknown packet)"));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
SaltGrainPropertiesDialog::url_changed (const QString &url)
|
||||
{
|
||||
// inserts the URL into the label
|
||||
open_label->setText (m_open_label.arg (url));
|
||||
}
|
||||
|
||||
void
|
||||
SaltGrainPropertiesDialog::set_icon ()
|
||||
{
|
||||
BEGIN_PROTECTED
|
||||
|
||||
const int max_dim = 256;
|
||||
|
||||
QString fileName = QFileDialog::getOpenFileName (this, tr ("Pick Icon Image File"), m_image_dir, tr ("Images (*.png *.jpg)"));
|
||||
if (! fileName.isNull ()) {
|
||||
QImage img = QImage (fileName);
|
||||
if (img.width () > max_dim || img.height () > max_dim) {
|
||||
throw tl::Exception (tl::to_string (tr ("Icon image too big -\nmust be %1x%2 pixels max, but is %3x%4").arg (max_dim).arg (max_dim).arg (img.width ()).arg (img.height ())));
|
||||
}
|
||||
m_grain.set_icon (img);
|
||||
m_image_dir = QFileInfo (fileName).path ();
|
||||
update_icon ();
|
||||
}
|
||||
|
||||
END_PROTECTED
|
||||
}
|
||||
|
||||
void
|
||||
SaltGrainPropertiesDialog::reset_icon ()
|
||||
{
|
||||
m_grain.set_icon (QImage ());
|
||||
update_icon ();
|
||||
}
|
||||
|
||||
void
|
||||
SaltGrainPropertiesDialog::set_screenshot ()
|
||||
{
|
||||
BEGIN_PROTECTED
|
||||
|
||||
const int max_dim = 1024;
|
||||
|
||||
QString fileName = QFileDialog::getOpenFileName (this, tr ("Pick Showcase Image File"), m_image_dir, tr ("Images (*.png *.jpg)"));
|
||||
if (! fileName.isNull ()) {
|
||||
QImage img = QImage (fileName);
|
||||
if (img.width () > max_dim || img.height () > max_dim) {
|
||||
throw tl::Exception (tl::to_string (tr ("Showcase image too big -\nmust be %1x%2 pixels max, but is %3x%4").arg (max_dim).arg (max_dim).arg (img.width ()).arg (img.height ())));
|
||||
}
|
||||
m_grain.set_screenshot (img);
|
||||
m_image_dir = QFileInfo (fileName).path ();
|
||||
update_screenshot ();
|
||||
}
|
||||
|
||||
END_PROTECTED
|
||||
}
|
||||
|
||||
void
|
||||
SaltGrainPropertiesDialog::reset_screenshot ()
|
||||
{
|
||||
m_grain.set_screenshot (QImage ());
|
||||
update_screenshot ();
|
||||
}
|
||||
|
||||
void
|
||||
SaltGrainPropertiesDialog::add_dependency_clicked ()
|
||||
{
|
||||
QTreeWidgetItem *item = new QTreeWidgetItem (dependencies);
|
||||
item->setFlags (item->flags () | Qt::ItemIsEditable);
|
||||
dependencies->addTopLevelItem (item);
|
||||
dependencies->setCurrentItem (dependencies->topLevelItem (dependencies->topLevelItemCount () - 1));
|
||||
}
|
||||
|
||||
void
|
||||
SaltGrainPropertiesDialog::remove_dependency_clicked ()
|
||||
{
|
||||
int index = dependencies->indexOfTopLevelItem (dependencies->currentItem ());
|
||||
if (index >= 0 && index < dependencies->topLevelItemCount ()) {
|
||||
delete dependencies->topLevelItem (index);
|
||||
}
|
||||
}
|
||||
|
||||
bool
|
||||
SaltGrainPropertiesDialog::exec_dialog (lay::SaltGrain *grain, lay::Salt *salt)
|
||||
{
|
||||
m_grain = *grain;
|
||||
mp_salt = salt;
|
||||
update_controls ();
|
||||
|
||||
bool res = exec ();
|
||||
if (res) {
|
||||
update_data ();
|
||||
*grain = m_grain;
|
||||
}
|
||||
|
||||
mp_salt = 0;
|
||||
return res;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,84 @@
|
|||
|
||||
/*
|
||||
|
||||
KLayout Layout Viewer
|
||||
Copyright (C) 2006-2017 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_laySaltGrainPropertiesDialog
|
||||
#define HDR_laySaltGrainPropertiesDialog
|
||||
|
||||
#include "laySaltGrain.h"
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
#include "ui_SaltGrainPropertiesDialog.h"
|
||||
|
||||
namespace lay
|
||||
{
|
||||
|
||||
class Salt;
|
||||
|
||||
/**
|
||||
* @brief The dialog for managing the Salt ("Packages")
|
||||
*/
|
||||
class SaltGrainPropertiesDialog
|
||||
: public QDialog, private Ui::SaltGrainPropertiesDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
/**
|
||||
* @brief Constructor
|
||||
*/
|
||||
SaltGrainPropertiesDialog (QWidget *parent);
|
||||
|
||||
/**
|
||||
* @brief Executes the dialog for the given grain
|
||||
* If the dialog is committed with "Ok", the new data is written into
|
||||
* the grain provided and "true" is returned. Otherwise, "false" is
|
||||
* returned and the object remains unchanged.
|
||||
*/
|
||||
bool exec_dialog (lay::SaltGrain *grain, lay::Salt *salt);
|
||||
|
||||
private slots:
|
||||
void reset_icon ();
|
||||
void set_icon ();
|
||||
void reset_screenshot ();
|
||||
void set_screenshot ();
|
||||
void url_changed (const QString &url);
|
||||
void add_dependency_clicked ();
|
||||
void remove_dependency_clicked ();
|
||||
void dependency_changed (QTreeWidgetItem *item, int column);
|
||||
|
||||
private:
|
||||
lay::SaltGrain m_grain;
|
||||
lay::Salt *mp_salt;
|
||||
QString m_title;
|
||||
QString m_open_label;
|
||||
QString m_image_dir;
|
||||
|
||||
void update_controls ();
|
||||
void update_data ();
|
||||
void update_icon ();
|
||||
void update_screenshot ();
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
@ -21,6 +21,7 @@
|
|||
*/
|
||||
|
||||
#include "laySaltManagerDialog.h"
|
||||
#include "laySaltGrainPropertiesDialog.h"
|
||||
#include "laySalt.h"
|
||||
#include "tlString.h"
|
||||
|
||||
|
|
@ -80,16 +81,29 @@ public:
|
|||
|
||||
} else if (role == Qt::DecorationRole) {
|
||||
|
||||
int icon_dim = 64;
|
||||
|
||||
const lay::SaltGrain *g = mp_salt->begin_flat ()[index.row ()];
|
||||
if (g->icon ().isNull ()) {
|
||||
return QIcon (":/salt_icon.png");
|
||||
} else {
|
||||
QPixmap px = QPixmap::fromImage (g->icon ());
|
||||
if (px.width () == 64) {
|
||||
return px;
|
||||
|
||||
QImage img = g->icon ();
|
||||
if (img.width () == icon_dim && img.height () == icon_dim) {
|
||||
return QPixmap::fromImage (img);
|
||||
} else {
|
||||
return px.scaled (QSize (64, 64), Qt::KeepAspectRatioByExpanding, Qt::SmoothTransformation);
|
||||
|
||||
img = img.scaled (QSize (icon_dim, icon_dim), Qt::KeepAspectRatio, Qt::SmoothTransformation);
|
||||
|
||||
QImage final_img (icon_dim, icon_dim, QImage::Format_ARGB32);
|
||||
final_img.fill (QColor (0, 0, 0, 0));
|
||||
QPainter painter (&final_img);
|
||||
painter.drawImage ((icon_dim - img.width ()) / 2, (icon_dim - img.height ()) / 2, img);
|
||||
|
||||
return QPixmap::fromImage (final_img);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
} else {
|
||||
|
|
@ -225,6 +239,9 @@ SaltManagerDialog::SaltManagerDialog (QWidget *parent)
|
|||
m_current_changed_enabled (true)
|
||||
{
|
||||
Ui::SaltManagerDialog::setupUi (this);
|
||||
mp_properties_dialog = new lay::SaltGrainPropertiesDialog (this);
|
||||
|
||||
connect (edit_button, SIGNAL (clicked ()), this, SLOT (edit_properties ()));
|
||||
|
||||
// @@@
|
||||
salt = lay::Salt (); salt_initialized = false;
|
||||
|
|
@ -247,8 +264,19 @@ SaltManagerDialog::SaltManagerDialog (QWidget *parent)
|
|||
|
||||
connect (salt_view->selectionModel (), SIGNAL (currentChanged (const QModelIndex &, const QModelIndex &)), this, SLOT (current_changed ()));
|
||||
|
||||
// @@@
|
||||
}
|
||||
|
||||
// ...
|
||||
void
|
||||
SaltManagerDialog::edit_properties ()
|
||||
{
|
||||
SaltGrain *g = current_grain ();
|
||||
if (g) {
|
||||
if (mp_properties_dialog->exec_dialog (g, mp_salt)) {
|
||||
current_changed ();
|
||||
// @@@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -277,12 +305,7 @@ SaltManagerDialog::salt_changed ()
|
|||
void
|
||||
SaltManagerDialog::current_changed ()
|
||||
{
|
||||
SaltModel *model = dynamic_cast <SaltModel *> (salt_view->model ());
|
||||
if (! model) {
|
||||
return;
|
||||
}
|
||||
|
||||
SaltGrain *g = model->grain_from_index (salt_view->currentIndex ());
|
||||
SaltGrain *g = current_grain ();
|
||||
details_text->set_grain (g);
|
||||
if (!g) {
|
||||
details_frame->setEnabled (false);
|
||||
|
|
@ -293,4 +316,11 @@ SaltManagerDialog::current_changed ()
|
|||
}
|
||||
}
|
||||
|
||||
lay::SaltGrain *
|
||||
SaltManagerDialog::current_grain ()
|
||||
{
|
||||
SaltModel *model = dynamic_cast <SaltModel *> (salt_view->model ());
|
||||
return model ? model->grain_from_index (salt_view->currentIndex ()) : 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,8 +20,8 @@
|
|||
|
||||
*/
|
||||
|
||||
#ifndef HDR_laySaltManager
|
||||
#define HDR_laySaltManager
|
||||
#ifndef HDR_laySaltManagerDialog
|
||||
#define HDR_laySaltManagerDialog
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
|
|
@ -32,6 +32,7 @@ namespace lay
|
|||
|
||||
class Salt;
|
||||
class SaltGrain;
|
||||
class SaltGrainPropertiesDialog;
|
||||
|
||||
/**
|
||||
* @brief The dialog for managing the Salt ("Packages")
|
||||
|
|
@ -58,9 +59,17 @@ private slots:
|
|||
*/
|
||||
void current_changed ();
|
||||
|
||||
/**
|
||||
* @brief Called when the "edit" button is pressed
|
||||
*/
|
||||
void edit_properties ();
|
||||
|
||||
private:
|
||||
lay::Salt *mp_salt;
|
||||
bool m_current_changed_enabled;
|
||||
lay::SaltGrainPropertiesDialog *mp_properties_dialog;
|
||||
|
||||
lay::SaltGrain *current_grain ();
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue