mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
27 lines
696 B
C++
27 lines
696 B
C++
|
#include "NotificationModel.hpp"
|
||
|
|
||
|
#include "Application.hpp"
|
||
|
#include "singletons/Settings.hpp"
|
||
|
#include "util/StandardItemHelper.hpp"
|
||
|
|
||
|
namespace chatterino {
|
||
|
|
||
|
NotificationModel::NotificationModel(QObject *parent)
|
||
|
: SignalVectorModel<QString>(1, parent)
|
||
|
{
|
||
|
}
|
||
|
|
||
|
// turn a vector item into a model row
|
||
|
QString NotificationModel::getItemFromRow(std::vector<QStandardItem *> &row,
|
||
|
const QString &original)
|
||
|
{
|
||
|
return QString(row[0]->data().toString());
|
||
|
}
|
||
|
|
||
|
void NotificationModel::getRowFromItem(const QString &item,
|
||
|
std::vector<QStandardItem *> &row)
|
||
|
{
|
||
|
setStringItem(row[0], item);
|
||
|
}
|
||
|
} // namespace chatterino
|