RTXI 2.4 The Real-Time eXperiment Interface Documentation |
#include <default_gui_model.h>
Data Structures | |
struct | param_t |
Public Types | |
enum | update_flags_t { INIT, MODIFY, PERIOD, PAUSE, UNPAUSE, EXIT } |
typedef Workspace::variable_t | variable_t |
Public Types inherited from RT::Thread | |
typedef unsigned long | Priority |
Public Types inherited from Settings::Object | |
typedef unsigned long | ID |
Public Slots | |
void | resizeMe () |
virtual void | exit (void) |
virtual void | refresh (void) |
virtual void | modify (void) |
virtual void | pause (bool) |
Public Member Functions | |
QGridLayout * | getLayout (void) |
DefaultGUIModel (std::string name, variable_t *variables, size_t size) | |
virtual | ~DefaultGUIModel (void) |
virtual void | update (update_flags_t flag) |
void | createGUI (DefaultGUIModel::variable_t *var, int size) |
Public Member Functions inherited from RT::Thread | |
Thread (Priority p=DefaultPriority) | |
virtual | ~Thread (void) |
Priority | getPriority (void) const |
virtual void | execute (void) |
bool | getActive (void) const |
void | setActive (bool) |
Public Member Functions inherited from RT::List< T >::Node | |
Node (void) | |
virtual | ~Node (void) |
bool | operator== (const Node &x) const |
Public Member Functions inherited from Plugin::Object | |
Object (void) | |
virtual | ~Object (void) |
std::string | getLibrary (void) const |
void | unload (void) |
Public Member Functions inherited from Settings::Object | |
Object (void) | |
ID | getID (void) const |
State | save (void) const |
void | load (const State &) |
void | deferred (const State &) |
Public Member Functions inherited from Workspace::Instance | |
Instance (std::string name, variable_t *variables, size_t size) | |
virtual | ~Instance (void) |
size_t | getCount (IO::flags_t type) const |
std::string | getName (IO::flags_t type, size_t index) const |
std::string | getDescription (IO::flags_t type, size_t index) const |
double | getValue (IO::flags_t type, size_t index) const |
std::string | getValueString (IO::flags_t type, size_t index) const |
void | setValue (size_t index, double value) |
void | setComment (size_t index, std::string comment) |
Public Member Functions inherited from IO::Block | |
Block (std::string name, channel_t *channels, size_t size) | |
virtual | ~Block (void) |
std::string | getName (void) const |
double | input (size_t index) const |
double | output (size_t index) const |
Public Member Functions inherited from Event::Handler | |
Handler (void) | |
virtual | ~Handler (void) |
Data Fields | |
QPushButton * | pauseButton |
QPushButton * | modifyButton |
QPushButton * | unloadButton |
std::map< QString, param_t > | parameter |
QPalette | palette |
Static Public Attributes | |
static const IO::flags_t | INPUT = Workspace::INPUT |
static const IO::flags_t | OUTPUT = Workspace::OUTPUT |
static const IO::flags_t | PARAMETER = Workspace::PARAMETER |
static const IO::flags_t | STATE = Workspace::STATE |
static const IO::flags_t | EVENT = Workspace::EVENT |
static const IO::flags_t | COMMENT = Workspace::COMMENT |
static const IO::flags_t | DOUBLE = Workspace::COMMENT<<1 |
static const IO::flags_t | INTEGER = Workspace::COMMENT<<2 |
static const IO::flags_t | UINTEGER = Workspace::COMMENT<<3 |
Static Public Attributes inherited from RT::Thread | |
static const Priority | MinimumPriority = 0 |
static const Priority | MaximumPriority = 100 |
static const Priority | DefaultPriority = MaximumPriority/2 |
Static Public Attributes inherited from Settings::Object | |
const static ID | INVALID = 0 |
Protected Member Functions | |
QString | getParameter (const QString &name) |
void | setParameter (const QString &name, double value) |
void | setParameter (const QString &name, const QString value) |
QString | getComment (const QString &name) |
void | setComment (const QString &name, const QString comment) |
void | setState (const QString &name, double &ref) |
void | setEvent (const QString &name, double &ref) |
Protected Member Functions inherited from Workspace::Instance | |
double * | getData (IO::flags_t type, size_t index) |
void | setData (IO::flags_t type, size_t index, double *value) |
Protected Member Functions inherited from IO::Block | |
double & | output (size_t index) |
Protected Attributes | |
QGridLayout * | layout |
A class that provides a simplified C++ interface for model creation.
Definition at line 52 of file default_gui_model.h.
Structure used to pass variable information to the constructor
Definition at line 124 of file default_gui_model.h.
Flag passed to DefaultGUIModel::update to signal the kind of update.
Definition at line 131 of file default_gui_model.h.
DefaultGUIModel::DefaultGUIModel | ( | std::string | name, |
DefaultGUIModel::variable_t * | var, | ||
size_t | size | ||
) |
The constructor needs to be provided with a specification of the variables that will be embedded in the enclosed workspace.
Definition at line 61 of file default_gui_model.cpp.
| virtual |
void DefaultGUIModel::createGUI | ( | DefaultGUIModel::variable_t * | var, |
int | size | ||
) |
Function that builds the Qt GUI.
var | The structure defining the module's parameters, states, inputs, and outputs. |
size | The size of the structure vars. |
Definition at line 85 of file default_gui_model.cpp.
| virtualslot |
Function that allows the object to safely delete and unload itself.
Definition at line 213 of file default_gui_model.cpp.
| protected |
| inline |
Definition at line 64 of file default_gui_model.h.
| protected |
Get the value of the parameter in the GUI, and update the value within the Workspace.
name | The parameter's name. |
Definition at line 292 of file default_gui_model.cpp.
| virtualslot |
Function that calls DefaultGUIModel::update with the MODIFY flag
Definition at line 249 of file default_gui_model.cpp.
| virtualslot |
Function that pauses/unpauses the model.
Definition at line 346 of file default_gui_model.cpp.
| virtualslot |
Function that updates the GUI with new parameter values.
Definition at line 225 of file default_gui_model.cpp.
| slot |
Function that resizes widgets to properly fit layouts after overloading
Definition at line 208 of file default_gui_model.cpp.
| protected |
| protected |
Set the reference to this event within the Workspace via Workspace::setData().
name | The event name. |
ref | A reference to the event. |
Definition at line 336 of file default_gui_model.cpp.
| protected |
Set the value of this parameter within the Workspace and GUI.
name | The parameter's name. |
value | The parameter's new value. |
Definition at line 315 of file default_gui_model.cpp.
| protected |
Set the value of this parameter within the Workspace and GUI.
name | The name of the parameter. |
ref | A reference to the parameter. |
Definition at line 304 of file default_gui_model.cpp.
| protected |
Set the reference to this state within the Workspace via Workspace::setData().
name | The state's name. |
ref | A reference to the state. |
Definition at line 326 of file default_gui_model.cpp.
| virtual |
Callback function that is called when the system state changes.
flag | The kind of update to signal. |
Definition at line 204 of file default_gui_model.cpp.
| static |
Flag that marks a variable as a comment.
Definition at line 104 of file default_gui_model.h.
| static |
Flag that marks a parameter as being of double type.
Definition at line 108 of file default_gui_model.h.
| static |
Flag that marks a variable as an event.
Definition at line 98 of file default_gui_model.h.
| static |
Flag that marks a variable as an input.
Definition at line 74 of file default_gui_model.h.
| static |
Flag that marks a parameter as being of integer type.
Definition at line 112 of file default_gui_model.h.
| protected |
Definition at line 215 of file default_gui_model.h.
QPushButton* DefaultGUIModel::modifyButton |
Definition at line 172 of file default_gui_model.h.
| static |
Flag that marks a variable as an output.
Definition at line 80 of file default_gui_model.h.
QPalette DefaultGUIModel::palette |
Definition at line 184 of file default_gui_model.h.
| static |
Flag that marks a variable as a parameter.
Definition at line 86 of file default_gui_model.h.
std::map<QString,param_t> DefaultGUIModel::parameter |
Definition at line 183 of file default_gui_model.h.
QPushButton* DefaultGUIModel::pauseButton |
Definition at line 171 of file default_gui_model.h.
| static |
Flag that marks a variable as a state.
Definition at line 92 of file default_gui_model.h.
| static |
Flag that marks a parameter as being of unsigned integer type.
Definition at line 116 of file default_gui_model.h.
QPushButton* DefaultGUIModel::unloadButton |
Definition at line 173 of file default_gui_model.h.