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

obarcollection.h

Go to the documentation of this file.
00001 /*
00002                =.            This file is part of the OPIE Project
00003              .=l.            Copyright (c)  2003 hOlgAr <zecke@handhelds.org>
00004            .>+-=
00005  _;:,     .>    :=|.         This library is free software; you can
00006 .> <`_,   >  .   <=          redistribute it and/or  modify it under
00007 :`=1 )Y*s>-.--   :           the terms of the GNU Library General Public
00008 .="- .-=="i,     .._         License as published by the Free Software
00009  - .   .-<_>     .<>         Foundation; either version 2 of the License,
00010      ._= =}       :          or (at your option) any later version.
00011     .%`+i>       _;_.
00012     .i_,=:_.      -<s.       This library is distributed in the hope that
00013      +  .  -:.       =       it will be useful,  but WITHOUT ANY WARRANTY;
00014     : ..    .:,     . . .    without even the implied warranty of
00015     =_        +     =;=|`    MERCHANTABILITY or FITNESS FOR A
00016   _.=:.       :    :=>`:     PARTICULAR PURPOSE. See the GNU
00017 ..}^=.=       =       ;      Library General Public License for more
00018 ++=   -.     .`     .:       details.
00019  :     =  ...= . :.=-
00020  -.   .:....=;==+<;          You should have received a copy of the GNU
00021   -_. . .   )=.  =           Library General Public License along with
00022     --        :-=`           this library; see the file COPYING.LIB.
00023                              If not, write to the Free Software Foundation,
00024                              Inc., 59 Temple Place - Suite 330,
00025                              Boston, MA 02111-1307, USA.
00026  
00027 */
00028 
00029 #ifndef OBARCOLLECTION_H
00030 #define OBARCOLLECTION_H
00031 
00032 /* QT */
00033 
00034 #include <qstring.h>
00035 #include <qwidget.h>
00036 
00037 class QAction;
00038 class QPopupMenu;
00039 
00040 namespace Opie
00041 {
00042 
00043 /*
00044  * ### TODO
00045  * -Consider Life Updates
00046  * -Make ValueBased like Opie-featurelist
00047  */
00048 
00064 class OBarGroup
00065 {
00066 public:
00067     enum Preference { Allways, Never, IfPlace };
00068     OBarGroup( const QString& name,  enum Preference groupPreference );
00069     ~OBarGroup();
00070 
00071     void add( QAction* action, enum Preference menuPreference,
00072                   enum Preference toolpreference );
00073     void add( const QString&, QPopupMenu* );
00074 
00075     void add( OBarGroup* );
00076 
00077     void remove( QAction* action );
00078     void remove( QMap* );
00079 
00080 protected:
00081     OBarGroup* parent()const;
00082 
00083 private:
00084 };
00085 
00086 
00093 class OBarManager : public QObject
00094 {
00095 public:
00096     OBarManager( QWindow* parent );
00097     ~OBarManager();
00098 
00099     void add( OBarGroup*, int pos = -1 );
00100     void remove( OBarGroup* );
00101 
00102     bool eventFilter( QObject* , QEvent* );
00103 
00104 public slots:
00105     void createGUI();
00106 };
00107 
00108 /*
00109  * ### TODO GUI merging
00110  */
00111 
00112 };
00113 
00114 #endif
00115 
00116 

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