summaryrefslogtreecommitdiff
path: root/core/launcher/startmenu.h
Unidiff
Diffstat (limited to 'core/launcher/startmenu.h') (more/less context) (show whitespace changes)
-rw-r--r--core/launcher/startmenu.h31
1 files changed, 29 insertions, 2 deletions
diff --git a/core/launcher/startmenu.h b/core/launcher/startmenu.h
index a02f39e..0a91bb8 100644
--- a/core/launcher/startmenu.h
+++ b/core/launcher/startmenu.h
@@ -1,10 +1,10 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
@@ -20,27 +20,42 @@
20 20
21#ifndef __START_MENU_H__ 21#ifndef __START_MENU_H__
22#define __START_MENU_H__ 22#define __START_MENU_H__
23 23
24#include <qstring.h> 24#include <qstring.h>
25#include <qlist.h> 25#include <qlist.h>
26#include <qintdict.h>
26#include <qlabel.h> 27#include <qlabel.h>
27#include <qpopupmenu.h> 28#include <qpopupmenu.h>
28 29
30#include <qpe/menuappletinterface.h>
29 31
30class AppLnkSet; 32class AppLnkSet;
31class AppLnk; 33class AppLnk;
32 34
33class StartPopupMenu : public QPopupMenu 35class StartPopupMenu : public QPopupMenu
34{ 36{
35public: 37public:
36 StartPopupMenu( QWidget *parent ) : QPopupMenu( parent ) {} 38 StartPopupMenu( QWidget *parent ) : QPopupMenu( parent ) {}
37protected: 39protected:
38 void keyPressEvent( QKeyEvent *e ); 40 void keyPressEvent( QKeyEvent *e );
39}; 41};
40 42
43class QLibrary;
44
45struct MenuApplet
46{
47#ifndef QT_NO_COMPONENT
48 QLibrary *library;
49#endif
50 MenuAppletInterface *iface;
51 int id;
52 QPopupMenu *popup;
53};
54
55
41class StartMenu : public QLabel { 56class StartMenu : public QLabel {
42 Q_OBJECT 57 Q_OBJECT
43public: 58public:
44 StartMenu( QWidget * ); 59 StartMenu( QWidget * );
45 ~StartMenu(); 60 ~StartMenu();
46 61
@@ -50,27 +65,39 @@ public:
50 StartPopupMenu *launchMenu; 65 StartPopupMenu *launchMenu;
51 66
52public slots: 67public slots:
53 void launch( ); 68 void launch( );
54 void loadOptions( ); 69 void loadOptions( );
55 void createMenu( ); 70 void createMenu( );
71 void reloadApps( );
72 void reloadApplets( );
56 73
57protected slots: 74protected slots:
58 void itemSelected( int id ); 75 void itemSelected( int id );
59 76
60protected: 77protected:
61 virtual void mousePressEvent( QMouseEvent * ); 78 virtual void mousePressEvent( QMouseEvent * );
79 virtual void timerEvent ( QTimerEvent * );
62 80
63private: 81private:
64 bool loadMenu( AppLnkSet *folder, QPopupMenu *menu ); 82 bool loadMenu( AppLnkSet *folder, QPopupMenu *menu );
83 void loadApplets( );
84 void clearApplets( );
65 85
66private: 86private:
67 bool useWidePopupMenu; 87 bool useWidePopupMenu;
68 QString popupMenuSidePixmap; 88 QString popupMenuSidePixmap;
69 89
70 bool startButtonIsFlat; 90 bool startButtonIsFlat;
71 QString startButtonPixmap; 91 QString startButtonPixmap;
72 92
73 AppLnkSet *apps; 93 AppLnkSet *apps;
94
95 QIntDict<MenuApplet> applets;
96 QIntDict<QPopupMenu> tabdict;
97
98// QValueList<MenuApplet> appletList;
99 int safety_tid;
100 int sepId;
74}; 101};
75 102
76#endif // __START_MENU_H__ 103#endif // __START_MENU_H__