Game Header Editor

The game header editor is a 2-column table which assigns to values to header elements. The PGN standard lists the supported header elements. The header elements of 7-tag roster, i.e. Event, Site, Date, Round, White, Black and Result, are mandatory.

The Game/Select Header Elements … menu entry opens a dialog to add/remove header elements.

Header Editor

Depending on the type, the values are edited using a text, date and time editors. To avoid inconsistent header data, the following header elements are readonly:

  • Result, Annotator, PlyCount

  • any kind of opening information, i.e. Opening, Variation, SubVariation, ECO, NIC

class gameheaderview.KeyType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]
class gameheaderview.GameHeaderView(parent=None)[source]

Game Header Editor object

__init__(parent=None) None[source]
static headerElements(withoutSevenTagRoster: bool = False) List[str][source]

Get game header elements

Parameters:

withoutSevenTagRoster – returns only the optional header elements

Returns:

list of header elements

resetGame() None[source]

Resets editor to standard header

setPlyCount(newCount: int) None[source]

Sets the ‘PlyCount’ header element, if selected

Parameters:

newCount – actual number of halfmoves

setGameResult(result: str) None[source]

Sets the ‘Result’ header element

Parameters:

result – one out of 1-0, 0-1, 1/2-1/2, *

setGame(game: Game) None[source]

Edit the header of a game. It corrects the following header elements

  • Result

  • FEN, if available

  • PlyCount, if available

Parameters:

game – game to be edited