• 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
calprintweek.h
Go to the documentation of this file.
1 /*
2  This file is part of the PimPrint library.
3 
4  Copyright (C) 2012 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_CALPRINTWEEK_H
23 #define PIMPRINT_CALPRINTWEEK_H
24 
25 #include "calprintbase.h"
26 
27 namespace PimPrint
28 {
29 
30 namespace Calendar
31 {
32 
33 class PIMPRINT_CALENDAR_EXPORT CalPrintWeek : public CalPrintBase
34 {
35  Q_PROPERTY(QDate startDate
36  READ startDate WRITE setStartDate)
37 
38  Q_PROPERTY(QDate endDate
39  READ endDate WRITE setEndDate)
40 
41  Q_PROPERTY(QTime startTime
42  READ startTime WRITE setStartTime)
43 
44  Q_PROPERTY(QTime endTime
45  READ endTime WRITE setEndTime)
46 
47 public:
48  explicit CalPrintWeek(QPrinter *printer);
49 
50  virtual ~CalPrintWeek();
51 
52  void print(QPainter &p);
53 
59  void setStartDate(const QDate &date);
60 
65  QDate startDate() const;
66 
72  void setEndDate(const QDate &date);
73 
78  QDate endDate() const;
79 
87  void setStartTime(const QTime &time);
88 
93  QTime startTime() const;
94 
102  void setEndTime(const QTime &time);
103 
108  QTime endTime() const;
109 
110 private:
111  //TODO: move to dpointer
112 
113  void drawFiloFaxWeek(QPainter &p) const;
114  void drawTimeTableWeek(QPainter &p) const;
115  void drawSplitWeek(QPainter &p) const;
116 
117  QRect drawHeader(QPainter &p, const QDate &date, bool printWeekNumber = false) const;
118 
119  QRect drawFooter(QPainter &p) const;
120 
121  void drawWeek(QPainter &p,
122  const QDate &qd,
123  const QTime &fromTime, const QTime &toTime,
124  const QRect &box) const;
125 
126  //@cond PRIVATE
127  class Private;
128  Private *const d;
129  //@endcond
130 
131 };
132 
133 }
134 
135 }
136 
137 #endif
QPrinter
QTime
QRect
QPainter
PimPrint::Calendar::CalPrintWeek
Definition: calprintweek.h:33
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