|
Cute Chess
0.1
|
A text or HTML token in a PGN game. More...
#include <pgntoken.h>
Public Member Functions | |
| void | insert (QTextCursor &cursor) |
| bool | isEmpty () const |
| int | length () const |
| void | mergeCharFormat (QTextCursor &cursor, const QTextCharFormat &format) |
| void | move (int diff) |
| PgnToken () | |
| void | select (QTextCursor &cursor) |
| virtual QString | toString () const =0 |
| virtual | ~PgnToken () |
Protected Member Functions | |
| virtual void | vInsert (QTextCursor &cursor)=0 |
A text or HTML token in a PGN game.
| PgnToken::PgnToken | ( | ) |
Creates a new PgnToken.
|
virtual |
Destroys the PgnToken.
| void PgnToken::insert | ( | QTextCursor & | cursor | ) |
Inserts the token into the document. This method calls the subclass' vInsert() method.
| bool PgnToken::isEmpty | ( | ) | const |
Returns true if the token is empty; otherwise returns false.
| int PgnToken::length | ( | ) | const |
Returns the token's length.
| void PgnToken::mergeCharFormat | ( | QTextCursor & | cursor, |
| const QTextCharFormat & | format | ||
| ) |
Merges the token's character format with format.
| void PgnToken::move | ( | int | diff | ) |
Moves the token's begin and end positions by diff.
| void PgnToken::select | ( | QTextCursor & | cursor | ) |
Selects the token with cursor.
|
pure virtual |
Returns the token as a string.
Implemented in MoveNumberToken, MoveCommentToken, and MoveToken.
|
protectedpure virtual |
Subclasses must implement this function to insert the token into the document using cursor.
Implemented in MoveCommentToken, MoveNumberToken, and MoveToken.
1.8.11