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

PIMPrint Library

  • sources
  • kde-4.14
  • kdepim
  • pimprint
  • calendar
calprintday.h
Go to the documentation of this file.
1 /*
2  This file is part of the PimPrint library.
3 
4  Copyright (C) 2012-2013 Allen Winter <winter@kde.org>
5 
6  This library is free software; you can redistribute it and/or
7  modify it under the terms of the GNU Library General Public
8  License as published by the Free Software Foundation; either
9  version 2 of the License, or (at your option) any later version.
10 
11  This library is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU Library General Public License for more details.
15 
16  You should have received a copy of the GNU Library General Public License
17  along with this library; see the file COPYING.LIB. If not, write to the
18  Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19  Boston, MA 02110-1301, USA.
20 */
21 
22 #ifndef PIMPRINT_CALPRINTDAY_H
23 #define PIMPRINT_CALPRINTDAY_H
24 
25 #include "calprintbase.h"
26 
27 #include <KLocale>
28 
29 #include <QDate>
30 #include <QTime>
31 
32 class KCalendarSystem;
33 
34 namespace PimPrint
35 {
36 
37 namespace Calendar
38 {
39 
40 class PrintCellItem;
41 
42 class PIMPRINT_CALENDAR_EXPORT CalPrintDay : public CalPrintBase
43 {
44  Q_PROPERTY(QDate startDate
45  READ startDate WRITE setStartDate)
46 
47  Q_PROPERTY(QDate endDate
48  READ endDate WRITE setEndDate)
49 
50  Q_PROPERTY(QTime startTime
51  READ startTime WRITE setStartTime)
52 
53  Q_PROPERTY(QTime endTime
54  READ endTime WRITE setEndTime)
55 
56 public:
57  explicit CalPrintDay(QPrinter *printer);
58 
59  virtual ~CalPrintDay();
60 
61  void print(QPainter &p);
62 
68  void setStartDate(const QDate &date);
69 
74  QDate startDate() const;
75 
81  void setEndDate(const QDate &date);
82 
87  QDate endDate() const;
88 
96  void setStartTime(const QTime &time);
97 
102  QTime startTime() const;
103 
111  void setEndTime(const QTime &time);
112 
117  QTime endTime() const;
118 
119  void drawDayFiloFax(QPainter &p) const;
120  void drawDaySingleTimeTable(QPainter &p) const;
121  void drawDayTimeTable(QPainter &p) const;
122 
123 private:
124  //TODO: move to dpointer
125  QRect drawHeader(QPainter &p,
126  const QDate &startDate, const QDate &endDate) const;
127 
128  QRect drawFooter(QPainter &p) const;
129 
140  void drawDays(QPainter &p, const QDate &start, const QDate &end,
141  const QTime &startTime, const QTime &endTime,
142  const QRect &box) const;
143 
144  //@cond PRIVATE
145  class Private;
146  Private *const d;
147  //@endcond
148 
149 };
150 
151 }
152 
153 }
154 
155 #endif
PimPrint::Calendar::CalPrintDay
Definition: calprintday.h:42
QPrinter
QTime
QRect
QPainter
PimPrint::Calendar::CalPrintBase
Definition: calprintbase.h:67
QDate
PIMPRINT_CALENDAR_EXPORT
#define PIMPRINT_CALENDAR_EXPORT
Definition: pimprint_calendar_export.h:35
calprintbase.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:32:09 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

PIMPrint Library

Skip menu "PIMPrint Library"
  • Main Page
  • Namespace List
  • 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