Plasma
fullview.h
Go to the documentation of this file.00001 /* 00002 * Copyright 2007 Aaron Seigo <aseigo@kde.org 00003 * 00004 * Redistribution and use in source and binary forms, with or without 00005 * modification, are permitted provided that the following conditions 00006 * are met: 00007 * 00008 * 1. Redistributions of source code must retain the above copyright 00009 * notice, this list of conditions and the following disclaimer. 00010 * 2. Redistributions in binary form must reproduce the above copyright 00011 * notice, this list of conditions and the following disclaimer in the 00012 * documentation and/or other materials provided with the distribution. 00013 * 00014 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 00015 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 00016 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 00017 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 00018 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 00019 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 00020 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 00021 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 00022 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 00023 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00024 */ 00025 00026 #ifndef FULLVIEW_H 00027 #define FULLVIEW_H 00028 00029 #include <plasma/corona.h> 00030 00031 #include <QGraphicsView> 00032 00033 class FullView : public QGraphicsView 00034 { 00035 Q_OBJECT 00036 00037 public: 00038 explicit FullView(const QString &formfactor = "planar", const QString &location = "floating", QWidget *parent = 0); 00039 00040 void addApplet(const QString &a, const QVariantList &args = QVariantList()); 00041 00042 protected slots: 00043 void sceneRectChanged(const QRectF &rect); 00044 void resizeEvent(QResizeEvent *event); 00045 00046 private: 00047 Plasma::Corona m_corona; 00048 Plasma::FormFactor m_formfactor; 00049 Plasma::Location m_location; 00050 Plasma::Containment *m_containment; 00051 Plasma::Applet *m_applet; 00052 }; 00053 00054 #endif 00055