1 #ifndef KARM_TASK_VIEW_H 2 #define KARM_TASK_VIEW_H 6 #include <tqptrstack.h> 8 #include <tdelistview.h> 10 #include "desktoplist.h" 11 #include "resourcecalendar.h" 12 #include "karmstorage.h" 13 #include "mainwindow.h" 14 #include "reportcriteria.h" 48 TaskView( TQWidget *parent = 0,
const char *name = 0,
const TQString &icsfile =
"" );
52 Task* first_child()
const;
55 Task* current_item()
const;
58 Task* item_at_index(
int i);
61 void load( TQString filename=
"" );
67 void startNewSession();
70 void resetTimeForAllTasks();
76 TQValueList<HistoryEvent> getHistory(
const TQDate& from,
const TQDate& to)
const;
85 TQString addTask(
const TQString& taskame,
long total,
long session,
const DesktopList& desktops,
93 void startCurrentTimer();
96 void stopCurrentTimer();
102 void stopAllTimersAt(TQDateTime qdt);
105 void resetTimeCurrentTask();
111 void newTask( TQString caption,
Task* parent );
117 void loadFromFlatFile();
120 TQString importPlanner( TQString fileName=
"" );
126 void exportcsvFile();
129 TQString exportcsvHistory();
155 void deleteTask(
bool markingascomplete=
false);
159 void reinstateTask(
int completion);
161 void markTaskAsComplete();
162 void markTaskAsIncomplete();
168 void extractTime(
int minutes );
169 void taskTotalTimesChanged(
long session,
long total)
170 { emit totalTimesChanged( session, total); };
173 void deletingTask(
Task* deletedTask);
179 void startTimerFor(
Task* task, TQDateTime startTime = TQDateTime::currentDateTime() );
180 void stopTimerFor(
Task* task );
185 void clearActiveTasks();
190 void iCalFileChanged(TQString file);
202 void totalTimesChanged(
long session,
long total );
203 void updateButtons();
205 void timersInactive();
206 void tasksChanged( TQPtrList<Task> activeTasks );
207 void setStatusBar( TQString );
211 TQTimer *_minuteTimer;
212 TQTimer *_autoSaveTimer;
213 TQTimer *_manualSaveTimer;
215 TQPtrList<Task> activeTasks;
216 int previousColumnWidths[4];
224 void contentsMousePressEvent ( TQMouseEvent * e );
225 void contentsMouseDoubleClickEvent ( TQMouseEvent * e );
226 void updateParents(
Task* task,
long totalDiff,
long sesssionDiff);
227 void deleteChildTasks(
Task *item );
228 void addTimeToActiveTasks(
int minutes,
bool save_data =
true );
230 void restoreItemState( TQListViewItem *item );
233 void autoSaveChanged(
bool );
234 void autoSavePeriodChanged(
int period );
237 void itemStateChanged( TQListViewItem *item );
239 void iCalFileModified(ResourceCalendar *);
242 #endif // KARM_TASK_VIEW Keep track of how long the computer has been idle.
Singleton to store/retrieve KArm data to/from persistent storage.
Stores entries from export dialog.
Dialog to add a new task or edit an existing task.
One start/stop event that has been logged.
A utility to associate tasks with desktops As soon as a desktop is activated/left - an signal is emit...
Provide an interface to the configuration options for the program.
Container and interface for the tasks.
A class representing a task.