renamed file to fix compiling

This commit is contained in:
fourtf
2018-07-05 16:09:08 +02:00
parent 6059f98c21
commit d925704aa9
@@ -0,0 +1,36 @@
#include "UserHighlightModel.hpp"
#include "Application.hpp"
#include "singletons/Settings.hpp"
#include "util/StandardItemHelper.hpp"
namespace chatterino {
// commandmodel
UserHighlightModel::UserHighlightModel(QObject *parent)
: SignalVectorModel<HighlightPhrase>(4, parent)
{
}
// turn vector item into model row
HighlightPhrase UserHighlightModel::getItemFromRow(std::vector<QStandardItem *> &row,
const HighlightPhrase &original)
{
// key, regex
return HighlightPhrase{
row[0]->data(Qt::DisplayRole).toString(), row[1]->data(Qt::CheckStateRole).toBool(),
row[2]->data(Qt::CheckStateRole).toBool(), row[3]->data(Qt::CheckStateRole).toBool()};
}
// row into vector item
void UserHighlightModel::getRowFromItem(const HighlightPhrase &item,
std::vector<QStandardItem *> &row)
{
setStringItem(row[0], item.getPattern());
setBoolItem(row[1], item.getAlert());
setBoolItem(row[2], item.getSound());
setBoolItem(row[3], item.isRegex());
}
} // namespace chatterino