Crossfire Server, Trunk
CREMultilineItemDelegate.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 _CREMULTILINEITEMDELEGATE_H
14 #define _CREMULTILINEITEMDELEGATE_H
15 
19 class CREMultilineItemDelegate : public QStyledItemDelegate
20 {
21  public:
28  CREMultilineItemDelegate(QObject* parent, bool asStringList = true, bool trimEmpty = false);
29  virtual ~CREMultilineItemDelegate();
30 
31  virtual QWidget* createEditor(QWidget* parent, const QStyleOptionViewItem& option, const QModelIndex& index) const override;
32  virtual void setEditorData(QWidget* editor, const QModelIndex& index) const override;
33  virtual void setModelData(QWidget* editor, QAbstractItemModel* model, const QModelIndex& index) const override;
34 
35 private:
38 };
39 
40 #endif /* _CREMULTILINEITEMDELEGATE_H */
CREMultilineItemDelegate::~CREMultilineItemDelegate
virtual ~CREMultilineItemDelegate()
Definition: CREMultilineItemDelegate.cpp:22
CREMultilineItemDelegate::setEditorData
virtual void setEditorData(QWidget *editor, const QModelIndex &index) const override
Definition: CREMultilineItemDelegate.cpp:33
CREMultilineItemDelegate::CREMultilineItemDelegate
CREMultilineItemDelegate(QObject *parent, bool asStringList=true, bool trimEmpty=false)
Definition: CREMultilineItemDelegate.cpp:17
CREMultilineItemDelegate::createEditor
virtual QWidget * createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const override
Definition: CREMultilineItemDelegate.cpp:26
CREMultilineItemDelegate::myTrimEmpty
bool myTrimEmpty
Definition: CREMultilineItemDelegate.h:37
CFweardisguise.option
option
Definition: CFweardisguise.py:16
npc_dialog.index
int index
Definition: npc_dialog.py:102
CREMultilineItemDelegate
Definition: CREMultilineItemDelegate.h:19
CREMultilineItemDelegate::myAsStringList
bool myAsStringList
Definition: CREMultilineItemDelegate.h:36
CREMultilineItemDelegate::setModelData
virtual void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const override
Definition: CREMultilineItemDelegate.cpp:58