Cute Chess 0.1
MoveCommentToken Class Reference

A comment token for a move in a PGN game. More...

#include <movecommenttoken.h>

Inheritance diagram for MoveCommentToken:
PgnToken

Public Member Functions

 MoveCommentToken (int ply, const QString &text)
void setValue (const QString &text)
virtual QString toString () const
Public Member Functions inherited from PgnToken
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 ~PgnToken ()

Protected Member Functions

virtual void vInsert (QTextCursor &cursor)

Detailed Description

A comment token for a move in a PGN game.

Constructor & Destructor Documentation

◆ MoveCommentToken()

MoveCommentToken::MoveCommentToken ( int ply,
const QString & text )

Creates a new MoveCommentToken with text text at ply.

Member Function Documentation

◆ setValue()

void MoveCommentToken::setValue ( const QString & text)

Sets the comment's text to text. Changes to the text document have to be made separately.

◆ toString()

QString MoveCommentToken::toString ( ) const
virtual

Returns the token as a string.

Implements PgnToken.

◆ vInsert()

void MoveCommentToken::vInsert ( QTextCursor & cursor)
protectedvirtual

Subclasses must implement this function to insert the token into the document using cursor.

Implements PgnToken.


The documentation for this class was generated from the following files: