Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

PG_PropertyField_String< StringType > Class Template Reference

#include <pgpropertyfield_string.h>

Inheritance diagram for PG_PropertyField_String< StringType >:

Inheritance graph
[legend]
List of all members.

Public Types

typedef PG_Signal2< PG_PropertyField_String *,
StringType > 
StringPropertySignal

Public Member Functions

 PG_PropertyField_String (PG_PropertyEditor *propertyEditor, const std::string &name, StringType *string)
 Creates a PG_PropertyField_String.
 PG_PropertyField_String (PG_PropertyEditor *propertyEditor, const std::string &name, const StringType &string)
 Creates a PG_PropertyField_String.
bool Valid ()
 checks if the entered value is valid
bool Apply ()
 Write the entered value back into the referenced variable (if it exists), provided the value is valid.
void Reload ()
 Reloads the entry field with the current value of the referenced variable (if it exists).
void SetPassHidden (const PG_Char &passchar)

Public Attributes

StringPropertySignal sigValueChanged
StringPropertySignal sigValueApplied

Protected Member Functions

bool EditEnd ()

template<class StringType = std::string>
class PG_PropertyField_String< StringType >


Member Typedef Documentation

template<class StringType = std::string>
typedef PG_Signal2<PG_PropertyField_String*, StringType> PG_PropertyField_String< StringType >::StringPropertySignal
 

Definition at line 52 of file pgpropertyfield_string.h.


Constructor & Destructor Documentation

template<class StringType = std::string>
PG_PropertyField_String< StringType >::PG_PropertyField_String PG_PropertyEditor propertyEditor,
const std::string &  name,
StringType *  string
[inline]
 

Creates a PG_PropertyField_String.

Parameters:
propertyEditor The PG_PropertyEditor for which the PropertyField shall be registered for
name The label shown for the PropertyField
string The variable that is edited. Make sure the variable exists for the whole lifetime of the PG_PropertyEditor

Definition at line 61 of file pgpropertyfield_string.h.

References PG_PropertyField_String< StringType >::Reload().

template<class StringType = std::string>
PG_PropertyField_String< StringType >::PG_PropertyField_String PG_PropertyEditor propertyEditor,
const std::string &  name,
const StringType &  string
[inline]
 

Creates a PG_PropertyField_String.

Parameters:
propertyEditor The PG_PropertyEditor for which the PropertyField shall be registered for
name The label shown for the PropertyField
string The initial value for the editor field

Definition at line 70 of file pgpropertyfield_string.h.

References PG_PropertyEditor_LineField::lineEdit, and PG_LineEdit::SetText().


Member Function Documentation

template<class StringType = std::string>
bool PG_PropertyField_String< StringType >::Apply  )  [inline, virtual]
 

Write the entered value back into the referenced variable (if it exists), provided the value is valid.

Returns:
false if the value is not valid

Implements PG_PropertyEditor::PG_PropertyEditorField.

Definition at line 77 of file pgpropertyfield_string.h.

References PG_Widget::GetText(), PG_PropertyEditor_LineField::lineEdit, and PG_PropertyField_String< StringType >::sigValueApplied.

template<class StringType = std::string>
bool PG_PropertyField_String< StringType >::EditEnd  )  [inline, protected, virtual]
 

Implements PG_PropertyEditor_LineField.

Definition at line 46 of file pgpropertyfield_string.h.

References PG_Widget::GetText(), PG_PropertyEditor_LineField::lineEdit, and PG_PropertyField_String< StringType >::sigValueChanged.

template<class StringType = std::string>
void PG_PropertyField_String< StringType >::Reload  )  [inline, virtual]
 

Reloads the entry field with the current value of the referenced variable (if it exists).

Implements PG_PropertyEditor::PG_PropertyEditorField.

Definition at line 85 of file pgpropertyfield_string.h.

References PG_PropertyEditor_LineField::lineEdit, and PG_LineEdit::SetText().

Referenced by PG_PropertyField_String< StringType >::PG_PropertyField_String().

template<class StringType = std::string>
void PG_PropertyField_String< StringType >::SetPassHidden const PG_Char &  passchar  )  [inline]
 

Definition at line 90 of file pgpropertyfield_string.h.

References PG_PropertyEditor_LineField::lineEdit, and PG_LineEdit::SetPassHidden().

template<class StringType = std::string>
bool PG_PropertyField_String< StringType >::Valid  )  [inline, virtual]
 

checks if the entered value is valid

Implements PG_PropertyEditor::PG_PropertyEditorField.

Definition at line 74 of file pgpropertyfield_string.h.


Member Data Documentation

template<class StringType = std::string>
StringPropertySignal PG_PropertyField_String< StringType >::sigValueApplied
 

Definition at line 54 of file pgpropertyfield_string.h.

Referenced by PG_PropertyField_String< StringType >::Apply().

template<class StringType = std::string>
StringPropertySignal PG_PropertyField_String< StringType >::sigValueChanged
 

Definition at line 53 of file pgpropertyfield_string.h.

Referenced by PG_PropertyField_String< StringType >::EditEnd().


The documentation for this class was generated from the following file:
Generated on Tue Jun 24 02:19:19 2008 for Advanced Strategic Command by  doxygen 1.4.2