summaryrefslogtreecommitdiff
path: root/libopie/ofontmenu.h
Unidiff
Diffstat (limited to 'libopie/ofontmenu.h') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/ofontmenu.h44
1 files changed, 37 insertions, 7 deletions
diff --git a/libopie/ofontmenu.h b/libopie/ofontmenu.h
index 5fd515f..6e143ca 100644
--- a/libopie/ofontmenu.h
+++ b/libopie/ofontmenu.h
@@ -5,5 +5,5 @@
5             .=l. Copyright (c) 2002 zecke <zecke@handhelds.org> 5             .=l. Copyright (c) 2002 zecke <zecke@handhelds.org>
6           .>+-= 6           .>+-=
7 _;:,     .>    :=|. This library is free software; you can 7 _;:,     .>    :=|. This library is free software; you can
8.> <`_,   >  .   <= redistribute it and/or modify it under 8.> <`_,   >  .   <= redistribute it and/or modify it under
9:`=1 )Y*s>-.--   : the terms of the GNU Library General Public 9:`=1 )Y*s>-.--   : the terms of the GNU Library General Public
@@ -11,6 +11,6 @@
11 - .   .-<_>     .<> Foundation; either version 2 of the License, 11 - .   .-<_>     .<> Foundation; either version 2 of the License,
12     ._= =}       : or (at your option) any later version. 12     ._= =}       : or (at your option) any later version.
13    .%`+i>       _;_. 13    .%`+i>       _;_.
14    .i_,=:_.      -<s. This library is distributed in the hope that 14    .i_,=:_.      -<s. This library is distributed in the hope that
15     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY; 15     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
16    : ..    .:,     . . . without even the implied warranty of 16    : ..    .:,     . . . without even the implied warranty of
@@ -19,8 +19,8 @@
19..}^=.=       =       ; Library General Public License for more 19..}^=.=       =       ; Library General Public License for more
20++=   -.     .`     .: details. 20++=   -.     .`     .: details.
21 :     =  ...= . :.=- 21 :     =  ...= . :.=-
22 -.   .:....=;==+<; You should have received a copy of the GNU 22 -.   .:....=;==+<; You should have received a copy of the GNU
23  -_. . .   )=.  = Library General Public License along with 23  -_. . .   )=.  = Library General Public License along with
24    --        :-=` this library; see the file COPYING.LIB. 24    --        :-=` this library; see the file COPYING.LIB.
25 If not, write to the Free Software Foundation, 25 If not, write to the Free Software Foundation,
26 Inc., 59 Temple Place - Suite 330, 26 Inc., 59 Temple Place - Suite 330,
@@ -38,5 +38,7 @@
38#include <qlist.h> 38#include <qlist.h>
39 39
40 40/*
41 * @internal
42 */
41namespace { 43namespace {
42 struct WidSize { 44 struct WidSize {
@@ -47,6 +49,28 @@ namespace {
47}; 49};
48 50
49// if i would be on kde this would be a KActionMenu... 51// forward declarations
50class Config; 52class Config;
53
54/**
55 * This class is a specialised QPopupMenu. It'll display three different
56 * font sizes. Small, Normal and large by adding widgets to the Menu
57 * you can control the font size of these widgets
58 * by using the save and restore method you can also apply font sizes
59 * over two different runtimes
60 *
61 * <pre>
62 * QTable* tbl = new QTable();
63 * QList<QWidget> wid;
64 * wid.append( tbl );
65 * OFontMenu* menu = new OFontMenu(this, "Popup Menu", wid );
66 * Config cfg("mycfg");
67 * menu->restore( cfg );
68 * </pre>
69 *
70 * @author Holger Freyther ( zecke@handhelds.org )
71 * @version 0.1
72 * @short PopupMenu which can control the size of Widgets
73 * @see QPopupMenu
74 */
51class OFontMenu : public QPopupMenu { 75class OFontMenu : public QPopupMenu {
52 Q_OBJECT 76 Q_OBJECT
@@ -62,5 +86,10 @@ class OFontMenu : public QPopupMenu {
62 86
63 signals: 87 signals:
88 /**
89 * this signal gets emitted when the font size gets changed
90 * @param size The new size of font
91 */
64 void fontChanged(int size ); 92 void fontChanged(int size );
93
65 private: 94 private:
66 QList<QWidget> m_list; 95 QList<QWidget> m_list;
@@ -69,4 +98,5 @@ class OFontMenu : public QPopupMenu {
69 class OFontMenuPrivate; 98 class OFontMenuPrivate;
70 OFontMenuPrivate *d; 99 OFontMenuPrivate *d;
100
71 private slots: 101 private slots:
72 virtual void slotSmall(); 102 virtual void slotSmall();