This commit is contained in:
Misaki
2025-12-04 19:11:29 +08:00
commit bb600bbbc4
2741 changed files with 364700 additions and 0 deletions
+33
View File
@@ -0,0 +1,33 @@
#ifndef T_TREEITEM_H
#define T_TREEITEM_H
#include <QModelIndex>
#include <QObject>
#include "stdafx.h"
class T_TreeItem : public QObject
{
Q_OBJECT
Q_PROPERTY_CREATE(QList<T_TreeItem*>, ChildrenItems)
Q_PROPERTY_CREATE(bool, IsChecked)
Q_PRIVATE_CREATE(T_TreeItem*, ParentItem)
public:
explicit T_TreeItem(QString itemTitle, T_TreeItem* parent = nullptr);
~T_TreeItem();
QString getItemKey() const;
QString getItemTitle() const;
void setChildChecked(bool isChecked);
Qt::CheckState getChildCheckState();
void appendChildItem(T_TreeItem* childItem);
bool getIsHasChild() const;
int getRow() const;
private:
QString _itemKey = "";
QString _itemTitle = "";
bool _isExpanded{false};
};
#endif // T_TREEITEM_H