Plasma
plasmaapp.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 PLASMA_APP_H
00022 #define PLASMA_APP_H
00023
00024 #include <QList>
00025
00026 #include <KUniqueApplication>
00027
00028 namespace Plasma
00029 {
00030 class Containment;
00031 class Corona;
00032 }
00033
00034 class SaverView;
00035 class BackgroundDialog;
00036
00037 class PlasmaApp : public KUniqueApplication
00038 {
00039 Q_OBJECT
00040 Q_CLASSINFO("D-Bus Interface", "org.kde.plasmaoverlay.App")
00041 public:
00042 ~PlasmaApp();
00043
00044 static PlasmaApp* self();
00045 static bool hasComposite();
00046
00047 Plasma::Corona* corona();
00048
00049 void setActiveOpacity(qreal opacity);
00050 void setIdleOpacity(qreal opacity);
00051 qreal activeOpacity() const;
00052 qreal idleOpacity() const;
00053
00054 Q_SIGNALS:
00055
00056
00057
00058
00059
00060 void hidden();
00061
00062 public Q_SLOTS:
00063
00064
00068 void setActive(bool activate);
00069
00073 void lock();
00074
00075
00076
00085 void setup(bool setupMode);
00086
00091 void quit();
00092
00093 private Q_SLOTS:
00094 void cleanup();
00095 void createView(Plasma::Containment *containment);
00096 void adjustSize(int screen);
00097 void dialogDestroyed(QObject *obj);
00098 void hideDialogs();
00099 void showDialogs();
00100 void configureContainment(Plasma::Containment*);
00101 void configDialogRemoved(QObject* dialog);
00102 void syncConfig();
00103
00104 protected:
00105 bool eventFilter(QObject *obj, QEvent *event);
00106
00107 private:
00108 PlasmaApp(Display* display, Qt::HANDLE visual, Qt::HANDLE colormap);
00109
00110 Plasma::Corona *m_corona;
00111 SaverView *m_view;
00112 QList<QWidget*> m_dialogs;
00113 BackgroundDialog *m_configDialog;
00114
00115 qreal m_activeOpacity;
00116 qreal m_idleOpacity;
00117 };
00118
00119 #endif // multiple inclusion guard