1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
|
/*******************************************************************************
* konsolekalendarvariables.h *
* *
* KonsoleKalendar is a command line interface to KDE calendars *
* Copyright (C) 2002-2004 Tuukka Pasanen <illuusio@mailcity.com> *
* Copyright (C) 2003-2005 Allen Winter <winter@kde.org> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the Free Software *
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
* *
* As a special exception, permission is given to link this program *
* with any edition of TQt, and distribute the resulting executable, *
* without including the source code for TQt in the source distribution. *
* *
******************************************************************************/
#ifndef _KONSOLEKALENDARVARIABLES_H_
#define _KONSOLEKALENDARVARIABLES_H_
#include <libkcal/calendarlocal.h>
#include <libkcal/calendarresources.h>
#include <libkcal/resourcelocal.h>
#include <libkcal/resourcecalendar.h>
#include <libkcal/event.h>
#include <tqstring.h>
#include <tqdatetime.h>
/**
* @file konsolekalendarvariables.h
* Provides the KonsoleKalendarVariables class definition.
*/
namespace KCal
{
/**
* ExportType is the type of Export output
*/
enum ExportType
{
/** Export none */
ExportTypeNone,
/** Export as text (default) */
ExportTypeText,
/** Export as compact text */
ExportTypeTextShort,
/** Export HTML for the specified time span */
ExportTypeHTML,
/** Export HTML for the time span on month boundaries */
ExportTypeMonthHTML,
/** Export XHTML (NOT AVAILABLE YET) */
ExportTypeXHTML,
/** Export XML (NOT AVAILABLE YET) */
ExportTypeXML,
/** Export Comma-Separated Values */
ExportTypeCSV,
/** Export VCard (NOT AVAILABLE YET) */
ExportTypeVCard
};
/**
* This class provides all the variables for the program.
* @author Tuukka Pasanen
* @author Allen Winter
*/
class KonsoleKalendarVariables
{
public:
/**
* Construct an empty KonsoleKalendarVariables object.
*/
KonsoleKalendarVariables();
/**
* Destructor
*/
~KonsoleKalendarVariables();
/**
* Set switch to use Events.
* @param useEvents if true, operation uses Events.
*/
void setUseEvents( bool useEvents );
/**
* Get use Events switch.
* @return true if operation using Events is specified.
*/
bool getUseEvents();
/**
* Set switch to use Todos.
* @param useTodos if true, operation uses Todos.
*/
void setUseTodos( bool useTodos );
/**
* Get use Todos switch.
* @return true if operation using Todos is specified.
*/
bool getUseTodos();
/**
* Set switch to use Journals.
* @param useJournals if true, operation uses Journals.
*/
void setUseJournals( bool useJournals );
/**
* Get use Journals switch.
* @return true if operation using Journals is specified.
*/
bool getUseJournals();
/**
* Sets start date.
* @param start is the start date.
*/
void setStartDateTime( TQDateTime start );
/**
* Get start date.
* @return start date.
*/
TQDateTime getStartDateTime();
/**
* Is there start date?
* @return true if there is false is there isn't.
*/
bool isStartDateTime();
/**
* Sets end date.
* @param end is the enddate.
*/
void setEndDateTime( TQDateTime end );
/**
* Get end date.
* @return end date.
*/
TQDateTime getEndDateTime();
/**
* Is there end date?
* @return true if there is false is there isn't.
*/
bool isEndDateTime();
/**
* Sets the UID, the unique tag for VCard entry.
* @param uid unique tag for VCard entry.
*/
void setUID( TQString uid );
/**
* Get UID, the unique tag for VCard entry.
* @return UID number.
*/
TQString getUID();
/**
* Is there UID set?
* @return true there is UID false there isn't.
*/
bool isUID();
/**
* Show only next activity and exit.
* @param next true or false.
*/
void setNext( bool next );
/**
* Should we show only next activity and exit?
*/
bool isNext();
/**
* Should program be more verbose?
* @param verbose a flag to set verbosity.
*/
void setVerbose( bool verbose );
/**
* Should program be more verbose?
*/
bool isVerbose();
/**
* Should we only try to run it and do nothing?
* @param dryrun false no and true just test it.
*/
void setDryRun( bool dryrun );
/**
* Is this program only in testing mode?
* @return true yes false no.
*/
bool isDryRun();
/**
* Set calendar file
* @param calendar Calendar files full path.
*/
void setCalendarFile( TQString calendar );
/**
* Returns fullpath to calendar file.
* @return calendar file.
*/
TQString getCalendarFile();
/**
* Set file to import active calendar.
* @param calendar Calendar file to import.
*/
void setImportFile( TQString calendar );
/**
* Return import filename.
* @return File that should be imported.
*/
TQString getImportFile();
/**
* Add description.
* @param description to event.
*/
void setDescription( TQString description );
/**
* Return description.
* @return description of event.
*/
TQString getDescription();
/**
* Is there an event description?
* @return true is there is description false there isn't.
*/
bool isDescription();
/**
* Add location information.
* @param location location where the event occurs.
*/
void setLocation( TQString location );
/**
* Return location information.
* @return location where event is occurring.
*/
TQString getLocation();
/**
* Is there event location information available?
* @return true is there is description false there isn't.
*/
bool isLocation();
/**
* Add summary.
* @param summary event summary.
*/
void setSummary( TQString summary );
/**
* Get summary.
* @return summary.
*/
TQString getSummary();
/**
* Is there an event summary?
* @return true there is false there isn't.
*/
bool isSummary();
/**
* View all option.
* @param all flag to view all Events.
*/
void setAll( bool all );
/**
* Return all option.
*/
bool getAll();
/**
* Is the all option set?
*/
bool isAll();
/**
* Set if Event is floating.
* @param floating if true then the Event is floating.
*/
void setFloating( bool floating );
/**
* Return if Event is floating.
*/
bool getFloating();
/**
* Set calendar resources for global use.
*/
void setCalendar( CalendarResources *resources );
/**
* Get global calendar resources.
*/
CalendarResources *getCalendar();
/**
* Set output file.
*/
void setExportFile( TQString export_file );
/**
* To what file we'll output.
*/
TQString getExportFile();
/**
* Has an Export File been set?
*/
bool isExportFile();
/**
* Set export type that'll we use.
*/
void setExportType( ExportType exportType );
/**
* What export type to use.
*/
ExportType getExportType();
/**
* Set how many day should be seen.
*/
void setDaysCount( int count );
/**
* Is there some cound of days should be seen.
*/
bool isDaysCount();
/**
* Get how many day should be seen.
*/
int getDaysCount();
private:
bool m_bIsUID;
TQString m_UID;
bool m_bIsStartDateTime;
TQDateTime m_startDateTime;
bool m_bIsEndDateTime;
TQDateTime m_endDateTime;
bool m_bNext;
bool m_bVerbose;
bool m_bDryRun;
bool m_bUseEvents;
bool m_bUseTodos;
bool m_bUseJournals;
TQString m_calendar;
TQString m_import;
ExportType m_exportType;
bool m_bIsExportFile;
TQString m_exportFile;
bool m_bAll;
bool m_bDescription;
TQString m_description;
bool m_bLocation;
TQString m_location;
bool m_bSummary;
TQString m_summary;
bool m_bFloating;
bool m_bDaysCount;
int m_daysCount;
CalendarResources *m_calendarResources;
};
}
#endif
|