init
This commit is contained in:
31
device/workfileedit/spinboxdelegate.h
Normal file
31
device/workfileedit/spinboxdelegate.h
Normal file
@@ -0,0 +1,31 @@
|
||||
#ifndef SPINBOXDELEGATE_H
|
||||
#define SPINBOXDELEGATE_H
|
||||
|
||||
|
||||
#include <QStyledItemDelegate>
|
||||
#include <QItemDelegate>
|
||||
#include <QModelIndex>
|
||||
#include <QPainter>
|
||||
#include <QWidget>
|
||||
|
||||
#define COMBOXCOL 1
|
||||
|
||||
class SpinBoxDelegate: public QItemDelegate
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
SpinBoxDelegate(QObject *parent = nullptr);
|
||||
~SpinBoxDelegate();
|
||||
|
||||
void paint(QPainter *painter, const QStyleOptionViewItem &option,
|
||||
const QModelIndex &index) const;
|
||||
QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const;
|
||||
|
||||
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;
|
||||
};
|
||||
|
||||
#endif // SPINBOXDELEGATE_H
|
||||
Reference in New Issue
Block a user