libplasma
corona.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
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
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
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 }
00194
00195 #endif
00196
00197