• Skip to content
  • Skip to link menu
KDE 4.0 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

libplasma

corona.h

Go to the documentation of this file.
00001 /*
00002  *   Copyright 2007 Aaron Seigo <aseigo@kde.org>
00003  *   Copyright 2007 Matt Broadstone <mbroadst@gmail.com>
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 CORONA_H
00022 #define CORONA_H
00023 
00024 #include <QtGui/QGraphicsScene>
00025 
00026 #include <plasma/applet.h>
00027 #include <plasma/plasma.h>
00028 #include <plasma/plasma_export.h>
00029 
00030 namespace Plasma
00031 {
00032 
00033 class Containment;
00034 
00038 class PLASMA_EXPORT Corona : public QGraphicsScene
00039 {
00040     Q_OBJECT
00041 
00042 //typedef QHash<QString, QList<Plasma::Applet*> > layouts;
00043 
00044 public:
00045     explicit Corona(QObject * parent = 0);
00046     explicit Corona(const QRectF & sceneRect, QObject * parent = 0);
00047     Corona(qreal x, qreal y, qreal width, qreal height, QObject * parent = 0);
00048     ~Corona();
00049 
00053     bool isImmutable() const;
00054 
00058     bool isKioskImmutable() const;
00059 
00064     QRectF maxSizeHint() const;
00065 
00070     void setAppletMimeType(const QString &mimetype);
00071 
00075     QString appletMimeType();
00076 
00082     void saveApplets(const QString &config) const;
00083 
00089     void loadApplets(const QString &config);
00090 
00094     virtual void loadDefaultSetup();
00095 
00099     void clearApplets();
00100 
00104     KSharedConfig::Ptr config() const;
00105 
00106 public Q_SLOTS:
00110     void loadApplets();
00111 
00115     void saveApplets() const;
00116 
00121     void scheduleConfigSync() const;
00122 
00138     Containment* addContainment(const QString& name, const QVariantList& args = QVariantList(),
00139                                 uint id = 0, bool delayInit = false);
00140 
00144     void destroyContainment(Containment *containment);
00145 
00151     Containment* containmentForScreen(int screen) const;
00152 
00156     QList<Containment*> containments() const;
00157 
00161     void setImmutable(bool immutable_);
00162 
00163 Q_SIGNALS:
00167     void launchActivated();
00168 
00175     void newScreen(int screen);
00176 
00177 protected:
00178     void dragEnterEvent(QGraphicsSceneDragDropEvent* event);
00179     void dragLeaveEvent(QGraphicsSceneDragDropEvent* event);
00180     void dragMoveEvent(QGraphicsSceneDragDropEvent* event);
00181     //void contextMenuEvent(QGraphicsSceneContextMenuEvent *contextMenuEvent);
00182 
00183 protected Q_SLOTS:
00184     void containmentDestroyed(QObject*);
00185     void screenResized(int);
00186     void syncConfig();
00187 
00188 private:
00189     class Private;
00190     Private * const d;
00191 };
00192 
00193 } // namespace Plasma
00194 
00195 #endif
00196 
00197 

libplasma

Skip menu "libplasma"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

API Reference

Skip menu "API Reference"
  • KWin
  •   KWin Libraries
  • Libraries
  •   libkworkspace
  •   libplasma
  • Plasma
  •   Animators
  •   Applets
  •   Engines
  • Solid Modules
Generated for API Reference by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal