karm

karmdcopiface.h
1 /*
2  * This file only:
3  * Copyright (C) 2004 Mark Bucciarelli <mark@hubcapconsulting.com>
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License along
16  * with this program; if not, write to the
17  * Free Software Foundation, Inc.
18  * 51 Franklin Street, Fifth Floor
19  * Boston, MA 02110-1301 USA.
20  */
21 #ifndef KARM_DCOP_IFAC_H
22 #define KARM_DCOP_IFAC_H
23 
24 #include <dcopobject.h>
25 
27 class KarmDCOPIface : virtual public DCOPObject
28 {
29  K_DCOP
30  k_dcop:
31 
33  virtual TQString version() const = 0;
34 
36  virtual TQString taskIdFromName( const TQString& taskName ) const = 0;
37 
47  virtual int addTask( const TQString& taskName ) = 0;
48 
57  virtual TQString setPerCentComplete( const TQString& taskName, int perCent ) = 0;
58 
77  virtual int bookTime( const TQString& taskId, const TQString& iso8601StartDateTime,
78  long durationInMinutes ) = 0;
79 
90  virtual TQString getError( int karmErrorNumber ) const = 0;
91 
100  virtual int totalMinutesForTaskId( const TQString& taskId ) = 0;
101 
103  // may conflict with unitaskmode
104  virtual TQString starttimerfor( const TQString& taskname ) = 0;
105 
107  // may conflict with unitaskmode
108  virtual TQString stoptimerfor( const TQString& taskname ) = 0;
109 
111  virtual TQString deletetodo() = 0;
112 
114  virtual TQString setpromptdelete( bool prompt ) = 0;
115 
117  virtual bool getpromptdelete() = 0;
118 
120  virtual TQString exportcsvfile( TQString filename, TQString from, TQString to, int type = 0, bool decimalMinutes=true, bool allTasks=true, TQString delimiter=";", TQString quote="'" ) = 0;
121 
123  virtual TQString importplannerfile( TQString filename ) = 0;
124 
126  virtual bool save() = 0;
127 
129  virtual void quit() = 0;
130 };
131 
132 #endif // KARM_DCOP_IFAC_H
Define DCOP interface to karm.
Definition: karmdcopiface.h:28
virtual TQString exportcsvfile(TQString filename, TQString from, TQString to, int type=0, bool decimalMinutes=true, bool allTasks=true, TQString delimiter=";", TQString quote="'")=0
export csv history or totals file
virtual TQString version() const =0
Return karm version.
virtual int addTask(const TQString &taskName)=0
Add a new top-level task.
virtual TQString starttimerfor(const TQString &taskname)=0
Start timer for all tasks with the summary taskname.
virtual bool getpromptdelete()=0
get if prompted on deleting a task
virtual TQString setPerCentComplete(const TQString &taskName, int perCent)=0
Set percent complete to a task.
virtual void quit()=0
Graceful shutdown.
virtual int totalMinutesForTaskId(const TQString &taskId)=0
Total time currently associated with a task.
virtual bool save()=0
save your tasks
virtual TQString stoptimerfor(const TQString &taskname)=0
Stop timer for all tasks with the summary taskname.
virtual TQString deletetodo()=0
delete the current item
virtual TQString importplannerfile(TQString filename)=0
import planner project file
virtual TQString getError(int karmErrorNumber) const =0
Return error string associated with karm error number.
virtual TQString taskIdFromName(const TQString &taskName) const =0
Return id of task found, empty string if no match.
virtual TQString setpromptdelete(bool prompt)=0
set if prompted on deleting a task
virtual int bookTime(const TQString &taskId, const TQString &iso8601StartDateTime, long durationInMinutes)=0
Add time to a task.