author | sandman <sandman> | 2002-10-02 22:06:33 (UTC) |
---|---|---|
committer | sandman <sandman> | 2002-10-02 22:06:33 (UTC) |
commit | b757807635fddb4824eabd87f72c96a0929c5cb1 (patch) (unidiff) | |
tree | 831e4870fe1562507540b386cbcbd1ea93ecb9a8 /core/launcher/startmenu.h | |
parent | 2682a282dc87074bdc61d241d5b2d76e8533982c (diff) | |
download | opie-b757807635fddb4824eabd87f72c96a0929c5cb1.zip opie-b757807635fddb4824eabd87f72c96a0929c5cb1.tar.gz opie-b757807635fddb4824eabd87f72c96a0929c5cb1.tar.bz2 |
- Qtopia 1.6 launcher merge (again - should be finished soon)
- Support for O-Menu applets (similiar to Taskbar applets)
-rw-r--r-- | core/launcher/startmenu.h | 31 |
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 | ||
30 | class AppLnkSet; | 32 | class AppLnkSet; |
31 | class AppLnk; | 33 | class AppLnk; |
32 | 34 | ||
33 | class StartPopupMenu : public QPopupMenu | 35 | class StartPopupMenu : public QPopupMenu |
34 | { | 36 | { |
35 | public: | 37 | public: |
36 | StartPopupMenu( QWidget *parent ) : QPopupMenu( parent ) {} | 38 | StartPopupMenu( QWidget *parent ) : QPopupMenu( parent ) {} |
37 | protected: | 39 | protected: |
38 | void keyPressEvent( QKeyEvent *e ); | 40 | void keyPressEvent( QKeyEvent *e ); |
39 | }; | 41 | }; |
40 | 42 | ||
43 | class QLibrary; | ||
44 | |||
45 | struct MenuApplet | ||
46 | { | ||
47 | #ifndef QT_NO_COMPONENT | ||
48 | QLibrary *library; | ||
49 | #endif | ||
50 | MenuAppletInterface *iface; | ||
51 | int id; | ||
52 | QPopupMenu *popup; | ||
53 | }; | ||
54 | |||
55 | |||
41 | class StartMenu : public QLabel { | 56 | class StartMenu : public QLabel { |
42 | Q_OBJECT | 57 | Q_OBJECT |
43 | public: | 58 | public: |
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 | ||
52 | public slots: | 67 | public 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 | ||
57 | protected slots: | 74 | protected slots: |
58 | void itemSelected( int id ); | 75 | void itemSelected( int id ); |
59 | 76 | ||
60 | protected: | 77 | protected: |
61 | virtual void mousePressEvent( QMouseEvent * ); | 78 | virtual void mousePressEvent( QMouseEvent * ); |
79 | virtual void timerEvent ( QTimerEvent * ); | ||
62 | 80 | ||
63 | private: | 81 | private: |
64 | bool loadMenu( AppLnkSet *folder, QPopupMenu *menu ); | 82 | bool loadMenu( AppLnkSet *folder, QPopupMenu *menu ); |
83 | void loadApplets( ); | ||
84 | void clearApplets( ); | ||
65 | 85 | ||
66 | private: | 86 | private: |
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__ |