libopie API Documentation

ofontmenu.h

00001 
00002 /*
00003 
00004                =.            This file is part of the OPIE Project
00005              .=l.            Copyright (c)  2002 zecke <zecke@handhelds.org>
00006            .>+-=
00007  _;:,     .>    :=|.         This library is free software; you can
00008 .> <`_,   >  .   <=          redistribute it and/or  modify it under
00009 :`=1 )Y*s>-.--   :           the terms of the GNU Library General Public
00010 .="- .-=="i,     .._         License as published by the Free Software
00011  - .   .-<_>     .<>         Foundation; either version 2 of the License,
00012      ._= =}       :          or (at your option) any later version.
00013     .%`+i>       _;_.
00014     .i_,=:_.      -<s.       This library is distributed in the hope that
00015      +  .  -:.       =       it will be useful,  but WITHOUT ANY WARRANTY;
00016     : ..    .:,     . . .    without even the implied warranty of
00017     =_        +     =;=|`    MERCHANTABILITY or FITNESS FOR A
00018   _.=:.       :    :=>`:     PARTICULAR PURPOSE. See the GNU
00019 ..}^=.=       =       ;      Library General Public License for more
00020 ++=   -.     .`     .:       details.
00021  :     =  ...= . :.=-
00022  -.   .:....=;==+<;          You should have received a copy of the GNU
00023   -_. . .   )=.  =           Library General Public License along with
00024     --        :-=`           this library; see the file COPYING.LIB.
00025                              If not, write to the Free Software Foundation,
00026                              Inc., 59 Temple Place - Suite 330,
00027                              Boston, MA 02111-1307, USA.
00028 
00029 */
00030 
00031 
00032 
00033 
00034 #ifndef ofontmenu_h
00035 #define ofontmenu_h
00036 
00037 #include <qpopupmenu.h>
00038 #include <qlist.h>
00039 
00040 /*
00041  * @internal
00042  */
00043 namespace {
00044   struct WidSize {
00045     QWidget *wid;
00046     int size;
00047   };
00048 
00049 };
00050 
00051 // forward declarations
00052 class Config;
00053 
00075 class OFontMenu : public QPopupMenu {
00076   Q_OBJECT
00077  public:
00078   OFontMenu(QWidget *parent, const char* name, const QList<QWidget> &list );
00079   void save(Config *cfg );
00080   void restore(Config *cfg );
00081   void setWidgets(const QList<QWidget> &list );
00082   void addWidget(QWidget *wid );
00083   void forceSize(QWidget *wid, int size );
00084   void removeWidget(QWidget *wid );
00085   const QList<QWidget> &widgets()const;
00086 
00087  signals:
00092   void fontChanged(int size );
00093 
00094  private:
00095   QList<QWidget> m_list;
00096   QList<WidSize> m_wids;
00097   int m_size;
00098   class OFontMenuPrivate;
00099   OFontMenuPrivate *d;
00100 
00101  private slots:
00102   virtual void slotSmall();
00103   virtual void slotMedium();
00104   virtual void slotLarge();
00105   void setFontSize(int size );
00106 };
00107 
00108 #endif
00109 
00110 
00111 
00112 
00113 
KDE Logo
This file is part of the documentation for OPIE Version 1.1.
Documentation copyright © 1997-2003 the KDE developers. 2003 OPIE developers
Generated on Tue Feb 10 20:24:44 2004 by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2001