Plasma
dashboardview.h
Go to the documentation of this file.00001 /* 00002 * Copyright 2007 Aaron Seigo <aseigo@kde.org> 00003 * Copyright 2007 André Duffeck <duffeck@kde.org> 00004 * 00005 * This program is free software; you can redistribute it and/or modify 00006 * it under the terms of the GNU Library General Public License as 00007 * published by the Free Software Foundation; either version 2, or 00008 * (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 DASHBOARDVIEW_H 00022 #define DASHBOARDVIEW_H 00023 00024 #include <Plasma/Plasma> 00025 #include <Plasma/View> 00026 00027 class QAction; 00028 00029 namespace Plasma 00030 { 00031 class AppletBrowser; 00032 class Containment; 00033 } 00034 00035 class DashboardView : public Plasma::View 00036 { 00037 Q_OBJECT 00038 00039 public: 00040 DashboardView(Plasma::Containment* containment, QWidget *parent); 00041 ~DashboardView(); 00042 00043 protected: 00044 void drawBackground(QPainter * painter, const QRectF & rect); 00045 void keyPressEvent(QKeyEvent *event); 00046 void showEvent(QShowEvent *event); 00047 void paintEvent(QPaintEvent *event); 00048 bool eventFilter(QObject *watched, QEvent *event); 00049 bool event(QEvent *event); 00050 00051 public slots: 00052 void toggleVisibility(); 00053 00060 void setContainment(Plasma::Containment *newContainment); 00061 00062 protected slots: 00063 void showAppletBrowser(); 00064 void appletBrowserDestroyed(); 00065 void hideView(); 00066 void activeWindowChanged(WId id); 00067 void suppressShowTimeout(); 00068 00069 private: 00070 Plasma::AppletBrowser *m_appletBrowser; 00071 QPoint m_appletBrowserDragStart; 00072 QAction *m_hideAction; 00073 bool m_suppressShow; 00074 bool m_zoomIn; 00075 bool m_zoomOut; 00076 }; 00077 00078 #endif // multiple inclusion guard