2 * Copyright 2007 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 General Public License as
6 * published by the Free Software Foundation; either version 2,
7 * or (at your option) any later version.
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
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.
23 #include <Plasma/Plasma>
24 #include <Plasma/View>
38 class DesktopView
: public Plasma::View
43 DesktopView(Plasma::Containment
*containment
, int id
, QWidget
*parent
);
47 * Returns whether or not the dashboard view is visible
49 bool isDashboardVisible() const;
53 * zoom in towards the given containment.
54 * if toContainment is null, the current containment is used instead.
55 * zooming in also sets toContainment as current.
57 void zoomIn(Plasma::ZoomLevel zoomLevel
);
58 void zoomOut(Plasma::ZoomLevel zoomLevel
);
59 void toggleDashboard();
60 void screenResized(Kephal::Screen
*);
61 void screenMoved(Kephal::Screen
*);
64 void screenOwnerChanged(int wasScreen
, int isScreen
, Plasma::Containment
* containment
);
67 * switch to the "next" available containment on the corona.
69 void nextContainment();
72 * switch to the "previous" available containment on the corona.
74 void previousContainment();
77 * Sets the containment for this view, which will also cause the view
78 * to track the geometry of the containment.
80 * @arg containment the containment to center the view on
82 void setContainment(Plasma::Containment
*containment
);
85 void wheelEvent(QWheelEvent
*event
);
86 void drawBackground(QPainter
*painter
, const QRectF
&rect
);
89 DashboardView
*m_dashboard
;
90 bool m_dashboardFollowsDesktop
;
92 //FIXME: duplicated from containment_p.h
93 //(but with a bigger margin to make room even for very big panels)
94 static const int TOOLBOX_MARGIN
= 400;
97 #endif // multiple inclusion guard