LibrePCB Developers Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 Attributes

LengthUnit mUnit
 

Detailed Description

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

Constructor & Destructor Documentation

LengthDelegate ( QObject *  parent = nullptr)
explicitnoexcept
LengthDelegate ( const LengthDelegate other)
delete
~LengthDelegate ( )
noexcept

Member Function Documentation

void setUnit ( const LengthUnit unit)
noexcept
QString displayText ( const QVariant &  value,
const QLocale &  locale 
) const
override

+ Here is the call graph for this function:

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

+ Here is the call graph for this function:

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

+ Here is the call graph for this function:

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

+ Here is the call graph for this function:

void updateEditorGeometry ( QWidget *  editor,
const QStyleOptionViewItem &  option,
const QModelIndex &  index 
) const
override
LengthDelegate& operator= ( const LengthDelegate rhs)
delete

Member Data Documentation

LengthUnit mUnit
private

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