Back to index

scribus-ng  1.3.4.dfsg+svn20071115
Functions
reformdoc.cpp File Reference
#include "reformdoc.h"
#include "reformdoc.moc"
#include <qcolordialog.h>
#include <qcursor.h>
#include <qspinbox.h>
#include <qtooltip.h>
#include "docsections.h"
#include "tabtypography.h"
#include "docinfo.h"
#include "tabguides.h"
#include "tabtools.h"
#include "tabcheckdoc.h"
#include "hysettings.h"
#include "cmsprefs.h"
#include "units.h"
#include "mpalette.h"
#include "mspinbox.h"
#include "scribus.h"
#include "scribuscore.h"
#include "tabpdfoptions.h"
#include "fontprefs.h"
#include "pagesize.h"
#include "docitemattrprefs.h"
#include "tocindexprefs.h"
#include "marginWidget.h"
#include "page.h"
#include "prefsmanager.h"
#include "pagelayout.h"
#include "colorcombo.h"
#include "fontcombo.h"
#include "linecombo.h"
#include "arrowchooser.h"
#include "polygonwidget.h"
#include "hyphenator.h"
#include "sccombobox.h"
#include "commonstrings.h"
#include "tabdisplay.h"
#include "tabdocument.h"

Go to the source code of this file.

Functions

QPixmap loadIcon (QString nam)

Function Documentation

QPixmap loadIcon ( QString  nam)

Definition at line 224 of file util.cpp.

{
       static ScPixmapCache<QString> pxCache;
       if (pxCache.contains(nam))
              return *pxCache[nam];

       QString iconFilePath(QString("%1%2").arg(ScPaths::instance().iconDir()).arg(nam));
       QPixmap *pm = new QPixmap();
       
       if (!QFile::exists(iconFilePath))
              qWarning("Unable to load icon %s: File not found", iconFilePath.ascii());
       else
       {
              pm->load(iconFilePath);
              if (pm->isNull())
                     qWarning("Unable to load icon %s: Got null pixmap", iconFilePath.ascii());
       }
       pxCache.insert(nam, pm);
       return *pm;
}