• Skip to content
  • Skip to link menu
KDE 4.1 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 class CoronaPrivate;
00035 
00039 class PLASMA_EXPORT Corona : public QGraphicsScene
00040 {
00041     Q_OBJECT
00042 
00043 //typedef QHash<QString, QList<Plasma::Applet*> > layouts;
00044 
00045 public:
00046     explicit Corona(QObject * parent = 0);
00047     ~Corona();
00048 
00053     void setAppletMimeType(const QString &mimetype);
00054 
00058     QString appletMimeType();
00059 
00063     QList<Containment*> containments() const;
00064 
00068     void clearContainments();
00069 
00073     KSharedConfig::Ptr config() const;
00074 
00087     Containment* addContainment(const QString& name, const QVariantList& args = QVariantList());
00088 
00094     Containment* containmentForScreen(int screen) const;
00095 
00096 public Q_SLOTS:
00105     void initializeLayout(const QString &config = QString());
00106 
00114     void loadLayout(const QString &config = QString());
00115 
00120     void saveLayout(const QString &config = QString()) const;
00121 
00125     ImmutabilityType immutability() const;
00126 
00131     void setImmutability(const ImmutabilityType immutable);
00132 
00137     void requestConfigSync();
00138 
00139 Q_SIGNALS:
00144     void containmentAdded(Plasma::Containment *containment);
00145 
00154     void screenOwnerChanged(int wasScreen, int isScreen, Plasma::Containment *containment);
00155 
00162     void releaseVisualFocus();
00163 
00167     void configSynced();
00168 
00169 protected:
00173     virtual void loadDefaultLayout();
00174 
00189     Containment *addContainmentDelayed(const QString& name, const QVariantList& args = QVariantList());
00190 
00191     //Reimplemented from QGraphicsScene
00192     void dragEnterEvent(QGraphicsSceneDragDropEvent* event);
00193     void dragLeaveEvent(QGraphicsSceneDragDropEvent* event);
00194     void dragMoveEvent(QGraphicsSceneDragDropEvent* event);
00195 
00196 private:
00197     CoronaPrivate * const d;
00198 
00199     Q_PRIVATE_SLOT(d, void containmentDestroyed(QObject*))
00200     Q_PRIVATE_SLOT(d, void syncConfig())
00201 
00202     friend class CoronaPrivate;
00203 };
00204 
00205 } // namespace Plasma
00206 
00207 #endif
00208 
00209 

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
  •   libsolidcontrol
  •   libtaskmanager
  • 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