AURobotServers  4
Public Slots | Signals | Public Member Functions | Public Attributes | Private Member Functions | List of all members
UTermEmulator Class Reference

#include <terminal_emulator.h>

Inheritance diagram for UTermEmulator:
Inheritance graph

Public Slots

void postTermMessage (QString message)
 add this string to text window More...
 
void sendCmd ()
 send command in command edit widget More...
 

Signals

void sendCmdSig (QString val)
 number of ifbuttons defined More...
 

Public Member Functions

void addIfButtons (QStandardItem *root)
 test if interface buttons match loaded modules More...
 
 UTermEmulator (QWidget *parent=0, UQStandardItem *varTree=0)
 

Public Attributes

QLineEdit * comm
 
QTextEdit * disp
 
QGridLayout * grid
 
QPushButton * ifButtons [10]
 lead lebels More...
 
int ifButtonsCnt
 one button per interface More...
 
QHBoxLayout * iflayout
 
QLabel * label
 grid for label and if buttons More...
 
QLabel * labelif
 

Private Member Functions

UQStandardItemgetQTItem (const char *name, QStandardItem *troot)
 test if interface connection status More...
 

Detailed Description

terminal emulator widget with command-line and reply text area

Constructor & Destructor Documentation

UTermEmulator::UTermEmulator ( QWidget *  parent = 0,
UQStandardItem varTree = 0 
)
explicit

Calculate widget size in pixels(relative to window size)

Create and set terminal messages widget (type QTextEdit)

Move the display cursor on the last line

Create and set terminal commands widget (type QTextEdit)

Connect returnPressed signal of comm widget with sendCmd slot

References comm, disp, grid, ifButtonsCnt, iflayout, label, labelif, and sendCmd().

Member Function Documentation

void UTermEmulator::addIfButtons ( QStandardItem *  root)

test if interface buttons match loaded modules

add interface button for each interface module loaded into qclient

Parameters
rootis root entry for global variable tree

References UVarPool::getLocalValueInt(), UVarPool::getLocalVariable(), UVarPool::getLocalVarIndex(), getQTItem(), UVariable::getString(), UVariable::getValueBool(), ifButtons, ifButtonsCnt, iflayout, UQStandardItem::pool, and UQStandardItem::var.

UQStandardItem * UTermEmulator::getQTItem ( const char *  name,
QStandardItem *  troot 
)
private

test if interface connection status

Set interface buttons to reflect alive status

Parameters
rootis root entry for global variable tree find an item in the global variable tree with this name
nameis the name to search for among the childs of this root (branch)
trootis the tree (or branch) to be searched
Returns
pointer to the extended version of the child item.

Referenced by addIfButtons().

void UTermEmulator::postTermMessage ( QString  message)
slot

add this string to text window

Update all widget sizes on a resizeEvent.

Post message on terminal

References disp.

void UTermEmulator::sendCmd ( )
slot

send command in command edit widget

Send command to server queue on Enter pressed in comm widget.

References comm, and sendCmdSig().

Referenced by UTermEmulator().

void UTermEmulator::sendCmdSig ( QString  val)
signal

number of ifbuttons defined

This string should be send to server queue

Referenced by sendCmd().

Member Data Documentation

QLineEdit* UTermEmulator::comm

Referenced by sendCmd(), and UTermEmulator().

QTextEdit* UTermEmulator::disp

Referenced by postTermMessage(), and UTermEmulator().

QGridLayout* UTermEmulator::grid

Referenced by UTermEmulator().

QPushButton* UTermEmulator::ifButtons[10]

lead lebels

Referenced by addIfButtons().

int UTermEmulator::ifButtonsCnt

one button per interface

Referenced by addIfButtons(), and UTermEmulator().

QHBoxLayout* UTermEmulator::iflayout

Referenced by addIfButtons(), and UTermEmulator().

QLabel* UTermEmulator::label

grid for label and if buttons

Referenced by UTermEmulator().

QLabel * UTermEmulator::labelif

Referenced by UTermEmulator().


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