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

console/kabcclient

  • sources
  • kde-4.14
  • kdepim
  • console
  • kabcclient
  • src
csvtemplatefactory.h
Go to the documentation of this file.
1 //
2 // Copyright (C) 2005 - 2006 Kevin Krammer <kevin.krammer@gmx.at>
3 //
4 // This program is free software; you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published by
6 // the Free Software Foundation; either version 2 of the License, or
7 // (at your option) any later version.
8 //
9 // This program 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
12 // GNU General Public License for more details.
13 //
14 // You should have received a copy of the GNU General Public License
15 // along with this program; if not, write to the Free Software
16 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17 //
18 
19 #ifndef CSVTEMPLATEFACTORY_H
20 #define CSVTEMPLATEFACTORY_H
21 
22 // Qt includes
23 #include <QtCore/QMap>
24 #include <QtCore/QStringList>
25 
26 // forward declarations
27 class CSVTemplate;
28 class KConfigBase;
29 
44 class CSVTemplateFactory
45 {
46 public:
50  CSVTemplateFactory();
51 
57  ~CSVTemplateFactory();
58 
76  CSVTemplate* createTemplate(const QString& name);
77 
95  CSVTemplate* createCachedTemplate(const QString& name);
96 
115  QMap<QString, QString> templateNames();
116 
117 private:
123  QMap<QString, QString> m_templateNames;
124 
129  QMap<QString, QString> m_templateFiles;
130 
136  QMap<QString, CSVTemplate*> m_templates;
137 
138 private:
153  QString findTemplateFile(const QString& name) const;
154 
165  KConfigBase* loadTemplateConfig(const QString& filename) const;
166 
178  void addTemplateNames(const QString& directory);
179 
180 private:
184  CSVTemplateFactory(const CSVTemplateFactory&);
185 
189  CSVTemplateFactory& operator=(const CSVTemplateFactory&);
190 };
191 
192 #endif
193 
194 // End of file
CSVTemplateFactory::CSVTemplateFactory
CSVTemplateFactory()
Creates the factory instance.
Definition: csvtemplatefactory.cpp:36
QMap< QString, QString >
CSVTemplateFactory::templateNames
QMap< QString, QString > templateNames()
Returns a set of available templates.
Definition: csvtemplatefactory.cpp:96
CSVTemplate
Class for handling KAddressBook's CSV templates.
Definition: csvtemplate.h:88
QString
CSVTemplateFactory::createCachedTemplate
CSVTemplate * createCachedTemplate(const QString &name)
Creates a template handler for a given name and caches the instance.
Definition: csvtemplatefactory.cpp:74
CSVTemplateFactory::~CSVTemplateFactory
~CSVTemplateFactory()
Destroys the instance.
Definition: csvtemplatefactory.cpp:42
CSVTemplateFactory::createTemplate
CSVTemplate * createTemplate(const QString &name)
Creates a template handler for a given name.
Definition: csvtemplatefactory.cpp:55
CSVTemplateFactory
Factory for creation CSV template handlers.
Definition: csvtemplatefactory.h:44
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:31:23 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

console/kabcclient

Skip menu "console/kabcclient"
  • Main Page
  • Namespace List
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Modules
  • 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