lib

KoDateVariable Class Reference

#include <KoVariable.h>

Inheritance diagram for KoDateVariable:

KoVariable KoTextCustomItem List of all members.

Detailed Description

Date-related variables.

Definition at line 458 of file KoVariable.h.


Public Types

 VST_DATE_FIX = 0
 VST_DATE_CURRENT = 1
 VST_DATE_LAST_PRINTING = 2
 VST_DATE_CREATE_FILE = 3
 VST_DATE_MODIFY_FILE = 4
enum  {
  VST_DATE_FIX = 0, VST_DATE_CURRENT = 1, VST_DATE_LAST_PRINTING = 2, VST_DATE_CREATE_FILE = 3,
  VST_DATE_MODIFY_FILE = 4
}

Public Member Functions

 KoDateVariable (KoTextDocument *textdoc, short int subtype, KoVariableFormat *_varFormat, KoVariableCollection *_varColl, int _correctDate=0)
virtual VariableType type () const
virtual void recalc ()
virtual QString fieldCode ()
virtual void resize ()
void setDate (const QDate &_date)
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_correctDate

Member Function Documentation

QCString KoDateVariable::defaultFormat (  )  [static]

Return the default date format for old file.

Definition at line 1380 of file KoVariable.cpp.

QCString KoDateVariable::formatStr ( int &  correct  )  [static]

Ask the user and return the date format string with prefix "DATE".

Definition at line 1385 of file KoVariable.cpp.

void KoDateVariable::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 1211 of file KoVariable.cpp.

void KoDateVariable::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 1195 of file KoVariable.cpp.

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

Save to Oasis XML.

Reimplemented from KoVariable.

Definition at line 1286 of file KoVariable.cpp.

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

Variable should reimplement this to implement saving.

Implements KoVariable.

Definition at line 1230 of file KoVariable.cpp.

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

Set this variable's subtype.

Reimplemented from KoVariable.

Definition at line 482 of file KoVariable.h.

QStringList KoDateVariable::subTypeList (  )  [virtual]

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

Reimplemented from KoVariable.

Definition at line 1375 of file KoVariable.cpp.


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