#include <KoVariable.h>
Public Types | |
| 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 Types inherited from KoTextCustomItem | |
| enum | Placement { PlaceInline = 0 , PlaceLeft , PlaceRight } |
Public Member Functions | |
| KoDateVariable (KoTextDocument *textdoc, short int subtype, KoVariableFormat *_varFormat, KoVariableCollection *_varColl, int _correctDate=0) | |
| virtual VariableType | type () const |
| virtual void | recalc () |
| virtual TQString | fieldCode () |
| virtual void | resize () |
| void | setDate (const TQDate &_date) |
| virtual void | saveVariable (TQDomElement &parentElem) |
| virtual int | correctValue () const |
| virtual void | load (TQDomElement &elem) |
| virtual void | loadOasis (const TQDomElement &elem, KoOasisContext &context) |
| virtual void | saveOasis (KoXmlWriter &writer, KoSavingContext &context) const |
| virtual TQStringList | subTypeList () |
| virtual void | setVariableSubType (short int subtype) |
| virtual short int | subType () const |
| Public Member Functions inherited from KoVariable | |
| KoVariable (KoTextDocument *fs, KoVariableFormat *varFormat, KoVariableCollection *varColl) | |
| virtual Placement | placement () const |
| virtual int | ascent () const |
| virtual int | widthHint () const |
| virtual int | minimumWidth () const |
| virtual void | drawCustomItem (TQPainter *p, int x, int y, int wpix, int hpix, int ascentpix, int cx, int cy, int cw, int ch, const TQColorGroup &cg, bool selected, int offset, bool drawingShadow) |
| void | drawCustomItemHelper (TQPainter *p, int x, int y, int wpix, int hpix, int ascentpix, const TQColorGroup &cg, bool selected, int offset, KoTextFormat *fmt, const TQFont &font, TQColor textColor, bool drawingShadow) |
| void | setVariableFormat (KoVariableFormat *_varFormat) |
| KoVariableFormat * | variableFormat () const |
| KoVariableCollection * | variableColl () const |
| virtual TQString | text (bool realValue=false) |
| TQVariant | varValue () const |
| void | recalcAndRepaint () |
| virtual void | save (TQDomElement &parentElem) |
| virtual int | typeId () const |
| virtual short int | variableSubType (short int menuNumber) |
| TQString | convertKlocaleToTQDateTimeFormat (const TQString &_format) |
| Public Member Functions inherited from KoTextCustomItem | |
| KoTextCustomItem (KoTextDocument *p) | |
| virtual void | draw (TQPainter *p, int x, int y, int cx, int cy, int cw, int ch, const TQColorGroup &cg, bool selected) |
| virtual void | finalize () |
| void | move (int x, int y) |
| int | x () const |
| int | y () const |
| virtual void | setFormat (KoTextFormat *) |
| bool | placeInline () |
| virtual bool | ownLine () const |
| virtual void | resize (int nwidth) |
| virtual void | invalidate () |
| virtual bool | isNested () const |
| virtual TQString | richText () const |
| TQRect | geometry () const |
| virtual bool | enter (KoTextCursor *, KoTextDocument *&doc, KoTextParag *¶g, int &idx, int &ox, int &oy, bool atEnd=false) |
| virtual bool | enterAt (KoTextCursor *, KoTextDocument *&doc, KoTextParag *¶g, int &idx, int &ox, int &oy, const TQPoint &) |
| virtual bool | next (KoTextCursor *, KoTextDocument *&doc, KoTextParag *¶g, int &idx, int &ox, int &oy) |
| virtual bool | prev (KoTextCursor *, KoTextDocument *&doc, KoTextParag *¶g, int &idx, int &ox, int &oy) |
| virtual bool | down (KoTextCursor *, KoTextDocument *&doc, KoTextParag *¶g, int &idx, int &ox, int &oy) |
| virtual bool | up (KoTextCursor *, KoTextDocument *&doc, KoTextParag *¶g, int &idx, int &ox, int &oy) |
| void | setParagraph (KoTextParag *p) |
| KoTextParag * | paragraph () const |
| virtual void | pageBreak (int, KoTextFlow *) |
| KoTextDocument * | textDocument () const |
| virtual void | setDeleted (bool b) |
| bool | isDeleted () const |
| virtual KCommand * | createCommand () |
| virtual KCommand * | deleteCommand () |
| int | index () const |
| KoTextFormat * | format () const |
Static Public Member Functions | |
| static TQStringList | actionTexts () |
| static TQCString | formatStr (int &correct) |
| static TQCString | defaultFormat () |
Protected Attributes | |
| short int | m_subtype |
| int | m_correctDate |
| Protected Attributes inherited from KoVariable | |
| KoVariableFormat * | m_varFormat |
| KoVariableCollection * | m_varColl |
| TQVariant | m_varValue |
| int | m_ascent |
| Private * | d |
| Protected Attributes inherited from KoTextCustomItem | |
| bool | m_deleted |
| int | xpos |
| int | ypos |
Additional Inherited Members | |
| Public Attributes inherited from KoTextCustomItem | |
| int | width |
| int | height |
| KoTextDocument * | parent |
Detailed Description
Date-related variables.
Definition at line 459 of file KoVariable.h.
Member Enumeration Documentation
◆ anonymous enum
| anonymous enum |
Definition at line 467 of file KoVariable.h.
Constructor & Destructor Documentation
◆ KoDateVariable()
| KoDateVariable::KoDateVariable | ( | KoTextDocument * | textdoc, |
| short int | subtype, | ||
| KoVariableFormat * | _varFormat, | ||
| KoVariableCollection * | _varColl, | ||
| int | _correctDate = 0 ) |
Definition at line 1173 of file KoVariable.cpp.
Member Function Documentation
◆ actionTexts()
|
static |
Definition at line 1363 of file KoVariable.cpp.
◆ correctValue()
|
inlinevirtual |
Reimplemented from KoVariable.
Definition at line 476 of file KoVariable.h.
◆ defaultFormat()
|
static |
Return the default date format for old file.
Definition at line 1379 of file KoVariable.cpp.
◆ fieldCode()
|
virtual |
Reimplemented from KoVariable.
Definition at line 1178 of file KoVariable.cpp.
◆ formatStr()
|
static |
Ask the user and return the date format string with prefix "DATE".
Definition at line 1384 of file KoVariable.cpp.
◆ load()
|
virtual |
Reimplemented from KoVariable.
Definition at line 1251 of file KoVariable.cpp.
◆ loadOasis()
|
virtual |
Reimplemented from KoVariable.
Definition at line 1333 of file KoVariable.cpp.
◆ 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 1210 of file KoVariable.cpp.
◆ 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 1194 of file KoVariable.cpp.
◆ saveOasis()
|
virtual |
◆ saveVariable()
|
virtual |
Variable should reimplement this to implement saving.
Implements KoVariable.
Definition at line 1229 of file KoVariable.cpp.
◆ setDate()
|
inline |
Definition at line 473 of file KoVariable.h.
◆ setVariableSubType()
|
inlinevirtual |
Set this variable's subtype.
Reimplemented from KoVariable.
Definition at line 483 of file KoVariable.h.
◆ subType()
|
inlinevirtual |
Reimplemented from KoVariable.
Definition at line 485 of file KoVariable.h.
◆ subTypeList()
|
virtual |
List of available subtypes (translated). Use variableSubType() to map index to ID.
Reimplemented from KoVariable.
Definition at line 1374 of file KoVariable.cpp.
◆ type()
|
inlinevirtual |
Implements KoVariable.
Definition at line 464 of file KoVariable.h.
Member Data Documentation
◆ m_correctDate
|
protected |
Definition at line 497 of file KoVariable.h.
◆ m_subtype
|
protected |
Definition at line 496 of file KoVariable.h.
The documentation for this class was generated from the following files:
