#include <KoVariable.h>
Public Types | |
| enum | { VST_PGNUM_CURRENT = 0 , VST_PGNUM_TOTAL = 1 , VST_CURRENT_SECTION = 2 , VST_PGNUM_PREVIOUS = 3 , VST_PGNUM_NEXT = 4 } |
Public Types inherited from KoTextCustomItem | |
| enum | Placement { PlaceInline = 0 , PlaceLeft , PlaceRight } |
Public Member Functions | |
| KoPageVariable (KoTextDocument *textdoc, short int subtype, KoVariableFormat *varFormat, KoVariableCollection *_varColl) | |
| virtual VariableType | type () const |
| virtual TQString | fieldCode () |
| virtual TQStringList | subTypeList () |
| virtual void | setVariableSubType (short int subtype) |
| void | setPgNum (int pgNum) |
| void | setSectionTitle (const TQString &title) |
| virtual short int | subType () const |
| virtual void | recalc ()=0 |
| virtual void | saveVariable (TQDomElement &parentElem) |
| virtual void | load (TQDomElement &elem) |
| virtual void | loadOasis (const TQDomElement &elem, KoOasisContext &context) |
| virtual void | saveOasis (KoXmlWriter &writer, KoSavingContext &context) const |
Public Member Functions inherited from KoVariable | |
| KoVariable (KoTextDocument *fs, KoVariableFormat *varFormat, KoVariableCollection *varColl) | |
| virtual Placement | placement () const |
| virtual void | resize () |
| 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 () |
Protected Attributes | |
| short int | m_subtype |
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 |
Protected Member Functions inherited from KoVariable | |
| virtual int | correctValue () const |
Detailed Description
"current page number" and "number of pages" variables This is a base class, it must be inherited by applications, to provide recalc().
Definition at line 661 of file KoVariable.h.
Member Enumeration Documentation
◆ anonymous enum
| anonymous enum |
Definition at line 669 of file KoVariable.h.
Constructor & Destructor Documentation
◆ KoPageVariable()
| KoPageVariable::KoPageVariable | ( | KoTextDocument * | textdoc, |
| short int | subtype, | ||
| KoVariableFormat * | varFormat, | ||
| KoVariableCollection * | _varColl | ||
| ) |
Definition at line 1817 of file KoVariable.cpp.
Member Function Documentation
◆ actionTexts()
|
static |
Definition at line 1941 of file KoVariable.cpp.
◆ fieldCode()
|
virtual |
Reimplemented from KoVariable.
Definition at line 1822 of file KoVariable.cpp.
◆ load()
|
virtual |
Reimplemented from KoVariable.
Definition at line 1851 of file KoVariable.cpp.
◆ loadOasis()
|
virtual |
Reimplemented from KoVariable.
Definition at line 1908 of file KoVariable.cpp.
◆ recalc()
|
pure 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.
◆ saveOasis()
|
virtual |
◆ saveVariable()
|
virtual |
Variable should reimplement this to implement saving.
Implements KoVariable.
Definition at line 1840 of file KoVariable.cpp.
◆ setPgNum()
|
inline |
Definition at line 679 of file KoVariable.h.
◆ setSectionTitle()
| void KoPageVariable::setSectionTitle | ( | const TQString & | title | ) |
Definition at line 2629 of file KoVariable.cpp.
◆ setVariableSubType()
|
virtual |
Set this variable's subtype.
Reimplemented from KoVariable.
Definition at line 1957 of file KoVariable.cpp.
◆ subType()
|
inlinevirtual |
Reimplemented from KoVariable.
Definition at line 683 of file KoVariable.h.
◆ subTypeList()
|
virtual |
List of available subtypes (translated). Use variableSubType() to map index to ID.
Reimplemented from KoVariable.
Definition at line 1952 of file KoVariable.cpp.
◆ type()
|
inlinevirtual |
Implements KoVariable.
Definition at line 666 of file KoVariable.h.
Member Data Documentation
◆ m_subtype
|
protected |
Definition at line 692 of file KoVariable.h.
The documentation for this class was generated from the following files:

Public Types inherited from