QtCraft API C++ classes QML types Handbook

QcClientBlockScreenOf Class

template <typename Open, typename State, typename Close> class QcClientBlockScreenOf

A screen of the kind the server opens with the message Open, updates with the message State and closes with the message Close (either side sends Close). More...

Header: #include <clientcore/session/QcClientBlockScreen.h>
Inherits: QcClientBlockScreen

Public Functions

void close()
bool handle(const QcMessage &message)
const State &state() const

Protected Functions

virtual bool sameState(const State &a, const State &b) const = 0
void setState(const State &state)

Detailed Description

The state is kept only while the screen is open; a state still on its way after the player's own close belongs to no open screen and is dropped.

Member Function Documentation

void QcClientBlockScreenOf::close()

The player closed the screen; the server gives the slots back.

bool QcClientBlockScreenOf::handle(const QcMessage &message)

Takes over message when it is Open, State or Close. Returns false for other messages.

[pure virtual protected] bool QcClientBlockScreenOf::sameState(const State &a, const State &b) const

Returns whether a and b show the same on the screen (no changed() between them).

[protected] void QcClientBlockScreenOf::setState(const State &state)

Sets the state to state.

See also state().

const State &QcClientBlockScreenOf::state() const

Returns the state as the server last sent it (empty while closed).

See also setState().