Plasma
view.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 #ifndef PLASMA_VIEW_H
00021 #define PLASMA_VIEW_H
00022
00023 #include <QtGui/QApplication>
00024 #include <QtGui/QGraphicsView>
00025
00026 #include <kconfiggroup.h>
00027
00028 #include <plasma/plasma_export.h>
00029
00030 namespace Plasma
00031 {
00032
00033 class Containment;
00034 class Corona;
00035 class ViewPrivate;
00036
00047 class PLASMA_EXPORT View : public QGraphicsView
00048 {
00049 Q_OBJECT
00050
00051 public:
00059 explicit View(Containment *containment, QWidget *parent = 0);
00060
00068 View(Containment *containment, int viewId, QWidget *parent = 0);
00069
00070 ~View();
00071
00076 void setWallpaperEnabled(bool draw);
00077
00081 bool isWallpaperEnabled() const;
00082
00090 void setScreen(int screen, int desktop = -1);
00091
00097 int screen() const;
00098
00104 int desktop() const;
00105
00111 int effectiveDesktop() const;
00112
00116 Containment *containment() const;
00117
00125 Containment *swapContainment(Plasma::Containment *existing,
00126 const QString &name,
00127 const QVariantList &args = QVariantList());
00128
00136 Containment *swapContainment(const QString &name,
00137 const QVariantList &args = QVariantList());
00138
00145 void setTrackContainmentChanges(bool trackChanges);
00146
00150 bool trackContainmentChanges();
00151
00156 static View * topLevelViewAt(const QPoint & pos);
00157
00161 int id() const;
00162
00163 Q_SIGNALS:
00170 void sceneRectAboutToChange();
00171
00178 void sceneRectChanged();
00179
00180 public Q_SLOTS:
00187 virtual void setContainment(Plasma::Containment *containment);
00188
00189 protected:
00193 KConfigGroup config() const;
00194
00195 private:
00196 ViewPrivate * const d;
00197
00198 Q_PRIVATE_SLOT(d, void updateSceneRect())
00199 Q_PRIVATE_SLOT(d, void containmentDestroyed())
00200
00201 friend class ViewPrivate;
00202 };
00203
00204 }
00205
00206 #endif
00207