Scribus
Open source desktop publishing at your fingertips
sclistwidgetdelegate.h
1 /*
2 For general Scribus (>=1.3.2) copyright and licensing information please refer
3 to the COPYING file provided with the program. Following this notice may exist
4 a copyright and/or license notice that predates the release of Scribus 1.3.2
5 for which a new license (GPL+exception) is in place.
6 */
7 /***************************************************************************
8  sclistwidgetdelegate.h - description
9  -------------------
10  copyright : Scribus Team
11  ***************************************************************************/
12 
13 /***************************************************************************
14  * *
15  * This program is free software; you can redistribute it and/or modify *
16  * it under the terms of the GNU General Public License as published by *
17  * the Free Software Foundation; either version 2 of the License, or *
18  * (at your option) any later version. *
19  * *
20  ***************************************************************************/
21 
22 #ifndef SCLISTWIDGETDELEGATE_H
23 #define SCLISTWIDGETDELEGATE_H
24 
25 #include <QItemDelegate>
26 #include <QListWidget>
27 #include "scribusapi.h"
28 
29 class SCRIBUS_API ScListWidgetDelegate : public QItemDelegate
30 {
31  Q_OBJECT
32 public:
33  ScListWidgetDelegate(QListWidget *view, QWidget *parent);
34  virtual void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const;
35  virtual QSize sizeHint(const QStyleOptionViewItem &opt, const QModelIndex &index) const;
36  void setIconOnly(bool setter);
37  bool iconOnly();
38 
39 private:
40  QListWidget *m_view;
41  bool m_dispIconOnly;
42 };
43 
44 #endif // SCLISTWIDGETDELEGATE_H
Definition: sclistwidgetdelegate.h:29