#include <TdkInterfaceController.h>
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 TdkInterfaceController * | DefaultObject () |
Method used by Abstract Factory. Returns a default object. |
All common dialog object operation is implemented by this interface.
TODO: 1)
TdkInterfaceController::TdkInterfaceController | ( | TdkDlg * | pDlg | ) | [inline] |
Constructor.
pDlg | Pointer to a dialog. |
virtual TdkInterfaceController::~TdkInterfaceController | ( | ) | [inline, virtual] |
Virtual destructor.
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.
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.
componentName | Dialog component name. | |
iconFileName | Icon file name. |
virtual void TdkInterfaceController::clear | ( | const string & | componentName | ) | [pure virtual] |
Clears a dialog object contents.
componentName | Dialog component name. |
virtual string TdkInterfaceController::getText | ( | const string & | componentName | ) | [pure virtual] |
Retrieves the text showed in a dialog object.
componentName | Dialog component name. |
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.
componentName | Dialog component name. | |
item | Item position in list. |
virtual string TdkInterfaceController::getCurrentText | ( | const string & | componentName | ) | [pure virtual] |
Retrieves the current text showed in a list dialog object.
componentName | Dialog component name. |
virtual int TdkInterfaceController::getCurrentItem | ( | const string & | componentName | ) | [pure virtual] |
Retrieves the position of current text showed in a list dialog object.
componentName | Dialog component name. |
virtual void TdkInterfaceController::setCurrentItem | ( | const string & | componentName, | |
const int & | item | |||
) | [pure virtual] |
Sets current element to be shown on list dialog object.
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.
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.
componentName | Dialog component name. | |
txVec | Vector with a set of strings. |
virtual void TdkInterfaceController::showWindow | ( | const bool | isDialog | ) | [pure virtual] |
Shows the dialog.
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.
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. |
virtual void TdkInterfaceController::insertItem | ( | const string & | componentName, | |
const string & | item | |||
) | [pure virtual] |
Adds an element to a list object.
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.
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.
componentName | Dialog component name. |
virtual int TdkInterfaceController::getNumItems | ( | const string & | componentName | ) | [pure virtual] |
Retrieves the number of elements in a dialog component. Useful for list components.
componentName | Dialog component name. |
virtual void TdkInterfaceController::setSelected | ( | const string & | componentName, | |
const int & | itemIdx, | |||
const bool & | state | |||
) | [pure virtual] |
Selects an item from a list.
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.
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.
componentName | Dialog component name. |
virtual vector<string> TdkInterfaceController::getListItems | ( | const string & | componentName | ) | [pure virtual] |
Retrieves all elements in a list object.
componentName | Dialog component name. |
virtual void TdkInterfaceController::removeFromList | ( | const string & | componentName, | |
const int & | elementIdx | |||
) | [pure virtual] |
Removes element identified by elementIdx parameter.
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.
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.
src | String to be broken. | |
separator | Tokens separator. |
Pointer to a dialog.