Logo Search packages:      
Sourcecode: qt4-x11 version File versions  Download package

QIcon QStyle::standardIcon ( StandardPixmap  standardIcon,
const QStyleOption option = 0,
const QWidget widget = 0 
) const [inherited]

Returns an icon for the given standardIcon.

The standardIcon is a standard pixmap which can follow some existing GUI style or guideline. The option argument can be used to pass extra information required when defining the appropriate icon. The widget argument is optional and can also be used to aid the determination of the icon.

Because of binary compatibility constraints, this function is not virtual. If you want to provide your own icons in a QStyle subclass, reimplement the standardIconImplementation() slot in your subclass instead. The standardIcon() function will dynamically detect the slot and call it.
See also:
standardIconImplementation(), standardPixmap()

Definition at line 2140 of file qstyle.cpp.

References QMetaObject::invokeMethod().

Referenced by QCommonStyle::drawComplexControl(), QCleanlooksStyle::drawComplexControl(), drawComplexControl(), QWindowsVistaStyle::drawControl(), drawControl(), QMdiSubWindow::event(), QMdiSubWindow::QMdiSubWindow(), QMessageBox::standardIcon(), standardPixmap(), and QCommonStyle::subElementRect().

    QIcon result;
    // ### Qt 4.1: invokeMethod should accept const functions, to avoid this dirty cast
                              "standardIconImplementation", Qt::DirectConnection,
                              Q_RETURN_ARG(QIcon, result),
                              Q_ARG(StandardPixmap, standardIcon),
                              Q_ARG(const QStyleOption*, option),
                              Q_ARG(const QWidget*, widget));
    return result;

Generated by  Doxygen 1.6.0   Back to index