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
00126 Containment *swapContainment(Plasma::Containment *existing,
00127 const QString &name,
00128 const QVariantList &args = QVariantList());
00129
00137 Containment *swapContainment(const QString &name,
00138 const QVariantList &args = QVariantList());
00139
00146 void setTrackContainmentChanges(bool trackChanges);
00147
00151 bool trackContainmentChanges();
00152
00157 static View * topLevelViewAt(const QPoint & pos);
00158
00162 int id() const;
00163
00164 Q_SIGNALS:
00171 void sceneRectAboutToChange();
00172
00179 void sceneRectChanged();
00180
00181 public Q_SLOTS:
00188 virtual void setContainment(Plasma::Containment *containment);
00189
00190 protected:
00194 KConfigGroup config() const;
00195
00196
00200 void configNeedsSaving() const;
00201
00202 private:
00203 ViewPrivate * const d;
00204
00205 Q_PRIVATE_SLOT(d, void updateSceneRect())
00206 Q_PRIVATE_SLOT(d, void containmentDestroyed())
00207 Q_PRIVATE_SLOT(d, void containmentScreenChanged(int, int, Plasma::Containment *))
00208 Q_PRIVATE_SLOT(d, void privateInit())
00209
00210 friend class ViewPrivate;
00211 };
00212
00213 }
00214
00215 #endif
00216