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);
108 void newTask( TQString caption, Task* parent );
114 void loadFromFlatFile();
117 TQString importPlanner( TQString fileName= "" );
123 void exportcsvFile();
126 TQString exportcsvHistory();
152 void deleteTask( bool markingascomplete= false);
156 void reinstateTask( int completion);
158 void markTaskAsComplete();
159 void markTaskAsIncomplete();
165 void extractTime( int minutes );
166 void taskTotalTimesChanged( long session, long total)
167 { emit totalTimesChanged( session, total); };
170 void deletingTask( Task* deletedTask);
176 void startTimerFor( Task* task, TQDateTime startTime = TQDateTime::currentDateTime() );
177 void stopTimerFor( Task* task );
182 void clearActiveTasks();
187 void iCalFileChanged(TQString file);
199 void totalTimesChanged( long session, long total );
200 void updateButtons();
202 void timersInactive();
203 void tasksChanged( TQPtrList<Task> activeTasks );
204 void setStatusBar( TQString );
208 TQTimer *_minuteTimer;
209 TQTimer *_autoSaveTimer;
210 TQTimer *_manualSaveTimer;
212 TQPtrList<Task> activeTasks;
213 int previousColumnWidths[4];
221 void contentsMousePressEvent ( TQMouseEvent * e );
222 void contentsMouseDoubleClickEvent ( TQMouseEvent * e );
223 void updateParents( Task* task, long totalDiff, long sesssionDiff);
224 void deleteChildTasks( Task *item );
225 void addTimeToActiveTasks( int minutes, bool save_data = true );
227 void restoreItemState( TQListViewItem *item );
230 void autoSaveChanged( bool );
231 void autoSavePeriodChanged( int period );
234 void itemStateChanged( TQListViewItem *item );
236 void iCalFileModified(ResourceCalendar *);
239 #endif // KARM_TASK_VIEW
|