KDEUI
kiconloader.cpp
Go to the documentation of this file.
254 QString makeCacheKey(const QString &name, KIconLoader::Group group, const QStringList &overlays,
299 void drawOverlays(const KIconLoader *loader, KIconLoader::Group group, int state, QPixmap& pix, const QStringList& overlays);
306 const QStringList genericIconsFiles = KGlobal::dirs()->findAllResources("xdgdata-mime", "generic-icons");
350 void KIconLoaderPrivate::drawOverlays(const KIconLoader *iconLoader, KIconLoader::Group group, int state, QPixmap& pix, const QStringList& overlays)
388 const QPixmap pixmap = iconLoader->loadIcon(overlay, group, overlaySize, state, QStringList(), 0, true);
476 static const char * const groups[] = { "Desktop", "Toolbar", "MainToolbar", "Small", "Panel", "Dialog", 0L };
521 kError(264) << "Error: standard icon theme" << KIconTheme::defaultThemeName() << "not found!" << endl;
699 void KIconLoader::drawOverlays(const QStringList &overlays, QPixmap &pixmap, KIconLoader::Group group, int state) const
717 void KIconLoaderPrivate::normalizeIconMetadata(KIconLoader::Group &group, int &size, int &state) const
838 bool KIconLoaderPrivate::findCachedPixmapWithPath(const QString &key, QPixmap &data, QString &path)
890 K3Icon KIconLoaderPrivate::findMatchingIconWithGenericFallbacks(const QString& name, int size) const
1075 QPixmap KIconLoader::loadMimeTypeIcon( const QString& _iconName, KIconLoader::Group group, int size,
1177 icon = d->findMatchingIconWithGenericFallbacks(favIconOverlay ? QString("text-html") : name, size);
1240 QMovie *KIconLoader::loadMovie(const QString& name, KIconLoader::Group group, int size, QObject *parent) const
1310 QStringList KIconLoader::loadAnimated(const QString& name, KIconLoader::Group group, int size) const
1510 QPixmap tmp = loadIcon(name, g, s, KIconLoader::ActiveState, QStringList(), NULL, canReturnNull);
1523 QPixmap DesktopIcon(const QString& name, int force_size, int state, const QStringList &overlays)
1568 QPixmap MainBarIcon(const QString& name, int force_size, int state, const QStringList &overlays)
1610 QString path = global()->iconPath("unknown", KIconLoader::Small, true); //krazy:exclude=iconnames
QStringList loadAnimated(const QString &name, KIconLoader::Group group, int size=0) const
Loads an animated icon as a series of still frames.
Definition: kiconloader.cpp:1310
int defaultSize(KIconLoader::Group group) const
The default size of this theme for a certain icon group.
Definition: kicontheme.cpp:321
int indexOf(QChar ch, int from, Qt::CaseSensitivity cs) const
void addExtraDesktopThemes()
Adds all the default themes from other desktops at the end of the list of icon themes.
Definition: kiconloader.cpp:644
int currentSize(KIconLoader::Group group) const
Returns the current size of the icon group.
Definition: kiconloader.cpp:1370
QString toUpper() const
QMovie * loadMovie(const QString &name, KIconLoader::Group group, int size=0, QObject *parent=0) const
Loads an animated icon.
Definition: kiconloader.cpp:1240
void addAppDir(const QString &appname)
Adds appname to the list of application specific directories.
Definition: kiconloader.cpp:561
void truncate(int position)
void moveBottomRight(const QPoint &position)
QPixmap MainBarIcon(const QString &name, int size=0, int state=KIconLoader::DefaultState, const QStringList &overlays=QStringList())
Definition: kiconloader.cpp:1568
int width() const
bool hasContext(KIconLoader::Context context) const
Definition: kiconloader.cpp:1477
static KIconLoader * global()
Returns the global icon loader initialized with the global KComponentData.
#define K_GLOBAL_STATIC(TYPE, NAME)
bool isValid() const
QPoint bottomRight() const
KStandardDirs * dirs()
bool contains(const QString &str, Qt::CaseSensitivity cs) const
bool isEmpty() const
const char * name(StandardAction id)
This will return the internal name of a given standard action.
Definition: kstandardaction.cpp:223
static QDebug kError(bool cond, int area=KDE_DEFAULT_DEBUG_AREA)
QPixmap fromImage(const QImage &image, QFlags< Qt::ImageConversionFlag > flags)
QString join(const QString &separator) const
bool isNull() const
bool alphaBlending(KIconLoader::Group group) const
Checks whether the user wants to blend the icons with the background using the alpha channel informat...
Definition: kiconloader.cpp:1492
static KGlobalSettings * self()
Return the KGlobalSettings singleton.
Definition: kglobalsettings.cpp:188
QString moviePath(const QString &name, KIconLoader::Group group, int size=0) const
Returns the path to an animated icon.
Definition: kiconloader.cpp:1258
static QDebug kDebug(bool cond, int area=KDE_DEFAULT_DEBUG_AREA)
void chop(int n)
static bool exists(const QString &fullPath)
QStringList queryIcons(int group_or_size, KIconLoader::Context context=KIconLoader::Any) const
Queries all available icons for a specific group, having a specific context.
Definition: kiconloader.cpp:1436
QByteArray & buffer()
KSharedConfigPtr config()
int lastIndexOf(QChar ch, int from, Qt::CaseSensitivity cs) const
QStringList queryIconsByContext(int group_or_size, KIconLoader::Context context=KIconLoader::Any) const
Queries all available icons for a specific context.
Definition: kiconloader.cpp:1394
QPixmap SmallIcon(const QString &name, int size=0, int state=KIconLoader::DefaultState, const QStringList &overlays=QStringList())
Definition: kiconloader.cpp:1553
Definition: kstandardguiitem.h:50
const char * name() const
QPixmap loadIcon(const QString &name, KIconLoader::Group group, int size=0, int state=KIconLoader::DefaultState, const QStringList &overlays=QStringList(), QString *path_store=0L, bool canReturnNull=false) const
Loads an icon.
Definition: kiconloader.cpp:1100
QString number(int n, int base)
bool exists() const
void append(const T &value)
QString & insert(int position, QChar ch)
void fill(uint pixelValue)
void output(QList< Action > actions, QHash< QString, QString > domain)
void setObjectName(const QString &name)
bool isEmpty() const
QRect rect() const
bool startsWith(const QString &s, Qt::CaseSensitivity cs) const
QPixmap loadMimeTypeIcon(const QString &iconName, KIconLoader::Group group, int size=0, int state=KIconLoader::DefaultState, const QStringList &overlays=QStringList(), QString *path_store=0) const
Loads an icon for a mimetype.
Definition: kiconloader.cpp:1075
bool endsWith(const QString &s, Qt::CaseSensitivity cs) const
virtual bool open(QFlags< QIODevice::OpenModeFlag > flags)
void addPixmap(const QPixmap &pixmap, Mode mode, State state)
QIcon SmallIconSet(const QString &name, int size=0)
Definition: kiconloader.cpp:1561
QString componentName() const
K_GLOBAL_STATIC_WITH_ARGS(QString, NULL_EFFECT_FINGERPRINT,(QString::fromLatin1("noeffect"))) static bool pathIsRelative(const QString &path)
Checks for relative paths quickly on UNIX-alikes, slowly on everything else.
Definition: kiconloader.cpp:67
bool load(const QString &fileName, const char *format, QFlags< Qt::ImageConversionFlag > flags)
KIconEffect * iconEffect() const
Returns a pointer to the KIconEffect object used by the icon loader.
Definition: kiconloader.cpp:1487
QString right(int n) const
iterator end()
bool isNull() const
int height() const
QPixmap DesktopIcon(const QString &name, int size=0, int state=KIconLoader::DefaultState, const QStringList &overlays=QStringList())
Definition: kiconloader.cpp:1523
bool extraDesktopThemesAdded() const
Returns if the default icon themes of other desktops have been added to the list of icon themes where...
Definition: kiconloader.cpp:694
QStringList resourceDirs(const char *type) const
bool isRelativePath(const QString &path)
QPixmap UserIcon(const QString &name, int state=KIconLoader::DefaultState, const QStringList &overlays=QStringList())
Definition: kiconloader.cpp:1583
QIcon BarIconSet(const QString &name, int size=0)
Definition: kiconloader.cpp:1546
QIcon MainBarIconSet(const QString &name, int size=0)
Definition: kiconloader.cpp:1576
bool contains(const T &value) const
virtual void close()
QByteArray toLatin1() const
void drawImage(const QRectF &target, const QImage &image, const QRectF &source, QFlags< Qt::ImageConversionFlag > flags)
QString mid(int position, int n) const
QString dirName() const
static QString locateLocal(const char *type, const QString &filename, const KComponentData &cData=KGlobal::mainComponent())
void iconLoaderSettingsChanged()
Emitted by newIconLoader once the new settings have been loaded.
QStringList entryList(QFlags< QDir::Filter > filters, QFlags< QDir::SortFlag > sort) const
typedef ConstIterator
QPixmap * find(const QString &key)
void reconfigure(const QString &_appname, KStandardDirs *_dirs)
Called by KComponentData::newIconLoader to reconfigure the icon loader.
Definition: kiconloader.cpp:446
const KComponentData & mainComponent()
void setBuffer(QByteArray *byteArray)
KIconLoader(const QString &appname=QString(), KStandardDirs *dirs=0, QObject *parent=0)
Constructs an iconloader.
Definition: kiconloader.cpp:424
int length() const
QIcon loadIconSet(const QString &name, KIconLoader::Group group, int size=0, bool canReturnNull=false)
Creates an icon set, that will do on-demand loading of the icon.
Definition: kiconloader.cpp:1506
static QDebug kWarning(bool cond, int area=KDE_DEFAULT_DEBUG_AREA)
QString left(int n) const
QString fromLatin1(const char *str, int size)
void sort()
void drawOverlays(const QStringList &overlays, QPixmap &pixmap, KIconLoader::Group group, int state=KIconLoader::DefaultState) const
Draws overlays on the specified pixmap, it takes the width and height of the pixmap into consideratio...
Definition: kiconloader.cpp:699
const QString & staticQString(const char *str)
QStringList findAllResources(const char *type, const QString &filter=QString(), SearchOptions options=NoSearchOptions) const
QStringList queryIconsByDir(const QString &iconsDir) const
Returns a list of all icons (*.png or *.xpm extension) in the given directory.
Definition: kiconloader.cpp:1382
const_iterator constEnd() const
const_iterator constBegin() const
bool insert(const QString &key, const QPixmap &pixmap)
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
int defaultDepth()
Definition: kicontheme.h:46
iterator begin()
QImage scaled(int width, int height, Qt::AspectRatioMode aspectRatioMode, Qt::TransformationMode transformMode) const
QByteArray encodeName(const QString &fileName)
QString decodeName(const QByteArray &localFileName)
QIcon DesktopIconSet(const QString &name, int size=0)
Definition: kiconloader.cpp:1531
QString internalName() const
The internal name of the icon theme (same as the name argument passed to the constructor).
Definition: kicontheme.cpp:276
QPixmap BarIcon(const QString &name, int size=0, int state=KIconLoader::DefaultState, const QStringList &overlays=QStringList())
Definition: kiconloader.cpp:1538
KStandardDirs * dirs() const
QString iconPath(const QString &name, int group_or_size, bool canReturnNull=false) const
Returns the path of an icon.
Definition: kiconloader.cpp:1009
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:23:59 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:23:59 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.