47 #ifndef _MIRA_SPINBOXDELEGATE_H_ 48 #define _MIRA_SPINBOXDELEGATE_H_ 50 #include <QStyledItemDelegate> 51 #include <QDoubleSpinBox> 61 double maxRange,
double step,
62 double defvalue,
const QString& suffix =
"",
63 bool buttons =
true,
bool readonly =
false,
64 unsigned int decimals = 2);
67 int defvalue,
const QString& suffix =
"",
68 bool buttons =
true,
bool readonly =
false);
86 void setSpinBoxFormat(
double minRange,
double maxRange,
double step,
double defvalue,
87 const QString& suffix =
"",
bool buttons =
true,
unsigned int decimals = 2);
88 void setRange(
double minRange,
double maxRange,
double step);
89 void setDefaultValue(
double defvalue);
90 void setSuffix(
const QString& suffix);
91 void setShowButtons(
bool show);
92 void setDecimals(
unsigned int decimals);
98 QWidget *createEditor(QWidget *parent,
const QStyleOptionViewItem &option,
99 const QModelIndex &index)
const;
101 void setEditorData(QWidget *editor,
const QModelIndex &index)
const;
102 void setModelData(QWidget *editor, QAbstractItemModel *model,
103 const QModelIndex &index)
const;
105 void updateEditorGeometry(QWidget *editor,
const QStyleOptionViewItem &option,
106 const QModelIndex &index)
const;
108 QString displayText(
const QVariant &value,
const QLocale &locale)
const;
117 unsigned int mDecimals;
Delegate for a QTableWidgetItem (or any model-view item for that matter).
Definition: SpinBoxDelegate.h:76
specialize cv::DataType for our ImgPixel and inherit from cv::DataType<Vec>
Definition: IOService.h:67
MIRA_GUI_WIDGETS_EXPORT QSpinBox * createSpinBox(QWidget *parent, int min, int max, int step, int defvalue, const QString &suffix="", bool buttons=true, bool readonly=false)
PropertyHint step(const T &step)
Sets the attribute "step" to the specified value.
Definition: PropertyHint.h:265
MIRA_GUI_WIDGETS_EXPORT QDoubleSpinBox * createDoubleSpinBox(QWidget *parent, double minRange, double maxRange, double step, double defvalue, const QString &suffix="", bool buttons=true, bool readonly=false, unsigned int decimals=2)