RTXI  3.0.0
The Real-Time eXperiment Interface Reference Manual
Data Structures | Public Slots | Signals | Public Member Functions | Protected Member Functions
Widgets::Panel Class Reference

#include <widgets.hpp>

Inheritance diagram for Widgets::Panel:
Inheritance graph
Collaboration diagram for Widgets::Panel:
Collaboration graph

Public Slots

void resizeMe ()
 
virtual void exit ()
 
virtual void refresh ()
 
virtual void modify ()
 
virtual void pause (bool p)
 
virtual void update_state (RT::State::state_t flag)
 

Signals

void signal_state_change (RT::State::state_t state)
 

Public Member Functions

 Panel (const std::string &mod_name, QMainWindow *mw, Event::Manager *ev_manager)
 
QMdiSubWindow * getMdiWindow ()
 
virtual void createGUI (const std::vector< Widgets::Variable::Info > &vars, const std::vector< Widgets::Variable::Id > &skip_ids)
 
void setHostPlugin (Widgets::Plugin *hplugin)
 

Protected Member Functions

QString getParameter (const QString &var_name)
 
void setParameter (const QString &var_name, double value)
 
void setParameter (const QString &var_name, uint64_t value)
 
void setParameter (const QString &var_name, int value)
 
QString getComment (const QString &name)
 
void setComment (const QString &var_name, const QString &comment)
 
void closeEvent (QCloseEvent *event) override
 
std::string getName ()
 
Widgets::PlugingetHostPlugin ()
 
QMainWindow * getQMainWindowPtr ()
 
Event::ManagergetRTXIEventManager ()
 

Detailed Description

RTXI Widgets UI class

Definition at line 278 of file widgets.hpp.

Constructor & Destructor Documentation

◆ Panel()

Widgets::Panel::Panel(const std::string & mod_name,
QMainWindow * mw,
Event::Managerev_manager 
)

Definition at line 155 of file widgets.cpp.

Here is the call graph for this function:

Member Function Documentation

◆ closeEvent()

void Widgets::Panel::closeEvent(QCloseEvent * event)
overrideprotected

This function overrides the base class from Qt. It handles the closing of the widget and properly initiates unloading of plugin

Parameters
eventThe close event triggered

Definition at line 179 of file widgets.cpp.

◆ createGUI()

void Widgets::Panel::createGUI(const std::vector< Widgets::Variable::Info > & vars,
const std::vector< Widgets::Variable::Id > & skip_ids 
)
virtual

Function that builds the Qt GUI for the Widget's panel.

This is a convenience function that will automatically generate a simple panel with text fields corresponding to the parameters. It is useful for quick and dirty gui construction.

Parameters
varsThe structure defining the module's parameters, states, inputs, and outputs.
skip_idsA vector of IDs that this function should not consider building interface for.

Definition at line 185 of file widgets.cpp.

Here is the call graph for this function:

◆ exit

void Widgets::Panel::exit()
virtualslot

Function that allows the object to safely delete and unload itself.

Definition at line 286 of file widgets.cpp.

◆ getComment()

QString Widgets::Panel::getComment(const QString & name)
protected

retrieves the comment storedabout the component parameter

Parameters
nameThe name of the parameter
Returns
The parameter description

◆ getHostPlugin()

Widgets::Plugin* Widgets::Panel::getHostPlugin()
inlineprotected

retrieve the host plugin that owns this panel

Returns
pointer to host plugin

Definition at line 429 of file widgets.hpp.

◆ getMdiWindow()

QMdiSubWindow* Widgets::Panel::getMdiWindow()
inline

Definition at line 286 of file widgets.hpp.

◆ getName()

std::string Widgets::Panel::getName()
inlineprotected

Obtains the name that identifies this module

Returns
The name of the module

Definition at line 422 of file widgets.hpp.

◆ getParameter()

QString Widgets::Panel::getParameter(const QString & var_name)
protected

Get the value of the parameter in the GUI, and update the value within the Workspace.

Parameters
nameThe parameter's name.
Returns
The value of the parameter.

◆ getQMainWindowPtr()

QMainWindow* Widgets::Panel::getQMainWindowPtr()
inlineprotected

Retrieve the main window for the application

Returns
pointer of type QMainWindow that controls the RTXI application

Definition at line 436 of file widgets.hpp.

◆ getRTXIEventManager()

Event::Manager* Widgets::Panel::getRTXIEventManager()
inlineprotected

Obtain the event manager attached to this session of the RTXI application.

Returns
Pointer to the RTXI event manager

Definition at line 443 of file widgets.hpp.

◆ modify

void Widgets::Panel::modify()
virtualslot

Function that calls DefaultGUIModel::update with the MODIFY flag

Definition at line 340 of file widgets.cpp.

Here is the call graph for this function:

◆ pause

void Widgets::Panel::pause(bool p)
virtualslot

Function that pauses/unpauses the model.

Parameters
pausedTrue if pausing widget, false otherwise

Definition at line 440 of file widgets.cpp.

◆ refresh

void Widgets::Panel::refresh()
virtualslot

Function that updates the GUI with new parameter values.

Definition at line 296 of file widgets.cpp.

Here is the call graph for this function:

◆ resizeMe

void Widgets::Panel::resizeMe()
slot

Function that resizes widgets to properly fit layouts after overloading

Definition at line 281 of file widgets.cpp.

◆ setComment()

void Widgets::Panel::setComment(const QString & var_name,
const QString & comment 
)
protected

Assigns a comment to the parameter

Parameters
var_namethe name of the parameter
commentThe comment assigned to this parameter

Definition at line 386 of file widgets.cpp.

◆ setHostPlugin()

void Widgets::Panel::setHostPlugin(Widgets::Pluginhplugin)
inline

Assigns a plugin to this panel. Typically used during construction of the module and should not be used beyond initialization.

Parameters
hpluginA pointer to the host plugin this panel belongs to.

Definition at line 310 of file widgets.hpp.

◆ setParameter() [1/3]

void Widgets::Panel::setParameter(const QString & var_name,
double value 
)
protected

Set the value of double parameter within the Workspace and GUI.

Parameters
nameThe name of the parameter.
refA reference to the parameter.

Definition at line 398 of file widgets.cpp.

◆ setParameter() [2/3]

void Widgets::Panel::setParameter(const QString & var_name,
int value 
)
protected

Set the value of int parameter within the Workspace and GUI.

Parameters
nameThe name of the parameter.
refA reference to the parameter.

Definition at line 412 of file widgets.cpp.

◆ setParameter() [3/3]

void Widgets::Panel::setParameter(const QString & var_name,
uint64_t value 
)
protected

Set the value of unsigned int parameter within the Workspace and GUI.

Parameters
nameThe name of the parameter.
refA reference to the parameter.

Definition at line 426 of file widgets.cpp.

◆ signal_state_change

void Widgets::Panel::signal_state_change(RT::State::state_t state)
signal

Signal used for changing the state of the internal component.

◆ update_state

void Widgets::Panel::update_state(RT::State::state_t flag)
virtualslot

Callback function that is called when the system state changes.

Parameters
flagThe kind of update to signal.

Definition at line 275 of file widgets.cpp.

Here is the call graph for this function:

The documentation for this class was generated from the following files: