Chatterino
Public Member Functions | Protected Member Functions | Friends | List of all members
chatterino::AccountModel Class Reference

#include <AccountModel.hpp>

Inheritance diagram for chatterino::AccountModel:
[legend]
Collaboration diagram for chatterino::AccountModel:
[legend]

Public Member Functions

 AccountModel (QObject *parent)
 
- Public Member Functions inherited from chatterino::SignalVectorModel< std::shared_ptr< Account > >
 SignalVectorModel (int columnCount, QObject *parent=nullptr)
 
void initialize (SignalVector< std::shared_ptr< Account > > *vec)
 
SignalVectorModel< std::shared_ptr< Account > > * initialized (SignalVector< std::shared_ptr< Account > > *vec)
 
virtual ~SignalVectorModel ()
 
int rowCount (const QModelIndex &parent) const override
 
int columnCount (const QModelIndex &parent) const override
 
QVariant data (const QModelIndex &index, int role) const override
 
bool setData (const QModelIndex &index, const QVariant &value, int role) override
 
QVariant headerData (int section, Qt::Orientation orientation, int role) const override
 
bool setHeaderData (int section, Qt::Orientation orientation, const QVariant &value, int role=Qt::DisplayRole) override
 
Qt::ItemFlags flags (const QModelIndex &index) const override
 
QStandardItem * getItem (int row, int column)
 
void deleteRow (int row)
 
bool moveRows (const QModelIndex &sourceParent, int sourceRow, int count, const QModelIndex &destinationParent, int destinationChild) override
 
bool removeRows (int row, int count, const QModelIndex &parent) override
 
QStringList mimeTypes () const override
 
QMimeData * mimeData (const QModelIndexList &list) const override
 
bool dropMimeData (const QMimeData *data, Qt::DropAction action, int, int, const QModelIndex &parent) override
 
Qt::DropActions supportedDropActions () const override
 
int getModelIndexFromVectorIndex (int vectorIndex) const
 

Protected Member Functions

virtual std::shared_ptr< AccountgetItemFromRow (std::vector< QStandardItem *> &row, const std::shared_ptr< Account > &original) override
 
virtual void getRowFromItem (const std::shared_ptr< Account > &item, std::vector< QStandardItem *> &row) override
 
virtual int beforeInsert (const std::shared_ptr< Account > &item, std::vector< QStandardItem *> &row, int proposedIndex) override
 
virtual void afterRemoved (const std::shared_ptr< Account > &item, std::vector< QStandardItem *> &row, int index) override
 
- Protected Member Functions inherited from chatterino::SignalVectorModel< std::shared_ptr< Account > >
virtual void afterInit ()
 
virtual void customRowSetData (const std::vector< QStandardItem * > &row, int column, const QVariant &value, int role, int rowIndex)
 
void insertCustomRow (std::vector< QStandardItem * > row, int index)
 
void removeCustomRow (int index)
 
std::vector< QStandardItem *> createRow ()
 
const std::vector< Row > & rows () const
 

Friends

class AccountController
 

Constructor & Destructor Documentation

◆ AccountModel()

chatterino::AccountModel::AccountModel ( QObject *  parent)

Member Function Documentation

◆ afterRemoved()

void chatterino::AccountModel::afterRemoved ( const std::shared_ptr< Account > &  item,
std::vector< QStandardItem *> &  row,
int  index 
)
overrideprotectedvirtual

Reimplemented from chatterino::SignalVectorModel< std::shared_ptr< Account > >.

Here is the call graph for this function:

◆ beforeInsert()

int chatterino::AccountModel::beforeInsert ( const std::shared_ptr< Account > &  item,
std::vector< QStandardItem *> &  row,
int  proposedIndex 
)
overrideprotectedvirtual

Reimplemented from chatterino::SignalVectorModel< std::shared_ptr< Account > >.

Here is the call graph for this function:

◆ getItemFromRow()

std::shared_ptr< Account > chatterino::AccountModel::getItemFromRow ( std::vector< QStandardItem *> &  row,
const std::shared_ptr< Account > &  original 
)
overrideprotectedvirtual

◆ getRowFromItem()

void chatterino::AccountModel::getRowFromItem ( const std::shared_ptr< Account > &  item,
std::vector< QStandardItem *> &  row 
)
overrideprotectedvirtual

Friends And Related Function Documentation

◆ AccountController

friend class AccountController
friend

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