Files
chatterino2/src/controllers/highlights/UserHighlightModel.hpp
Auro d6ccab2cdf Added option to highlight your own messages (#3833)
* Removed magic numbers when checking rowIndex

* Swap from static ints to enum

* Referred enum members by enum name

* Fixed formatting

* Added highlight option for self messages

* Update CHANGELOG.md

* Made disabled by default

* Moved setting from Messages tab to Users tab

* Moved checks to HighlightController

* Set row index to 0

sillE silly me

* Update CHANGELOG.md

* Moved check outside of loop

* Improved naming and documentation on variables

* Fixed formatting

* Fix compile errors

* Update ColorProvider self message highlight color when it's changed

Use the ColorProvider self message highlight color instead of rolling
our own non-updating color

* Update changelog entry

* Remove unused `customColor` from user highlights builder

* Use explicit lambda capture

* Update comment for the color provider color

* HighlightModelHpp: Future-proof custom row enum B)

* Document UserHighlightModel color changes

* Update colorprovider comment

* Update enabled, show in mentions & color setting paths

* Rename settings from `selfMessagesHighlight` to `selfMessageHighlight`

---------

Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
2023-01-30 11:40:50 +01:00

34 lines
881 B
C++

#pragma once
#include "common/SignalVectorModel.hpp"
#include <QObject>
namespace chatterino {
class HighlightController;
class HighlightPhrase;
class UserHighlightModel : public SignalVectorModel<HighlightPhrase>
{
public:
explicit UserHighlightModel(QObject *parent);
protected:
// vector into model row
virtual HighlightPhrase getItemFromRow(
std::vector<QStandardItem *> &row,
const HighlightPhrase &original) override;
virtual void getRowFromItem(const HighlightPhrase &item,
std::vector<QStandardItem *> &row) override;
virtual void afterInit() override;
virtual void customRowSetData(const std::vector<QStandardItem *> &row,
int column, const QVariant &value, int role,
int rowIndex) override;
};
} // namespace chatterino