TdkInterfaceController Class Reference

Defines the TdkInterfaceController class. This class defines an abstract interface controller. More...

#include <TdkInterfaceController.h>

List of all members.

Behavioral Methods

Methods related to dialog behavior.

TdkDlg_pDlg
 Pointer to a dialog.
virtual void setEnabled (const string &componentName, bool state, const string &iconFileName=string())=0
 Sets a dialog object enable.
virtual void setIconSet (const string &componentName, const string &iconFileName)=0
 Sets a dialog object icon.
virtual void clear (const string &componentName)=0
 Clears a dialog object contents.
virtual string getText (const string &componentName)=0
 Retrieves the text showed in a dialog object.
virtual string getText (const string &componentName, const int &item)=0
 Retrieves the text showed in a dialog object in an defined position. This is useful for list components.
virtual string getCurrentText (const string &componentName)=0
 Retrieves the current text showed in a list dialog object.
virtual int getCurrentItem (const string &componentName)=0
 Retrieves the position of current text showed in a list dialog object.
virtual void setCurrentItem (const string &componentName, const int &item)=0
 Sets current element to be shown on list dialog object.
virtual void setText (const string &componentName, const string &text)=0
 Sets current text to be shown on dialog object.
virtual void fillList (const string &componentName, const vector< string > &txVec)=0
 Fills a list with a set of strings.
virtual void showWindow (const bool isDialog)=0
 Shows the dialog.
virtual void closeWindow ()=0
 Close the dialog.
virtual int showMessage (const TdkDlg::TdkErrorMsgTypes type, const string &msg, const string &s=string(), const string &s1=string(), const string &s2=string())=0
 Shows application messages.
virtual void insertItem (const string &componentName, const string &item)=0
 Adds an element to a list object.
virtual void setChecked (const string &componentName, bool state)=0
 Sets a dialog object checked.
virtual bool isChecked (const string &componentName)=0
 Verifies if the dialog object is checked.
virtual int getNumItems (const string &componentName)=0
 Retrieves the number of elements in a dialog component. Useful for list components.
virtual void setSelected (const string &componentName, const int &itemIdx, const bool &state)=0
 Selects an item from a list.
virtual void showProgress (const string &caption, const string &msg)
 Shows a progress bar dialog.
virtual void hideProgress ()
 Hides the progress bar dialog.
virtual vector< string > getSelectedItems (const string &componentName)=0
 Retrieves all selected elements in a list object.
virtual vector< string > getListItems (const string &componentName)=0
 Retrieves all elements in a list object.
virtual void removeFromList (const string &componentName, const int &elementIdx)=0
 Removes element identified by elementIdx parameter.
virtual int expressionMatch (const string &exp, const string &src)=0
 Matching regular expressions.
virtual vector< string > stringTokenizer (const string &src, const string &separator)=0
 Separates a string using separator parameter.

Constructor and Destructor Methods

Methods related to instantiation and destruction.

 TdkInterfaceController (TdkDlg *pDlg)
 Constructor.
virtual ~TdkInterfaceController ()
 Virtual destructor.
static TdkInterfaceControllerDefaultObject ()
 Method used by Abstract Factory. Returns a default object.


Detailed Description

Defines the TdkInterfaceController class. This class defines an abstract interface controller.

All common dialog object operation is implemented by this interface.

TODO: 1)

See also:
TdkDlg


Constructor & Destructor Documentation

TdkInterfaceController::TdkInterfaceController ( TdkDlg pDlg  )  [inline]

Constructor.

Parameters:
pDlg Pointer to a dialog.

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

Virtual destructor.


Member Function Documentation

static TdkInterfaceController* TdkInterfaceController::DefaultObject (  )  [inline, static]

Method used by Abstract Factory. Returns a default object.

virtual void TdkInterfaceController::setEnabled ( const string &  componentName,
bool  state,
const string &  iconFileName = string() 
) [pure virtual]

Sets a dialog object enable.

Parameters:
componentName Dialog component name.
state Enables state. True - enable, False - disable.
iconFileName Icon file name. In the case of icons that change by enabling.

virtual void TdkInterfaceController::setIconSet ( const string &  componentName,
const string &  iconFileName 
) [pure virtual]

Sets a dialog object icon.

Parameters:
componentName Dialog component name.
iconFileName Icon file name.

virtual void TdkInterfaceController::clear ( const string &  componentName  )  [pure virtual]

Clears a dialog object contents.

Parameters:
componentName Dialog component name.

virtual string TdkInterfaceController::getText ( const string &  componentName  )  [pure virtual]

Retrieves the text showed in a dialog object.

Parameters:
componentName Dialog component name.
Returns:
Text showed in component defined by componentName parameter.

virtual string TdkInterfaceController::getText ( const string &  componentName,
const int &  item 
) [pure virtual]

Retrieves the text showed in a dialog object in an defined position. This is useful for list components.

Parameters:
componentName Dialog component name.
item Item position in list.
Returns:
Text showed in component defined by componentName parameter in position defined by item parameter.

virtual string TdkInterfaceController::getCurrentText ( const string &  componentName  )  [pure virtual]

Retrieves the current text showed in a list dialog object.

Parameters:
componentName Dialog component name.
Returns:
Current text showed in component defined by componentName parameter.

virtual int TdkInterfaceController::getCurrentItem ( const string &  componentName  )  [pure virtual]

Retrieves the position of current text showed in a list dialog object.

Parameters:
componentName Dialog component name.
Returns:
Position of current text showed in component defined by componentName parameter.

virtual void TdkInterfaceController::setCurrentItem ( const string &  componentName,
const int &  item 
) [pure virtual]

Sets current element to be shown on list dialog object.

Parameters:
componentName Dialog component name.
item Item position in list object.

virtual void TdkInterfaceController::setText ( const string &  componentName,
const string &  text 
) [pure virtual]

Sets current text to be shown on dialog object.

Parameters:
componentName Dialog component name.
text Text to be shown.

virtual void TdkInterfaceController::fillList ( const string &  componentName,
const vector< string > &  txVec 
) [pure virtual]

Fills a list with a set of strings.

Parameters:
componentName Dialog component name.
txVec Vector with a set of strings.

virtual void TdkInterfaceController::showWindow ( const bool  isDialog  )  [pure virtual]

Shows the dialog.

Parameters:
isDialog True if is a dialog to be shown, false otherwise.

virtual void TdkInterfaceController::closeWindow (  )  [pure virtual]

Close the dialog.

virtual int TdkInterfaceController::showMessage ( const TdkDlg::TdkErrorMsgTypes  type,
const string &  msg,
const string &  s = string(),
const string &  s1 = string(),
const string &  s2 = string() 
) [pure virtual]

Shows application messages.

Parameters:
type Type of message: error, warning, etc...
msg Message to be shown.
s In case of question messages, this is string is showed on ok button.
s1 In case of question messages, this is string is showed on cancel button.
s2 In case of question messages, this is string is showed on help button.
Returns:
If is a question dialog, returns the user response: 0 - Ok, 1 - Cancel.

virtual void TdkInterfaceController::insertItem ( const string &  componentName,
const string &  item 
) [pure virtual]

Adds an element to a list object.

Parameters:
componentName Dialog component name.
item Text to be added.

virtual void TdkInterfaceController::setChecked ( const string &  componentName,
bool  state 
) [pure virtual]

Sets a dialog object checked.

Parameters:
componentName Dialog component name.
state True enables checked, false disables checked.

virtual bool TdkInterfaceController::isChecked ( const string &  componentName  )  [pure virtual]

Verifies if the dialog object is checked.

Parameters:
componentName Dialog component name.
Returns:
True if element is checked, false otherwise.

virtual int TdkInterfaceController::getNumItems ( const string &  componentName  )  [pure virtual]

Retrieves the number of elements in a dialog component. Useful for list components.

Parameters:
componentName Dialog component name.
Returns:
Number of elements in the list.

virtual void TdkInterfaceController::setSelected ( const string &  componentName,
const int &  itemIdx,
const bool &  state 
) [pure virtual]

Selects an item from a list.

Parameters:
componentName List component name.
itemIdx Item position in list.
state State of element: true - select, false - unselected.

void TdkInterfaceController::showProgress ( const string &  caption,
const string &  msg 
) [inline, virtual]

Shows a progress bar dialog.

Parameters:
caption Text to be shown in progress bar dialog Title.
msg Text to be shown in progress bar dialog.

void TdkInterfaceController::hideProgress (  )  [inline, virtual]

Hides the progress bar dialog.

virtual vector<string> TdkInterfaceController::getSelectedItems ( const string &  componentName  )  [pure virtual]

Retrieves all selected elements in a list object.

Parameters:
componentName Dialog component name.
Returns:
Vector with the set of selected elements.

virtual vector<string> TdkInterfaceController::getListItems ( const string &  componentName  )  [pure virtual]

Retrieves all elements in a list object.

Parameters:
componentName Dialog component name.
Returns:
Vector with the set of all elements.

virtual void TdkInterfaceController::removeFromList ( const string &  componentName,
const int &  elementIdx 
) [pure virtual]

Removes element identified by elementIdx parameter.

Parameters:
componentName Dialog component name.
elementIdx Identifier of element to be removed in list object.

virtual int TdkInterfaceController::expressionMatch ( const string &  exp,
const string &  src 
) [pure virtual]

Matching regular expressions.

Parameters:
exp Regular expression.
src String to be matched.

virtual vector<string> TdkInterfaceController::stringTokenizer ( const string &  src,
const string &  separator 
) [pure virtual]

Separates a string using separator parameter.

Parameters:
src String to be broken.
separator Tokens separator.


Member Data Documentation

TdkDlg* TdkInterfaceController::_pDlg

Pointer to a dialog.


The documentation for this class was generated from the following file:
Generated on Fri Jun 15 16:54:41 2007 for TDK by  doxygen 1.5.2