Ungroup terminal is now managed by undo stack

This commit is contained in:
joshua
2021-10-09 14:45:54 +02:00
parent c6e3e385ff
commit 7c6fca2aac
5 changed files with 79 additions and 12 deletions

View File

@@ -61,6 +61,15 @@ struct PhysicalTerminalData
QUuid uuid_;
};
//Code to use PhysicalTerminalData as key for QHash
inline bool operator == (const PhysicalTerminalData &phy_1, const PhysicalTerminalData &phy_2) {
return phy_1.uuid_ == phy_2.uuid_;
}
inline uint qHash(const PhysicalTerminalData &key, uint seed) {
return qHash(key.uuid_, seed);
}
/**
* @brief The TerminalStrip class
* This class hold all the datas and configurations
@@ -103,7 +112,6 @@ class TerminalStrip : public QObject
bool addTerminal (Element *terminal);
bool removeTerminal (Element *terminal);
bool haveTerminal (Element *terminal);
int physicalTerminalCount() const;
PhysicalTerminalData physicalTerminalData(int index) const;