2 * Copyright 2007 by Aaron Seigo <aseigo@kde.org>
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Library General Public License version 2,
6 * or (at your option) any later version.
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details
13 * You should have received a copy of the GNU Library General Public
14 * License along with this program; if not, write to the
15 * Free Software Foundation, Inc.,
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19 #ifndef PLASMA_DESKTOP_H
20 #define PLASMA_DESKTOP_H
22 #include <QGraphicsItem>
25 #include <QStyleOptionGraphicsItem>
31 #include <plasma/containment.h>
32 #include <plasma/phase.h>
33 #include <plasma/widgets/widget.h>
35 #include "iconloader.h"
37 #include "renderthread.h"
39 class BackgroundDialog
;
54 /*class Tool : public QObject, public QGraphicsItem
59 explicit Tool(QGraphicsItem *parent = 0);
60 QRectF boundingRect() const;
61 void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
65 class DefaultDesktop
: public Plasma::Containment
70 DefaultDesktop(QObject
*parent
, const QVariantList
&args
);
73 void constraintsUpdated(Plasma::Constraints constraints
);
75 QList
<QAction
*> contextActions();
78 * Paints a default background image. Nothing fancy, but that's what plugins
79 * are for. Reimplemented from Plasma::Containment;
81 void paintInterface(QPainter
*painter
,
82 const QStyleOptionGraphicsItem
*option
,
83 const QRect
& contentsRect
);
89 void nextSlide(bool skipUpdates
=false);
91 void toggleDesktopImmutability();
95 void updateBackground();
96 void updateBackground(int, const QImage
&img
);
98 void reloadConfig(bool skipUpdates
=false);
99 QSize
resolution() const;
101 QAction
*m_lockDesktopAction
;
102 QAction
*m_appletBrowserAction
;
103 QAction
*m_runCommandAction
;
104 QAction
*m_setupDesktopAction
;
105 QAction
*m_lockScreenAction
;
106 QAction
*m_logoutAction
;
107 QAction
*m_separator
;
108 QAction
*m_separator2
;
110 BackgroundDialog
*m_configDialog
;
112 int m_backgroundMode
;
114 // slideshow settings
115 // the index of which m_slidePath is currently visible
117 QTimer m_slideshowTimer
;
118 QStringList m_slideFiles
;
120 QPixmap m_bitmapBackground
;
121 QString m_wallpaperPath
;
123 int m_wallpaperPosition
;
124 QColor m_wallpaperColor
;
126 RenderThread m_renderer
;
127 int m_current_renderer_token
;
130 static IconLoader
*s_icons
;
133 #endif // PLASMA_PANEL_H