Aquila  2.0 prealpha
Cognitive Robotics Architecture
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Slots | Signals | Public Member Functions | Public Attributes | Protected Slots | Protected Member Functions | Protected Attributes | List of all members
GUI Class Reference

#include <gui.h>

Inheritance diagram for GUI:
Blank ESN MTRNN SOM Tracker Xxxxxxxxx

Public Slots

void setGpu (int deviceID)
 Sets GPU based on user selection.
 
void setGpuList (QStringList gpuList)
 Sets GPU list and subsequently calls a function that constructs device sub-menu.
 

Signals

void tabSelected ()
 
void tabDeselected ()
 
void stateReceived (int newState)
 
void abortRequested ()
 

Public Member Functions

 GUI (MainWindow *pMainWindow, QString binaryName, QString moduleTitle, QString serverName, int instanceID, int tabID=-1)
 Constructor.
 
 ~GUI ()
 Destructor.
 

Public Attributes

QString binary
 
QString title
 
QString server
 
int instance
 

Protected Slots

virtual void about ()
 Shows message box with the information about module.
 
virtual void show ()
 Shows menu.
 
virtual void checkFocus (int tabID)
 Checks if the module tab is currently selected.
 
virtual void statusChanged (int newStatus)
 Updates module based on the new status.
 
virtual void createMenu ()
 Creates menu.
 
virtual void createFileMenu ()
 Creates file menu.
 
virtual void createEditMenu ()
 Creates edit menu.
 
virtual void createHelpMenu ()
 Creates help menu.
 
virtual void createModuleMenu ()
 Creates module menu.
 
virtual void createDeviceSubmenu ()
 Creates device sub-menu.
 
virtual void updateGUI ()
 Updates graphical user interface.
 
virtual void updateProgressBarClients ()
 Updates progress bar clients.
 
virtual void updateProgressBar (int currentProgress)
 Updates progress bar with the new value.
 

Protected Member Functions

void createStartAction (QMenu *menu, QString actionName, QString statusTip, QString shortcut)
 
void createStopAction (QMenu *menu, QString actionName, QString statusTip, QString shortcut)
 

Protected Attributes

MainWindowmainWindow
 
SettingssettingsBase
 
InterfaceinterfaceBase
 
QSignalMapper * deviceSignalMapper
 
QMenu * fileMenu
 
QMenu * editMenu
 
QMenu * helpMenu
 
QMenu * deviceSubMenu
 
QMenu * moduleMenu
 
QAction * startAction
 
QAction * stopAction
 
QAction * settingsAct
 
QAction * deviceAct [MAX_GPU_DEVICES]
 
QAction * abortAct
 
QAction * quitAct
 
QAction * aboutAct [2]
 
QString tag
 
int progress
 
int status
 
bool selected
 
bool running
 
bool remoteMode
 
bool useModuleMenu
 
bool moduleConnected
 

Detailed Description

Base class for graphical user interfaces

Constructor & Destructor Documentation

GUI::GUI ( MainWindow pMainWindow,
QString  binaryName,
QString  moduleTitle,
QString  serverName,
int  instanceID,
int  tabID = -1 
)

Constructor.

Parameters
[in]pMainWindow- pointer to MainWindow
[in]binaryName- name of module executable
[in]moduleTitle- title of this module
[in]server- server where the module runs
[in]instanceID- module identification number
[in]tabID- module tab index
GUI::~GUI ( )

Destructor.

Member Function Documentation

void GUI::abortRequested ( )
signal
void GUI::about ( )
protectedvirtualslot

Shows message box with the information about module.

Note
This is a virtual function that can be overridden.
void GUI::checkFocus ( int  tabID)
protectedvirtualslot

Checks if the module tab is currently selected.

Note
This function emits signals that broadcast if module is selected or not.
Parameters
[in]tabID- module tab identification number
void GUI::createDeviceSubmenu ( )
protectedvirtualslot

Creates device sub-menu.

Note
This is a virtual function that can be overridden.
void GUI::createEditMenu ( )
protectedvirtualslot

Creates edit menu.

Note
This is a virtual function that can be overridden.
void GUI::createFileMenu ( )
protectedvirtualslot

Creates file menu.

Note
This is a virtual function that can be overridden.

Reimplemented in MTRNN, and SOM.

void GUI::createHelpMenu ( )
protectedvirtualslot

Creates help menu.

Note
This is a virtual function that can be overridden.
void GUI::createMenu ( )
protectedvirtualslot

Creates menu.

Note
This is a virtual function that can be overridden.
void GUI::createModuleMenu ( )
protectedvirtualslot

Creates module menu.

Note
This is a virtual function that can be overridden.
void GUI::createStartAction ( QMenu *  menu,
QString  actionName,
QString  statusTip,
QString  shortcut 
)
protected
void GUI::createStopAction ( QMenu *  menu,
QString  actionName,
QString  statusTip,
QString  shortcut 
)
protected
void GUI::setGpu ( int  deviceID)
slot

Sets GPU based on user selection.

Parameters
[in]deviceID- GPU device identification number
void GUI::setGpuList ( QStringList  gpuList)
slot

Sets GPU list and subsequently calls a function that constructs device sub-menu.

Parameters
[in]list- list of GPU devices present on server running module
Note
This function is called when interface receives a list of GPU devices from module.
void GUI::show ( )
protectedvirtualslot

Shows menu.

void GUI::stateReceived ( int  newState)
signal
void GUI::statusChanged ( int  newStatus)
protectedvirtualslot

Updates module based on the new status.

Parameters
[in]newStatus- new status received from module
void GUI::tabDeselected ( )
signal
void GUI::tabSelected ( )
signal
void GUI::updateGUI ( )
protectedvirtualslot

Updates graphical user interface.

Note
This is a virtual function that can be overridden.
void GUI::updateProgressBar ( int  currentProgress)
protectedvirtualslot

Updates progress bar with the new value.

Parameters
[in]currentProgress- current progress
void GUI::updateProgressBarClients ( )
protectedvirtualslot

Updates progress bar clients.

Note
This function is used on Windows 7 where a taskbar icon is used to show the overall
progress of all modules currently running. Therefore it is necessary to keep track of connected clients.

Member Data Documentation

QAction* GUI::abortAct
protected
QAction* GUI::aboutAct[2]
protected
QString GUI::binary
QAction* GUI::deviceAct[MAX_GPU_DEVICES]
protected
QSignalMapper* GUI::deviceSignalMapper
protected
QMenu* GUI::deviceSubMenu
protected
QMenu* GUI::editMenu
protected
QMenu* GUI::fileMenu
protected
QMenu* GUI::helpMenu
protected
int GUI::instance
Interface* GUI::interfaceBase
protected
MainWindow* GUI::mainWindow
protected
bool GUI::moduleConnected
protected
QMenu* GUI::moduleMenu
protected
int GUI::progress
protected
QAction* GUI::quitAct
protected
bool GUI::remoteMode
protected
bool GUI::running
protected
bool GUI::selected
protected
QString GUI::server
QAction* GUI::settingsAct
protected
Settings* GUI::settingsBase
protected
QAction* GUI::startAction
protected
int GUI::status
protected
QAction* GUI::stopAction
protected
QString GUI::tag
protected
QString GUI::title
bool GUI::useModuleMenu
protected

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