RhythmGame 1.4.3
Loading...
Searching...
No Matches
Public Types | Signals | Public Member Functions | Properties | List of all members
arena::ArenaRoomListModel Class Reference

#include <ArenaRoomListModel.h>

Inheritance diagram for arena::ArenaRoomListModel:
Inheritance graph
[legend]
Collaboration diagram for arena::ArenaRoomListModel:
Collaboration graph
[legend]

Public Types

enum  Roles {
  RoomIdRole = Qt::UserRole + 1 , NameRole , PhaseRole , PasswordProtectedRole ,
  ConnectedCountRole , ReservedCountRole , MaximumCountRole , MembersRole
}
 

Signals

void countChanged ()
 

Public Member Functions

 ArenaRoomListModel (QObject *parent=nullptr)
 
auto rowCount (const QModelIndex &parent={}) const -> int override
 
auto data (const QModelIndex &index, int role) const -> QVariant override
 
auto roleNames () const -> QHash< int, QByteArray > override
 
auto replace (QVector< RoomSummary > rooms) -> bool
 
auto applyDelta (const QVector< RoomSummary > &upserts, const QVector< QString > &removedRoomIds) -> bool
 
auto findRoom (QStringView id) const -> const RoomSummary *
 
void upsert (RoomSummary room)
 
auto remove (QStringView roomId) -> bool
 
void clear ()
 

Properties

int count
 

Member Enumeration Documentation

◆ Roles

Enumerator
RoomIdRole 
NameRole 
PhaseRole 
PasswordProtectedRole 
ConnectedCountRole 
ReservedCountRole 
MaximumCountRole 
MembersRole 

Constructor & Destructor Documentation

◆ ArenaRoomListModel()

arena::ArenaRoomListModel::ArenaRoomListModel ( QObject *  parent = nullptr)
explicit

Member Function Documentation

◆ applyDelta()

auto arena::ArenaRoomListModel::applyDelta ( const QVector< RoomSummary > &  upserts,
const QVector< QString > &  removedRoomIds 
) -> bool

◆ clear()

void arena::ArenaRoomListModel::clear ( )

◆ countChanged

void arena::ArenaRoomListModel::countChanged ( )
signal

◆ data()

auto arena::ArenaRoomListModel::data ( const QModelIndex &  index,
int  role 
) const -> QVariant
override

◆ findRoom()

auto arena::ArenaRoomListModel::findRoom ( QStringView  id) const -> const RoomSummary*

◆ remove()

auto arena::ArenaRoomListModel::remove ( QStringView  roomId) -> bool

◆ replace()

auto arena::ArenaRoomListModel::replace ( QVector< RoomSummary >  rooms) -> bool

◆ roleNames()

auto arena::ArenaRoomListModel::roleNames ( ) const -> QHash<int, QByteArray>
override

◆ rowCount()

auto arena::ArenaRoomListModel::rowCount ( const QModelIndex &  parent = {}) const -> int
override

◆ upsert()

void arena::ArenaRoomListModel::upsert ( RoomSummary  room)

Property Documentation

◆ count

int arena::ArenaRoomListModel::count
read

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