Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

qpemenubar.h

Go to the documentation of this file.
00001 /**********************************************************************
00002 ** Copyright (C) 2000-2002 Trolltech AS.  All rights reserved.
00003 **
00004 ** This file is part of the Qtopia Environment.
00005 **
00006 ** This file may be distributed and/or modified under the terms of the
00007 ** GNU General Public License version 2 as published by the Free Software
00008 ** Foundation and appearing in the file LICENSE.GPL included in the
00009 ** packaging of this file.
00010 **
00011 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
00012 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
00013 **
00014 ** See http://www.trolltech.com/gpl/ for GPL licensing information.
00015 **
00016 ** Contact info@trolltech.com if any conditions of this licensing are
00017 ** not clear to you.
00018 **
00019 **********************************************************************/
00020 
00021 #ifndef QPEMENUBAR_H
00022 #define QPEMENUBAR_H
00023 
00024 #include <qmenubar.h>
00025 #include <qguardedptr.h>
00026 #include <qvaluelist.h>
00027 
00028 #include <qtopia/qpeglobal.h>
00029 
00030 class QPEMenuToolFocusManager : public QObject
00031 {
00032     Q_OBJECT
00033 public:
00034     QPEMenuToolFocusManager();
00035 
00036     void addWidget( QWidget *w );
00037     void removeWidget( QWidget *w );
00038     void setActive( bool a );
00039     bool isActive() const;
00040     void moveFocus( bool next );
00041 
00042     static QPEMenuToolFocusManager *manager();
00043     static void initialize();
00044 
00045 protected:
00046     void setFocus( QWidget *w, bool next=TRUE );
00047     bool eventFilter( QObject *object, QEvent *event );
00048 
00049 private slots:
00050     void deactivate();
00051 
00052 private:
00053     typedef QGuardedPtr<QWidget> GuardedWidget;
00054     QValueList<GuardedWidget> list;
00055     GuardedWidget inFocus;
00056     GuardedWidget oldFocus;
00057     static QPEMenuToolFocusManager *me;
00058     
00059 private: // Sharp ROM compatibility
00060         void setMenukeyEnabled ( bool b );
00061 };
00062 
00063 
00064 class QPE_DEPRECATED QPEMenuBar : public QMenuBar
00065 {
00066     Q_OBJECT
00067 public:
00068     QPEMenuBar( QWidget *parent=0, const char* name=0 );
00069     ~QPEMenuBar();
00070 
00071 protected:
00072     virtual void keyPressEvent( QKeyEvent *e );
00073 
00074     /* Patch from Mickey
00075      * Sharp Qtopia1.5 seems to have these functions
00076      * TO BE RESOLVED  - zecke
00077      */
00078     void activateItem( int index );
00079     void goodbye();
00080     
00081     // This is a special "lineo" add-on for the Sharp ROM
00082     // nobody knows, what it does, though ...
00083         int getOldFocus ( );
00084 };
00085 
00086 #endif
00087 

Generated on Sat Nov 5 16:16:40 2005 for OPIE by  doxygen 1.4.2