lib

KoTimeVariable Class Reference

#include <KoVariable.h>

Inheritance diagram for KoTimeVariable:

KoVariable KoTextCustomItem List of all members.

Detailed Description

Time-related variables.

Definition at line 503 of file KoVariable.h.


Public Types

 VST_TIME_FIX = 0
 VST_TIME_CURRENT = 1
enum  { VST_TIME_FIX = 0, VST_TIME_CURRENT = 1 }

Public Member Functions

 KoTimeVariable (KoTextDocument *textdoc, short int subtype, KoVariableFormat *varFormat, KoVariableCollection *_varColl, int _correct)
virtual VariableType type () const
virtual void recalc ()
virtual void resize ()
virtual QString fieldCode ()
void setTime (const QTime &_time)
virtual void saveVariable (QDomElement &parentElem)
virtual int correctValue () const
virtual void load (QDomElement &elem)
virtual void loadOasis (const QDomElement &elem, KoOasisContext &context)
virtual void saveOasis (KoXmlWriter &writer, KoSavingContext &context) const
virtual QStringList subTypeList ()
virtual void setVariableSubType (short int subtype)
virtual short int subType () const

Static Public Member Functions

static QStringList actionTexts ()
static QCString formatStr (int &_correct)
static QCString defaultFormat ()

Protected Attributes

short int m_subtype
int m_correctTime

Member Function Documentation

QCString KoTimeVariable::defaultFormat (  )  [static]

Return the default date format for old file.

Definition at line 1660 of file KoVariable.cpp.

QCString KoTimeVariable::formatStr ( int &  _correct  )  [static]

Returns the time format string with prefix "TIME".

Definition at line 1597 of file KoVariable.cpp.

void KoTimeVariable::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 1479 of file KoVariable.cpp.

void KoTimeVariable::resize (  )  [virtual]

Reimplement this to calculate the item width It is important to start with "if ( m_deleted ) return;".

Reimplemented from KoVariable.

Definition at line 1464 of file KoVariable.cpp.

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

Save to Oasis XML.

Reimplemented from KoVariable.

Definition at line 1557 of file KoVariable.cpp.

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

Variable should reimplement this to implement saving.

Implements KoVariable.

Definition at line 1493 of file KoVariable.cpp.

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

Set this variable's subtype.

Reimplemented from KoVariable.

Definition at line 527 of file KoVariable.h.

QStringList KoTimeVariable::subTypeList (  )  [virtual]

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

Reimplemented from KoVariable.

Definition at line 1592 of file KoVariable.cpp.


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