mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
28 lines
723 B
C++
28 lines
723 B
C++
|
#include "accountmodel.hpp"
|
||
|
|
||
|
namespace chatterino {
|
||
|
namespace controllers {
|
||
|
namespace accounts {
|
||
|
|
||
|
AccountModel::AccountModel(QObject *parent)
|
||
|
: util::SignalVectorModel<std::shared_ptr<Account>>(1, parent)
|
||
|
{
|
||
|
}
|
||
|
|
||
|
// turn a vector item into a model row
|
||
|
std::shared_ptr<Account> AccountModel::getItemFromRow(std::vector<QStandardItem *> &row)
|
||
|
{
|
||
|
return nullptr;
|
||
|
}
|
||
|
|
||
|
// turns a row in the model into a vector item
|
||
|
void AccountModel::getRowFromItem(const std::shared_ptr<Account> &item,
|
||
|
std::vector<QStandardItem *> &row)
|
||
|
{
|
||
|
row[0]->setData(item->toString(), Qt::DisplayRole);
|
||
|
}
|
||
|
|
||
|
} // namespace accounts
|
||
|
} // namespace controllers
|
||
|
} // namespace chatterino
|