mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-12-18 10:02:41 -05:00
added QStyledItemDelegate based on ChannelFilesStatusWidget. Not working yet.
This commit is contained in:
parent
a5dd33e085
commit
b9c41b31d4
6 changed files with 93 additions and 21 deletions
|
|
@ -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:
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue