• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

Plasma

backgrounddelegate.h

Go to the documentation of this file.
00001 /*
00002   Copyright (c) 2007 Paolo Capriotti <p.capriotti@gmail.com>
00003 
00004   This program is free software; you can redistribute it and/or modify
00005   it under the terms of the GNU General Public License as published by
00006   the Free Software Foundation; either version 2 of the License, or
00007   (at your option) any later version.
00008 */
00009 
00010 #ifndef BACKGROUNDDELEGATE_H
00011 #define BACKGROUNDDELEGATE_H
00012 
00013 #include <QAbstractItemDelegate>
00014 
00015 class BackgroundDelegate : public QAbstractItemDelegate
00016 {
00017 public:
00018     enum {
00019         AuthorRole = Qt::UserRole,
00020         ScreenshotRole
00021     };
00022 
00023     BackgroundDelegate(QObject *listener,
00024                        float ratio, QObject *parent = 0);
00025 
00026     virtual void paint(QPainter *painter,
00027                        const QStyleOptionViewItem &option,
00028                        const QModelIndex &index) const;
00029     virtual QSize sizeHint(const QStyleOptionViewItem &option,
00030                            const QModelIndex &index) const;
00031 
00032 private:
00033     static const int MARGIN = 5;
00034     QObject *m_listener;
00035     float m_ratio;
00036 };
00037 
00038 #endif // BACKGROUNDDELEGATEL_H

Plasma

Skip menu "Plasma"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members

API Reference

Skip menu "API Reference"
  • KWin
  •   KWin Libraries
  • Libraries
  •   libkworkspace
  •   libsolidcontrol
  •   libtaskmanager
  • Plasma
  •   Animators
  •   Applets
  •   Engines
  • Solid Modules
Generated for API Reference by doxygen 1.5.7
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal