123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- #ifndef CNODE_H
- #define CNODE_H
- #include <QObject>
- struct CNodeData
- {
- int id = -1;
- int projectId = -1;
- int indexType = 0;
- int number = -1;
- int pNumber = -1;
- QString name = "新节点";
- QString remark = "";
- QString dimension = "";
- CNodeData(int projId = -1, int indexType = 0, int number = -1, int pNumber = -1, int id = -1);
- bool isValid() const;
- bool isNull() const;
- bool isCached() const;
- bool hasParent() const;
- bool isSameMind(CNodeData n) const;
- };
- class CNode : public QObject
- {
- Q_OBJECT
- public:
- explicit CNode(QObject *parent = nullptr);
- const CNode *pNode() const;
- const CNode *rNode() const;
- QList<CNode *> cNodes() const;
- int height() const;
- int depth() const;
- int leaves() const;
-
-
-
-
-
- int sizeOfLevel(int lev) const;
- signals:
- };
- #endif
|