Plasma
desktop.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
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
00054
00055
00056
00057
00058
00059
00060
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);
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
00118
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