52 lines
1.4 KiB
C++
52 lines
1.4 KiB
C++
#pragma once
|
|
|
|
#include <QWidget>
|
|
#include <QMap>
|
|
|
|
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 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 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<QtProperty*, QString> propertyToId_;
|
|
QMap<QString, QtProperty*> idToProperty_;
|
|
QMap<QString, bool> idToExpanded_;
|
|
|
|
QMap<QString, class QtComponentPropertyManager*> componetManager_;
|
|
};
|
|
|