diff src/changeset.h @ 510:c623ce6b3104

Refactor: make closed a changeset property (not a changeset item one)
author Chris Cannam
date Tue, 18 Oct 2011 11:30:00 +0100
parents b9c153e00e84
children a17c06f773cd
line wrap: on
line diff
--- a/src/changeset.h	Tue Oct 18 11:21:20 2011 +0100
+++ b/src/changeset.h	Tue Oct 18 11:30:00 2011 +0100
@@ -65,6 +65,12 @@
      */
     QStringList children() const { return m_children; }
 
+    /**
+     * The closed property is not obtained from Hg, but set in
+     * Grapher::layout() based on traversing closed branch graphs
+     */
+    bool closed() const { return m_closed; }
+
     int number() const {
         return id().split(':')[0].toInt();
     }
@@ -119,6 +125,7 @@
     void ageChanged(QString age);
     void parentsChanged(QStringList parents);
     void childrenChanged(QStringList children);
+    void closedChanged(bool closed);
     void commentChanged(QString comment);
 
 public slots:
@@ -133,6 +140,7 @@
     void setParents(QStringList parents) { m_parents = parents; emit parentsChanged(parents); }
     void setChildren(QStringList children) { m_children = children; emit childrenChanged(m_children); }
     void addChild(QString child) { m_children.push_back(child); emit childrenChanged(m_children); }
+    void setClosed(bool closed) { m_closed = closed; emit closedChanged(closed); }
     void setComment(QString comment) { m_comment = comment; emit commentChanged(comment); }
 
 private:
@@ -145,6 +153,7 @@
     QString m_age;
     QStringList m_parents;
     QStringList m_children;
+    bool m_closed;
     QString m_comment;
 };