Songbook-Client  0.7
This application is a manager of customguitar songbooks
 All Classes Files Functions Variables Enumerations Enumerator Pages
song-item-delegate.hh
Go to the documentation of this file.
1 // Copyright (C) 2009-2011, Romain Goffe <romain.goffe@gmail.com>
2 // Copyright (C) 2009-2011, Alexandre Dupas <alexandre.dupas@gmail.com>
3 //
4 // This program is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU General Public License as
6 // published by the Free Software Foundation; either version 2 of the
7 // License, or (at your option) any later version.
8 //
9 // This program is distributed in the hope that it will be useful, but
10 // WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 // General Public License for more details.
13 //
14 // You should have received a copy of the GNU General Public License
15 // along with this program; if not, write to the Free Software
16 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17 // 02110-1301, USA.
18 //******************************************************************************
19 
20 #ifndef __SONG_ITEM_DELEGATE_HH__
21 #define __SONG_ITEM_DELEGATE_HH__
22 
23 #include <QStyledItemDelegate>
24 
33 class CSongItemDelegate : public QStyledItemDelegate
34 {
35  Q_OBJECT
36 
37 public:
39  CSongItemDelegate(QObject *parent = 0);
40 
43 
47  virtual void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const;
48 
52  virtual QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const;
53 };
54 
55 #endif // __SONG_ITEM_DELEGATE_HH__