Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

TxqActionItem Class Reference

TxqActionItem is a class to add a QComboBox widget to a QTableItem in order to present a list of actions to the user. More...

#include <TxqActionItem.h>

Inheritance diagram for TxqActionItem::

QObject QTableItem List of all members.

Public Slots

void activated (int action)
 Slot used to signal that the item has changed. More...


Signals

void actionChanged (QString)
 Signal used to signify that an action item has changed. More...


Public Methods

 TxqActionItem (QTable *t, EditType e, const QString s)
 Construct a TxqActionItem given the QTable and EditTye parameters. More...

QWidgetcreateEditor () const
 Create the action item widget. More...

void setContentFromEditor (QWidget *w)
 Set the content from the editor widget. More...

void setText (const QString &newText)
 Set the new text. More...

void setActionMap (const TXSTD::map< int, QString > &m, int action=0)
 Set the action map. More...

TXSTD::map<int, QString> getActionMap ()
 Get the action map. More...

void setActionItem (int action)
 Set the desired action item. More...

void setActionItem (QString action)
 Set the desired action item. More...

int getActionItem ()
 Get the current action item. More...

QString getActionItemName ()
 Get the current aciton item name. More...


Protected Attributes

TXSTD::map<int , QString> actionMap
 The map of action items. More...


Private Attributes

QComboBox* comboBox
 The editor widget. More...


Detailed Description

TxqActionItem is a class to add a QComboBox widget to a QTableItem in order to present a list of actions to the user.

Definition at line 32 of file TxqActionItem.h.


Constructor & Destructor Documentation

TxqActionItem::TxqActionItem ( QTable * t,
EditType e,
const QString s )
 

Construct a TxqActionItem given the QTable and EditTye parameters.

Parameters:
t   the QTable pointer that this item belong to
e   the type of edit for this item
s   the QString startup text for the editor


Member Function Documentation

void TxqActionItem::actionChanged ( QString ) [signal]
 

Signal used to signify that an action item has changed.

void TxqActionItem::activated ( int action ) [slot]
 

Slot used to signal that the item has changed.

Parameters:
action   the new action number

QWidget * TxqActionItem::createEditor ( ) const
 

Create the action item widget.

This widget is a QComboxBox and will preset to the user different options for action.

int TxqActionItem::getActionItem ( ) [inline]
 

Get the current action item.

Definition at line 93 of file TxqActionItem.h.

QString TxqActionItem::getActionItemName ( ) [inline]
 

Get the current aciton item name.

Definition at line 98 of file TxqActionItem.h.

TXSTD::map< int, QString > TxqActionItem::getActionMap ( ) [inline]
 

Get the action map.

Returns:
the action map

Definition at line 76 of file TxqActionItem.h.

void TxqActionItem::setActionItem ( QString action )
 

Set the desired action item.

Parameters:
action   the QStringaction item

void TxqActionItem::setActionItem ( int action )
 

Set the desired action item.

Parameters:
action   the integer action item

void TxqActionItem::setActionMap ( const TXSTD::map< int, QString > & m,
int action = 0 ) [inline]
 

Set the action map.

Parameters:
m   the map to set actions from.

Definition at line 67 of file TxqActionItem.h.

void TxqActionItem::setContentFromEditor ( QWidget * w )
 

Set the content from the editor widget.

Parameters:
w   the editor widget

void TxqActionItem::setText ( const QString & newText )
 

Set the new text.

Parameters:
newText   the new text

Referenced by setActionMap().


Member Data Documentation

TXSTD::map< int, QString > TxqActionItem::actionMap [protected]
 

The map of action items.

Definition at line 119 of file TxqActionItem.h.

QComboBox * TxqActionItem::comboBox [private]
 

The editor widget.

Definition at line 126 of file TxqActionItem.h.


The documentation for this class was generated from the following file: Copyright Tech-X Corporation, all rights reserved.