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

parley

  • sources
  • kde-4.12
  • kdeedu
  • parley
  • src
  • practice
imagecache.h
Go to the documentation of this file.
1 /***************************************************************************
2  Copyright 2010 Daniel Laidig <laidig@kde.org>
3  ***************************************************************************/
4 
5 /***************************************************************************
6  * *
7  * This program is free software; you can redistribute it and/or modify *
8  * it under the terms of the GNU General Public License as published by *
9  * the Free Software Foundation; either version 2 of the License, or *
10  * (at your option) any later version. *
11  * *
12  ***************************************************************************/
13 
14 #ifndef PRACTICE_IMAGECACHE_H
15 #define PRACTICE_IMAGECACHE_H
16 
17 #include <QHash>
18 #include <QStringList>
19 #include <QDateTime>
20 #include <QImage>
21 
22 class QSize;
23 class QDebug;
24 
25 namespace Practice {
26 
27 class ImageCache {
28 public:
29  ImageCache() {}
30  // set a list of filenames which should be checked for timestamps
31  void setFilenames(const QStringList& filename);
32 
33  void updateImage(const QString& id, const QImage& image);
34  QSize imageSize(const QString& id);
35  QImage getImage(const QString& id);
36  bool isEmpty() {return m_images.isEmpty();}
37 
38  void setSaveFilename(const QString& filename) {m_saveFilename = filename;}
39  void openCache();
40  void saveCache();
41 
42  friend QDebug operator<<(QDebug dbg, const Practice::ImageCache &c);
43 private:
44  QHash<QString, QImage> m_images;
45  QList<QDateTime> m_timestamps;
46  QStringList m_filenames;
47  QString m_saveFilename;
48 };
49 
50 QDebug operator<<(QDebug dbg, const Practice::ImageCache &c);
51 
52 }
53 
54 
55 
56 #endif // PRACTICE_IMAGECACHE_H
Practice::ImageCache::setSaveFilename
void setSaveFilename(const QString &filename)
Definition: imagecache.h:38
Practice::ImageCache::ImageCache
ImageCache()
Definition: imagecache.h:29
Practice::ImageCache
Definition: imagecache.h:27
Practice::operator<<
QDebug operator<<(QDebug dbg, const Practice::ImageCache &c)
Definition: imagecache.cpp:101
Practice::ImageCache::operator<<
friend QDebug operator<<(QDebug dbg, const Practice::ImageCache &c)
Practice::ImageCache::saveCache
void saveCache()
Definition: imagecache.cpp:91
Practice::ImageCache::imageSize
QSize imageSize(const QString &id)
Definition: imagecache.cpp:44
Practice::ImageCache::updateImage
void updateImage(const QString &id, const QImage &image)
Definition: imagecache.cpp:39
Practice::ImageCache::getImage
QImage getImage(const QString &id)
Definition: imagecache.cpp:52
Practice::ImageCache::isEmpty
bool isEmpty()
Definition: imagecache.h:36
Practice::ImageCache::openCache
void openCache()
Definition: imagecache.cpp:60
Practice::ImageCache::setFilenames
void setFilenames(const QStringList &filename)
Definition: imagecache.cpp:25
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:42:05 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

parley

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

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • kstars
  • libkdeedu
  •   keduvocdocument
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

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