mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-17 12:40:35 +01:00
Add 'comment' to terminal strip
This commit is contained in:
@@ -195,6 +195,10 @@ void TerminalStrip::setName(const QString &name) {
|
||||
m_data.m_name = name;
|
||||
}
|
||||
|
||||
void TerminalStrip::setComment(const QString &comment) {
|
||||
m_data.m_comment = comment;
|
||||
}
|
||||
|
||||
void TerminalStrip::setDescription(const QString &description) {
|
||||
m_data.m_description = description;
|
||||
}
|
||||
|
||||
@@ -44,6 +44,8 @@ class TerminalStrip : public QObject
|
||||
QString location() const {return m_data.m_location;}
|
||||
void setName(const QString &name);
|
||||
QString name() const {return m_data.m_name;}
|
||||
void setComment(const QString &comment);
|
||||
QString comment() const {return m_data.m_comment;}
|
||||
void setDescription(const QString &description);
|
||||
QString description() const {return m_data.m_description;}
|
||||
|
||||
|
||||
@@ -37,6 +37,7 @@ class TerminalStripData : public PropertiesInterface
|
||||
QString m_installation = QStringLiteral("="),
|
||||
m_location = QStringLiteral("+"),
|
||||
m_name,
|
||||
m_comment,
|
||||
m_description;
|
||||
|
||||
};
|
||||
|
||||
@@ -79,9 +79,13 @@ TerminalStrip *TerminalStripCreatorDialog::generatedTerminalStrip() const
|
||||
if (name_.isEmpty()) {
|
||||
name_ = QStringLiteral("X"); }
|
||||
|
||||
return m_project->newTerminalStrip(installation_,
|
||||
location_,
|
||||
name_);
|
||||
auto strip = m_project->newTerminalStrip(installation_,
|
||||
location_,
|
||||
name_);
|
||||
strip->setComment(ui->m_comment_le->text());
|
||||
strip->setDescription(ui->m_description_te->toPlainText());
|
||||
|
||||
return strip;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -89,12 +89,23 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string>Commentaire :</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<widget class="QLineEdit" name="m_comment_le"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<tabstops>
|
||||
<tabstop>m_installation_le</tabstop>
|
||||
<tabstop>m_location_le</tabstop>
|
||||
<tabstop>m_name_le</tabstop>
|
||||
<tabstop>m_comment_le</tabstop>
|
||||
<tabstop>m_description_te</tabstop>
|
||||
</tabstops>
|
||||
<resources/>
|
||||
|
||||
Reference in New Issue
Block a user