• 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
  • util
kimagecache.h
Go to the documentation of this file.
1 /*
2  * This file is part of the KDE project.
3  * Copyright © 2010 Michael Pyne <mpyne@kde.org>
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Library General Public
7  * License version 2 as published by the Free Software Foundation.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Library General Public License for more details.
13  *
14  * You should have received a copy of the GNU Library General Public License
15  * along with this library; see the file COPYING.LIB. If not, write to
16  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17  * Boston, MA 02110-1301, USA.
18  */
19 
20 #ifndef KIMAGECACHE_H
21 #define KIMAGECACHE_H
22 
23 #include <kdeui_export.h>
24 #include <kshareddatacache.h>
25 
26 #include <time.h>
27 
28 class QImage;
29 class QPixmap;
30 
58 class KDEUI_EXPORT KImageCache : public KSharedDataCache
59 {
60  public:
74  KImageCache(const QString &cacheName,
75  unsigned defaultCacheSize,
76  unsigned expectedItemSize = 0);
77 
81  ~KImageCache();
82 
96  bool insertPixmap(const QString &key, const QPixmap &pixmap);
97 
109  bool insertImage(const QString &key, const QImage &image);
110 
118  bool findPixmap(const QString &key, QPixmap *destination) const;
119 
126  bool findImage(const QString &key, QImage *destination) const;
127 
132  void clear();
133 
137  time_t lastModifiedTime() const;
138 
144  bool pixmapCaching() const;
145 
154  void setPixmapCaching(bool enable);
155 
160  int pixmapCacheLimit() const;
161 
168  void setPixmapCacheLimit(int size);
169 
170  private:
171  class Private;
172  Private *const d;
173 };
174 
175 #endif /* KIMAGECACHE_H */
KImageCache
A simple wrapping layer over KSharedDataCache to support caching images and pixmaps.
Definition: kimagecache.h:58
QString
KSharedDataCache::clear
void clear()
KSharedDataCache
kshareddatacache.h
kdeui_export.h
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