Atlas Game Manager
A game manager for f95 and dlsite written in c++
Loading...
Searching...
No Matches
ImageDelegate.hpp
Go to the documentation of this file.
1//
2// Created by kj16609 on 4/17/23.
3//
4
5#pragma once
6#ifndef ATLASGAMEMANAGER_IMAGEDELEGATE_HPP
7#define ATLASGAMEMANAGER_IMAGEDELEGATE_HPP
8
9#include <QAbstractItemDelegate>
10
12
13class ImageDelegate final : public QAbstractItemDelegate
14{
15 Q_OBJECT
16 Q_DISABLE_COPY_MOVE( ImageDelegate )
17
19
20 public:
21
22 bool use_thumbnils { true };
23
24 ImageDelegate( FilepathModel* model, QObject* parent = nullptr ) : QAbstractItemDelegate( parent ), m_model( model )
25 {}
26
27 void paint( QPainter* painter, const QStyleOptionViewItem& item, const QModelIndex& index ) const override;
28 QSize sizeHint( const QStyleOptionViewItem& item, const QModelIndex& index ) const override;
29};
30
31#endif //ATLASGAMEMANAGER_IMAGEDELEGATE_HPP
Definition FilepathModel.hpp:18
bool use_thumbnils
Definition ImageDelegate.hpp:22
ImageDelegate(FilepathModel *model, QObject *parent=nullptr)
Definition ImageDelegate.hpp:24
QSize sizeHint(const QStyleOptionViewItem &item, const QModelIndex &index) const override
Definition ImageDelegate.cpp:62
void paint(QPainter *painter, const QStyleOptionViewItem &item, const QModelIndex &index) const override
Definition ImageDelegate.cpp:18
FilepathModel * m_model
Definition ImageDelegate.hpp:18