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

TxqTableItem Class Reference

TxqTableItem is a base class to add a QTableItem for the attribute name and a TxqActionItem for the Action column. More...

#include <TxqTableItem.h>

Inheritance diagram for TxqTableItem::

QObject QTableItem TxqOptionTableItem TxqOptVecTableItem TxqParamTableItem TxqPrmVecTableItem TxqStringTableItem TxqOptionVecTableItem TxqParamVecTableItem List of all members.

Public Types

typedef void (* TxqActionFcnPtr )(TxqTableItem *)
 The global typedef for static functions to insert into a name, pointer map such that functions can be invoked dynamically. More...


Public Methods

 TxqTableItem (QTable *t, EditType e, TxAttributeSet *a, const QString s, const QVariant &v, int r)
 Construct a TxqTableItem given the QTable and EditTye parameters. More...

virtual ~TxqTableItem ()
 The destructor. More...

virtual void setAttribute (TxAttributeSet *a)
 Set the input attribute pointer. More...

virtual void setAttribValue ()
 Public interface to set the attribute value from the class data members. More...

int getRow () const
 Public interface to get the row number. More...

virtual int rtti () const
 Return a run time type number different than QTableItem. More...

virtual void addActionItem ()
 Add the action item. More...


Static Public Attributes

int RTTI
 The public RTTI number. More...


Protected Slots

virtual void sectionClicked (int section)
 sectionClicked slot open the section. More...

void doubleClicked (int row, int col, int button, const QPoint &mousePos)
 Slot to process a doubleClick received on the QTable. More...

void actionChanged (QString action)
 Slot to signify a new action item. More...


Protected Methods

virtual void setAttribName (const QString nm)
 Sets the attribute name. More...

virtual TXSTD::string getAttribName ()
 Returns the attribute name. More...

virtual void addNameItem ()
 Add the attribute name item. More...

virtual void createActionMaps ()
 Create action maps. More...

virtual int getVecSize ()
 Get the vector size, since the base class does not use vectors, this returns 0. More...

virtual bool checkLabel (int section)
 Check the label of the header. More...

virtual void addSubItem (int index, int row)
 Add sub item will create a vector sub-item. More...

virtual bool editAction (int row)
 The protected edit function, invoked by the static private editAction() method. More...

virtual bool resetAction (int row)
 The protected reset function, invoked by the static private resetAction() method. More...

virtual bool deleteAction (int row)
 The protected delete function, invoked by the static private deleteAction() method. More...

virtual bool hideAction (int row)
 The protected hide function, invoked by the static private hideAction() method. More...

virtual bool showAction (int row)
 The protected show function, invoked by the static private showAction() method. More...


Protected Attributes

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

TXSTD::map<QString, TxqActionFcnPtractionFcnMap
 The map of action function pointers. More...

QVariant attribValue
 The attribute value. More...

TxAttributeSetattrib
 The attribute set pointer. More...

bool isOpen
 Bool for determining the state of the section. More...

TxqActionItemactionItem
 The Action item. More...


Static Private Methods

void editAction (TxqTableItem *)
 Static action method to edit the section. More...

void resetAction (TxqTableItem *)
 Static action method to reset the section. More...

void deleteAction (TxqTableItem *)
 Static action method to delete the section. More...

void hideAction (TxqTableItem *)
 Static action method to hide the section. More...

void showAction (TxqTableItem *)
 Static action method to show the section. More...


Private Attributes

QString attribName
 The attribute name. More...

QVariant resetValue
 The reset value. More...

int row
 The row number of this item. More...

bool subItemsCreated
 The bool to determine if sub items are created. More...


Detailed Description

TxqTableItem is a base class to add a QTableItem for the attribute name and a TxqActionItem for the Action column.

Definition at line 35 of file TxqTableItem.h.


Member Typedef Documentation

typedef void(* TxqTableItem::TxqActionFcnPtr)(TxqTableItem *)
 

The global typedef for static functions to insert into a name, pointer map such that functions can be invoked dynamically.

This typedef assigns TxqActionFcnPtr as a function pointer which requires no arguements and returns void.


Constructor & Destructor Documentation

TxqTableItem::TxqTableItem ( QTable * t,
EditType e,
TxAttributeSet * a,
const QString s,
const QVariant & v,
int r )
 

Construct a TxqTableItem 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 attribute pointer
s   the attribute name
v   the attribute value
r   the row number for this item

TxqTableItem::~TxqTableItem ( ) [inline, virtual]
 

The destructor.

Definition at line 65 of file TxqTableItem.h.


Member Function Documentation

void TxqTableItem::actionChanged ( QString action ) [protected, slot]
 

Slot to signify a new action item.

void TxqTableItem::addActionItem ( ) [virtual]
 

Add the action item.

void TxqTableItem::addNameItem ( ) [protected, virtual]
 

Add the attribute name item.

void TxqTableItem::addSubItem ( int index,
int row ) [inline, protected, virtual]
 

Add sub item will create a vector sub-item.

This base class method will do nothing.

Parameters:
index   the index number in the vector
row   the row number for the sub item.

Reimplemented in TxqOptVecTableItem, and TxqPrmVecTableItem.

Definition at line 147 of file TxqTableItem.h.

bool TxqTableItem::checkLabel ( int section ) [inline, protected, virtual]
 

Check the label of the header.

This base class method returns true for an error condition.

Parameters:
section   the section number clicked
Returns:
true if an error occurs in the label.

Reimplemented in TxqOptVecTableItem, and TxqPrmVecTableItem.

Definition at line 139 of file TxqTableItem.h.

void TxqTableItem::createActionMaps ( ) [protected, virtual]
 

Create action maps.

Reimplemented in TxqOptVecTableItem, and TxqPrmVecTableItem.

void TxqTableItem::deleteAction ( TxqTableItem * ) [static, private]
 

Static action method to delete the section.

bool TxqTableItem::deleteAction ( int row ) [protected, virtual]
 

The protected delete function, invoked by the static private deleteAction() method.

This method can be overloaded and is invoked when the user selects delete on the combo button.

Parameters:
row   the current row number
Returns:
a bool which can be used for status.

void TxqTableItem::doubleClicked ( int row,
int col,
int button,
const QPoint & mousePos ) [inline, protected, slot]
 

Slot to process a doubleClick received on the QTable.

Derived classes must connect to obtain this slot.

Parameters:
row   the row number of the click
col   the col number of the click
button   the button number of the click
mousePos   the mouse position for the click

Definition at line 245 of file TxqTableItem.h.

void TxqTableItem::editAction ( TxqTableItem * ) [static, private]
 

Static action method to edit the section.

bool TxqTableItem::editAction ( int row ) [protected, virtual]
 

The protected edit function, invoked by the static private editAction() method.

This method can be overloaded and is invoked when the user selects edit on the combo button.

Parameters:
row   the current row number
Returns:
a bool which can be used for status.

TXSTD::string TxqTableItem::getAttribName ( ) [inline, protected, virtual]
 

Returns the attribute name.

Returns:
the attribute name

Definition at line 114 of file TxqTableItem.h.

int TxqTableItem::getRow ( ) const [inline]
 

Public interface to get the row number.

Definition at line 84 of file TxqTableItem.h.

Referenced by doubleClicked().

int TxqTableItem::getVecSize ( ) [inline, protected, virtual]
 

Get the vector size, since the base class does not use vectors, this returns 0.

Reimplemented in TxqOptVecTableItem, and TxqPrmVecTableItem.

Definition at line 130 of file TxqTableItem.h.

void TxqTableItem::hideAction ( TxqTableItem * ) [static, private]
 

Static action method to hide the section.

bool TxqTableItem::hideAction ( int row ) [protected, virtual]
 

The protected hide function, invoked by the static private hideAction() method.

This method can be overloaded and is invoked when the user selects hide on the combo button.

Parameters:
row   the current row number
Returns:
a bool which can be used for status.

void TxqTableItem::resetAction ( TxqTableItem * ) [static, private]
 

Static action method to reset the section.

bool TxqTableItem::resetAction ( int row ) [protected, virtual]
 

The protected reset function, invoked by the static private resetAction() method.

This method can be overloaded and is invoked when the user selects reset on the combo button.

Parameters:
row   the current row number
Returns:
a bool which can be used for status.

int TxqTableItem::rtti ( ) const [inline, virtual]
 

Return a run time type number different than QTableItem.

Returns:
the rtt number

Definition at line 90 of file TxqTableItem.h.

void TxqTableItem::sectionClicked ( int section ) [protected, virtual, slot]
 

sectionClicked slot open the section.

Parameters:
section   the vertical section number that was clicked

Referenced by doubleClicked().

void TxqTableItem::setAttribName ( const QString nm ) [inline, protected, virtual]
 

Sets the attribute name.

Parameters:
nm   the QString name of this attribute set.

Definition at line 108 of file TxqTableItem.h.

void TxqTableItem::setAttribValue ( ) [inline, virtual]
 

Public interface to set the attribute value from the class data members.

The base class method does nothing.

Reimplemented in TxqOptionTableItem, TxqParamTableItem, and TxqStringTableItem.

Definition at line 79 of file TxqTableItem.h.

void TxqTableItem::setAttribute ( TxAttributeSet * a ) [inline, virtual]
 

Set the input attribute pointer.

Parameters:
a   the input TxAttributeSet pointer

Definition at line 71 of file TxqTableItem.h.

void TxqTableItem::showAction ( TxqTableItem * ) [static, private]
 

Static action method to show the section.

bool TxqTableItem::showAction ( int row ) [protected, virtual]
 

The protected show function, invoked by the static private showAction() method.

This method can be overloaded and is invoked when the user selects show on the combo button.

Parameters:
row   the current row number
Returns:
a bool which can be used for status.


Member Data Documentation

int TxqTableItem::RTTI [static]
 

The public RTTI number.

Definition at line 95 of file TxqTableItem.h.

TXSTD::map< QString, TxqActionFcnPtr > TxqTableItem::actionFcnMap [protected]
 

The map of action function pointers.

Definition at line 157 of file TxqTableItem.h.

TxqActionItem * TxqTableItem::actionItem [protected]
 

The Action item.

Definition at line 227 of file TxqTableItem.h.

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

The map of action items.

Definition at line 152 of file TxqTableItem.h.

TxAttributeSet * TxqTableItem::attrib [protected]
 

The attribute set pointer.

Definition at line 217 of file TxqTableItem.h.

QString TxqTableItem::attribName [private]
 

The attribute name.

Definition at line 285 of file TxqTableItem.h.

QVariant TxqTableItem::attribValue [protected]
 

The attribute value.

Definition at line 212 of file TxqTableItem.h.

bool TxqTableItem::isOpen [protected]
 

Bool for determining the state of the section.

Definition at line 222 of file TxqTableItem.h.

QVariant TxqTableItem::resetValue [private]
 

The reset value.

Definition at line 290 of file TxqTableItem.h.

int TxqTableItem::row [private]
 

The row number of this item.

Definition at line 295 of file TxqTableItem.h.

bool TxqTableItem::subItemsCreated [private]
 

The bool to determine if sub items are created.

Definition at line 300 of file TxqTableItem.h.


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