• Skip to content
  • Skip to link menu
KDE 4.4 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         ResolutionRole
00022     };
00023 
00024     BackgroundDelegate(QObject *listener,
00025                        float ratio, QObject *parent = 0);
00026 
00027     virtual void paint(QPainter *painter,
00028                        const QStyleOptionViewItem &option,
00029                        const QModelIndex &index) const;
00030     virtual QSize sizeHint(const QStyleOptionViewItem &option,
00031                            const QModelIndex &index) const;
00032 
00033     static const int SCREENSHOT_SIZE = 60;
00034 
00035 private:
00036     static const int MARGIN = 5;
00037     QObject *m_listener;
00038     float m_ratio;
00039 };
00040 
00041 #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
  • System Settings
  •   SystemSettingsView
Generated for API Reference by doxygen 1.5.9-20090814
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