libplasma
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 VIEW_H
00021 #define VIEW_H
00022
00023 #include <QtGui/QApplication>
00024 #include <QtGui/QGraphicsView>
00025
00026 #include <KDE/KConfigGroup>
00027
00028 #include <plasma/plasma_export.h>
00029
00030 namespace Plasma
00031 {
00032
00033 class Containment;
00034 class Corona;
00035 class ViewPrivate;
00036
00044 class PLASMA_EXPORT View : public QGraphicsView
00045 {
00046 Q_OBJECT
00047
00048 public:
00056 explicit View(Containment *containment, QWidget *parent = 0);
00057
00065 View(Containment *containment, int viewId, QWidget *parent = 0);
00066
00067 ~View();
00068
00073 void setWallpaperEnabled(bool draw);
00074
00078 bool isWallpaperEnabled() const;
00079
00086 void setScreen(int screen);
00087
00093 int screen() const;
00094
00100 void setDesktop(int desktop);
00101
00107 int desktop() const;
00108
00114 int effectiveDesktop() const;
00115
00119 Containment* containment() const;
00120
00127 void setTrackContainmentChanges(bool trackChanges);
00128
00132 bool trackContainmentChanges();
00133
00138 static View * topLevelViewAt(const QPoint & pos);
00139
00143 int id() const;
00144
00145 Q_SIGNALS:
00152 void sceneRectAboutToChange();
00153
00160 void sceneRectChanged();
00161
00162 public Q_SLOTS:
00169 virtual void setContainment(Containment *containment);
00170
00171 protected:
00175 KConfigGroup config() const;
00176
00177 private:
00178 ViewPrivate * const d;
00179
00180 Q_PRIVATE_SLOT(d, void updateSceneRect())
00181
00182 friend class ViewPrivate;
00183 };
00184
00185 }
00186
00187 #endif
00188
00189