#pragma once #include #include #include "workspace/FileEntry.h" class QtProperty; class PropertyBrowser : public QWidget { Q_OBJECT public: explicit PropertyBrowser(QWidget *parent = nullptr); ~PropertyBrowser() override; void AttachDock(class DockWidget* dockWidget); void OnWorkSpaceChange(const QVariant& value); void OnEntityChange(const QVariant& value); void OnWorkspaceFilesChanged(enum class FileEntryType type, std::shared_ptr fileEntry); void Test(); private: void InitUI(); void InitPropertyManager(); void InitComponentPropertyManager(); void addProperty(QtProperty* property, const QString& id); class QtComponentPropertyManager* GetCompononetPropertyManager(const QString& id); private: class QtTreePropertyBrowser* browser_{ nullptr }; class QtIntPropertyManager* intManager_{ nullptr }; class QtBoolPropertyManager* boolManager_{ nullptr }; class QtDoublePropertyManager* doubleManager_{ nullptr }; class QtStringPropertyManager* stringManager_{ nullptr }; class QtColorPropertyManager* colorManager_{ nullptr }; class QtFontPropertyManager* fontManager_{ nullptr }; class QtPointPropertyManager* pointManager_{ nullptr }; class QtSizePropertyManager* sizeManager_{ nullptr }; class QtModelBasePropertyManager* modelBaseManager_{ nullptr }; class QtWorkspacePropertyManager* workSpaceManager_{ nullptr }; class QtEntityPropertyManager* entityManager_{ nullptr }; QMap propertyToId_; QMap idToProperty_; QMap idToExpanded_; QMap componetManager_; // Track current workspace for real-time refresh class WorkSpace* currentWorkspace_{ nullptr }; };