lib

KoFieldVariable Class Reference

#include <KoVariable.h>

Inheritance diagram for KoFieldVariable:

KoVariable KoTextCustomItem

List of all members.


Detailed Description

Any variable that is a string, and whose value is automatically determined - as opposed to custom variables whose value is entered by the user.

Definition at line 582 of file KoVariable.h.


Public Types

enum  FieldSubType {
  VST_NONE = -1, VST_FILENAME = 0, VST_DIRECTORYNAME = 1, VST_AUTHORNAME = 2,
  VST_EMAIL = 3, VST_COMPANYNAME = 4, VST_PATHFILENAME = 5, VST_FILENAMEWITHOUTEXTENSION = 6,
  VST_TELEPHONE_WORK = 7, VST_FAX = 8, VST_COUNTRY = 9, VST_TITLE = 10,
  VST_ABSTRACT = 11, VST_POSTAL_CODE = 12, VST_CITY = 13, VST_STREET = 14,
  VST_AUTHORTITLE = 15, VST_INITIAL = 16, VST_TELEPHONE_HOME = 17, VST_SUBJECT = 18,
  VST_KEYWORDS = 19, VST_AUTHORPOSITION = 20
}

Public Member Functions

 KoFieldVariable (KoTextDocument *textdoc, short int subtype, KoVariableFormat *varFormat, KoVariableCollection *_varColl, KoDocument *_doc)
virtual VariableType type () const
virtual void saveVariable (QDomElement &parentElem)
virtual void load (QDomElement &elem)
virtual void loadOasis (const QDomElement &elem, KoOasisContext &context)
virtual void saveOasis (KoXmlWriter &writer, KoSavingContext &context) const
virtual QString fieldCode ()
virtual void recalc ()
virtual QString text (bool realValue=false)
QString value () const
virtual short int variableSubType (short int menuNumber)
virtual QStringList subTypeList ()
virtual void setVariableSubType (short int subtype)
virtual short int subType () const

Static Public Member Functions

static QStringList actionTexts ()
static FieldSubType fieldSubType (short int menuNumber)

Protected Attributes

short int m_subtype
KoDocumentm_doc

Member Function Documentation

void KoFieldVariable::saveVariable ( QDomElement &  parentElem  )  [virtual]

Variable should reimplement this to implement saving.

Implements KoVariable.

Definition at line 2049 of file KoVariable.cpp.

void KoFieldVariable::saveOasis ( KoXmlWriter writer,
KoSavingContext context 
) const [virtual]

Save to Oasis XML.

Reimplemented from KoVariable.

Definition at line 2131 of file KoVariable.cpp.

void KoFieldVariable::recalc (  )  [virtual]

Reimplemented by KoVariable to recalculate the value.

It exists at the KoTextCustomItem level so that KoTextParag::setCustomItem can call it to set the initial value. This should call always resize().

Reimplemented from KoTextCustomItem.

Definition at line 2209 of file KoVariable.cpp.

QString KoFieldVariable::text ( bool  realValue = false  )  [virtual]

Returns the text to be displayed for this variable It doesn't need to be cached, convert() is fast, and it's the actual value (date, time etc.

) that is cached in the variable already.

Reimplemented from KoVariable.

Definition at line 2040 of file KoVariable.cpp.

short int KoFieldVariable::variableSubType ( short int  menuNumber  )  [virtual]

Converts menuNumber to field variable subtype number.

Reimplemented from KoVariable.

Definition at line 2350 of file KoVariable.cpp.

KoFieldVariable::FieldSubType KoFieldVariable::fieldSubType ( short int  menuNumber  )  [static]

Converts menuNumber to field variable subtype number.

Definition at line 2355 of file KoVariable.cpp.

QStringList KoFieldVariable::subTypeList (  )  [virtual]

List of available subtypes (translated). Use variableSubType() to map index to ID.

Reimplemented from KoVariable.

Definition at line 2410 of file KoVariable.cpp.

virtual void KoFieldVariable::setVariableSubType ( short int   )  [inline, virtual]

Set this variable's subtype.

Reimplemented from KoVariable.

Definition at line 622 of file KoVariable.h.


The documentation for this class was generated from the following files:
KDE Home | KDE Accessibility Home | Description of Access Keys