demos/shared/arthurstyle.cpp File Reference

#include "arthurstyle.h"
#include "arthurwidgets.h"
#include <QLayout>
#include <QPainter>
#include <QPainterPath>
#include <QPixmapCache>
#include <QRadioButton>
#include <QString>
#include <QStyleOption>
#include <QtDebug>

Include dependency graph for arthurstyle.cpp:

Go to the source code of this file.

Functions

QPixmap cached (const QString &img)


Function Documentation

QPixmap cached ( const QString img  ) 

Definition at line 35 of file arthurstyle.cpp.

References QPixmapCache::find(), QPixmap::fromImage(), QPixmapCache::insert(), QPixmap::isNull(), Qt::OrderedAlphaDither, Qt::OrderedDither, and p.

Referenced by Q3Dns::addresses(), Q3Dns::canonicalName(), ArthurStyle::drawComplexControl(), ArthurStyle::drawPrimitive(), Q3Dns::hostNames(), Q3Dns::mailServers(), Q3Dns::servers(), ArthurStyle::subControlRect(), and Q3Dns::texts().

00036 {
00037     if (QPixmap *p = QPixmapCache::find(img))
00038         return *p;
00039 
00040     QPixmap pm;
00041     pm = QPixmap::fromImage(QImage(img), Qt::OrderedDither | Qt::OrderedAlphaDither);
00042     if (pm.isNull())
00043         return QPixmap();
00044 
00045     QPixmapCache::insert(img, pm);
00046     return pm;
00047 }

Here is the call graph for this function:


Generated on Thu Mar 15 12:04:20 2007 for Qt 4.2 User's Guide by  doxygen 1.5.1