Most of functionality for connections in tree works now. Old list largely removed.

This commit is contained in:
eelke 2019-08-27 20:12:00 +02:00
parent 8840d3bcbb
commit b3a98f6dc0
10 changed files with 399 additions and 158 deletions

View file

@ -43,7 +43,10 @@ public:
using Connections = QVector<std::shared_ptr<ConnectionConfig>>;
const Connections& connections() const { return m_connections; }
void add(std::shared_ptr<ConnectionConfig> cc);
void erase(int idx, int count = 1);
/// Adds cc to the group and returns the index within the group.
int add(std::shared_ptr<ConnectionConfig> cc);
void update(int idx, const ConnectionConfig &cc);
bool operator==(const ConnectionGroup &rhs) const {
return conngroup_id == rhs.conngroup_id
@ -57,7 +60,7 @@ class ConnectionConfig: public ConnectionNode {
public:
ConnectionConfig(); // Default object containing invalid uuid
ConnectionGroup* parent();
const ConnectionGroup* parent() const;
void setParent(ConnectionGroup *grp);
void setUuid(const QUuid &uuid);
@ -113,6 +116,8 @@ public:
void clean();
bool operator==(QUuid id) const { return m_uuid == id; }
QString makeLongDescription() const;
private:
QUuid m_uuid;
std::string m_name;