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

KonsoleKalendar

  • sources
  • kde-4.12
  • kdepim
  • console
  • konsolekalendar
konsolekalendarvariables.cpp
Go to the documentation of this file.
1 /******************************************************************************
2  * konsolekalendarvariables.cpp *
3  * *
4  * KonsoleKalendar is a command line interface to KDE calendars *
5  * Copyright (C) 2002-2004 Tuukka Pasanen <illuusio@mailcity.com> *
6  * Copyright (C) 2003-2005 Allen Winter <winter@kde.org> *
7  * *
8  * This program is free software; you can redistribute it and/or modify *
9  * it under the terms of the GNU General Public License as published by *
10  * the Free Software Foundation; either version 2 of the License, or *
11  * (at your option) any later version. *
12  * *
13  * This program is distributed in the hope that it will be useful, *
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
16  * GNU General Public License for more details. *
17  * *
18  * You should have received a copy of the GNU General Public License along *
19  * with this program; if not, write to the Free Software Foundation, Inc., *
20  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
21  * *
22  * As a special exception, permission is given to link this program *
23  * with any edition of Qt, and distribute the resulting executable, *
24  * without including the source code for Qt in the source distribution. *
25  * *
26  *****************************************************************************/
33 #include "konsolekalendarvariables.h"
34 
35 #include <klocale.h>
36 #include <kdebug.h>
37 #include <kglobal.h>
38 #include <kconfig.h>
39 #include <kstandarddirs.h>
40 
41 #include <QtCore/QDateTime>
42 #include <QtCore/QString>
43 #include <QtCore/QStringList>
44 
45 #include <stdlib.h>
46 #include <iostream>
47 #include <stdio.h>
48 #include <unistd.h>
49 #include <time.h>
50 
51 using namespace KCalCore;
52 using namespace std;
53 
54 KonsoleKalendarVariables::KonsoleKalendarVariables()
55 {
56  m_bIsUID = false;
57  m_bIsStartDateTime = false;
58  m_bIsEndDateTime = false;
59  m_bNext = false;
60  m_bVerbose = false;
61  m_bDryRun = false;
62  m_bUseEvents = false;
63  m_bUseTodos = false;
64  m_bUseJournals = false;
65  m_exportType = ExportTypeText;
66  m_bIsExportFile = false;
67  m_bDescription = false;
68  m_description.clear();
69  m_bLocation = false;
70  m_location = QLatin1String("Default location"); //i18n ?
71  m_bSummary = false;
72  m_summary = QLatin1String("Default summary"); //i18n?
73  m_bFloating = true;
74  m_bAllowGui = false;
75  m_collectionId = -1;
76 }
77 
78 KonsoleKalendarVariables::~KonsoleKalendarVariables()
79 {
80 }
81 
82 void KonsoleKalendarVariables::setUID( const QString &uid )
83 {
84  m_bIsUID = true;
85  m_UID = uid;
86 }
87 
88 QString KonsoleKalendarVariables::getUID() const
89 {
90  return m_UID;
91 }
92 
93 bool KonsoleKalendarVariables::isUID() const
94 {
95  return m_bIsUID;
96 }
97 
98 void KonsoleKalendarVariables::setStartDateTime( const QDateTime &start )
99 {
100  m_bIsStartDateTime = true;
101  m_startDateTime = start;
102 }
103 
104 QDateTime KonsoleKalendarVariables::getStartDateTime() const
105 {
106  return m_startDateTime;
107 }
108 
109 bool KonsoleKalendarVariables::isStartDateTime() const
110 {
111  return m_bIsStartDateTime;
112 }
113 
114 void KonsoleKalendarVariables::setEndDateTime( const QDateTime &end )
115 {
116  m_bIsEndDateTime = true;
117  m_endDateTime = end;
118 }
119 
120 QDateTime KonsoleKalendarVariables::getEndDateTime() const
121 {
122  return m_endDateTime;
123 }
124 
125 bool KonsoleKalendarVariables::isEndDateTime() const
126 {
127  return m_bIsEndDateTime;
128 }
129 
130 void KonsoleKalendarVariables::setNext( bool next )
131 {
132  m_bNext = next;
133 }
134 
135 bool KonsoleKalendarVariables::isNext() const
136 {
137  return m_bNext;
138 }
139 
140 void KonsoleKalendarVariables::setVerbose( bool verbose )
141 {
142  m_bVerbose = verbose;
143 }
144 
145 bool KonsoleKalendarVariables::isVerbose() const
146 {
147  return m_bVerbose;
148 }
149 
150 void KonsoleKalendarVariables::setDryRun( bool dryrun )
151 {
152  m_bDryRun = dryrun;
153 }
154 
155 bool KonsoleKalendarVariables::isDryRun() const
156 {
157  return m_bDryRun;
158 }
159 
160 void KonsoleKalendarVariables::setUseEvents( bool useEvents )
161 {
162  m_bUseEvents = useEvents;
163 }
164 
165 bool KonsoleKalendarVariables::getUseEvents() const
166 {
167  return m_bUseEvents;
168 }
169 
170 void KonsoleKalendarVariables::setUseTodos( bool useTodos )
171 {
172  m_bUseTodos = useTodos;
173 }
174 
175 bool KonsoleKalendarVariables::getUseTodos() const
176 {
177  return m_bUseTodos;
178 }
179 
180 void KonsoleKalendarVariables::setUseJournals( bool useJournals )
181 {
182  m_bUseJournals = useJournals;
183 }
184 
185 bool KonsoleKalendarVariables::getUseJournals() const
186 {
187  return m_bUseJournals;
188 }
189 
190 void KonsoleKalendarVariables::setCalendarFile( const QString &calendar )
191 {
192  m_calendarFile = calendar;
193 }
194 
195 QString KonsoleKalendarVariables::getCalendarFile() const
196 {
197  return m_calendarFile;
198 }
199 
200 void KonsoleKalendarVariables::setImportFile( const QString &calendar )
201 {
202  m_import = calendar;
203 }
204 
205 QString KonsoleKalendarVariables::getImportFile() const
206 {
207  return m_import;
208 }
209 
210 void KonsoleKalendarVariables::setCalendar( const Akonadi::FetchJobCalendar::Ptr &resources )
211 {
212  m_calendar = resources;
213 }
214 
215 Akonadi::FetchJobCalendar::Ptr KonsoleKalendarVariables::getCalendar() const
216 {
217  return m_calendar;
218 }
219 
220 void KonsoleKalendarVariables::setExportType( ExportType exportType )
221 {
222  m_exportType = exportType;
223 }
224 
225 ExportType KonsoleKalendarVariables::getExportType() const
226 {
227  return m_exportType;
228 }
229 
230 void KonsoleKalendarVariables::setExportFile( const QString &export_file )
231 {
232  m_exportFile = export_file;
233  m_bIsExportFile = true;
234 }
235 
236 bool KonsoleKalendarVariables::isExportFile() const
237 {
238  return m_bIsExportFile;
239 }
240 
241 QString KonsoleKalendarVariables::getExportFile() const
242 {
243  return m_exportFile;
244 }
245 
246 bool KonsoleKalendarVariables::isAll() const
247 {
248  return m_bAll;
249 }
250 
251 void KonsoleKalendarVariables::setAll( bool all )
252 {
253  m_bAll = all;
254 }
255 
256 bool KonsoleKalendarVariables::getAll() const
257 {
258  return m_bAll;
259 }
260 
261 void KonsoleKalendarVariables::setDescription( const QString &description )
262 {
263  m_bDescription = true;
264  m_description = description;
265 }
266 
267 QString KonsoleKalendarVariables::getDescription() const
268 {
269  return m_description;
270 }
271 
272 bool KonsoleKalendarVariables::isDescription() const
273 {
274  return m_bDescription;
275 }
276 
277 void KonsoleKalendarVariables::setLocation( const QString &location )
278 {
279  m_bLocation = true;
280  m_location = location;
281 }
282 
283 QString KonsoleKalendarVariables::getLocation() const
284 {
285  return m_location;
286 }
287 
288 bool KonsoleKalendarVariables::isLocation() const
289 {
290  return m_bLocation;
291 }
292 
293 void KonsoleKalendarVariables::setSummary( const QString &summary )
294 {
295  m_bSummary = true;
296  m_summary = summary;
297 }
298 
299 QString KonsoleKalendarVariables::getSummary() const
300 {
301  return m_summary;
302 }
303 
304 bool KonsoleKalendarVariables::isSummary() const
305 {
306  return m_bSummary;
307 }
308 
309 void KonsoleKalendarVariables::setFloating( bool floating )
310 {
311  m_bFloating = floating;
312 }
313 
314 bool KonsoleKalendarVariables::getFloating() const
315 {
316  return m_bFloating;
317 }
318 
319 void KonsoleKalendarVariables::setDaysCount( int count )
320 {
321  m_daysCount = count;
322  m_bDaysCount = true;
323 }
324 
325 int KonsoleKalendarVariables::getDaysCount() const
326 {
327  return m_daysCount;
328 }
329 
330 bool KonsoleKalendarVariables::isDaysCount() const
331 {
332  return m_bDaysCount;
333 }
334 
335 void KonsoleKalendarVariables::setAllowGui( bool allow )
336 {
337  m_bAllowGui = allow;
338 }
339 
340 void KonsoleKalendarVariables::setCollectionId(Akonadi::Collection::Id id)
341 {
342  m_collectionId = id;
343 }
344 
345 Akonadi::Collection::Id KonsoleKalendarVariables::collectionId() const
346 {
347  return m_collectionId;
348 }
349 
350 bool KonsoleKalendarVariables::allowGui() const
351 {
352  return m_bAllowGui;
353 }
KonsoleKalendarVariables::KonsoleKalendarVariables
KonsoleKalendarVariables()
Construct an empty KonsoleKalendarVariables object.
Definition: konsolekalendarvariables.cpp:54
KonsoleKalendarVariables::getExportType
ExportType getExportType() const
What export type to use.
Definition: konsolekalendarvariables.cpp:225
KonsoleKalendarVariables::setAll
void setAll(bool all)
View all option.
Definition: konsolekalendarvariables.cpp:251
KonsoleKalendarVariables::getCalendarFile
QString getCalendarFile() const
Returns fullpath to calendar file.
Definition: konsolekalendarvariables.cpp:195
KonsoleKalendarVariables::getUseTodos
bool getUseTodos() const
Get use Todos switch.
Definition: konsolekalendarvariables.cpp:175
KonsoleKalendarVariables::setDescription
void setDescription(const QString &description)
Add description.
Definition: konsolekalendarvariables.cpp:261
KonsoleKalendarVariables::getStartDateTime
QDateTime getStartDateTime() const
Get start date.
Definition: konsolekalendarvariables.cpp:104
KonsoleKalendarVariables::isDaysCount
bool isDaysCount() const
Is there some cound of days should be seen.
Definition: konsolekalendarvariables.cpp:330
KonsoleKalendarVariables::setUseJournals
void setUseJournals(bool useJournals)
Set switch to use Journals.
Definition: konsolekalendarvariables.cpp:180
KonsoleKalendarVariables::setDaysCount
void setDaysCount(int count)
Sets how many day should be seen.
Definition: konsolekalendarvariables.cpp:319
KonsoleKalendarVariables::setAllowGui
void setAllowGui(bool allow)
Sets whether to allow using resources with potential GUI dependencies.
Definition: konsolekalendarvariables.cpp:335
KonsoleKalendarVariables::setStartDateTime
void setStartDateTime(const QDateTime &start)
Sets start date.
Definition: konsolekalendarvariables.cpp:98
KonsoleKalendarVariables::getExportFile
QString getExportFile() const
To what file we'll output.
Definition: konsolekalendarvariables.cpp:241
KonsoleKalendarVariables::collectionId
Akonadi::Collection::Id collectionId() const
Definition: konsolekalendarvariables.cpp:345
KonsoleKalendarVariables::getSummary
QString getSummary() const
Get summary.
Definition: konsolekalendarvariables.cpp:299
KonsoleKalendarVariables::setVerbose
void setVerbose(bool verbose)
Should program be more verbose?
Definition: konsolekalendarvariables.cpp:140
KonsoleKalendarVariables::isUID
bool isUID() const
Is there UID set?
Definition: konsolekalendarvariables.cpp:93
KonsoleKalendarVariables::isEndDateTime
bool isEndDateTime() const
Is there end date?
Definition: konsolekalendarvariables.cpp:125
KonsoleKalendarVariables::isAll
bool isAll() const
Is the all option set?
Definition: konsolekalendarvariables.cpp:246
KonsoleKalendarVariables::getDescription
QString getDescription() const
Return description.
Definition: konsolekalendarvariables.cpp:267
KonsoleKalendarVariables::getUseJournals
bool getUseJournals() const
Get use Journals switch.
Definition: konsolekalendarvariables.cpp:185
KonsoleKalendarVariables::setLocation
void setLocation(const QString &location)
Add location information.
Definition: konsolekalendarvariables.cpp:277
KonsoleKalendarVariables::allowGui
bool allowGui() const
Returns whether to allow using resources with potential GUI dependencies.
Definition: konsolekalendarvariables.cpp:350
KonsoleKalendarVariables::getEndDateTime
QDateTime getEndDateTime() const
Get end date.
Definition: konsolekalendarvariables.cpp:120
KonsoleKalendarVariables::setNext
void setNext(bool next)
Show only next activity and exit.
Definition: konsolekalendarvariables.cpp:130
KonsoleKalendarVariables::setCollectionId
void setCollectionId(Akonadi::Collection::Id)
Definition: konsolekalendarvariables.cpp:340
KonsoleKalendarVariables::~KonsoleKalendarVariables
~KonsoleKalendarVariables()
Destructor.
Definition: konsolekalendarvariables.cpp:78
KonsoleKalendarVariables::setExportFile
void setExportFile(const QString &export_file)
Sets the output file name to export_file.
Definition: konsolekalendarvariables.cpp:230
KonsoleKalendarVariables::setSummary
void setSummary(const QString &summary)
Add summary.
Definition: konsolekalendarvariables.cpp:293
KonsoleKalendarVariables::isSummary
bool isSummary() const
Is there an event summary?
Definition: konsolekalendarvariables.cpp:304
KonsoleKalendarVariables::getFloating
bool getFloating() const
Returns if Event is floating.
Definition: konsolekalendarvariables.cpp:314
KonsoleKalendarVariables::getImportFile
QString getImportFile() const
Return import filename.
Definition: konsolekalendarvariables.cpp:205
KonsoleKalendarVariables::setUID
void setUID(const QString &uid)
Sets the UID, the unique tag for VCard entry.
Definition: konsolekalendarvariables.cpp:82
KonsoleKalendarVariables::isExportFile
bool isExportFile() const
Has an Export File been set?
Definition: konsolekalendarvariables.cpp:236
KonsoleKalendarVariables::setUseEvents
void setUseEvents(bool useEvents)
Set switch to use Events.
Definition: konsolekalendarvariables.cpp:160
ExportType
ExportType
ExportType is the type of Export output.
Definition: konsolekalendarvariables.h:46
KonsoleKalendarVariables::setDryRun
void setDryRun(bool dryrun)
Should we only try to run it and do nothing?
Definition: konsolekalendarvariables.cpp:150
KonsoleKalendarVariables::isNext
bool isNext() const
Should we show only next activity and exit?
Definition: konsolekalendarvariables.cpp:135
KonsoleKalendarVariables::setImportFile
void setImportFile(const QString &calendar)
Set file to import active calendar.
Definition: konsolekalendarvariables.cpp:200
KonsoleKalendarVariables::isDescription
bool isDescription() const
Is there an event description?
Definition: konsolekalendarvariables.cpp:272
KonsoleKalendarVariables::isStartDateTime
bool isStartDateTime() const
Is there start date?
Definition: konsolekalendarvariables.cpp:109
KonsoleKalendarVariables::getUID
QString getUID() const
Get UID, the unique tag for VCard entry.
Definition: konsolekalendarvariables.cpp:88
KonsoleKalendarVariables::setFloating
void setFloating(bool floating)
Set if Event is floating.
Definition: konsolekalendarvariables.cpp:309
KonsoleKalendarVariables::getUseEvents
bool getUseEvents() const
Get use Events switch.
Definition: konsolekalendarvariables.cpp:165
KonsoleKalendarVariables::setEndDateTime
void setEndDateTime(const QDateTime &end)
Sets end date.
Definition: konsolekalendarvariables.cpp:114
KonsoleKalendarVariables::getDaysCount
int getDaysCount() const
Get how many day should be seen.
Definition: konsolekalendarvariables.cpp:325
KonsoleKalendarVariables::setExportType
void setExportType(ExportType exportType)
Sets the ExportType to use.
Definition: konsolekalendarvariables.cpp:220
KonsoleKalendarVariables::getAll
bool getAll() const
Return all option.
Definition: konsolekalendarvariables.cpp:256
KonsoleKalendarVariables::setCalendar
void setCalendar(const Akonadi::FetchJobCalendar::Ptr &)
Sets the calendar resources for global use.
Definition: konsolekalendarvariables.cpp:210
KonsoleKalendarVariables::getLocation
QString getLocation() const
Return location information.
Definition: konsolekalendarvariables.cpp:283
KonsoleKalendarVariables::getCalendar
Akonadi::FetchJobCalendar::Ptr getCalendar() const
Get global calendar resources.
Definition: konsolekalendarvariables.cpp:215
KonsoleKalendarVariables::isLocation
bool isLocation() const
Is there event location information available?
Definition: konsolekalendarvariables.cpp:288
KonsoleKalendarVariables::isDryRun
bool isDryRun() const
Is this program only in testing mode?
Definition: konsolekalendarvariables.cpp:155
KonsoleKalendarVariables::setUseTodos
void setUseTodos(bool useTodos)
Set switch to use Todos.
Definition: konsolekalendarvariables.cpp:170
KonsoleKalendarVariables::setCalendarFile
void setCalendarFile(const QString &calendar)
Set calendar file.
Definition: konsolekalendarvariables.cpp:190
KonsoleKalendarVariables::isVerbose
bool isVerbose() const
Should program be more verbose?
Definition: konsolekalendarvariables.cpp:145
ExportTypeText
Export as text (default)
Definition: konsolekalendarvariables.h:50
konsolekalendarvariables.h
Provides the KonsoleKalendarVariables class definition.
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:55:04 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KonsoleKalendar

Skip menu "KonsoleKalendar"
  • Main Page
  • Namespace List
  • Alphabetical List
  • Class List
  • 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