Limo
A simple mod manager
Loading...
Searching...
No Matches
tablecelldelegate.h
Go to the documentation of this file.
1
5
6#pragma once
7
8#include "modlistproxymodel.h"
9#include "modlistview.h"
10#include <QStyledItemDelegate>
11
12
16class TableCellDelegate : public QStyledItemDelegate
17{
18 Q_OBJECT
19public:
25 explicit TableCellDelegate(QSortFilterProxyModel* proxy, QObject* parent);
26
36 void paint(QPainter* painter,
37 const QStyleOptionViewItem& option,
38 const QModelIndex& view_index) const override;
39
40protected:
42 QSortFilterProxyModel* proxy_model_ = nullptr;
45};
Displays mod data in the form of a mod list using a ModListModel.
Definition modlistview.h:21
ModListView * parent_view_
Convenience pointer to parent view. Points to the same address as this->parent.
Definition tablecelldelegate.h:44
TableCellDelegate(QSortFilterProxyModel *proxy, QObject *parent)
Constructor.
Definition tablecelldelegate.cpp:7
void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &view_index) const override
Paints the cells background and text or icon.
Definition tablecelldelegate.cpp:12
QSortFilterProxyModel * proxy_model_
Proxy model used to sort or filter the underlying model.
Definition tablecelldelegate.h:42
Header for the ModListProxyModel class.
Header for the ModListView class.