-rw-r--r-- | core/launcher/startmenu.h | 46 |
1 files changed, 19 insertions, 27 deletions
diff --git a/core/launcher/startmenu.h b/core/launcher/startmenu.h index 0a91bb8..99df0f0 100644 --- a/core/launcher/startmenu.h +++ b/core/launcher/startmenu.h | |||
@@ -21,16 +21,14 @@ | |||
21 | #ifndef __START_MENU_H__ | 21 | #ifndef __START_MENU_H__ |
22 | #define __START_MENU_H__ | 22 | #define __START_MENU_H__ |
23 | 23 | ||
24 | #include <qtopia/applnk.h> | ||
25 | #include <qintdict.h> | ||
24 | #include <qstring.h> | 26 | #include <qstring.h> |
25 | #include <qlist.h> | 27 | #include <qlist.h> |
26 | #include <qintdict.h> | ||
27 | #include <qlabel.h> | 28 | #include <qlabel.h> |
28 | #include <qpopupmenu.h> | 29 | #include <qpopupmenu.h> |
29 | 30 | ||
30 | #include <qpe/menuappletinterface.h> | 31 | #include <qtopia/menuappletinterface.h> |
31 | |||
32 | class AppLnkSet; | ||
33 | class AppLnk; | ||
34 | 32 | ||
35 | class StartPopupMenu : public QPopupMenu | 33 | class StartPopupMenu : public QPopupMenu |
36 | { | 34 | { |
@@ -42,16 +40,13 @@ protected: | |||
42 | 40 | ||
43 | class QLibrary; | 41 | class QLibrary; |
44 | 42 | ||
45 | struct MenuApplet | 43 | |
46 | { | 44 | struct MenuApplet { |
47 | #ifndef QT_NO_COMPONENT | ||
48 | QLibrary *library; | 45 | QLibrary *library; |
49 | #endif | ||
50 | MenuAppletInterface *iface; | 46 | MenuAppletInterface *iface; |
51 | int id; | 47 | int id; |
52 | QPopupMenu *popup; | 48 | QPopupMenu *popup; |
53 | }; | 49 | }; |
54 | |||
55 | 50 | ||
56 | class StartMenu : public QLabel { | 51 | class StartMenu : public QLabel { |
57 | Q_OBJECT | 52 | Q_OBJECT |
@@ -59,29 +54,29 @@ public: | |||
59 | StartMenu( QWidget * ); | 54 | StartMenu( QWidget * ); |
60 | ~StartMenu(); | 55 | ~StartMenu(); |
61 | 56 | ||
62 | const AppLnk* execToLink(const QString& appname); | 57 | void refreshMenu(); |
63 | 58 | ||
64 | public: | 59 | public: |
65 | StartPopupMenu *launchMenu; | 60 | StartPopupMenu *launchMenu; |
66 | 61 | ||
62 | signals: | ||
63 | void tabSelected(const QString&); | ||
64 | |||
67 | public slots: | 65 | public slots: |
68 | void launch( ); | 66 | void launch( ); |
69 | void loadOptions( ); | ||
70 | void createMenu( ); | 67 | void createMenu( ); |
71 | void reloadApps( ); | ||
72 | void reloadApplets( ); | ||
73 | 68 | ||
74 | protected slots: | 69 | protected slots: |
75 | void itemSelected( int id ); | 70 | void itemSelected( int id ); |
76 | 71 | ||
77 | protected: | 72 | protected: |
78 | virtual void mousePressEvent( QMouseEvent * ); | 73 | virtual void mousePressEvent( QMouseEvent * ); |
79 | virtual void timerEvent ( QTimerEvent * ); | 74 | |
80 | |||
81 | private: | 75 | private: |
82 | bool loadMenu( AppLnkSet *folder, QPopupMenu *menu ); | 76 | void loadApplets(); |
83 | void loadApplets( ); | 77 | void clearApplets(); |
84 | void clearApplets( ); | 78 | void addApplets( QPopupMenu* menu ); |
79 | bool loadMenu( QPopupMenu *menu ); | ||
85 | 80 | ||
86 | private: | 81 | private: |
87 | bool useWidePopupMenu; | 82 | bool useWidePopupMenu; |
@@ -90,14 +85,11 @@ private: | |||
90 | bool startButtonIsFlat; | 85 | bool startButtonIsFlat; |
91 | QString startButtonPixmap; | 86 | QString startButtonPixmap; |
92 | 87 | ||
93 | AppLnkSet *apps; | 88 | QStringList tabs; |
94 | 89 | QList<AppLnk> other; | |
95 | QIntDict<MenuApplet> applets; | 90 | QIntDict<MenuApplet> m_applets; |
96 | QIntDict<QPopupMenu> tabdict; | 91 | int ntabs; |
97 | 92 | int nother; | |
98 | // QValueList<MenuApplet> appletList; | ||
99 | int safety_tid; | ||
100 | int sepId; | ||
101 | }; | 93 | }; |
102 | 94 | ||
103 | #endif // __START_MENU_H__ | 95 | #endif // __START_MENU_H__ |