Delegate for a QTableWidgetItem (or any model-view item for that matter).
More...
#include <widgets/SpinBoxDelegate.h>
|
| SpinBoxDelegate (QObject *parent=0) |
|
virtual | ~SpinBoxDelegate () |
|
void | setSpinBoxFormat (double minRange, double maxRange, double step, double defvalue, const QString &suffix="", bool buttons=true, unsigned int decimals=2) |
|
void | setRange (double minRange, double maxRange, double step) |
|
void | setDefaultValue (double defvalue) |
|
void | setSuffix (const QString &suffix) |
|
void | setShowButtons (bool show) |
|
void | setDecimals (unsigned int decimals) |
|
QWidget * | createEditor (QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const |
|
void | setEditorData (QWidget *editor, const QModelIndex &index) const |
|
void | setModelData (QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const |
|
void | updateEditorGeometry (QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const |
|
QString | displayText (const QVariant &value, const QLocale &locale) const |
|
Delegate for a QTableWidgetItem (or any model-view item for that matter).
Is able to format a double value to two decimals precision
◆ SpinBoxDelegate()
◆ ~SpinBoxDelegate()
◆ setSpinBoxFormat()
void setSpinBoxFormat |
( |
double |
minRange, |
|
|
double |
maxRange, |
|
|
double |
step, |
|
|
double |
defvalue, |
|
|
const QString & |
suffix = "" , |
|
|
bool |
buttons = true , |
|
|
unsigned int |
decimals = 2 |
|
) |
| |
◆ setRange()
void setRange |
( |
double |
minRange, |
|
|
double |
maxRange, |
|
|
double |
step |
|
) |
| |
◆ setDefaultValue()
void setDefaultValue |
( |
double |
defvalue | ) |
|
◆ setSuffix()
void setSuffix |
( |
const QString & |
suffix | ) |
|
◆ setShowButtons()
void setShowButtons |
( |
bool |
show | ) |
|
◆ setDecimals()
void setDecimals |
( |
unsigned int |
decimals | ) |
|
◆ createEditor()
QWidget* createEditor |
( |
QWidget * |
parent, |
|
|
const QStyleOptionViewItem & |
option, |
|
|
const QModelIndex & |
index |
|
) |
| const |
◆ setEditorData()
void setEditorData |
( |
QWidget * |
editor, |
|
|
const QModelIndex & |
index |
|
) |
| const |
◆ setModelData()
void setModelData |
( |
QWidget * |
editor, |
|
|
QAbstractItemModel * |
model, |
|
|
const QModelIndex & |
index |
|
) |
| const |
◆ updateEditorGeometry()
void updateEditorGeometry |
( |
QWidget * |
editor, |
|
|
const QStyleOptionViewItem & |
option, |
|
|
const QModelIndex & |
index |
|
) |
| const |
◆ displayText()
QString displayText |
( |
const QVariant & |
value, |
|
|
const QLocale & |
locale |
|
) |
| const |
The documentation for this class was generated from the following file: