/*************************************************************************** Copyright 2008 Daniel Laidig ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #ifndef BUTTONDELEGATE_H #define BUTTONDELEGATE_H #include class WelcomeScreen; class ButtonDelegate : public KWidgetItemDelegate { Q_OBJECT public: ButtonDelegate(QAbstractItemView *itemView, WelcomeScreen *parent); virtual ~ButtonDelegate(); QList createItemWidgets() const; void updateItemWidgets(const QList widgets, const QStyleOptionViewItem &option, const QPersistentModelIndex &index) const; void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const; QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const; public slots: void slotEdit(); void slotPractice(); private: mutable int m_rightMargin; mutable int m_buttonHeight; WelcomeScreen *m_welcomeScreen; }; #endif