lib Library API Documentation

KoFieldVariable Class Reference

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

#include <kovariable.h>

Inheritance diagram for KoFieldVariable:

KoVariable List of all members.

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 = 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
}

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 QString fieldCode ()
virtual void recalc ()
virtual QString text (bool realValue=false)
QString value () const
virtual short int variableSubType (short int menuNumber)
virtual QStringList subTypeText ()
virtual void setVariableSubType (short int subtype)
virtual short int subType () const

Static Public Member Functions

QStringList actionTexts ()
FieldSubType fieldSubType (short int menuNumber)

Protected Attributes

short int m_subtype
KoDocumentm_doc

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 542 of file kovariable.h.


Member Function Documentation

void KoFieldVariable::saveVariable QDomElement parentElem  )  [virtual]
 

Variable should reimplement this to implement saving.

Implements KoVariable.

Definition at line 1457 of file kovariable.cc.

References saveVariable().

Referenced by saveVariable().

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 1448 of file kovariable.cc.

References text().

Referenced by text().

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

Converts menuNumber to field variable subtype number.

Reimplemented from KoVariable.

Definition at line 1604 of file kovariable.cc.

References fieldSubType(), and variableSubType().

Referenced by variableSubType().

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

Converts menuNumber to field variable subtype number.

Definition at line 1609 of file kovariable.cc.

References fieldSubType().

Referenced by fieldSubType(), and variableSubType().

QStringList KoFieldVariable::subTypeText  )  [virtual]
 

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

Reimplemented from KoVariable.

Definition at line 1656 of file kovariable.cc.

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

Set this variable's subtype.

Reimplemented from KoVariable.

Definition at line 580 of file kovariable.h.


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for lib Library Version 1.3.3.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Tue Sep 28 04:04:04 2004 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003