Cockatrice 2025-11-30-Development-2.11.0-beta.38
A cross-platform virtual tabletop for multiplayer card games
Loading...
Searching...
No Matches
RemoteDeckList_TreeModel Class Reference

#include <remote_decklist_tree_widget.h>

Inheritance diagram for RemoteDeckList_TreeModel:
[legend]
Collaboration diagram for RemoteDeckList_TreeModel:
[legend]

Classes

class  DirectoryNode
class  FileNode
class  Node

Signals

void treeRefreshed ()

Public Member Functions

template<typename T>
getNode (const QModelIndex &index) const
 RemoteDeckList_TreeModel (AbstractClient *_client, QObject *parent=nullptr)
 ~RemoteDeckList_TreeModel () override
int rowCount (const QModelIndex &parent=QModelIndex()) const override
int columnCount (const QModelIndex &=QModelIndex()) const override
QVariant data (const QModelIndex &index, int role) const override
QVariant headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const override
QModelIndex index (int row, int column, const QModelIndex &parent=QModelIndex()) const override
QModelIndex parent (const QModelIndex &index) const override
Qt::ItemFlags flags (const QModelIndex &index) const override
DirectoryNodegetRoot () const
void addFileToTree (const ServerInfo_DeckStorage_TreeItem &file, DirectoryNode *parent)
void addFolderToTree (const ServerInfo_DeckStorage_TreeItem &folder, DirectoryNode *parent)
DirectoryNodeaddNamedFolderToTree (const QString &name, DirectoryNode *parent)
void removeNode (Node *node)
void refreshTree ()
void clearTree ()

Private Slots

void deckListFinished (const Response &r)

Private Member Functions

QModelIndex nodeToIndex (Node *node) const

Private Attributes

AbstractClientclient
DirectoryNoderoot
QIcon fileIcon
QIcon dirIcon

Constructor & Destructor Documentation

◆ RemoteDeckList_TreeModel()

RemoteDeckList_TreeModel::RemoteDeckList_TreeModel ( AbstractClient * _client,
QObject * parent = nullptr )
explicit
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ~RemoteDeckList_TreeModel()

RemoteDeckList_TreeModel::~RemoteDeckList_TreeModel ( )
override

Member Function Documentation

◆ addFileToTree()

void RemoteDeckList_TreeModel::addFileToTree ( const ServerInfo_DeckStorage_TreeItem & file,
DirectoryNode * parent )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ addFolderToTree()

void RemoteDeckList_TreeModel::addFolderToTree ( const ServerInfo_DeckStorage_TreeItem & folder,
DirectoryNode * parent )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ addNamedFolderToTree()

RemoteDeckList_TreeModel::DirectoryNode * RemoteDeckList_TreeModel::addNamedFolderToTree ( const QString & name,
DirectoryNode * parent )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ clearTree()

void RemoteDeckList_TreeModel::clearTree ( )
Here is the caller graph for this function:

◆ columnCount()

int RemoteDeckList_TreeModel::columnCount ( const QModelIndex & = QModelIndex()) const
nodiscardoverride

◆ data()

QVariant RemoteDeckList_TreeModel::data ( const QModelIndex & index,
int role ) const
nodiscardoverride
Here is the call graph for this function:

◆ deckListFinished

void RemoteDeckList_TreeModel::deckListFinished ( const Response & r)
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ flags()

Qt::ItemFlags RemoteDeckList_TreeModel::flags ( const QModelIndex & index) const
nodiscardoverride
Here is the call graph for this function:

◆ getNode()

template<typename T>
T RemoteDeckList_TreeModel::getNode ( const QModelIndex & index) const
inlinenodiscard
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getRoot()

DirectoryNode * RemoteDeckList_TreeModel::getRoot ( ) const
inlinenodiscard

◆ headerData()

QVariant RemoteDeckList_TreeModel::headerData ( int section,
Qt::Orientation orientation,
int role = Qt::DisplayRole ) const
nodiscardoverride

◆ index()

QModelIndex RemoteDeckList_TreeModel::index ( int row,
int column,
const QModelIndex & parent = QModelIndex() ) const
nodiscardoverride
Here is the call graph for this function:
Here is the caller graph for this function:

◆ nodeToIndex()

QModelIndex RemoteDeckList_TreeModel::nodeToIndex ( Node * node) const
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ parent()

QModelIndex RemoteDeckList_TreeModel::parent ( const QModelIndex & index) const
nodiscardoverride
Here is the call graph for this function:
Here is the caller graph for this function:

◆ refreshTree()

void RemoteDeckList_TreeModel::refreshTree ( )
Here is the call graph for this function:

◆ removeNode()

void RemoteDeckList_TreeModel::removeNode ( RemoteDeckList_TreeModel::Node * node)
Here is the call graph for this function:

◆ rowCount()

int RemoteDeckList_TreeModel::rowCount ( const QModelIndex & parent = QModelIndex()) const
nodiscardoverride
Here is the call graph for this function:

◆ treeRefreshed

void RemoteDeckList_TreeModel::treeRefreshed ( )
signal
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ client

AbstractClient* RemoteDeckList_TreeModel::client
private

◆ dirIcon

QIcon RemoteDeckList_TreeModel::dirIcon
private

◆ fileIcon

QIcon RemoteDeckList_TreeModel::fileIcon
private

◆ root

DirectoryNode* RemoteDeckList_TreeModel::root
private

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