• Skip to content
  • Skip to link menu
KDE 4.2 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>
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         Bookmarks, 
00050         Leave 
00051     };
00052 
00056     enum FormatType {
00057         Name = 0, 
00058         Description, 
00059         NameDescription, 
00060         DescriptionName, 
00061         NameDashDescription 
00062     };
00063 
00070     MenuLauncherApplet(QObject *parent, const QVariantList &args);
00071 
00075     virtual ~MenuLauncherApplet();
00076 
00080     void init();
00081 
00087     void constraintsEvent(Plasma::Constraints constraints);
00088 
00092     virtual QList<QAction*> contextualActions();
00093 
00094 public Q_SLOTS:
00099     void switchMenuStyle();
00100 
00101     void startMenuEditor();
00102 
00103 protected:
00107     void createConfigurationInterface(KConfigDialog *parent);
00108 
00109 private Q_SLOTS:
00110     void configAccepted();
00111     void toggleMenu(bool pressed);
00112     void toggleMenu();
00113     void actionTriggered(QAction *action);
00114 
00115 private:
00116     class Private;
00117     Private * const d;
00118 };
00119 
00120 K_EXPORT_PLASMA_APPLET(menulauncher, MenuLauncherApplet)
00121 
00122 #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
  •   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