QtGui/qicon.h Source File
Go to the documentation of this file.
63 enum Mode { Normal, Disabled, Active, Selected };
68 QIcon(
const QIcon &other);
69 explicit QIcon(
const QString &fileName);
70 explicit QIcon(QIconEngine *engine);
71 explicit QIcon(QIconEngineV2 *engine);
73 QIcon &operator=(
const QIcon &other);
74 #ifdef Q_COMPILER_RVALUE_REFS
75 inline QIcon &operator=(QIcon &&other)
76 {
qSwap(d, other.d);
return *
this; }
78 inline void swap(QIcon &other) {
qSwap(d, other.d); }
94 { paint(painter,
QRect(x, y, w, h), alignment,
mode, state); }
97 bool isDetached()
const;
100 int serialNumber()
const;
108 static QIcon fromTheme(
const QString &
name,
const QIcon &fallback = QIcon());
109 static bool hasThemeIcon(
const QString &name);
112 static void setThemeSearchPaths(
const QStringList &searchpath);
115 static void setThemeName(
const QString &path);
119 enum Size { Small, Large, Automatic = Small };
120 static QT3_SUPPORT
void setPixmapSize(Size which,
const QSize &
size);
121 static QT3_SUPPORT
QSize pixmapSize(Size which);
122 inline QT3_SUPPORT
void reset(
const QPixmap &
pixmap, Size ) { *
this = QIcon(pixmap); }
124 { addPixmap(pixmap,
mode, state); }
125 inline QT3_SUPPORT
void setPixmap(
const QString &fileName, Size, Mode
mode = Normal,
State state = Off)
132 Q_DUMMY_COMPARISON_OPERATOR(QIcon)
136 #if !defined(QT_NO_DATASTREAM)
146 Q_DECLARE_SHARED(QIcon)
149 #if !defined(QT_NO_DATASTREAM)
155 typedef QIcon QIconSet;
QPixmap pixmap(int extent, Mode mode=Normal, State state=Off) const
State
The state the media producing object is in at the moment.
GLXFBConfig Pixmap pixmap
Q_GUI_EXPORT QDataStream & operator>>(QDataStream &, QIcon &)
QPixmap pixmap(int w, int h, Mode mode=Normal, State state=Off) const
#define QT_BEGIN_NAMESPACE
Q_GUI_EXPORT QDataStream & operator<<(QDataStream &, const QIcon &)
Q_INLINE_TEMPLATE void qSwap(QScopedPointer< T, Cleanup > &p1, QScopedPointer< T, Cleanup > &p2)
int int int int int int h
GLuint const GLchar * name
Q_DECLARE_TYPEINFO(QIcon, Q_MOVABLE_TYPE)
GLubyte GLubyte GLubyte GLubyte w
void paint(QPainter *painter, int x, int y, int w, int h, Qt::Alignment alignment=Qt::AlignCenter, Mode mode=Normal, State state=Off) const