• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

Plasma

plasmaapp.h

Go to the documentation of this file.
00001 /*
00002  *   Copyright 2006, 2007 Aaron Seigo <aseigo@kde.org>
00003  *   Copyright 2008 Chani Armitage <chanika@gmail.com>
00004  *
00005  *   This program is free software; you can redistribute it and/or modify
00006  *   it under the terms of the GNU General Public License as
00007  *   published by the Free Software Foundation; either version 2,
00008  *   or (at your option) any later version.
00009  *
00010  *   This program is distributed in the hope that it will be useful,
00011  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  *   GNU General Public License for more details
00014  *
00015  *   You should have received a copy of the GNU Library General Public
00016  *   License along with this program; if not, write to the
00017  *   Free Software Foundation, Inc.,
00018  *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
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 } // namespace Plasma
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     // DBUS interface.
00056     //if you change stuff, remember to regenerate with:
00057     //qdbuscpp2xml -S -M plasmaapp.h > org.kde.plasma-overlay.App.xml
00058 
00059     //XXX can this be deleted? probably. if lockprocess really cares it can use the unmapnotify
00060     void hidden();
00061 
00062 public Q_SLOTS:
00063     // DBUS interface.
00064     //if you change stuff, remember to regenerate ^^^
00068     void setActive(bool activate);
00069 
00073     void lock();
00074 
00075     //not really slots, but we want them in dbus:
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

Plasma

Skip menu "Plasma"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members

API Reference

Skip menu "API Reference"
  • KWin
  •   KWin Libraries
  • Libraries
  •   libkworkspace
  •   libsolidcontrol
  •   libtaskmanager
  • Plasma
  •   Animators
  •   Applets
  •   Engines
  • Solid Modules
Generated for API Reference by doxygen 1.5.7
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal