1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- #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 = "";
- int type = 0;
- int isEffective = 0;
- 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
|