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
+ Here is the caller graph for this function:

◆ ComboBoxDelegate() [2/2]

ComboBoxDelegate ( const ComboBoxDelegate other)
delete

◆ ~ComboBoxDelegate()

~ComboBoxDelegate ( )
noexcept
+ Here is the caller graph for this function:

Member Function Documentation

◆ createEditor()

QWidget * createEditor ( QWidget *  parent,
const QStyleOptionViewItem &  option,
const QModelIndex &  index 
) const
override
+ Here is the caller graph for this function:

◆ setEditorData()

void setEditorData ( QWidget *  editor,
const QModelIndex &  index 
) const
override
+ Here is the caller graph for this function:

◆ setModelData()

void setModelData ( QWidget *  editor,
QAbstractItemModel *  model,
const QModelIndex &  index 
) const
override
+ Here is the caller graph for this function:

◆ updateEditorGeometry()

void updateEditorGeometry ( QWidget *  editor,
const QStyleOptionViewItem &  option,
const QModelIndex &  index 
) const
override
+ Here is the caller graph for this function:

◆ operator=()

ComboBoxDelegate& operator= ( const ComboBoxDelegate rhs)
delete
+ Here is the caller graph for this function:

Member Data Documentation

◆ mEditable

bool mEditable
private

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