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

PG_PropertyField_Checkbox< B > Class Template Reference

#include <pgpropertyfield_checkbox.h>

Inheritance diagram for PG_PropertyField_Checkbox< B >:

Inheritance graph
[legend]
List of all members.

Public Types

typedef PG_Signal2< PG_PropertyField_Checkbox *,
B > 
CheckboxPropertySignal

Public Member Functions

 PG_PropertyField_Checkbox (PG_PropertyEditor *propertyEditor, const std::string &name, B *b, bool inverted=false)
 Creates a PG_PropertyField_Checkbox.
 PG_PropertyField_Checkbox (PG_PropertyEditor *propertyEditor, const std::string &name, const B &b, bool inverted=false)
 Creates a PG_PropertyField_Checkbox.
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).

Public Attributes

CheckboxPropertySignal sigValueChanged
CheckboxPropertySignal sigValueApplied

Detailed Description

template<typename B>
class PG_PropertyField_Checkbox< B >

Author:
Martin Bickel
Checkbox for a PG_PropertyEditor

Definition at line 43 of file pgpropertyfield_checkbox.h.


Member Typedef Documentation

template<typename B>
typedef PG_Signal2<PG_PropertyField_Checkbox*, B> PG_PropertyField_Checkbox< B >::CheckboxPropertySignal
 

Definition at line 54 of file pgpropertyfield_checkbox.h.


Constructor & Destructor Documentation

template<typename B>
PG_PropertyField_Checkbox< B >::PG_PropertyField_Checkbox PG_PropertyEditor propertyEditor,
const std::string &  name,
B *  b,
bool  inverted = false
[inline]
 

Creates a PG_PropertyField_Checkbox.

Parameters:
propertyEditor The PG_PropertyEditor for which the PropertyField shall be registered for
name The label shown for the PropertyField
b The variable that is edited. Make sure the variable exists for the whole lifetime of the PG_PropertyEditor
inverted If set the checkbox will be ticked on false and not ticked on true

Definition at line 64 of file pgpropertyfield_checkbox.h.

References PG_NULLSTR, PG_PropertyEditor::RegisterProperty(), PG_PropertyField_Checkbox< B >::Reload(), and PG_RadioButton::sigClick.

template<typename B>
PG_PropertyField_Checkbox< B >::PG_PropertyField_Checkbox PG_PropertyEditor propertyEditor,
const std::string &  name,
const B &  b,
bool  inverted = false
[inline]
 

Creates a PG_PropertyField_Checkbox.

Parameters:
propertyEditor The PG_PropertyEditor for which the PropertyField shall be registered for
name The label shown for the PropertyField
b The initial value.
inverted If set the checkbox will be ticked on false and not ticked on true

Definition at line 77 of file pgpropertyfield_checkbox.h.

References PG_NULLSTR, PG_PropertyEditor::RegisterProperty(), PG_RadioButton::SetPressed(), PG_CheckButton::SetUnpressed(), and PG_RadioButton::sigClick.


Member Function Documentation

template<typename B>
bool PG_PropertyField_Checkbox< B >::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 91 of file pgpropertyfield_checkbox.h.

References PG_RadioButton::GetPressed(), and PG_PropertyField_Checkbox< B >::sigValueApplied.

template<typename B>
void PG_PropertyField_Checkbox< B >::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 98 of file pgpropertyfield_checkbox.h.

References PG_RadioButton::SetPressed(), and PG_CheckButton::SetUnpressed().

Referenced by PG_PropertyField_Checkbox< B >::PG_PropertyField_Checkbox().

template<typename B>
bool PG_PropertyField_Checkbox< B >::Valid  )  [inline, virtual]
 

checks if the entered value is valid

Implements PG_PropertyEditor::PG_PropertyEditorField.

Definition at line 88 of file pgpropertyfield_checkbox.h.


Member Data Documentation

template<typename B>
CheckboxPropertySignal PG_PropertyField_Checkbox< B >::sigValueApplied
 

Definition at line 56 of file pgpropertyfield_checkbox.h.

Referenced by PG_PropertyField_Checkbox< B >::Apply().

template<typename B>
CheckboxPropertySignal PG_PropertyField_Checkbox< B >::sigValueChanged
 

Definition at line 55 of file pgpropertyfield_checkbox.h.


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