Terminal strip can now be edited and managed by undo command

This commit is contained in:
joshua
2021-05-05 22:34:11 +02:00
parent e0579b3040
commit 580ebe8b97
9 changed files with 215 additions and 27 deletions

View File

@@ -318,6 +318,29 @@ void TerminalStrip::setDescription(const QString &description) {
m_data.m_description = description;
}
/**
* @brief TerminalStrip::data
* @return The internal data of this strip
*/
TerminalStripData TerminalStrip::data() const {
return m_data;
}
/**
* @brief TerminalStrip::setData
* The internal data of this strip to data.
* the uuid of the new data is set to the uuid
* of the previous data to keep the uuid
* of the terminal strip unchanged
* @param data
*/
void TerminalStrip::setData(const TerminalStripData &data)
{
auto uuid_ = m_data.m_uuid;
m_data = data;
m_data.m_uuid = uuid_;
}
/**
* @brief TerminalStrip::addTerminal
* Add terminal to this terminal strip