summaryrefslogtreecommitdiff
path: root/libopie/ofontmenu.h
authorzecke <zecke>2003-04-13 16:57:28 (UTC)
committer zecke <zecke>2003-04-13 16:57:28 (UTC)
commit0b311079ff19798866291034663757103c6ba935 (patch) (unidiff)
tree70ddccf3a3147475050fa06cc2d807a71ab1d5ee /libopie/ofontmenu.h
parent1537ccb435ca725c793db6e94e0b9e83484b57e7 (diff)
downloadopie-0b311079ff19798866291034663757103c6ba935.zip
opie-0b311079ff19798866291034663757103c6ba935.tar.gz
opie-0b311079ff19798866291034663757103c6ba935.tar.bz2
Jumbo API documentation update
and some API fixed ColorDialog is now OColorDialog!!! keep the namespace tidy! ColorPopupMenu is now OColorPopupMenu!!! keep the namespace tidy ColorDialog TT couldn't break bc we can so make it const QColor& OTimePicker add some convience methods more I might have forgot
Diffstat (limited to 'libopie/ofontmenu.h') (more/less context) (show whitespace changes)
-rw-r--r--libopie/ofontmenu.h34
1 files changed, 32 insertions, 2 deletions
diff --git a/libopie/ofontmenu.h b/libopie/ofontmenu.h
index 5fd515f..6e143ca 100644
--- a/libopie/ofontmenu.h
+++ b/libopie/ofontmenu.h
@@ -37,7 +37,9 @@
37#include <qpopupmenu.h> 37#include <qpopupmenu.h>
38#include <qlist.h> 38#include <qlist.h>
39 39
40 40/*
41 * @internal
42 */
41namespace { 43namespace {
42 struct WidSize { 44 struct WidSize {
43 QWidget *wid; 45 QWidget *wid;
@@ -46,8 +48,30 @@ namespace {
46 48
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
53 public: 77 public:
@@ -61,13 +85,19 @@ class OFontMenu : public QPopupMenu {
61 const QList<QWidget> &widgets()const; 85 const QList<QWidget> &widgets()const;
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;
67 QList<WidSize> m_wids; 96 QList<WidSize> m_wids;
68 int m_size; 97 int m_size;
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();
73 virtual void slotMedium(); 103 virtual void slotMedium();