QcClientBlockScreen Class
A screen the server opened at a block for the local player (the anvil, the enchanting table): whether it is open, where, and the way out to the server. More...
| Header: | #include <clientcore/session/QcClientBlockScreen.h> |
| Inherits: | QObject |
| Inherited By: |
Public Types
Public Functions
| bool | isOpen() const |
| const QcClientBlockScreen::Sender & | messageSender() const |
| QcBlockPos | pos() const |
| void | setSender(QcClientBlockScreen::Sender sender) |
Signals
Protected Functions
| void | markClosedByPlayer(const QcMessage &message) |
| void | markClosedByServer() |
| void | markOpened(QcBlockPos pos) |
| bool | sendWhileOpen(const QcMessage &message) const |
Detailed Description
The server opens it, sends its state and closes it; the player's requests go out only while it is open. QcClientBlockScreenOf adds the messages of one kind of screen. Part of QcClientSession; GUI-free.
Member Type Documentation
[alias] QcClientBlockScreen::Sender
Sends a message to the server.
Member Function Documentation
[signal] void QcClientBlockScreen::changed()
The state the server sent changed.
[signal] void QcClientBlockScreen::closed()
The screen closed (by the server or by the player).
bool QcClientBlockScreen::isOpen() const
Returns whether the screen is open.
[protected] void QcClientBlockScreen::markClosedByPlayer(const QcMessage &message)
The player closed the open screen; tells the server with message.
[protected] void QcClientBlockScreen::markClosedByServer()
The server closed the open screen.
[protected] void QcClientBlockScreen::markOpened(QcBlockPos pos)
The server opened the screen at pos.
const QcClientBlockScreen::Sender &QcClientBlockScreen::messageSender() const
Returns the way out to the server (empty before setSender()).
[signal] void QcClientBlockScreen::opened()
The server opened the screen.
QcBlockPos QcClientBlockScreen::pos() const
Returns where the screen's block is.
[protected] bool QcClientBlockScreen::sendWhileOpen(const QcMessage &message) const
Sends the player's request message. Returns false, sending nothing, when the screen is not open or there is no way out.
void QcClientBlockScreen::setSender(QcClientBlockScreen::Sender sender)
Sets the way out to the server to sender (the session's connection).