LibrePCB Developers Documentation
ComboBoxDelegate Class Referencefinal

Subclass of QStyledItemDelegate which uses QComboBox as item editor. More...

#include <comboboxdelegate.h>

Inherits QStyledItemDelegate.

+ Collaboration diagram for ComboBoxDelegate:

Classes

struct  Item
 
struct  Items
 

Public Member Functions

 ComboBoxDelegate (bool editable=false, QObject *parent=nullptr) noexcept
 
 ComboBoxDelegate (const ComboBoxDelegate &other)=delete
 
 ~ComboBoxDelegate () noexcept
 
QWidget * createEditor (QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const override
 
void setEditorData (QWidget *editor, const QModelIndex &index) const override
 
void setModelData (QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const override
 
void updateEditorGeometry (QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const override
 
ComboBoxDelegateoperator= (const ComboBoxDelegate &rhs)=delete
 

Private Attributes

bool mEditable
 

Detailed Description

Subclass of QStyledItemDelegate which uses QComboBox as item editor.

Constructor & Destructor Documentation

◆ ComboBoxDelegate() [1/2]

ComboBoxDelegate ( bool  editable = false,
QObject *  parent = nullptr 
)
explicitnoexcept

◆ ComboBoxDelegate() [2/2]

ComboBoxDelegate ( const ComboBoxDelegate other)
delete

◆ ~ComboBoxDelegate()

~ComboBoxDelegate ( )
noexcept

Member Function Documentation

◆ createEditor()

QWidget * createEditor ( QWidget *  parent,
const QStyleOptionViewItem &  option,
const QModelIndex &  index 
) const
override

◆ setEditorData()

void setEditorData ( QWidget *  editor,
const QModelIndex &  index 
) const
override

◆ setModelData()

void setModelData ( QWidget *  editor,
QAbstractItemModel *  model,
const QModelIndex &  index 
) const
override

◆ updateEditorGeometry()

void updateEditorGeometry ( QWidget *  editor,
const QStyleOptionViewItem &  option,
const QModelIndex &  index 
) const
override

◆ operator=()

ComboBoxDelegate & operator= ( const ComboBoxDelegate rhs)
delete

Member Data Documentation

◆ mEditable

bool mEditable
private

The documentation for this class was generated from the following files: