Skip to main content

UI Interface

  • Global UI functions are in namespace xplugin;
  • All pluginName parameters use PLUGIN_NAME (same as XPLUGIN_REGISTER).
  • Return values: 0 success, -1 plugin name error, -2 plugin not initialized.

Center Main View

QWidget *mainWidget = new QWidget;
xplugin::CreateCenterWidget(PLUGIN_NAME, mainWidget);

Bottom Status Bar

QLabel *statusBarLab = new QLabel;
xplugin::CreateStatusBar(PLUGIN_NAME, statusBarLab, 1); // index defaults to 1

Right Expand Panel

QWidget *panel = new QWidget;
xplugin::CreateRightExpandWidgte(PLUGIN_NAME, panel, "panel1");
xplugin::SwitchRightExpandWidgte(PLUGIN_NAME, "panel1"); // empty name closes panel

Physical Keys

xplugin::PhysicalButton btn;
btn.text = tr("Feed");
btn.exec_function = [](bool pressed) { /* ... */ };

QList<xplugin::PhysicalButton> left_buttons{btn};
xplugin::CreatePhyButtonList(PLUGIN_NAME, PLUGIN_NAME, left_buttons, {});

xplugin::ChangePhyButtonStatus(PLUGIN_NAME, PLUGIN_NAME, true); // enable
xplugin::ChangeModelWindowStatus(PLUGIN_NAME, true); // physical keys inactive in modal state

Fullscreen and Notifications

xplugin::ChangeFullScreen(PLUGIN_NAME, true);
xplugin::ThrowLog(PLUGIN_NAME, xplugin::enThrowLogLevel::Info, tr("Prompt message"));

Auxiliary Programming (RL)

Register process-package RL instruction groups and insert/property windows via RLManager; see API Reference - RLManager.

xplugin::RLManager rlManager(this);
rlManager.createTypeKey("Custom");
rlManager.createGroups(tr("demo group"), "demo");
rlManager.createTypeToGroup("demo", "Custom");
rlManager.createSkeleton("Custom", "Custom");
rlManager.createInsertWidget("Custom", [](){ return new MyInsertWidget; });
  • You may also use createData(groupName, type, desc, insertFactory, propertyFactory) to register a standard instruction in one step.