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

Applets

simpleapplet.h

Go to the documentation of this file.
00001 /*
00002     Copyright 2007 Robert Knight <robertknight@gmail.com>
00003     Copyright 2008 Sebastian Sauer <mail@dipe.org>
00004 
00005     This library is free software; you can redistribute it and/or
00006     modify it under the terms of the GNU Library General Public
00007     License as published by the Free Software Foundation; either
00008     version 2 of the License, or (at your option) any later version.
00009 
00010     This library 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 GNU
00013     Library General Public License for more details.
00014 
00015     You should have received a copy of the GNU Library General Public License
00016     along with this library; see the file COPYING.LIB.  If not, write to
00017     the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00018     Boston, MA 02110-1301, USA.
00019 */
00020 
00021 #ifndef SIMPLEAPPLET_H
00022 #define SIMPLEAPPLET_H
00023 
00024 // Plasma
00025 #include <plasma/applet.h>
00026 
00027 class QAction;
00028 
00033 class MenuLauncherApplet : public Plasma::Applet
00034 {
00035         Q_OBJECT
00036         Q_ENUMS(ViewType)
00037         Q_ENUMS(FormatType)
00038     public:
00039 
00043         enum ViewType {
00044             Combined = 0, 
00045             Favorites, 
00046             Applications, 
00047             Computer, 
00048             RecentlyUsed, 
00049             Leave 
00050         };
00051 
00055         enum FormatType {
00056             Name = 0, 
00057             Description, 
00058             NameDescription, 
00059             DescriptionName 
00060         };
00061 
00068         MenuLauncherApplet(QObject *parent, const QVariantList &args);
00069 
00073         virtual ~MenuLauncherApplet();
00074 
00078         void init();
00079 
00085         void constraintsEvent(Plasma::Constraints constraints);
00086 
00090         virtual QList<QAction*> contextualActions();
00091 
00092 public Q_SLOTS:
00097         void switchMenuStyle();
00098 
00099         void startMenuEditor();
00100 
00101 protected:
00105         void createConfigurationInterface(KConfigDialog *parent);
00106 
00107 private Q_SLOTS:
00108         void configAccepted();
00109         void toggleMenu(bool pressed);
00110         void toggleMenu();
00111         void actionTriggered(QAction *action);
00112 
00113 private:
00114         class Private;
00115         Private * const d;
00116 };
00117 
00118 K_EXPORT_PLASMA_APPLET(menulauncher, MenuLauncherApplet)
00119 
00120 #endif

Applets

Skip menu "Applets"
  • 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
  •   libplasma
  •   libsolidcontrol
  •   libtaskmanager
  • Plasma
  •   Animators
  •   Applets
  •   Engines
  • Solid Modules
Generated for API Reference by doxygen 1.5.4
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