#include <KoVariable.h>
Public Member Functions | |
| KoCustomVariable (KoTextDocument *textdoc, const TQString &name, KoVariableFormat *varFormat, KoVariableCollection *_varcoll) | |
| virtual VariableType | type () const |
| 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 |
| TQString | name () const |
| virtual void | recalc () |
| virtual TQString | fieldCode () |
| virtual TQString | text (bool realValue=false) |
| TQString | value () const |
| void | setValue (const TQString &v) |
| Public Member Functions inherited from KoVariable | |
| KoVariable (KoTextDocument *fs, KoVariableFormat *varFormat, KoVariableCollection *varColl) | |
| virtual short int | subType () const |
| 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 |
| TQVariant | varValue () const |
| void | recalcAndRepaint () |
| virtual void | save (TQDomElement &parentElem) |
| virtual int | typeId () const |
| virtual TQStringList | subTypeList () |
| virtual void | setVariableSubType (short int) |
| 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 () |
Additional Inherited Members | |
| Public Types inherited from KoTextCustomItem | |
| enum | Placement { PlaceInline = 0 , PlaceLeft , PlaceRight } |
| Public Attributes inherited from KoTextCustomItem | |
| int | width |
| int | height |
| KoTextDocument * | parent |
| Protected Member Functions inherited from KoVariable | |
| virtual int | correctValue () const |
| 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 |
Detailed Description
A custom variable is a variable whose value is entered by the user.
Definition at line 551 of file KoVariable.h.
Constructor & Destructor Documentation
◆ KoCustomVariable()
| KoCustomVariable::KoCustomVariable | ( | KoTextDocument * | textdoc, |
| const TQString & | name, | ||
| KoVariableFormat * | varFormat, | ||
| KoVariableCollection * | _varcoll ) |
Definition at line 1668 of file KoVariable.cpp.
Member Function Documentation
◆ actionTexts()
|
static |
Definition at line 1743 of file KoVariable.cpp.
◆ fieldCode()
|
virtual |
Reimplemented from KoVariable.
Definition at line 1674 of file KoVariable.cpp.
◆ load()
|
virtual |
Reimplemented from KoVariable.
Definition at line 1697 of file KoVariable.cpp.
◆ loadOasis()
|
virtual |
Reimplemented from KoVariable.
Definition at line 1708 of file KoVariable.cpp.
◆ name()
|
inline |
Definition at line 565 of file KoVariable.h.
◆ 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 1748 of file KoVariable.cpp.
◆ saveOasis()
|
virtual |
◆ saveVariable()
|
virtual |
Variable should reimplement this to implement saving.
Implements KoVariable.
Definition at line 1689 of file KoVariable.cpp.
◆ setValue()
| void KoCustomVariable::setValue | ( | const TQString & | v | ) |
Definition at line 1738 of file KoVariable.cpp.
◆ text()
|
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 1679 of file KoVariable.cpp.
◆ type()
|
inlinevirtual |
Implements KoVariable.
Definition at line 556 of file KoVariable.h.
◆ value()
| TQString KoCustomVariable::value | ( | ) | const |
Definition at line 1733 of file KoVariable.cpp.
The documentation for this class was generated from the following files:
