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

korganizer

  • sources
  • kde-4.12
  • kdepim
  • korganizer
  • printing
calprinter.h
Go to the documentation of this file.
1 /*
2  This file is part of KOrganizer.
3 
4  Copyright (c) 1998 Preston Brown <pbrown@kde.org>
5  Copyright (C) 2003-2004 Reinhold Kainhofer <reinhold@kainhofer.com>
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  This program is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License along
18  with this program; if not, write to the Free Software Foundation, Inc.,
19  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20 
21  As a special exception, permission is given to link this program
22  with any edition of Qt, and distribute the resulting executable,
23  without including the source code for Qt in the source distribution.
24 */
25 #ifndef CALPRINTER_H
26 #define CALPRINTER_H
27 
28 #include "korganizer/korganizer_export.h"
29 #include "korganizer/printplugin.h"
30 
31 #include <Akonadi/Calendar/ETMCalendar>
32 
33 #include <KComboBox>
34 #include <KDialog>
35 
36 using namespace KCalCore;
37 
38 class QButtonGroup;
39 class QStackedWidget;
40 
46 class KORGANIZERPRIVATE_EXPORT CalPrinter : public QObject, public KOrg::CalPrinterBase
47 {
48  Q_OBJECT
49  public:
50  enum ePrintOrientation {
51  eOrientPlugin=0,
52  eOrientPrinter,
53  eOrientPortrait,
54  eOrientLandscape
55  };
56 
57  public:
66  CalPrinter( QWidget *par, const Akonadi::ETMCalendar::Ptr &calendar,
67  KOrg::CoreHelper *helper, bool uniqItem = false );
68 
69  virtual ~CalPrinter();
70 
71  void init( const Akonadi::ETMCalendar::Ptr &calendar );
72 
79  void setDateRange( const QDate &start, const QDate &end );
80 
81  public Q_SLOTS:
82  void updateConfig();
83 
84  private Q_SLOTS:
85  void doPrint( KOrg::PrintPlugin *selectedStyle,
86  ePrintOrientation dlgorientation, bool preview = false );
87 
88  public:
89  void print( int type, const QDate &fd, const QDate &td,
90  Incidence::List selectedIncidences = Incidence::List(),
91  bool preview = false );
92 
93  Akonadi::ETMCalendar::Ptr calendar() const;
94  KConfig *config() const;
95 
96  protected:
97  KOrg::PrintPlugin::List mPrintPlugins;
98 
99  private:
100  Akonadi::ETMCalendar::Ptr mCalendar;
101  QWidget *mParent;
102  KConfig *mConfig;
103  KOrg::CoreHelper *mCoreHelper;
104  bool mUniqItem;
105 };
106 
107 class CalPrintDialog : public KDialog
108 {
109  Q_OBJECT
110  public:
111  explicit CalPrintDialog( int initialPrintType, KOrg::PrintPlugin::List plugins,
112  QWidget *parent = 0, bool mUniqItem = false );
113 
114  virtual ~CalPrintDialog();
115 
116  KOrg::PrintPlugin *selectedPlugin();
117  void setOrientation( CalPrinter::ePrintOrientation orientation );
118  CalPrinter::ePrintOrientation orientation()
119  {
120  return mOrientation;
121  }
122 
123  public Q_SLOTS:
124  void setPrintType( int );
125  void setPreview( bool );
126 
127  protected Q_SLOTS:
128  void slotOk();
129 
130  private:
131  QButtonGroup *mTypeGroup;
132  QStackedWidget *mConfigArea;
133  QMap<int, KOrg::PrintPlugin*> mPluginIDs;
134  QString mPreviewText;
135  KComboBox *mOrientationSelection;
136 
137  CalPrinter::ePrintOrientation mOrientation;
138 };
139 
140 #endif
CalPrintDialog::orientation
CalPrinter::ePrintOrientation orientation()
Definition: calprinter.h:118
CalPrinter::eOrientPrinter
Definition: calprinter.h:52
printplugin.h
QWidget
KOrg::PrintPlugin::List
QList< PrintPlugin * > List
Definition: printplugin.h:69
KDialog
CalPrinter::ePrintOrientation
ePrintOrientation
Definition: calprinter.h:50
QObject
KOrg::CalPrinterBase
Base class of KOrganizer printer class.
Definition: printplugin.h:42
KOrg::PrintPlugin
Base class for KOrganizer printing classes.
Definition: printplugin.h:62
KORGANIZERPRIVATE_EXPORT
#define KORGANIZERPRIVATE_EXPORT
Definition: korganizer_export.h:35
CalPrinter
CalPrinter is a class for printing Calendars.
Definition: calprinter.h:46
korganizer_export.h
CalPrinter::mPrintPlugins
KOrg::PrintPlugin::List mPrintPlugins
Definition: calprinter.h:97
KOrg::CoreHelper
Definition: corehelper.h:30
CalPrintDialog
Definition: calprinter.h:107
CalPrinter::eOrientPortrait
Definition: calprinter.h:53
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:56:19 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

korganizer

Skip menu "korganizer"
  • 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

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