koprojectview.h
1/*
2 This file is part of KOrganizer.
3 Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org>
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
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18*/
19#ifndef KOPROJECTVIEW_H
20#define KOPROJECTVIEW_H
21/* $Id$ */
22
23#include <tqptrlist.h>
24#include <tqfontmetrics.h>
25
26#include <tqmap.h>
27
28#include <libkcal/calendar.h>
29#include <libkcal/event.h>
30
31#include "korganizer/baseview.h"
32#include "KGanttItem.h"
33
34class KGantt;
35class TQLineEdit;
36class TQFont;
37class TQLabel;
38class TQPopupMenu;
39class TQListBox;
40class TQStrList;
41class TQListView;
42
47class KOProjectViewItem : public KGanttItem {
48 public:
49 KOProjectViewItem(Todo *,KGanttItem* parentTask, const TQString& text,
50 const TQDateTime& start, const TQDateTime& end);
52
53 Todo *event();
54
55 private:
56 Todo *mEvent;
57};
58
59
67{
68 TQ_OBJECT
69
70 public:
71 KOProjectView(Calendar *, TQWidget* parent=0, const char* name=0 );
73
74 Incidence::List selectedIncidences();
75 DateList selectedDates();
76
78 int currentDateCount() { return 0; }
79
80 void readSettings();
81 void writeSettings(TDEConfig *);
82
83 public slots:
84 void updateView();
85 void updateConfig();
86
87 void changeIncidenceDisplay(Incidence *, int);
88
89 void showDates(const TQDate &start, const TQDate &end);
90 void showIncidences( const Incidence::List &incidenceList );
91
92/*
93 void editItem(TQListViewItem *item);
94 void showItem(TQListViewItem *item);
95 void popupMenu(TQListViewItem *item,const TQPoint &,int);
96 void newTodo();
97 void newSubTodo();
98 void itemClicked(TQListViewItem *);
99*/
100
101 protected slots:
102 void showModeMenu();
103 void zoomIn();
104 void zoomOut();
105 void taskChanged(KGanttItem *task,KGanttItem::Change change);
106
107 private:
108 void createMainTask();
109 KGanttItem *createTask(KGanttItem *,Todo *);
110
111 KGantt *mGantt;
112 KGanttItem *mMainTask;
113
114 TQMap<Todo *,KGanttItem *>::ConstIterator insertTodoItem(Todo *todo);
115
116 TQMap<Todo *,KGanttItem *> mTodoMap;
117};
118
119#endif
This class provides an item of the project view.
Definition: koprojectview.h:47
This class provides a Gantt-like project view on todo items.
Definition: koprojectview.h:67
int currentDateCount()
Return number of shown dates.
Definition: koprojectview.h:78
Incidence::List selectedIncidences()
This class provides an interface for all views being displayed within the main calendar view.
Definition: baseview.h:60