• 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
calprinttodos.h
Go to the documentation of this file.
1 /*
2  * This file is part of the PimPrint library.
3  *
4  * Copyright (C) 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_CALPRINTTODOS_H
23 #define PIMPRINT_CALPRINTTODOS_H
24 
25 #include "calprintbase.h"
26 
27 template<class T >
28 class to;
29 namespace PimPrint
30 {
31 
32 namespace Calendar
33 {
34 
35 class PIMPRINT_CALENDAR_EXPORT CalPrintTodos : public CalPrintBase
36 {
37  Q_ENUMS(TodoTypes)
38 
39  Q_PROPERTY(QDate startDate
40  READ startDate WRITE setStartDate)
41 
42  Q_PROPERTY(QDate endDate
43  READ endDate WRITE setEndDate)
44 
45  Q_PROPERTY(TodoTypes todoType
46  READ todoType WRITE setTodoType)
47 
48  Q_PROPERTY(QString headerText
49  READ headerText WRITE setHeaderText)
50 
51  Q_PROPERTY(KCalCore::SortDirection
52  READ sortDirection WRITE setSortDirection)
53 
54  Q_PROPERTY(KCalCore::TodoSortField
55  READ sortField WRITE setSortField)
56 
57 
60  class TodoParentStart;
61 
62 public:
63  explicit CalPrintTodos(QPrinter *printer);
64 
65  virtual ~CalPrintTodos();
66 
67  void print(QPainter &p);
68 
72  enum TodoTypes {
73  AllTodos, //< any kind
74  Completed, //< completed TODO: IMPLEMENT
75  InProgressTodos, //< not completed, but started and not past the due date
76  NotStarted, //< not started yet (no start date and 0% completed) TODO: IMPLEMENT
77  OpenEnded, //< no due date TODO: IMPLEMENT
78  OverDue, //< overdue (not completed yet and past the due date) TODO: IMPLEMENT
79  DueDateRangeTodos //< due date is with the specified start/due range
80  };
81 
87  void setStartDate(const QDate &date);
88 
93  QDate startDate() const;
94 
100  void setEndDate(const QDate &date);
101 
106  QDate endDate() const;
107 
113  void setTodoType(TodoTypes todoType);
114 
119  TodoTypes todoType() const;
120 
126  void setHeaderText(const QString &text);
127 
132  QString headerText() const;
133 
139  void setSortField(const KCalCore::TodoSortField &sortField);
140 
145  KCalCore::TodoSortField sortField() const;
146 
152  void setSortDirection(const KCalCore::SortDirection &sortDirection);
153 
158  KCalCore::SortDirection sortDirection() const;
159 
160 private:
161  //TODO: move to dpointer
162  void drawTodoLines(QPainter &p, const QString &description,
163  int x, int &y,
164  int width, int pageHeight,
165  bool richTextDescription,
166  QList<TodoParentStart *> &startPoints);
167 
168  void drawTodo(int &count, const KCalCore::Todo::Ptr &todo, QPainter &p,
169  int posPriority, int posSummary,
170  int posDueDt, int posPercentComplete,
171  int level, int x, int &y, int width,
172  int pageHeight, const KCalCore::Todo::List &todoList,
173  TodoParentStart *r);
174 
175  //@cond PRIVATE
176  class Private;
177  Private *const d;
178  //@endcond
179 };
180 
181 }
182 
183 }
184 
185 #endif
PimPrint::Calendar::CalPrintTodos::Completed
Definition: calprinttodos.h:74
QPrinter
PimPrint::Calendar::CalPrintTodos
Definition: calprinttodos.h:35
PimPrint::Calendar::CalPrintTodos::OverDue
Definition: calprinttodos.h:78
QPainter
PimPrint::Calendar::CalPrintBase
Definition: calprintbase.h:67
QDate
PIMPRINT_CALENDAR_EXPORT
#define PIMPRINT_CALENDAR_EXPORT
Definition: pimprint_calendar_export.h:35
QString
QList
calprintbase.h
to
Definition: calprinttodos.h:28
PimPrint::Calendar::CalPrintTodos::TodoTypes
TodoTypes
Various types of to-dos that can be printed.
Definition: calprinttodos.h:72
PimPrint::Calendar::CalPrintTodos::InProgressTodos
Definition: calprinttodos.h:75
PimPrint::Calendar::CalPrintTodos::NotStarted
Definition: calprinttodos.h:76
PimPrint::Calendar::CalPrintTodos::OpenEnded
Definition: calprinttodos.h:77
PimPrint::Calendar::CalPrintTodos::AllTodos
Definition: calprinttodos.h:73
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