demos/shared/arthurwidgets.cpp File Reference

#include "arthurwidgets.h"
#include <QApplication>
#include <QPainter>
#include <QPainterPath>
#include <QPixmapCache>
#include <QtEvents>
#include <QTextDocument>
#include <QAbstractTextDocumentLayout>
#include <QFile>
#include <QTextBrowser>
#include <QBoxLayout>

Include dependency graph for arthurwidgets.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:22 2007 for Qt 4.2 User's Guide by  doxygen 1.5.1