QCustomMenuItem man page on IRIX

Man page or keyword search:  
man Server   31559 pages
apropos Keyword Search (all sections)
Output format
IRIX logo
[printable version]



QCustomMenuItem(3qt)			     QCustomMenuItem(3qt)

NAME
       QCustomMenuItem - Abstract base class for custom menu
       items in popup menus

       #include <qmenudata.h>

       Inherits Qt.

   Public Members
       QCustomMenuItem ()
       virtual ~QCustomMenuItem ()
       virtual bool fullSpan () const
       virtual bool isSeparator () const
       virtual void setFont ( const QFont & font )
       virtual void paint ( QPainter * p, const QColorGroup & cg,
	   bool act, bool enabled, int x, int y, int w, int h )
       virtual QSize sizeHint ()

DESCRIPTION
       The QCustomMenuItem class is an abstract base class for
       custom menu items in popup menus.

       A custom menu item is a menu item that is defined by two
       purely virtual functions, paint() and sizeHint(). The size
       hint tells the menu how much space it needs to reserve for
       this item, whereas paint is called whenever the item needs
       painting.

       This simply mechanism gives applications the possibility
       to create all kinds of application specific menu items.
       Examples are items showing different fonts in a word
       processor, or menus that allow the selection of drawing
       utilities in a vector drawing program.

       A custom item is inserted into a popup menu with
       QPopupMenu::insertItem().

       Per default, a custom item can also have an icon set
       and/or an accelerator key. You can, however, reimplement
       fullSpan() to return TRUE if you want the item to span the
       entire popup menu width. This is in particular useful for
       labels.

       If you want the custom item to be treated as a separator
       only, reimplement isSeparator() to return TRUE.

       Note that you can also insert pixmaps or bitmaps as items
       into a popup menu. A custom menu item, however, offers
       even more flexibility and - which is especially important
       under windows style - the possibility to draw the item
       with a different color when it is highlighted.

       menu/menu.cpp shows a simply example how custom menu items

Trolltech AS		   13 June 2001				1

QCustomMenuItem(3qt)			     QCustomMenuItem(3qt)

       can be used.

			    [Image Omitted]

       See also QMenuData and QPopupMenu.

MEMBER FUNCTION DOCUMENTATION
QCustomMenuItem::QCustomMenuItem ()
       Constructs a QCustomMenuItem.

QCustomMenuItem::~QCustomMenuItem () [virtual]
       Destructs a QCustomMenuItem.

bool QCustomMenuItem::fullSpan () const [virtual]
       Returns whether this item wants to span the entire popup
       menu width. The default is FALSE, meaning that the menu
       may show an icon and/or an accelerator key for this item
       as well.

bool QCustomMenuItem::isSeparator () const [virtual]
       Returns whether this item is just a separator.

void QCustomMenuItem::paint ( QPainter * p, const QColorGroup &
       cg, bool act, bool enabled, int x, int y, int w, int h )
       [virtual]
       Paints this item. When this function is invoked, the
       painter p is set to the right font and the right
       foreground color suitable for a menu item text. The item
       is active according to act and enabled/disabled according
       to enabled. The geometry values x, y, w and h specify
       where to draw the item.

       Do not draw any background, this has already been done by
       the popup menu according to the current gui style.

void QCustomMenuItem::setFont ( const QFont & ) [virtual]
       Sets the font of the custom menu item.

       This function is called whenever the font in the popup
       menu changes. For menu items that show their own
       individual font entry, you want to ignore this.

QSize QCustomMenuItem::sizeHint () [virtual]
       Returns the size hint of this item.

SEE ALSO
       http://doc.trolltech.com/qcustommenuitem.html
       http://www.trolltech.com/faq/tech.html

COPYRIGHT
       Copyright 1992-2001 Trolltech AS,
       http://www.trolltech.com.  See the license file included
       in the distribution for a complete license statement.

Trolltech AS		   13 June 2001				2

QCustomMenuItem(3qt)			     QCustomMenuItem(3qt)

AUTHOR
       Generated automatically from the source code.

BUGS
       If you find a bug in Qt, please report it as described in
       http://doc.trolltech.com/bughowto.html.	Good bug reports
       make our job much simpler. Thank you.

       In case of content or formattting problems with this
       manual page, please report them to qt-bugs@trolltech.com.
       Please include the name of the manual page
       (qcustommenuitem.3qt) and the Qt version (2.3.1).

Trolltech AS		   13 June 2001				3

[top]

List of man pages available for IRIX

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net