STK++ 1.0
STK::PropertyDescriptor Class Reference

A descriptor for a property to be presented by a standard property sheet page (PropertySheetPage). More...

#include <STK_PropertyDescriptor.h>

Collaboration diagram for STK::PropertyDescriptor:

List of all members.

Public Member Functions

 PropertyDescriptor (String const &id, String const &displayName, String const &category=STRING_NA, String const &description=STRING_NA, String const &helpId=STRING_NA)
 constructor Creates a new property descriptor with the given id and display name
virtual ~PropertyDescriptor ()
 virtual destructor.
String const & category () const
 Returns the name of the category to which this property belongs.
String const & getDescription () const
 Returns a brief description of this property.
String const & getDisplayName () const
 Returns the display name for this property.
String const & getHelpContextId () const
 Returns the help context id for this property or NA if this property has no help context id.
String const & getId () const
 Returns the id for this property.
void setCategory (String const &category)
 Sets the category for this property descriptor.
void setDescription (String const &description)
 Sets the description for this property descriptor.
void setHelpContextIds (String const &contextId)
 Sets the help context id for this property descriptor.

Private Attributes

String id_
 The property id.
String display_
 The name to display for the property.
String category_
 Category name, or NA if none (the default).
String description_
 Description of the property, or NA if none (the default).
String helpId_
 The help context id, or NA if none (the default).

Detailed Description

A descriptor for a property to be presented by a standard property sheet page (PropertySheetPage).

The required attributes of property descriptors (id and display name) are passed to the constructor; the optional attributes can be configured using the various set methods (all have reasonable default values):

  • setDescription
  • setCategory
  • setHelpContextId
See also:
IPropertySource::getPropertyDescriptors

Definition at line 61 of file STK_PropertyDescriptor.h.


Constructor & Destructor Documentation

STK::PropertyDescriptor::PropertyDescriptor ( String const &  id,
String const &  displayName,
String const &  category = STRING_NA,
String const &  description = STRING_NA,
String const &  helpId = STRING_NA 
)

constructor Creates a new property descriptor with the given id and display name

Parameters:
idthe property id
displayNamea display name
categoryCategory of the property (optional)
descriptiona description of the property (optional)
helpIdId of the property (optional)

Definition at line 46 of file STK_PropertyDescriptor.cpp.

                                      : id_(id)
                                      , display_(displayName)
                                      , category_(category)
                                      , description_(description)
                                      , helpId_(helpId)
{ ;}
STK::PropertyDescriptor::~PropertyDescriptor ( ) [virtual]

virtual destructor.

Definition at line 59 of file STK_PropertyDescriptor.cpp.

{ ;}

Member Function Documentation

String const& STK::PropertyDescriptor::category ( ) const [inline]

Returns the name of the category to which this property belongs.

Properties belonging to the same category are grouped together visually. This localized string is shown to the user.

Returns:
the category name, or NA if the default category is to be used

Definition at line 119 of file STK_PropertyDescriptor.h.

References category_.

Referenced by setCategory().

    { return category_;}
String const& STK::PropertyDescriptor::getDescription ( ) const [inline]

Returns a brief description of this property.

This localized string is shown to the user when this property is selected.

Returns:
a brief description, or NA if none

Definition at line 128 of file STK_PropertyDescriptor.h.

References description_.

    { return description_;}
String const& STK::PropertyDescriptor::getDisplayName ( ) const [inline]

Returns the display name for this property.

This localized string is shown to the user as the name of this property.

Returns:
a displayable name

Definition at line 137 of file STK_PropertyDescriptor.h.

References display_.

    { return display_;}
String const& STK::PropertyDescriptor::getHelpContextId ( ) const [inline]

Returns the help context id for this property or NA if this property has no help context id.

Returns:
the help context id for this entry

Definition at line 146 of file STK_PropertyDescriptor.h.

References helpId_.

    { return helpId_;}
String const& STK::PropertyDescriptor::getId ( ) const [inline]

Returns the id for this property.

This object is used internally to distinguish one property descriptor from another.

Returns:
the property id

Definition at line 156 of file STK_PropertyDescriptor.h.

References id_.

    { return id_;}
void STK::PropertyDescriptor::setCategory ( String const &  category) [inline]

Sets the category for this property descriptor.

Parameters:
categorythe category for the descriptor, or NA if none
See also:
category

Definition at line 166 of file STK_PropertyDescriptor.h.

References category(), and category_.

Here is the call graph for this function:

void STK::PropertyDescriptor::setDescription ( String const &  description) [inline]

Sets the description for this property descriptor.

The description should be limited to a single line so that it can be displayed in the status line.

Parameters:
descriptionthe description, or NA if none
See also:
getDescription

Definition at line 177 of file STK_PropertyDescriptor.h.

References description_.

    { description_ = description;}
void STK::PropertyDescriptor::setHelpContextIds ( String const &  contextId) [inline]

Sets the help context id for this property descriptor.

Parameters:
contextIdthe help context id, or NA if none
See also:
getHelpContextId

Definition at line 186 of file STK_PropertyDescriptor.h.

References helpId_.

    { helpId_ = contextId;}

Member Data Documentation

The property id.

Definition at line 67 of file STK_PropertyDescriptor.h.

Referenced by getId().

The name to display for the property.

Definition at line 72 of file STK_PropertyDescriptor.h.

Referenced by getDisplayName().

Category name, or NA if none (the default).

Definition at line 77 of file STK_PropertyDescriptor.h.

Referenced by category(), and setCategory().

Description of the property, or NA if none (the default).

Definition at line 82 of file STK_PropertyDescriptor.h.

Referenced by getDescription(), and setDescription().

The help context id, or NA if none (the default).

Definition at line 87 of file STK_PropertyDescriptor.h.

Referenced by getHelpContextId(), and setHelpContextIds().


The documentation for this class was generated from the following files: