• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdelibs API Reference
  • KDE Home
  • Contact Us
 

KDEUI

  • sources
  • kde-4.12
  • kdelibs
  • kdeui
  • icons
kiconcache.h
Go to the documentation of this file.
1 /*
2  *
3  * This file is part of the KDE project.
4  * Copyright (C) 2007 Rivo Laks <rivolaks@hot.ee>
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Library General Public
8  * License version 2 as published by the Free Software Foundation.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Library General Public License for more details.
14  *
15  * You should have received a copy of the GNU Library General Public License
16  * along with this library; see the file COPYING.LIB. If not, write to
17  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18  * Boston, MA 02110-1301, USA.
19  */
20 
21 #ifndef KICONCACHE_H
22 #define KICONCACHE_H
23 
24 #include <kdeui_export.h>
25 
26 #include <QtCore/QList>
27 #include <QtCore/QSet>
28 #include <kicontheme.h>
29 #include <kpixmapcache.h>
30 
31 class QString;
32 class QStringList;
33 class QPixmap;
34 class QDataStream;
35 
36 
46 // KDE5: Un-export the symbols for this. Better yet, remove it entirely
47 // since KPixmapCache is deprecated.
48 class KDEUI_EXPORT KIconCache : public KPixmapCache
49 {
50 public:
54  explicit KIconCache();
55  virtual ~KIconCache();
56 
57 
58  bool find(const QString& key, QPixmap& pix, QString* path);
59  void insert(const QString& key, const QPixmap& pix, const QString& path);
60 
61  virtual bool find(const QString& key, QPixmap& pix);
62  virtual void insert(const QString& key, const QPixmap& pix);
63 
67  static void deleteCache();
68 
74  int defaultIconSize(KIconLoader::Group group) const;
75 
76  void setThemeInfo(const QList<KIconTheme*>& themes);
77 
78 
79 protected:
80  virtual bool loadCustomIndexHeader(QDataStream& stream);
81  virtual void writeCustomIndexHeader(QDataStream& stream);
82 
83  virtual bool loadCustomData(QDataStream& stream);
84  virtual bool writeCustomData(QDataStream& stream);
85 
86  QSet<QString> existingIconThemeDirs(const QStringList& themeNames) const;
87  unsigned int mostRecentMTime(const QSet<QString>& dirNames) const;
88 
89 private:
90  class Private;
91  friend class Private;
92  Private * const d;
93 };
94 
95 #endif // KICONCACHE_H
KPixmapCache::insert
virtual void insert(const QString &key, const QPixmap &pix)
Inserts the pixmap pix into the cache, associated with the key key.
Definition: kpixmapcache.cpp:1366
group
KPixmapCache::loadCustomData
virtual bool loadCustomData(QDataStream &stream)
Can be used by subclasses to load custom data from the stream.
Definition: kpixmapcache.cpp:1361
KPixmapCache
General-purpose pixmap cache for KDE.
Definition: kpixmapcache.h:85
QString
KPixmapCache::writeCustomIndexHeader
virtual void writeCustomIndexHeader(QDataStream &stream)
Can be used by subclasses to write custom data into cache's header.
Definition: kpixmapcache.cpp:1044
KPixmapCache::find
virtual bool find(const QString &key, QPixmap &pix)
Tries to load pixmap with the specified key from cache.
Definition: kpixmapcache.cpp:1272
KPixmapCache::loadCustomIndexHeader
virtual bool loadCustomIndexHeader(QDataStream &stream)
Can be used by subclasses to load custom data from cache's header.
Definition: kpixmapcache.cpp:1039
kpixmapcache.h
QStringList
KPixmapCache::deleteCache
static void deleteCache(const QString &name)
Deletes a pixmap cache.
Definition: kpixmapcache.cpp:1217
QSet< QString >
kicontheme.h
KPixmapCache::writeCustomData
virtual bool writeCustomData(QDataStream &stream)
Can be used by subclasses to write custom data into the stream.
Definition: kpixmapcache.cpp:1429
KIconCache
Icon cache for KDE.
Definition: kiconcache.h:48
KIconLoader::Group
Group
The group of the icon.
Definition: kiconloader.h:127
kdeui_export.h
QList
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:49:14 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KDEUI

Skip menu "KDEUI"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Modules
  • Related Pages

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal