Applets
simpleapplet.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 SIMPLEAPPLET_H
00022 #define SIMPLEAPPLET_H
00023
00024
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