added QStyledItemDelegate based on ChannelFilesStatusWidget. Not working yet.

This commit is contained in:
csoler 2020-06-05 17:34:56 +02:00
parent a5dd33e085
commit b9c41b31d4
No known key found for this signature in database
GPG key ID: 7BCA522266C0804C
6 changed files with 93 additions and 21 deletions

View file

@ -23,7 +23,7 @@
#include <map>
#include <QAbstractItemDelegate>
#include <QStyledItemDelegate>
#include "gui/gxs/GxsMessageFramePostWidget.h"
#include "gui/feeds/FeedHolder.h"
@ -38,17 +38,21 @@ class FeedItem;
class RsGxsChannelPostsModel;
class RsGxsChannelPostFilesModel;
class ChannelPostFilesDelegate: public QAbstractItemDelegate
class ChannelPostFilesDelegate: public QStyledItemDelegate
{
Q_OBJECT
public:
ChannelPostFilesDelegate(QObject *parent=0) : QAbstractItemDelegate(parent){}
ChannelPostFilesDelegate(QObject *parent=0) : QStyledItemDelegate(parent){}
virtual ~ChannelPostFilesDelegate(){}
void paint(QPainter * painter, const QStyleOptionViewItem & option, const QModelIndex & index) const override;
QSize sizeHint(const QStyleOptionViewItem& option, const QModelIndex& index) const override;
void updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &) const override;
QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const override;
void setEditorData(QWidget *editor, const QModelIndex &index) const override;
private:
};