#include "serviceitemdelegate.h"
-#include <QPushButton>
-
#include "servicemodel.h"
#include <QAbstractItemView>
#include <QCheckBox>
#include <QPainter>
+#include <QPushButton>
ServiceItemDelegate::ServiceItemDelegate(QAbstractItemView* itemView, QObject* parent) :
KWidgetItemDelegate(itemView, parent)
QSize ServiceItemDelegate::sizeHint(const QStyleOptionViewItem &option,
const QModelIndex &index) const
{
- Q_UNUSED(index);
+ Q_UNUSED(index)
const QStyle *style = itemView()->style();
const int buttonHeight = style->pixelMetric(QStyle::PM_ButtonMargin) * 2 +
void ServiceItemDelegate::paint(QPainter* painter, const QStyleOptionViewItem& option,
const QModelIndex& index) const
{
- Q_UNUSED(index);
+ Q_UNUSED(index)
painter->save();
itemView()->style()->drawPrimitive(QStyle::PE_PanelItemViewItem, &option, painter);