• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • kdeedu
  • Sitemap
  • Contact Us
 

kig

ObjectImpType Class Reference

#include <object_imp.h>

Inheritance diagram for ObjectImpType:

Inheritance graph
[legend]

List of all members.


Detailed Description

Instances of this class represent a certain ObjectImp type.

Every ObjectImp type has a static ObjectImpType member, that it returns a reference to in its type() function. Think of it as a nice enum, that you can also get some data from.

Definition at line 87 of file object_imp.h.


Public Member Functions

QString addAStatement () const
QString attachToThisStatement () const
QString hideAStatement () const
bool inherits (const ObjectImpType *t) const
const char * internalName () const
virtual bool match (const ObjectImpType *t) const
QString moveAStatement () const
 ObjectImpType (const ObjectImpType *parent, const char *internalname, const char *translatedname, const char *selectstatement, const char *selectnamestatement, const char *removeastatement, const char *addastatement, const char *moveastatement, const char *attachtothisstatement, const char *showastatement, const char *hideastatement)
QString removeAStatement () const
const char * selectNameStatement () const
const char * selectStatement () const
QString showAStatement () const
QString translatedName () const
virtual ~ObjectImpType ()

Static Public Member Functions

static const ObjectImpType * typeFromInternalName (const char *n)

Constructor & Destructor Documentation

ObjectImpType::ObjectImpType ( const ObjectImpType *  parent,
const char *  internalname,
const char *  translatedname,
const char *  selectstatement,
const char *  selectnamestatement,
const char *  removeastatement,
const char *  addastatement,
const char *  moveastatement,
const char *  attachtothisstatement,
const char *  showastatement,
const char *  hideastatement 
)

For internal use only.

Construct an ObjectImpType, with a lot of data about your ObjectImp type.

translatedname is a translatable string like "segment" selectstatement is a translatable string like "Select this segment" selectnamestatement is a translatable string like "Select segment %1" removeastatement is a translatable string like "Remove a Segment" addastatement is a translatable string like "Add a Segment" moveastatement is a translatable string like "Move a Segment" attachtothisstatement is a translatable string like "Attach to this segment" showastatement is a translatable string like "Show a Segment" hideastatement is a translatable string like "Hide a Segment"

All translatable strings should have I18N_NOOP around them !

Parameters:
parent is the ObjectImpType of your parent ObjectImp type. Never give 0 as parent, except for the top ObjectImp ObjectImpType.

Definition at line 181 of file object_imp.cc.

ObjectImpType::~ObjectImpType (  )  [virtual]

Definition at line 204 of file object_imp.cc.


Member Function Documentation

QString ObjectImpType::addAStatement (  )  const

Returns a translated string of the form "Add a xxx".

E.g. "Add a Segment".

Definition at line 244 of file object_imp.cc.

QString ObjectImpType::attachToThisStatement (  )  const

Returns a translated string of the form "Attach to this xxx".

E.g. "Attach to this segment".

For internal use only.

This is used by the text label construction mode

Definition at line 295 of file object_imp.cc.

QString ObjectImpType::hideAStatement (  )  const

Returns a translated string of the form "Hide a xxx".

E.g. "Hide a Segment".

Definition at line 305 of file object_imp.cc.

bool ObjectImpType::inherits ( const ObjectImpType *  t  )  const

Does the ObjectImp type represented by this instance inherit the ObjectImp type represented by t ?

Definition at line 208 of file object_imp.cc.

const char * ObjectImpType::internalName (  )  const

Returns an internal name for this ObjectImp type.

This name is guaranteed unique, and mostly corresponds with the class name of the corresponding ObjectImp.

Definition at line 219 of file object_imp.cc.

bool ObjectImpType::match ( const ObjectImpType *  t  )  const [virtual]

Reimplemented in LengthImpType, AngleImpType, and InvertibleImpType.

Definition at line 214 of file object_imp.cc.

QString ObjectImpType::moveAStatement (  )  const

Returns a translated string of the form "Move a xxx".

E.g. "Move a Segment".

Definition at line 249 of file object_imp.cc.

QString ObjectImpType::removeAStatement (  )  const

Returns a translated string of the form "Remove a xxx".

E.g. "Remove a Segment".

Definition at line 239 of file object_imp.cc.

const char * ObjectImpType::selectNameStatement (  )  const

Returns a translatable string of the form "Select point %1".

1 will be filled in by whomever calls this function with the name of the object in question. This function should be used as follows: i18n( x->selectNameStatement() ).arg( xname ).

Definition at line 234 of file object_imp.cc.

const char * ObjectImpType::selectStatement (  )  const

Returns a translatable string of the form "Select this %1".

E.g. "Select this segment". Note that users of this function should use i18n on the returned string before using it.

Definition at line 229 of file object_imp.cc.

QString ObjectImpType::showAStatement (  )  const

Returns a translated string of the form "Show a xxx".

E.g. "Show a Segment".

Definition at line 300 of file object_imp.cc.

QString ObjectImpType::translatedName (  )  const

The name of this type, translated to the currently used language.

Definition at line 224 of file object_imp.cc.

const ObjectImpType * ObjectImpType::typeFromInternalName ( const char *  n  )  [static]

Returns the type with name n.

For internal use only.

Do *not* call this from functions that can be called at static initializer time ! It depends on information that is only available after that stage and will crash if used too early.

Definition at line 254 of file object_imp.cc.


The documentation for this class was generated from the following files:
  • object_imp.h
  • object_imp.cc

kig

Skip menu "kig"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members

kdeedu

Skip menu "kdeedu"
  • kalzium
  • kanagram
  • kig
  •   lib
  • klettres
  • kstars
  • libkdeedu
  •   keduvocdocument
  •   docs
  •   src
  • parley
  •   stepcore
Generated for kdeedu by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal