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

calendarsupport

  • sources
  • kde-4.14
  • kdepim
  • calendarsupport
  • printing
calprinter.h
Go to the documentation of this file.
1 /*
2  Copyright (c) 1998 Preston Brown <pbrown@kde.org>
3  Copyright (C) 2003-2004 Reinhold Kainhofer <reinhold@kainhofer.com>
4 
5  This program is free software; you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation; either version 2 of the License, or
8  (at your option) any later version.
9 
10  This program is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU General Public License for more details.
14 
15  You should have received a copy of the GNU General Public License along
16  with this program; if not, write to the Free Software Foundation, Inc.,
17  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 
19  As a special exception, permission is given to link this program
20  with any edition of Qt, and distribute the resulting executable,
21  without including the source code for Qt in the source distribution.
22 */
23 #ifndef CALENDARSUPPORT_PRINTING_CALPRINTER_H
24 #define CALENDARSUPPORT_PRINTING_CALPRINTER_H
25 
26 #include "calendarsupport_export.h"
27 #include "printplugin.h"
28 
29 #include <KComboBox>
30 #include <KDialog>
31 
32 class QButtonGroup;
33 class QStackedWidget;
34 
35 namespace CalendarSupport {
36 
42 class CALENDARSUPPORT_EXPORT CalPrinter : public QObject, public CalPrinterBase
43 {
44  Q_OBJECT
45  public:
46  enum ePrintOrientation {
47  eOrientPlugin=0,
48  eOrientPrinter,
49  eOrientPortrait,
50  eOrientLandscape
51  };
52 
53  public:
61  CalPrinter( QWidget *par, const Akonadi::ETMCalendar::Ptr &calendar,
62  bool uniqItem = false );
63 
64  virtual ~CalPrinter();
65 
66  void init( const Akonadi::ETMCalendar::Ptr &calendar );
67 
74  void setDateRange( const QDate &start, const QDate &end );
75 
76  public Q_SLOTS:
77  void updateConfig();
78 
79  private Q_SLOTS:
80  void doPrint( PrintPlugin *selectedStyle,
81  ePrintOrientation dlgorientation, bool preview = false );
82 
83  public:
84  void print( int type, const QDate &fd, const QDate &td,
85  KCalCore::Incidence::List selectedIncidences = KCalCore::Incidence::List(),
86  bool preview = false );
87  Akonadi::ETMCalendar::Ptr calendar() const;
88  KConfig *config() const;
89 
90  protected:
91  PrintPlugin::List mPrintPlugins;
92 
93  private:
94  Akonadi::ETMCalendar::Ptr mCalendar;
95  QWidget *mParent;
96  KConfig *mConfig;
97  bool mUniqItem;
98 };
99 
100 class CalPrintDialog : public KDialog
101 {
102  Q_OBJECT
103  public:
104  explicit CalPrintDialog( int initialPrintType, PrintPlugin::List plugins,
105  QWidget *parent = 0, bool mUniqItem = false );
106 
107  virtual ~CalPrintDialog();
108 
109  PrintPlugin *selectedPlugin();
110  void setOrientation( CalPrinter::ePrintOrientation orientation );
111  CalPrinter::ePrintOrientation orientation()
112  {
113  return mOrientation;
114  }
115 
116  public Q_SLOTS:
117  void setPrintType( int );
118  void setPreview( bool );
119 
120  protected Q_SLOTS:
121  void slotOk();
122 
123  private:
124  QButtonGroup *mTypeGroup;
125  QStackedWidget *mConfigArea;
126  QMap<int, PrintPlugin*> mPluginIDs;
127  QString mPreviewText;
128  KComboBox *mOrientationSelection;
129 
130  CalPrinter::ePrintOrientation mOrientation;
131 };
132 
133 }
134 
135 #endif
CalendarSupport::CalPrinter::mPrintPlugins
PrintPlugin::List mPrintPlugins
Definition: calprinter.h:91
CalendarSupport::CalPrintDialog::slotOk
void slotOk()
Definition: calprinter.cpp:306
QWidget
CalendarSupport::CalPrintDialog::CalPrintDialog
CalPrintDialog(int initialPrintType, PrintPlugin::List plugins, QWidget *parent=0, bool mUniqItem=false)
Definition: calprinter.cpp:173
CalendarSupport::CalPrinter
CalPrinter is a class for printing Calendars.
Definition: calprinter.h:42
printplugin.h
CalendarSupport::CalPrinterBase
Base class of Calendar printer class.
Definition: printplugin.h:36
QMap
CalendarSupport::CalPrintDialog::orientation
CalPrinter::ePrintOrientation orientation()
Definition: calprinter.h:111
CalendarSupport::CalPrinter::ePrintOrientation
ePrintOrientation
Definition: calprinter.h:46
CalendarSupport::CalPrintDialog::setPreview
void setPreview(bool)
Definition: calprinter.cpp:271
KDialog
CalendarSupport::CalPrintDialog::setOrientation
void setOrientation(CalPrinter::ePrintOrientation orientation)
Definition: calprinter.cpp:290
calendarsupport_export.h
QButtonGroup
QObject
QDate
QStackedWidget
QString
QList< PrintPlugin * >
CalendarSupport::CalPrintDialog
Definition: calprinter.h:100
CalendarSupport::CalPrinter::eOrientPortrait
Definition: calprinter.h:49
CalendarSupport::PrintPlugin
Base class for Calendar printing classes.
Definition: printplugin.h:56
CalendarSupport::CalPrintDialog::selectedPlugin
PrintPlugin * selectedPlugin()
Definition: calprinter.cpp:296
CALENDARSUPPORT_EXPORT
#define CALENDARSUPPORT_EXPORT
Definition: calendarsupport_export.h:36
CalendarSupport::CalPrintDialog::~CalPrintDialog
virtual ~CalPrintDialog()
Definition: calprinter.cpp:267
CalendarSupport::CalPrinter::eOrientPrinter
Definition: calprinter.h:48
CalendarSupport::CalPrintDialog::setPrintType
void setPrintType(int)
Definition: calprinter.cpp:280
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:31:15 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

calendarsupport

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