summaryrefslogtreecommitdiff
path: root/core/launcher/startmenu.h
authorzecke <zecke>2003-08-28 14:47:24 (UTC)
committer zecke <zecke>2003-08-28 14:47:24 (UTC)
commite284d63306cd3b00baff8e464a8eaf2eb64ea49a (patch) (unidiff)
tree2898793040f5571455a3301d761383eed6efaee3 /core/launcher/startmenu.h
parent285e7737f47c508ee816c5a96ebfc4207dc78438 (diff)
downloadopie-e284d63306cd3b00baff8e464a8eaf2eb64ea49a.zip
opie-e284d63306cd3b00baff8e464a8eaf2eb64ea49a.tar.gz
opie-e284d63306cd3b00baff8e464a8eaf2eb64ea49a.tar.bz2
Use real applets
Diffstat (limited to 'core/launcher/startmenu.h') (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/startmenu.h46
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
32class AppLnkSet;
33class AppLnk;
34 32
35class StartPopupMenu : public QPopupMenu 33class StartPopupMenu : public QPopupMenu
36{ 34{
@@ -42,16 +40,13 @@ protected:
42 40
43class QLibrary; 41class QLibrary;
44 42
45struct MenuApplet 43
46{ 44struct 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
56class StartMenu : public QLabel { 51class 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
64public: 59public:
65 StartPopupMenu *launchMenu; 60 StartPopupMenu *launchMenu;
66 61
62signals:
63 void tabSelected(const QString&);
64
67public slots: 65public slots:
68 void launch( ); 66 void launch( );
69 void loadOptions( );
70 void createMenu( ); 67 void createMenu( );
71 void reloadApps( );
72 void reloadApplets( );
73 68
74protected slots: 69protected slots:
75 void itemSelected( int id ); 70 void itemSelected( int id );
76 71
77protected: 72protected:
78 virtual void mousePressEvent( QMouseEvent * ); 73 virtual void mousePressEvent( QMouseEvent * );
79 virtual void timerEvent ( QTimerEvent * ); 74
80
81private: 75private:
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
86private: 81private:
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__