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 *
19  * along with this program; if not, write to the Free Software *
20  * Foundation, Inc., 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 TQt, and distribute the resulting executable, *
24  * without including the source code for TQt in the source distribution. *
25  * *
26  ******************************************************************************/
33 #include <klocale.h>
34 #include <kdebug.h>
35 #include <kglobal.h>
36 #include <kconfig.h>
37 #include <kstandarddirs.h>
38 
39 #include <tqdatetime.h>
40 #include <tqstring.h>
41 #include <tqstringlist.h>
42 
43 #include <stdlib.h>
44 #include <iostream>
45 #include <stdio.h>
46 #include <unistd.h>
47 #include <time.h>
48 
50 
51 using namespace KCal;
52 using namespace std;
53 
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_calendar = "";
66  m_exportType = ExportTypeText;
67  m_bIsExportFile = false;
68  m_bDescription = false;
69  m_description = "";
70  m_bLocation = false;
71  m_location = "Default location";
72  m_bSummary = false;
73  m_summary = "Default summary";
74  m_bFloating = true;
75 }
76 
78 {
79  // delete m_resource;
80 }
81 
83 {
84  m_bIsUID = true;
85  m_UID = uid;
86 }
87 
89 {
90  return m_UID;
91 }
92 
94 {
95  return m_bIsUID;
96 }
97 
99 {
100  m_bIsStartDateTime = true;
101  m_startDateTime = start;
102 }
103 
105 {
106  return m_startDateTime;
107 }
108 
110 {
111  return m_bIsStartDateTime;
112 }
113 
115 {
116  m_bIsEndDateTime = true;
117  m_endDateTime = end;
118 }
119 
121 {
122  return m_endDateTime;
123 }
124 
126 {
127  return m_bIsEndDateTime;
128 }
129 
131 {
132  m_bNext = next;
133 }
134 
136 {
137  return m_bNext;
138 }
139 
141 {
142  m_bVerbose = verbose;
143 }
144 
146 {
147  return m_bVerbose;
148 }
149 
151 {
152  m_bDryRun = dryrun;
153 }
154 
156 {
157  return m_bDryRun;
158 }
159 
161 {
162  m_bUseEvents = useEvents;
163 }
164 
166 {
167  return( m_bUseEvents );
168 }
169 
171 {
172  m_bUseTodos = useTodos;
173 }
174 
176 {
177  return( m_bUseTodos );
178 }
179 
181 {
182  m_bUseJournals = useJournals;
183 }
184 
186 {
187  return( m_bUseJournals );
188 }
189 
191 {
192  m_calendar = calendar;
193 }
194 
196 {
197  return m_calendar;
198 }
199 
201 {
202  m_import = calendar;
203 }
204 
206 {
207  return m_import;
208 }
209 
210 void KonsoleKalendarVariables::setCalendar( CalendarResources *resources )
211 {
212  m_calendarResources = resources;
213 }
214 
216 {
217  return m_calendarResources;
218 }
219 
220 void KonsoleKalendarVariables::setExportType( ExportType exportType )
221 {
222  m_exportType = exportType;
223 }
224 
226 {
227  return m_exportType;
228 }
229 
230 void KonsoleKalendarVariables::setExportFile( TQString export_file )
231 {
232  m_exportFile = export_file;
233  m_bIsExportFile = true;
234 }
235 
237 {
238  return m_bIsExportFile;
239 }
240 
242 {
243  return m_exportFile;
244 }
245 
247 {
248  return m_bAll;
249 }
250 
252 {
253  m_bAll = all;
254 }
255 
257 {
258  return m_bAll;
259 }
260 
261 void KonsoleKalendarVariables::setDescription( TQString description )
262 {
263  m_bDescription = true;
264  m_description = description;
265 }
266 
268 {
269  return m_description;
270 }
271 
273 {
274  return m_bDescription;
275 }
276 
277 void KonsoleKalendarVariables::setLocation( TQString location )
278 {
279  m_bLocation = true;
280  m_location = location;
281 }
282 
284 {
285  return m_location;
286 }
287 
289 {
290  return m_bLocation;
291 }
292 
293 void KonsoleKalendarVariables::setSummary( TQString summary )
294 {
295  m_bSummary = true;
296  m_summary = summary;
297 }
298 
300 {
301  return m_summary;
302 }
303 
305 {
306  return m_bSummary;
307 }
308 
310 {
311  m_bFloating = floating;
312 }
313 
315 {
316  return m_bFloating;
317 }
318 
320 {
321  m_daysCount = count;
322  m_bDaysCount = true;
323 }
324 
326 {
327  return m_daysCount;
328 }
329 
331 {
332  return m_bDaysCount;
333 }