~ubuntu-branches/ubuntu/gutsy/kdebase-workspace/gutsy-backports

« back to all changes in this revision

Viewing changes to plasma/plasma/desktopview.h

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell
  • Date: 2007-09-05 20:45:14 UTC
  • Revision ID: james.westby@ubuntu.com-20070905204514-632hhspl0nvrc84i
Tags: upstream-3.93.0
ImportĀ upstreamĀ versionĀ 3.93.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 *   Copyright 2007 Aaron Seigo <aseigo@kde.org>
 
3
 *
 
4
 *   This program is free software; you can redistribute it and/or modify
 
5
 *   it under the terms of the GNU General Public License as
 
6
 *   published by the Free Software Foundation; either version 2,
 
7
 *   or (at your option) any later version.
 
8
 *
 
9
 *   This program is distributed in the hope that it will be useful,
 
10
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
12
 *   GNU General Public License for more details
 
13
 *
 
14
 *   You should have received a copy of the GNU Library General Public
 
15
 *   License along with this program; if not, write to the
 
16
 *   Free Software Foundation, Inc.,
 
17
 *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 
18
 */
 
19
 
 
20
#ifndef DESKTOPVIEW_H
 
21
#define DESKTOPVIEW_H
 
22
 
 
23
#include <QGraphicsView>
 
24
 
 
25
#include "plasma/plasma.h"
 
26
 
 
27
class QPixmap;
 
28
 
 
29
namespace Plasma
 
30
{
 
31
    class Svg;
 
32
    class Corona;
 
33
}
 
34
 
 
35
class DesktopView : public QGraphicsView
 
36
{
 
37
    Q_OBJECT
 
38
 
 
39
public:
 
40
    DesktopView(QWidget *parent);
 
41
    ~DesktopView();
 
42
 
 
43
public slots:
 
44
    void zoomIn();
 
45
    void zoomOut();
 
46
    void launchExplorer();
 
47
    void runCommand();
 
48
    void initializeWallpaper();
 
49
 
 
50
protected:
 
51
    void drawBackground(QPainter *painter, const QRectF &);
 
52
    void resizeEvent(QResizeEvent *event);
 
53
    void wheelEvent(QWheelEvent *event);
 
54
    void contextMenuEvent(QContextMenuEvent *event);
 
55
 
 
56
private:
 
57
    Plasma::Svg *m_background;
 
58
    QPixmap* m_bitmapBackground;
 
59
    QString m_wallpaperPath;
 
60
    QAction *m_engineExplorerAction;
 
61
    QAction *m_runCommandAction;
 
62
    QAction *m_zoomInAction;
 
63
    QAction *m_zoomOutAction;
 
64
    Plasma::ZoomLevel m_zoomLevel;
 
65
};
 
66
 
 
67
#endif // multiple inclusion guard