Crossfire Server, Trunk
CREPrePostConditionDelegate.h
Go to the documentation of this file.
1 #ifndef CREPREPOSTCONDITIONDELEGATE_H
2 #define CREPREPOSTCONDITIONDELEGATE_H
3 
4 #include "CREPrePostList.h"
5 
6 class MessageManager;
7 
11 class CREPrePostSingleConditionDelegate : public QStyledItemDelegate
12 {
13 public:
21 
22  virtual QWidget* createEditor(QWidget* parent, const QStyleOptionViewItem& option, const QModelIndex& index) const override;
23  virtual void setEditorData(QWidget* editor, const QModelIndex& index) const override;
24  virtual void setModelData(QWidget* editor, QAbstractItemModel* model, const QModelIndex& index) const override;
25  virtual void updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const override;
26 
27 private:
30 };
31 
35 class CREPrePostConditionDelegate : public QStyledItemDelegate
36 {
37 public:
46 
47  virtual QWidget* createEditor(QWidget* parent, const QStyleOptionViewItem& option, const QModelIndex& index) const;
48  virtual void setEditorData(QWidget* editor, const QModelIndex& index) const;
49  virtual void setModelData(QWidget* editor, QAbstractItemModel* model, const QModelIndex& index) const;
50  virtual void updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const override;
51 
52 private:
55 };
56 
57 #endif /* CREPREPOSTCONDITIONDELEGATE_H */
CREPrePostSingleConditionDelegate::myMode
CREPrePostList::Mode myMode
Definition: CREPrePostConditionDelegate.h:28
CREPrePostConditionDelegate::updateEditorGeometry
virtual void updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const override
Definition: CREPrePostConditionDelegate.cpp:89
CREPrePostConditionDelegate::setEditorData
virtual void setEditorData(QWidget *editor, const QModelIndex &index) const
Definition: CREPrePostConditionDelegate.cpp:63
CREPrePostList.h
CREPrePostConditionDelegate
Definition: CREPrePostConditionDelegate.h:35
CREPrePostSingleConditionDelegate::setModelData
virtual void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const override
Definition: CREPrePostConditionDelegate.cpp:24
CREPrePostSingleConditionDelegate::setEditorData
virtual void setEditorData(QWidget *editor, const QModelIndex &index) const override
Definition: CREPrePostConditionDelegate.cpp:16
CREPrePostSingleConditionDelegate::myMessages
const MessageManager * myMessages
Definition: CREPrePostConditionDelegate.h:29
CREPrePostConditionDelegate::setModelData
virtual void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const
Definition: CREPrePostConditionDelegate.cpp:78
CREPrePostList::Mode
Mode
Definition: CREPrePostList.h:18
MessageManager
Definition: MessageManager.h:13
CREPrePostConditionDelegate::CREPrePostConditionDelegate
CREPrePostConditionDelegate(QObject *parent, CREPrePostList::Mode mode, const MessageManager *manager)
Definition: CREPrePostConditionDelegate.cpp:49
CREPrePostConditionDelegate::myMessages
const MessageManager * myMessages
Definition: CREPrePostConditionDelegate.h:54
CREPrePostSingleConditionDelegate::CREPrePostSingleConditionDelegate
CREPrePostSingleConditionDelegate(QObject *parent, CREPrePostList::Mode mode, const MessageManager *manager)
Definition: CREPrePostConditionDelegate.cpp:6
CREPrePostSingleConditionDelegate::updateEditorGeometry
virtual void updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const override
Definition: CREPrePostConditionDelegate.cpp:36
CREPrePostConditionDelegate::~CREPrePostConditionDelegate
virtual ~CREPrePostConditionDelegate()
Definition: CREPrePostConditionDelegate.cpp:54
CREPrePostConditionDelegate::myMode
CREPrePostList::Mode myMode
Definition: CREPrePostConditionDelegate.h:53
CREPrePostSingleConditionDelegate::createEditor
virtual QWidget * createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const override
Definition: CREPrePostConditionDelegate.cpp:11
CFweardisguise.option
option
Definition: CFweardisguise.py:16
npc_dialog.index
int index
Definition: npc_dialog.py:102
CREPrePostConditionDelegate::createEditor
virtual QWidget * createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const
Definition: CREPrePostConditionDelegate.cpp:58
manager
static AssetsManager * manager
Definition: assets.cpp:63
CREPrePostSingleConditionDelegate
Definition: CREPrePostConditionDelegate.h:11