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

kaddressbook

  • sources
  • kde-4.12
  • kdepim
  • kaddressbook
  • printing
  • grantlee
grantleeprintstyle.h
Go to the documentation of this file.
1 /*
2  Copyright (c) 2013 Montel Laurent <montel@kde.org>
3 
4  This program is free software; you can redistribute it and/or modify it
5  under the terms of the GNU General Public License, version 2, as
6  published by the Free Software Foundation.
7 
8  This program is distributed in the hope that it will be useful, but
9  WITHOUT ANY WARRANTY; without even the implied warranty of
10  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11  General Public License for more details.
12 
13  You should have received a copy of the GNU General Public License along
14  with this program; if not, write to the Free Software Foundation, Inc.,
15  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16 */
17 
18 #ifndef GRANTLEEPRINTSTYLE_H
19 #define GRANTLEEPRINTSTYLE_H
20 
21 #include "printstyle.h"
22 #include <grantlee/templateloader.h>
23 
24 namespace Grantlee {
25 class Engine;
26 }
27 
28 namespace KABPrinting {
29 
30 class PrintProgress;
31 
32 class GrantleePrintStyle : public PrintStyle
33 {
34  Q_OBJECT
35 
36 public:
37  explicit GrantleePrintStyle(const QString &themePath, PrintingWizard *parent );
38  ~GrantleePrintStyle();
39 
40  void print( const KABC::Addressee::List &, PrintProgress * );
41 private:
42  QString contactsToHtml( const KABC::Addressee::List &contacts );
43  QString mErrorMessage;
44  Grantlee::Engine *mEngine;
45  Grantlee::FileSystemTemplateLoader::Ptr mTemplateLoader;
46  Grantlee::Template mSelfcontainedTemplate;
47 };
48 
49 class GrantleeStyleFactory : public PrintStyleFactory
50 {
51 public:
52  explicit GrantleeStyleFactory( const QString &name, const QString &themePath, PrintingWizard *parent );
53 
54  PrintStyle *create() const;
55  QString description() const;
56 private:
57  QString mThemePath;
58  QString mName;
59 };
60 
61 }
62 
63 #endif // GRANTLEEPRINTSTYLE_H
KABPrinting::GrantleeStyleFactory
Definition: grantleeprintstyle.h:49
KABPrinting::GrantleeStyleFactory::GrantleeStyleFactory
GrantleeStyleFactory(const QString &name, const QString &themePath, PrintingWizard *parent)
Definition: grantleeprintstyle.cpp:121
KABPrinting::PrintingWizard
The PrintingWizard combines pages common for all print styles and those provided by the respective st...
Definition: printingwizard.h:55
KABPrinting::GrantleePrintStyle::GrantleePrintStyle
GrantleePrintStyle(const QString &themePath, PrintingWizard *parent)
Definition: grantleeprintstyle.cpp:78
KABPrinting::PrintStyle
The abstract interface to the PrintingWizards style objects.
Definition: printstyle.h:67
printstyle.h
KABPrinting::GrantleeStyleFactory::create
PrintStyle * create() const
Definition: grantleeprintstyle.cpp:128
KABPrinting::GrantleeStyleFactory::description
QString description() const
Overload this method to provide a one-liner description for your print style.
Definition: grantleeprintstyle.cpp:133
KABPrinting::GrantleePrintStyle::print
void print(const KABC::Addressee::List &, PrintProgress *)
This method must be reimplemented to actually print something.
Definition: grantleeprintstyle.cpp:102
KABPrinting::PrintProgress
This defines a simple widget to display print progress information.
Definition: printprogress.h:41
KABPrinting::PrintStyleFactory
The factories are used to have all object of the respective print style created in one place...
Definition: printstyle.h:171
KABPrinting::GrantleePrintStyle
Definition: grantleeprintstyle.h:32
KABPrinting::GrantleePrintStyle::~GrantleePrintStyle
~GrantleePrintStyle()
Definition: grantleeprintstyle.cpp:97
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:55:51 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kaddressbook

Skip menu "kaddressbook"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

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

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