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

kig

Public Member Functions | Static Public Member Functions | List of all members
ObjectImpType Class Reference

#include <object_imp.h>

Inheritance diagram for ObjectImpType:
Inheritance graph
[legend]

Public Member Functions

 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)
 
virtual ~ObjectImpType ()
 
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
 
QString removeAStatement () const
 
const char * selectNameStatement () const
 
const char * selectStatement () const
 
QString showAStatement () const
 
QString translatedName () const
 

Static Public Member Functions

static const ObjectImpType * typeFromInternalName (const char *n)
 

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 95 of file object_imp.h.

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 
)

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
parentis the ObjectImpType of your parent ObjectImp type. Never give 0 as parent, except for the top ObjectImp ObjectImpType.

Definition at line 197 of file object_imp.cc.

ObjectImpType::~ObjectImpType ( )
virtual

Definition at line 220 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 260 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".

This is used by the text label construction mode

Definition at line 311 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 321 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 224 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 235 of file object_imp.cc.

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

Reimplemented in InvertibleImpType, WeightImpType, AngleImpType, and LengthImpType.

Definition at line 230 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 265 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 255 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 250 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 245 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 316 of file object_imp.cc.

QString ObjectImpType::translatedName ( ) const

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

Definition at line 240 of file object_imp.cc.

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

Returns the type with name n.

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 270 of file object_imp.cc.


The documentation for this class was generated from the following files:
  • object_imp.h
  • object_imp.cc
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:35:41 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kig

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

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • kstars
  • libkdeedu
  •   keduvocdocument
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal