#include <KoVariable.h>
Public Types | |
| enum | FieldSubType { VST_NONE = -1 , VST_FILENAME = 0 , VST_DIRECTORYNAME = 1 , VST_AUTHORNAME = 2 , VST_EMAIL = 3 , VST_COMPANYNAME = 4 , VST_PATHFILENAME = 5 , VST_FILENAMEWITHOUTEXTENSION =6 , VST_TELEPHONE_WORK = 7 , VST_FAX = 8 , VST_COUNTRY = 9 , VST_TITLE = 10 , VST_ABSTRACT = 11 , VST_POSTAL_CODE = 12 , VST_CITY = 13 , VST_STREET = 14 , VST_AUTHORTITLE = 15 , VST_INITIAL = 16 , VST_TELEPHONE_HOME = 17 , VST_SUBJECT = 18 , VST_KEYWORDS =19 , VST_AUTHORPOSITION = 20 } |
| Public Types inherited from KoTextCustomItem | |
| enum | Placement { PlaceInline = 0 , PlaceLeft , PlaceRight } |
Public Member Functions | |
| KoFieldVariable (KoTextDocument *textdoc, short int subtype, KoVariableFormat *varFormat, KoVariableCollection *_varColl, KoDocument *_doc) | |
| 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 |
| virtual TQString | fieldCode () |
| virtual void | recalc () |
| virtual TQString | text (bool realValue=false) |
| TQString | value () const |
| virtual short int | variableSubType (short int menuNumber) |
| 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 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 |
| 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 FieldSubType | fieldSubType (short int menuNumber) |
Protected Attributes | |
| short int | m_subtype |
| KoDocument * | m_doc |
| 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
Any variable that is a string, and whose value is automatically determined - as opposed to custom variables whose value is entered by the user.
Definition at line 583 of file KoVariable.h.
Member Enumeration Documentation
◆ FieldSubType
| enum KoFieldVariable::FieldSubType |
Definition at line 589 of file KoVariable.h.
Constructor & Destructor Documentation
◆ KoFieldVariable()
| KoFieldVariable::KoFieldVariable | ( | KoTextDocument * | textdoc, |
| short int | subtype, | ||
| KoVariableFormat * | varFormat, | ||
| KoVariableCollection * | _varColl, | ||
| KoDocument * | _doc ) |
Definition at line 1967 of file KoVariable.cpp.
Member Function Documentation
◆ actionTexts()
|
static |
Definition at line 2318 of file KoVariable.cpp.
◆ fieldCode()
|
virtual |
Reimplemented from KoVariable.
Definition at line 1972 of file KoVariable.cpp.
◆ fieldSubType()
|
static |
Converts menuNumber to field variable subtype number.
Definition at line 2354 of file KoVariable.cpp.
◆ load()
|
virtual |
Reimplemented from KoVariable.
Definition at line 2057 of file KoVariable.cpp.
◆ loadOasis()
|
virtual |
Reimplemented from KoVariable.
Definition at line 2071 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 2208 of file KoVariable.cpp.
◆ saveOasis()
|
virtual |
◆ saveVariable()
|
virtual |
Variable should reimplement this to implement saving.
Implements KoVariable.
Definition at line 2048 of file KoVariable.cpp.
◆ setVariableSubType()
|
inlinevirtual |
Set this variable's subtype.
Reimplemented from KoVariable.
Definition at line 623 of file KoVariable.h.
◆ subType()
|
inlinevirtual |
Reimplemented from KoVariable.
Definition at line 625 of file KoVariable.h.
◆ subTypeList()
|
virtual |
List of available subtypes (translated). Use variableSubType() to map index to ID.
Reimplemented from KoVariable.
Definition at line 2409 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 2039 of file KoVariable.cpp.
◆ type()
|
inlinevirtual |
Implements KoVariable.
Definition at line 598 of file KoVariable.h.
◆ value()
|
inline |
Definition at line 610 of file KoVariable.h.
◆ variableSubType()
|
virtual |
Converts menuNumber to field variable subtype number.
Reimplemented from KoVariable.
Definition at line 2349 of file KoVariable.cpp.
Member Data Documentation
◆ m_doc
|
protected |
Definition at line 629 of file KoVariable.h.
◆ m_subtype
|
protected |
Definition at line 628 of file KoVariable.h.
The documentation for this class was generated from the following files:
