OFontMenu Class Reference
This class is a specialised QPopupMenu. PopupMenu which can control the size of Widgets. More...
#include <ofontmenu.h>
Inheritance diagram for OFontMenu:


Signals | |
| void | fontChanged (int size) |
| this signal gets emitted when the font size gets changed | |
Public Member Functions | |
| OFontMenu (QWidget *parent, const char *name, const QList< QWidget > &list) | |
| Constructs the FontMenu. | |
| void | save (Config *cfg) |
| This method saves the font size into a Config object OFontMenu will be used as group and size as key. | |
| void | restore (Config *cfg) |
| This method restores the font size from a Config object it'll apply the sizes to the widgets and will also set the menu appropriate. | |
| void | setWidgets (const QList< QWidget > &list) |
| set the list of widgets | |
| void | addWidget (QWidget *wid) |
| add a widget to the list | |
| void | forceSize (QWidget *wid, int size) |
| Forces a size on a widget. | |
| void | removeWidget (QWidget *wid) |
| removes the widget from the list of controlled objects | |
| const QList< QWidget > & | widgets () const |
| The list of controlled widgets. | |
Detailed Description
This class is a specialised QPopupMenu. PopupMenu which can control the size of Widgets.It'll display three different font sizes. Small, Normal and large by adding widgets to the Menu you can control the font size of these widgets by using the save and restore method you can also apply font sizes over two different runtimes
QTable* tbl = new QTable(); QList<QWidget> wid; wid.append( tbl ); OFontMenu* menu = new OFontMenu(this, "Popup Menu", wid ); Config cfg("mycfg"); menu->restore( cfg );
- Author:
- Holger Freyther ( zecke@handhelds.org )
- Version:
- 0.1
- See also:
- QPopupMenu
Definition at line 75 of file ofontmenu.h.
Constructor & Destructor Documentation
|
||||||||||||||||
|
Constructs the FontMenu.
Definition at line 14 of file ofontmenu.cc. References QPopupMenu::insertItem(), QPopupMenu::setCheckable(), and QObject::tr(). |
Member Function Documentation
|
|
This method saves the font size into a Config object OFontMenu will be used as group and size as key.
Definition at line 36 of file ofontmenu.cc. References Config::setGroup(), and Config::writeEntry(). |
|
|
This method restores the font size from a Config object it'll apply the sizes to the widgets and will also set the menu appropriate.
Definition at line 47 of file ofontmenu.cc. References Config::readNumEntry(), Config::setGroup(), and QPopupMenu::setItemChecked(). |
|
|
set the list of widgets
Definition at line 74 of file ofontmenu.cc. |
|
|
add a widget to the list
Definition at line 83 of file ofontmenu.cc. References QList< QWidget >::append(). |
|
||||||||||||
|
Forces a size on a widget.
Definition at line 110 of file ofontmenu.cc. References QList< WidSize >::append(), and QWidget::size(). |
|
|
removes the widget from the list of controlled objects
Definition at line 92 of file ofontmenu.cc. References QList< QWidget >::remove(). |
|
|
The list of controlled widgets.
Definition at line 100 of file ofontmenu.cc. |
|
|
this signal gets emitted when the font size gets changed
|
The documentation for this class was generated from the following files:
