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.h" 00025 #include "plasma/view.h" 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 00050 public slots: 00051 void toggleVisibility(); 00052 00059 void setContainment(Plasma::Containment *newContainment); 00060 00061 protected slots: 00062 void showAppletBrowser(); 00063 void appletBrowserDestroyed(); 00064 void hideView(); 00065 void activeWindowChanged(WId id); 00066 void suppressShowTimeout(); 00067 00068 private: 00069 Plasma::AppletBrowser *m_appletBrowser; 00070 QPoint m_appletBrowserDragStart; 00071 QAction *m_hideAction; 00072 bool m_suppressShow; 00073 bool m_zoomIn; 00074 bool m_zoomOut; 00075 }; 00076 00077 #endif // multiple inclusion guard