ORE Studio 0.0.4
Loading...
Searching...
No Matches
Public Member Functions | List of all members
AdminPlugin Class Reference

Plugin owning all admin-domain entity controllers. More...

#include <AdminPlugin.hpp>

Inheritance diagram for AdminPlugin:
Inheritance graph
Collaboration diagram for AdminPlugin:
Collaboration graph

Public Member Functions

 AdminPlugin (QObject *parent=nullptr)
 
QString name () const override
 Returns a short, unique plugin name (e.g. "ores.qt.legacy").
 
int load_order () const override
 Load order hint — lower values are initialised first (default 100).
 
void on_login (const plugin_context &ctx) override
 Create controllers and subscribe to server events.
 
void setup_menus (const shared_menus_context &ctx) override
 Contribute items to host-owned shared menus.
 
QList< QMenu * > create_menus () override
 Build and return standalone domain menus for this plugin.
 
QList< QAction * > toolbar_actions () override
 Return actions to be added to the main toolbar.
 
void on_logout () override
 Destroy controllers and unsubscribe from server events.
 
- Public Member Functions inherited from PluginBase
 PluginBase (QObject *parent=nullptr)
 

Additional Inherited Members

- Signals inherited from PluginBase
void statusMessage (const QString &msg)
 Status or error message to display in the host status bar.
 
void windowCreated (DetachableMdiSubWindow *window)
 A detachable MDI sub-window was created by a controller.
 
void windowDestroyed (DetachableMdiSubWindow *window)
 A detachable MDI sub-window owned by a controller was destroyed.
 
- Protected Member Functions inherited from PluginBase
void connectControllerSignals (EntityController *ctrl)
 Wire the four standard EntityController signals to PluginBase signals.
 

Detailed Description

Plugin owning all admin-domain entity controllers.

Manages accounts, roles, tenants, system settings, badges, and apps. Loaded as a shared library by QPluginLoader at application startup.

Member Function Documentation

◆ name()

QString name ( ) const
overridevirtual

Returns a short, unique plugin name (e.g. "ores.qt.legacy").

Implements IPlugin.

◆ load_order()

int load_order ( ) const
overridevirtual

Load order hint — lower values are initialised first (default 100).

Reimplemented from IPlugin.

◆ on_login()

void on_login ( const plugin_context ctx)
overridevirtual

Create controllers and subscribe to server events.

Called immediately after successful login. ctx provides the shared application resources (client, caches, MDI area, etc.).

Implements IPlugin.

◆ setup_menus()

void setup_menus ( const shared_menus_context ctx)
overridevirtual

Contribute items to host-owned shared menus.

Called once at startup, before create_menus(). The host passes a struct containing pre-created menus that plugins may freely add sub-menus or actions to.

Plugins that only need to add sub-menus to these shared containers should do all their work here and return {} from create_menus().

The default implementation does nothing.

Reimplemented from IPlugin.

◆ create_menus()

QList< QMenu * > create_menus ( )
overridevirtual

Build and return standalone domain menus for this plugin.

Called once at startup, after setup_menus(). The host inserts the returned menus into the menu bar before the &System menu, in plugin load_order. Menus are initially disabled and are enabled on login.

Plugins that contribute exclusively to shared menus via setup_menus() should return an empty list here.

Implements IPlugin.

◆ toolbar_actions()

QList< QAction * > toolbar_actions ( )
overridevirtual

Return actions to be added to the main toolbar.

Called once at startup (after create_menus()). The returned QAction objects must be the same instances that appear in the plugin's menus so that enable/disable state is shared automatically. The host inserts a separator between each plugin's toolbar group.

The default implementation returns an empty list (no toolbar contribution).

Reimplemented from IPlugin.

◆ on_logout()

void on_logout ( )
overridevirtual

Destroy controllers and unsubscribe from server events.

Called when the client disconnects, before the returned menus are removed.

Implements IPlugin.