![]() |
Cockatrice 2026-09-01-Development-3.1.0-beta.10
A virtual tabletop for multiplayer card games
|
Connects to the configured server and opens a room identified by its name. More...
#include <intent_open_server_room_by_name.h>
Public Member Functions | |
| IntentOpenServerRoomByName (TabSupervisor *_tabSupervisor, RemoteClient *_remoteClient, std::unique_ptr< ContextJoinRoom > _context, const QString &_roomName) | |
| Public Member Functions inherited from Intent | |
| Intent (QObject *parent=nullptr) | |
| ~Intent () override | |
| void | execute () |
Protected Member Functions | |
| bool | checkPrecondition () const override |
| void | onPreconditionSatisfied () override |
| void | onPreconditionNotSatisfied () override |
| Protected Member Functions inherited from Intent | |
| void | runDependency (Intent *dependency) |
| void | emitFinished () |
| void | emitFailed (const QString &reason) |
Private Member Functions | |
| void | processListRooms (const Event_ListRooms &event) |
| void | openRoom (const ServerInfo_Room &roomInfo) |
| void | handleJoinResponse (const Response &response) |
| void | onClientStatusChanged (ClientStatus status) |
| bool | selectOpenRoom () |
Private Attributes | |
| TabSupervisor * | tabSupervisor |
| RemoteClient * | remoteClient |
| QScopedPointer< ContextJoinRoom > | context |
| QString | roomName |
| bool | listening = false |
| bool | joinPending = false |
| QTimer | checkTimer |
| QTimer | refreshTimer |
Additional Inherited Members | |
| Signals inherited from Intent | |
| void | finished () |
| void | failed (QString reason) |
Connects to the configured server and opens a room identified by its name.
Room ids are assigned by the server per session, so the room is resolved by name from the room list once the client is logged in. If the room is already open it is simply selected.
The join itself is sent directly through the client instead of TabServer::joinRoom, so a failed join only fails the intent silently instead of popping a modal error box during startup. Success is routed to TabSupervisor::addRoomTab, the same tab-creation machinery the normal join flow uses.
| IntentOpenServerRoomByName::IntentOpenServerRoomByName | ( | TabSupervisor * | _tabSupervisor, |
| RemoteClient * | _remoteClient, | ||
| std::unique_ptr< ContextJoinRoom > | _context, | ||
| const QString & | _roomName ) |
|
overrideprotectedvirtual |
Implements Intent.
|
private |
|
private |
|
overrideprotectedvirtual |
|
overrideprotectedvirtual |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |