lib

NameSequence Class Reference

#include <sequenceelement.h>

Inheritance diagram for NameSequence:

SequenceElement BasicElement List of all members.

Detailed Description

The sequence thats a name.

Actually the purpose is to be able to insert any element by keyboard.

Definition at line 492 of file sequenceelement.h.


Public Member Functions

 NameSequence (BasicElement *parent=0)
virtual NameSequenceclone ()
virtual bool accept (ElementVisitor *visitor)
virtual QChar getCharacter () const
virtual TokenType getTokenType () const
virtual SequenceElementgetMainChild ()
virtual void calcCursorSize (const ContextStyle &context, FormulaCursor *cursor, bool smallCursor)
virtual void drawCursor (QPainter &painter, const ContextStyle &context, StyleAttributes &style, FormulaCursor *cursor, bool smallCursor, bool activeCursor)
virtual void moveWordLeft (FormulaCursor *cursor)
virtual void moveWordRight (FormulaCursor *cursor)
virtual KCommandbuildCommand (Container *, Request *)
virtual KCommandinput (Container *container, QChar ch)
virtual void setElementType (ElementType *t)
BasicElementreplaceElement (const SymbolTable &table)

Static Public Member Functions

static bool isValidSelection (FormulaCursor *cursor)

Protected Member Functions

virtual QString getTagName () const
virtual QString getElementName () const
virtual BasicElementcreateElement (QString type)
virtual bool isFirstOfToken (BasicElement *)

Member Function Documentation

bool NameSequence::accept ( ElementVisitor visitor  )  [virtual]

Visit this element.

An implementation of the visitor pattern.

Reimplemented from SequenceElement.

Definition at line 1609 of file sequenceelement.cc.

virtual QChar NameSequence::getCharacter (  )  const [inline, virtual]

Returns:
the character that represents this element.

Used for parsing a sequence. This is guaranteed to be QChar::null for all non-text elements.

Reimplemented from BasicElement.

Definition at line 514 of file sequenceelement.h.

virtual TokenType NameSequence::getTokenType (  )  const [inline, virtual]

Returns:
the type of this element.

Used for parsing a sequence.

Reimplemented from BasicElement.

Definition at line 520 of file sequenceelement.h.

virtual SequenceElement* NameSequence::getMainChild (  )  [inline, virtual]

We are our own main child.

This causes interessting effects.

Reimplemented from BasicElement.

Definition at line 525 of file sequenceelement.h.

void NameSequence::drawCursor ( QPainter &  painter,
const ContextStyle context,
StyleAttributes style,
FormulaCursor cursor,
bool  smallCursor,
bool  activeCursor 
) [virtual]

If the cursor is inside a sequence it needs to be drawn.

Reimplemented from SequenceElement.

Definition at line 1626 of file sequenceelement.cc.

void NameSequence::moveWordLeft ( FormulaCursor cursor  )  [virtual]

Moves to the beginning of this word or if we are there already to the beginning of the previous.

Reimplemented from SequenceElement.

Definition at line 1643 of file sequenceelement.cc.

void NameSequence::moveWordRight ( FormulaCursor cursor  )  [virtual]

Moves to the end of this word or if we are there already to the end of the next.

Reimplemented from SequenceElement.

Definition at line 1654 of file sequenceelement.cc.

KCommand * NameSequence::buildCommand ( Container ,
Request  
) [virtual]

This is called by the container to get a command depending on the current cursor position (this is how the element gets chosen) and the request.

Returns:
the command that performs the requested action with the containers active cursor.

Reimplemented from SequenceElement.

Definition at line 1679 of file sequenceelement.cc.

KCommand * NameSequence::input ( Container container,
QChar  ch 
) [virtual]

Parses the input.

It's the container which does create new elements because it owns the undo stack. But only the sequence knows what chars are allowed.

Reimplemented from SequenceElement.

Definition at line 1701 of file sequenceelement.cc.

void NameSequence::setElementType ( ElementType t  )  [virtual]

Sets a new type.

This is done during parsing.

Reimplemented from BasicElement.

Definition at line 1740 of file sequenceelement.cc.

BasicElement * NameSequence::replaceElement ( const SymbolTable table  ) 

Returns:
the element this sequence is to be replaced with.

Definition at line 1746 of file sequenceelement.cc.

bool NameSequence::isValidSelection ( FormulaCursor cursor  )  [static]

Tests whether the selected elements can be inserted in a name sequence.

Definition at line 1801 of file sequenceelement.cc.

virtual QString NameSequence::getTagName (  )  const [inline, protected, virtual]

Returns the tag name of this element type.

Reimplemented from SequenceElement.

Definition at line 588 of file sequenceelement.h.

BasicElement * NameSequence::createElement ( QString  type  )  [protected, virtual]

Creates a new element with the given type.

Parameters:
type the desired type of the element

Definition at line 1777 of file sequenceelement.cc.

virtual bool NameSequence::isFirstOfToken ( BasicElement  )  [inline, protected, virtual]

Returns:
whether the child is the first element of its token.

This can never happen here. Our children reuse our own element type.

Reimplemented from SequenceElement.

Definition at line 609 of file sequenceelement.h.


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