• 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  *
00004  *   This program is free software; you can redistribute it and/or modify
00005  *   it under the terms of the GNU General Public License as
00006  *   published by the Free Software Foundation; either version 2,
00007  *   or (at your option) any later version.
00008  *
00009  *   This program is distributed in the hope that it will be useful,
00010  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  *   GNU General Public License for more details
00013  *
00014  *   You should have received a copy of the GNU Library General Public
00015  *   License along with this program; if not, write to the
00016  *   Free Software Foundation, Inc.,
00017  *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
00018  */
00019 
00020 #ifndef PLASMA_APP_H
00021 #define PLASMA_APP_H
00022 
00023 #include <QHash>
00024 #include <QList>
00025 #include <QSize>
00026 #include <QPoint>
00027 
00028 #include <KUniqueApplication>
00029 
00030 #include <Plasma/Plasma>
00031 
00032 namespace Plasma
00033 {
00034     class AppletBrowser;
00035     class Containment;
00036     class Corona;
00037 } // namespace Plasma
00038 
00039 namespace Kephal {
00040     class Screen;
00041 } // namespace Kephal
00042 
00043 class DesktopView;
00044 class BackgroundDialog;
00045 class RootWidget;
00046 class PanelView;
00047 class DesktopCorona;
00048 
00049 class PlasmaApp : public KUniqueApplication
00050 {
00051     Q_OBJECT
00052 public:
00053     ~PlasmaApp();
00054 
00055     static PlasmaApp* self();
00056     static bool hasComposite();
00057 
00058     void notifyStartup(bool completed);
00059     Plasma::Corona* corona();
00060     void showAppletBrowser(Plasma::Containment *containment);
00061 
00065     void createDesktopView(Plasma::Containment *containment, int id = 0);
00066 
00070     void panelHidden(bool hidden);
00071 
00075      Plasma::ZoomLevel desktopZoomLevel() const;
00076 
00080     QList<PanelView*> panelViews() const;
00081 
00082 #ifdef Q_WS_X11
00083     Atom m_XdndAwareAtom;
00084     Atom m_XdndEnterAtom;
00085     Atom m_XdndFinishedAtom;
00086     Atom m_XdndPositionAtom;
00087     Atom m_XdndStatusAtom;
00088     Atom m_XdndVersionAtom;
00089 #endif
00090 
00091 public Q_SLOTS:
00092     // DBUS interface. if you change these methods, you MUST run:
00093     // qdbuscpp2xml plasmaapp.h -o dbus/org.kde.plasma.App.xml
00094     void toggleDashboard();
00095 
00099     void zoom(Plasma::Containment*, Plasma::ZoomDirection);
00100 
00101 protected:
00102 #ifdef Q_WS_X11
00103     PanelView *findPanelForTrigger(WId trigger) const;
00104     bool x11EventFilter(XEvent *event);
00105 #endif
00106 
00107 private:
00108     PlasmaApp(Display* display, Qt::HANDLE visual, Qt::HANDLE colormap);
00109     DesktopView* viewForScreen(int screen, int desktop) const;
00110     void zoomIn(Plasma::Containment *containment);
00111     void zoomOut(Plasma::Containment *containment);
00112 
00113 private Q_SLOTS:
00114     void setupDesktop();
00115     void cleanup();
00116     void containmentAdded(Plasma::Containment *containment);
00117     void syncConfig();
00118     void appletBrowserDestroyed();
00119     void createView(Plasma::Containment *containment);
00120     void panelRemoved(QObject* panel);
00121     void configDialogRemoved(QObject* configDialogRemoved);
00122     void screenRemoved(int id);
00123     void compositingChanged();
00124     void showAppletBrowser();
00125     void addContainment(Plasma::Containment *fromContainment = 0);
00126     void configureContainment(Plasma::Containment*);
00127 
00128 private:
00129     DesktopCorona *m_corona;
00130     QList<PanelView*> m_panels;
00131     Plasma::AppletBrowser *m_appletBrowser;
00132     QList<DesktopView*> m_desktops;
00133     QHash<Plasma::Containment *, BackgroundDialog *> m_configDialogs;
00134     Plasma::ZoomLevel m_zoomLevel;
00135     int m_panelHidden;
00136 };
00137 
00138 #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