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

messageviewer

  • sources
  • kde-4.14
  • kdepim
  • messageviewer
  • utils
iconnamecache.h
Go to the documentation of this file.
1 /* Copyright 2009 Thomas McGuire <mcguire@kde.org>
2 
3  This library is free software; you can redistribute it and/or modify
4  it under the terms of the GNU Library General Public License as published
5  by the Free Software Foundation; either version 2 of the License or
6  ( at your option ) version 3 or, at the discretion of KDE e.V.
7  ( which shall act as a proxy as in section 14 of the GPLv3 ), any later version.
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 #ifndef ICONNAMECACHE_H
20 #define ICONNAMECACHE_H
21 
22 #include "messageviewer_export.h"
23 #include <QMap>
24 #include <QString>
25 
26 namespace MessageViewer {
27 
35 class MESSAGEVIEWER_EXPORT IconNameCache
36 {
37 public:
38 
39  static IconNameCache *instance();
40  QString iconPath( const QString &name, int size ) const;
41 
42 private:
43 
44  class Entry
45  {
46  public:
47  QString fileName;
48  int size;
49 
50  bool operator < ( const Entry &other ) const;
51  };
52 
53  mutable QMap<Entry,QString> mCachedEntries;
54 };
55 
56 }
57 #endif
QMap< Entry, QString >
MessageViewer::IconNameCache
This class is a replacement for KIconLoader::iconPath(), because the iconPath() function can be slow ...
Definition: iconnamecache.h:35
QString
MESSAGEVIEWER_EXPORT
#define MESSAGEVIEWER_EXPORT
Definition: messageviewer_export.h:37
messageviewer_export.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:32:45 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

messageviewer

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

kdepim API Reference

Skip menu "kdepim API Reference"
  • akonadi_next
  • akregator
  • blogilo
  • calendarsupport
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt2
  • kjots
  • kleopatra
  • kmail
  • knode
  • knotes
  • kontact
  • korgac
  • korganizer
  • ktimetracker
  • libkdepim
  • libkleo
  • libkpgp
  • mailcommon
  • messagelist
  • messageviewer
  • pimprint

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