2013-04-27 15:27:27 +00:00
|
|
|
#ifndef MODELDELEGATES_H
|
|
|
|
#define MODELDELEGATES_H
|
|
|
|
|
2013-05-02 22:27:36 +00:00
|
|
|
#include <QStyledItemDelegate>
|
2013-04-27 15:27:27 +00:00
|
|
|
|
2013-05-02 22:27:36 +00:00
|
|
|
class StarWidgetsDelegate : public QStyledItemDelegate {
|
2013-04-27 15:27:27 +00:00
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2013-05-23 04:25:05 +00:00
|
|
|
explicit StarWidgetsDelegate(QWidget* parent = 0);
|
|
|
|
virtual void paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const;
|
|
|
|
virtual QSize sizeHint(const QStyleOptionViewItem& option, const QModelIndex& index) const;
|
2013-05-02 22:27:36 +00:00
|
|
|
private:
|
|
|
|
QWidget *parentWidget;
|
2013-04-27 15:27:27 +00:00
|
|
|
};
|
2013-05-22 17:11:49 +00:00
|
|
|
|
|
|
|
class TankInfoDelegate : public QStyledItemDelegate{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2013-05-23 04:25:05 +00:00
|
|
|
explicit TankInfoDelegate(QObject* parent = 0);
|
|
|
|
virtual QWidget* createEditor(QWidget* parent, const QStyleOptionViewItem& option, const QModelIndex& index) const;
|
2013-05-22 17:11:49 +00:00
|
|
|
};
|
|
|
|
|
2013-04-27 15:27:27 +00:00
|
|
|
#endif
|