Crossfire Server, Trunk
CREStringListDelegate.h
Go to the documentation of this file.
1 /*
2  * Crossfire -- cooperative multi-player graphical RPG and adventure game
3  *
4  * Copyright (c) 2022 the Crossfire Development Team
5  *
6  * Crossfire is free software and comes with ABSOLUTELY NO WARRANTY. You are
7  * welcome to redistribute it under certain conditions. For details, please
8  * see COPYING and LICENSE.
9  *
10  * The authors can be reached via e-mail at <crossfire@metalforge.org>.
11  */
12 
13 #ifndef CRESTRINGLISTDELEGATE_H
14 #define CRESTRINGLISTDELEGATE_H
15 
16 #include <QtWidgets>
17 
21 class CREStringListDelegate : public QStyledItemDelegate
22 {
23 public:
24  CREStringListDelegate(QObject* parent);
25  virtual ~CREStringListDelegate();
26 
27  virtual QWidget* createEditor(QWidget* parent, const QStyleOptionViewItem& option, const QModelIndex& index) const override;
28  virtual void setEditorData(QWidget* editor, const QModelIndex& index) const override;
29  virtual void setModelData(QWidget* editor, QAbstractItemModel* model, const QModelIndex& index) const override;
30  virtual void updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const override;
31 };
32 
33 #endif /* CRESTRINGLISTDELEGATE_H */
CREStringListDelegate
Definition: CREStringListDelegate.h:21
CREStringListDelegate::updateEditorGeometry
virtual void updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const override
Definition: CREStringListDelegate.cpp:45
CREStringListDelegate::setEditorData
virtual void setEditorData(QWidget *editor, const QModelIndex &index) const override
Definition: CREStringListDelegate.cpp:29
CREStringListDelegate::CREStringListDelegate
CREStringListDelegate(QObject *parent)
Definition: CREStringListDelegate.cpp:16
CREStringListDelegate::setModelData
virtual void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const override
Definition: CREStringListDelegate.cpp:37
CFweardisguise.option
option
Definition: CFweardisguise.py:16
npc_dialog.index
int index
Definition: npc_dialog.py:102
CREStringListDelegate::createEditor
virtual QWidget * createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const override
Definition: CREStringListDelegate.cpp:24
CREStringListDelegate::~CREStringListDelegate
virtual ~CREStringListDelegate()
Definition: CREStringListDelegate.cpp:20