载入中...
搜索中...
未找到
eve::ui::DatabasePanel类 参考

Reflection-driven database panel (DevTools, MVVM). 更多...

#include <DatabasePanel.h>

Public 成员函数

 DatabasePanel ()=default
 
 ~DatabasePanel ()
 
 DatabasePanel (const DatabasePanel &)=delete
 
DatabasePaneloperator= (const DatabasePanel &)=delete
 
void open ()
 Mounts (or updates) the database host on the UI ECS world.
 
void close ()
 Hides the database host.
 
bool isOpen () const
 True while the database host is mounted and visible.
 
UIHosthost () const
 The mounted host (nullptr until open()); for embedding/tests.
 
void refresh ()
 Re-scans reflected classes and refreshes the grid.
 
bool selectClass (const std::string &name)
 Selects a class for the grid.
 
const std::string & selectedClass () const
 Name of the currently selected class ("" when none).
 
uint64_t createInstance ()
 Creates + registers an instance of the selected class.
 
uint64_t registerObject (const ssq::Object &object, const std::string &label={})
 Registers a live script object (auto-derives class when empty).
 
bool unregister (uint64_t id)
 Removes an entry from the registry and refreshes the grid.
 
void sync ()
 Pulls model → view for visible cells (per-frame).
 
WidgetDesc build ()
 Declarative tree of the current selection.
 

详细描述

Reflection-driven database panel (DevTools, MVVM).

Left/top: class menu generated from reflected script classes. Below: one editable row per registered instance (ObjectRegistry), with one cell per reflected member. Cell edits write back to the live script instance; sync() pulls model changes back into the grid.

Grid cells reuse the declarative widget set (InputText / Checkbox / Combo / read-only text), so no separate table node type is needed.

在文件 DatabasePanel.h29 行定义.

构造及析构函数说明

◆ DatabasePanel() [1/2]

eve::ui::DatabasePanel::DatabasePanel ( )
default

◆ ~DatabasePanel()

eve::ui::DatabasePanel::~DatabasePanel ( )

在文件 DatabasePanel.cpp50 行定义.

引用了 eve::ui::UIHost::setTree() , 以及 eve::ui::window().

◆ DatabasePanel() [2/2]

eve::ui::DatabasePanel::DatabasePanel ( const DatabasePanel )
delete

成员函数说明

◆ build()

◆ close()

void eve::ui::DatabasePanel::close ( )

Hides the database host.

在文件 DatabasePanel.cpp63 行定义.

引用了 eve::ui::UIHost::setVisible().

◆ createInstance()

uint64_t eve::ui::DatabasePanel::createInstance ( )

Creates + registers an instance of the selected class.

在文件 DatabasePanel.cpp99 行定义.

引用了 eve::ui::ObjectRegistry::create(), id , 以及 eve::ui::ObjectRegistry::instance().

◆ host()

UIHost * eve::ui::DatabasePanel::host ( ) const
inline

The mounted host (nullptr until open()); for embedding/tests.

在文件 DatabasePanel.h43 行定义.

◆ isOpen()

bool eve::ui::DatabasePanel::isOpen ( ) const

True while the database host is mounted and visible.

在文件 DatabasePanel.cpp67 行定义.

◆ open()

void eve::ui::DatabasePanel::open ( )

Mounts (or updates) the database host on the UI ECS world.

在文件 DatabasePanel.cpp56 行定义.

引用了 eve::ui::UIHost::createHost(), refresh(), eve::ui::UIHost::setLayer() , 以及 eve::ui::UIHost::setVisible().

◆ operator=()

DatabasePanel & eve::ui::DatabasePanel::operator= ( const DatabasePanel )
delete

◆ refresh()

void eve::ui::DatabasePanel::refresh ( )

Re-scans reflected classes and refreshes the grid.

在文件 DatabasePanel.cpp71 行定义.

引用了 cls , 以及 eve::ModuleManager::runtime().

被这些函数引用 open().

◆ registerObject()

uint64_t eve::ui::DatabasePanel::registerObject ( const ssq::Object &  object,
const std::string &  label = {} 
)

Registers a live script object (auto-derives class when empty).

在文件 DatabasePanel.cpp109 行定义.

引用了 id, eve::ui::ObjectRegistry::instance() , 以及 eve::ui::ObjectRegistry::registerObject().

◆ selectClass()

bool eve::ui::DatabasePanel::selectClass ( const std::string &  name)

Selects a class for the grid.

在文件 DatabasePanel.cpp89 行定义.

引用了 name.

◆ selectedClass()

const std::string & eve::ui::DatabasePanel::selectedClass ( ) const
inline

Name of the currently selected class ("" when none).

在文件 DatabasePanel.h50 行定义.

◆ sync()

◆ unregister()

bool eve::ui::DatabasePanel::unregister ( uint64_t  id)

Removes an entry from the registry and refreshes the grid.

在文件 DatabasePanel.cpp120 行定义.

引用了 eve::ui::ObjectRegistry::instance(), removed , 以及 eve::ui::ObjectRegistry::unregister().


该类的文档由以下文件生成: