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

Plasma

desktop.h

Go to the documentation of this file.
00001 /*
00002 *   Copyright 2007 by Aaron Seigo <aseigo@kde.org>
00003 *   Copyright 2008 by Alexis Ménard <darktears31@gmail.com>
00004 *
00005 *
00006 *   This program is free software; you can redistribute it and/or modify
00007 *   it under the terms of the GNU Library General Public License version 2,
00008 *   or (at your option) any later version.
00009 *
00010 *   This program is distributed in the hope that it will be useful,
00011 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013 *   GNU General Public License for more details
00014 *
00015 *   You should have received a copy of the GNU Library General Public
00016 *   License along with this program; if not, write to the
00017 *   Free Software Foundation, Inc.,
00018 *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
00019 */
00020 
00021 #ifndef PLASMA_DESKTOP_H
00022 #define PLASMA_DESKTOP_H
00023 
00024 #include <QGraphicsItem>
00025 #include <QList>
00026 #include <QObject>
00027 #include <QStyleOptionGraphicsItem>
00028 #include <QTimer>
00029 
00030 #include <KDialog>
00031 #include <KIcon>
00032 
00033 #include <plasma/containment.h>
00034 #include <plasma/animator.h>
00035 
00036 #include "renderthread.h"
00037 
00038 class BackgroundDialog;
00039 class QAction;
00040 class QTimeLine;
00041 
00042 namespace Plasma
00043 {
00044     class AppletBrowser;
00045     class Svg;
00046 }
00047 
00048 namespace Ui
00049 {
00050     class config;
00051 }
00052 
00053 /*class Tool : public QObject, public QGraphicsItem
00054 {
00055     Q_OBJECT
00056 
00057 public:
00058     explicit Tool(QGraphicsItem *parent = 0);
00059     QRectF boundingRect() const;
00060     void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
00061 
00062 };*/
00063 
00064 class DefaultDesktop : public Plasma::Containment
00065 {
00066     Q_OBJECT
00067 
00068 public:
00069     DefaultDesktop(QObject *parent, const QVariantList &args);
00070     ~DefaultDesktop();
00071 
00072     void constraintsEvent(Plasma::Constraints constraints);
00073 
00074     QList<QAction*> contextualActions();
00075 
00080     void paintInterface(QPainter *painter,
00081                         const QStyleOptionGraphicsItem *option,
00082                         const QRect& contentsRect);
00083 
00084 protected Q_SLOTS:
00085     void runCommand();
00086     void configure();
00087     void applyConfig();
00088     void nextSlide(bool skipUpdates=false);
00089 
00090     void lockScreen();
00091     void logout();
00092 
00093     void updateBackground();
00094     void updateBackground(int, const QImage &img);
00095 
00096     void addPanel();
00097 
00098 private:
00099     void reloadConfig();
00100     QSize resolution() const;
00101     void suspendStartup(bool suspend); // for ksmserver
00102 
00103     QAction *m_lockDesktopAction;
00104     QAction *m_appletBrowserAction;
00105     QAction *m_addPanelAction;
00106     QAction *m_runCommandAction;
00107     QAction *m_setupDesktopAction;
00108     QAction *m_lockScreenAction;
00109     QAction *m_logoutAction;
00110     QAction *m_separator;
00111     QAction *m_separator2;
00112 
00113     BackgroundDialog *m_configDialog;
00114 
00115     int m_backgroundMode;
00116 
00117     // slideshow settings
00118     // the index of which m_slidePath is currently visible
00119     int m_currentSlide;
00120     QTimer m_slideshowTimer;
00121     QStringList m_slideFiles;
00122 
00123     QPixmap m_bitmapBackground;
00124     QString m_wallpaperPath;
00125 
00126     int m_wallpaperPosition;
00127     QColor m_wallpaperColor;
00128 
00129     RenderThread m_renderer;
00130     int m_rendererToken;
00131 };
00132 
00133 #endif // PLASMA_PANEL_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
  •   libplasma
  •   libsolidcontrol
  •   libtaskmanager
  • Plasma
  •   Animators
  •   Applets
  •   Engines
  • Solid Modules
Generated for API Reference by doxygen 1.5.4
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