LibrePCB Developers Documentation
LengthDelegate Class Referencefinal

Subclass of QStyledItemDelegate to display/edit librepcb::Length values. More...

#include <lengthdelegate.h>

Inherits QStyledItemDelegate.

+ Collaboration diagram for LengthDelegate:

Public Member Functions

 LengthDelegate (QObject *parent=nullptr) noexcept
 
 LengthDelegate (const LengthDelegate &other)=delete
 
 ~LengthDelegate () noexcept
 
void setUnit (const LengthUnit &unit) noexcept
 
QString displayText (const QVariant &value, const QLocale &locale) const override
 
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
 
LengthDelegateoperator= (const LengthDelegate &rhs)=delete
 

Private Member Functions

void editingFinished () noexcept
 

Private Attributes

LengthUnit mUnit
 

Detailed Description

Subclass of QStyledItemDelegate to display/edit librepcb::Length values.

Constructor & Destructor Documentation

◆ LengthDelegate() [1/2]

LengthDelegate ( QObject *  parent = nullptr)
explicitnoexcept

◆ LengthDelegate() [2/2]

LengthDelegate ( const LengthDelegate other)
delete

◆ ~LengthDelegate()

~LengthDelegate ( )
noexcept

Member Function Documentation

◆ setUnit()

void setUnit ( const LengthUnit unit)
noexcept

◆ displayText()

QString displayText ( const QVariant &  value,
const QLocale &  locale 
) const
override
+ Here is the call graph for this function:

◆ createEditor()

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

◆ setEditorData()

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

◆ setModelData()

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

◆ updateEditorGeometry()

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

◆ operator=()

LengthDelegate & operator= ( const LengthDelegate rhs)
delete

◆ editingFinished()

void editingFinished ( )
privatenoexcept
+ Here is the caller graph for this function:

Member Data Documentation

◆ mUnit

LengthUnit mUnit
private

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