The QIconSet class provides a set of icons (normal, disabled, various sizes) for e.g. buttons. More...
#include <qiconset.h>
QIconSet must be fed at least one icon, and can generate the other icons from the ones it is fed, or use programmer-specified icons.
Using the icon or icons specified, QIconSet generates a set of six icons:
You can set any of the icons using setPixmap() and when you retrieve one using pixmap(), QIconSet will compute and cache that from the closest other icon.
The Disabled
appearance is computed using a "shadow" algorithm
which produces results very similar to that used in of Microsoft
Windows 95.
The Active
appearance is identical to the Normal
appearance
unless you use setPixmap() to set it to something special.
QIconSet provides a function, isGenerated(), that indicates whether an icon was set by the application programmer or computed by QIconSet itself.
In Qt 1.41 only QToolButton uses QIconSet. In Qt 2.0 we will use it in more classes, including the menu system.
See also: QPixmap, QLabel, QToolButton, GUI Design Handbook: Iconic Label,, Constructs an icon set that will generate its members from defaultPixmap, which is assumed to be of defaultSize.
The default for defaultSize is See also: reset().
Constructs an a copy of other. This is very fast.
See also: detach().
Destroys the icon set and frees any allocated resources.
Detaches this icon set from others with which it may share data.
You should never need to call this function; reset() and setPixmap()
call it as necessary. It exists merely so that the copy constructor
and operator= can be faster.
Returns TRUE if the variant with size s and mode m was
automatically generated, and FALSE if it was not.
Assigns other to this icon set and returns a reference to this
icon set.
This is very fast.
See also: detach().
Returns the pixmap originally provided to the constructor or
reset().
See also: reset().
Returns a pixmap with size s and mode m, generating one if
needed.
Set this icon set to display pm, which is assumed to be in
size s. If s is Sets this icon set to display pn in size s/mode m, and
perhaps to use pm for deriving some other varieties.
s must be Large or Small; it cannot be Automatic.
Sets this icon set to load fileName as a pixmap and display it
in size s/mode m, and perhaps to use pm for deriving some
other varieties.
Search the documentation, FAQ, qt-interest archive and more (uses
www.troll.no):
This file is part of the Qt toolkit,
copyright © 1995-98
Troll Tech, all rights reserved.
It was generated from the following files:
Microsoft, Icon and Gallery.
Member Function Documentation
QIconSet::QIconSet ( const QPixmap & defaultPixmap, Size defaultSize = Automatic )
Automatic,
which means that
QIconSet will determine the icon's size from its actual size.
QIconSet::QIconSet ( const QIconSet & other )
QIconSet::~QIconSet ()
[virtual]
void QIconSet::detach ()
bool QIconSet::isGenerated ( Size s, Mode m ) const
QIconSet & QIconSet::operator= ( const QIconSet & p )
QPixmap QIconSet::pixmap () const
QPixmap QIconSet::pixmap ( Size s, Mode m ) const
void QIconSet::reset ( const QPixmap & pm, Size s )
Automatic,
QIconSet guesses the size from
the size of pm using and unspecified algorithm.
void QIconSet::setPixmap ( const QPixmap & pm, Size s, Mode m = Normal )
void QIconSet::setPixmap ( const char * fileName, Size s, Mode m = Normal )
Copyright İ 1998 Troll Tech Trademarks