Äîêóìåíò âçÿò èç êýøà ïîèñêîâîé ìàøèíû. Àäðåñ îðèãèíàëüíîãî äîêóìåíòà : http://rtm-cs.sinp.msu.ru/manual/qt/qiconset.html
Äàòà èçìåíåíèÿ: Sun Jul 12 02:58:58 1998
Äàòà èíäåêñèðîâàíèÿ: Mon Oct 1 20:06:30 2012
Êîäèðîâêà:
Qt Toolkit - QIconSet Class Qt logo

QIconSet Class Reference


The QIconSet class provides a set of icons (normal, disabled, various sizes) for e.g. buttons. More...

#include <qiconset.h>

List of all member functions.

Public Members


Detailed Description

The QIconSet class provides a set of icons (normal, disabled, various sizes) for e.g. buttons.

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 aone 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.40 only QToolButton uses QIconSet. In Qt 2.0 we will use it in more classes, including the menu system.

See also: QPixmap, QLabel, QToolButton and GUI Design Handbook: Iconic Label.


Member Function Documentation

QIconSet::QIconSet ( const QPixmap & defaultPixmap, Size defaultSize = Automatic )

Constructs an icon set that will generate its members from defaultPixmap, which is assumed to be of defaultSize.

The default for defaultSize is Automatic, which means that QIconSet will determine the icon's size from its actual size.

See also: reset().

QIconSet::QIconSet ( const QIconSet & other )

Constructs an a copy of other. This is very fast.

QIconSet::~QIconSet () [virtual]

Destroys the icon set and frees any allocated resources.

bool QIconSet::isGenerated ( Size s, Mode m ) const

.

QIconSet & QIconSet::operator= ( const QIconSet & p )

Assigns other to this icon set and returns a reference to this icon set.

This is very fast.

QPixmap QIconSet::pixmap () const

Returns the pixmap originally provided to the constructor or reset().

See also: reset().

QPixmap QIconSet::pixmap ( Size s, Mode m ) const

.

void QIconSet::reset ( const QPixmap & pm, Size s )

.

void QIconSet::setPixmap ( const QPixmap & pm, Size s, Mode m = Normal )

Sets this icon set to display pn in size s/mode m, and perhaps to use pm for deriving some other varieties.

void QIconSet::setPixmap ( const char * fileName, Size s, Mode m = Normal )

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:


Copyright © 1998 Troll TechTrademarks
Qt version 1.40