Paints a cell containing text or an icon in a ModListView.
More...
#include <tablecelldelegate.h>
|
| TableCellDelegate (QSortFilterProxyModel *proxy, QObject *parent) |
| Constructor.
|
|
void | paint (QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &view_index) const override |
| Paints the cells background and text or icon.
|
|
|
QSortFilterProxyModel * | proxy_model_ = nullptr |
| Proxy model used to sort or filter the underlying model.
|
|
ModListView * | parent_view_ |
| Convenience pointer to parent view. Points to the same address as this->parent.
|
|
Paints a cell containing text or an icon in a ModListView.
◆ TableCellDelegate()
TableCellDelegate::TableCellDelegate |
( |
QSortFilterProxyModel * | proxy, |
|
|
QObject * | parent ) |
|
explicit |
Constructor.
- Parameters
-
parent | Parent of this object. |
proxy | Proxy model used, or nullptr if non is used. |
◆ paint()
void TableCellDelegate::paint |
( |
QPainter * | painter, |
|
|
const QStyleOptionViewItem & | option, |
|
|
const QModelIndex & | view_index ) const |
|
override |
Paints the cells background and text or icon.
Uses alternating row colors and highlight / mouse hover colors, depending on the selection status of the cell.
- Parameters
-
painter | Painter used to draw. |
option | Style options. |
view_index | The target views index. |
The documentation for this class was generated from the following files: