Files
mediasystem/ClippingStation/pushbuttondelegate.h
T
2022-12-13 09:18:00 -06:00

58 lines
1.7 KiB
C++

/************************************************************************
* $Id: pushbuttondelegate.h 661 2011-04-05 13:16:53Z elzubeir $
*
* ------------
* Description:
* ------------
*
* (C) Copyright 2009-2011 ALLCONTENT. All rights reserved.
*
* -----------------
* Revision Details: (Updated by Revision Control System)
* -----------------
* $Date: 2011-04-05 17:16:53 +0400 (Tue, 05 Apr 2011) $
* $Author: elzubeir $
* $Revision: 661 $
* $HeadURL: file:///opt/svn/socialhose/trunk/app/ClippingStation/pushbuttondelegate.h $
*
************************************************************************/
#ifndef PUSHBUTTONDELEGATE_H
#define PUSHBUTTONDELEGATE_H
#include <QItemDelegate>
#include <QModelIndex>
#include <QObject>
#include <QSize>
#include <QSpinBox>
#include <QPushButton>
#include "tagswrapper.h"
class PushButtonDelegate : public QItemDelegate
{
public:
PushButtonDelegate(QObject *parent, TagsWrapper* sw);
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;
void paint ( QPainter * painter, const QStyleOptionViewItem & option, const QModelIndex & index ) const;
QSize sizeHint ( const QStyleOptionViewItem & option, const QModelIndex & index ) const;
private:
TagsWrapper * m_sw;
};
#endif // PUSHBUTTONDELEGATE_H