F:/KPlato/koffice/kplato/kptcanvasitem.h

Aller à la documentation de ce fichier.
00001 /* This file is part of the KDE project
00002    Copyright (C) 2003 - 2004 Dag Andersen <danders@get2net.dk>
00003 
00004    This library is free software; you can redistribute it and/or
00005    modify it under the terms of the GNU Library General Public
00006    License as published by the Free Software Foundation;
00007    version 2 of the License.
00008 
00009    This library is distributed in the hope that it will be useful,
00010    but WITHOUT ANY WARRANTY; without even the implied warranty of
00011    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012    Library General Public License for more details.
00013 
00014    You should have received a copy of the GNU Library General Public License
00015    along with this library; see the file COPYING.LIB.  If not, write to
00016    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00017  * Boston, MA 02110-1301, USA.
00018 */
00019 
00020 #ifndef KPTCANVASITEM_H
00021 #define KPTCANVASITEM_H
00022 
00023 #include "kptnode.h"
00024 #include "KDGanttView.h"
00025 #include "KDGanttViewItem.h"
00026 #include "KDGanttViewSummaryItem.h"
00027 #include "KDGanttViewTaskItem.h"
00028 #include "KDGanttViewEventItem.h"
00029 
00030 #include <q3canvas.h>
00031 #include <qrect.h>
00032 //Added by qt3to4:
00033 #include <Q3PointArray>
00034 #include <Q3PtrList>
00035 
00036 class QPainter;
00037 
00038 namespace KPlato
00039 {
00040 
00041 class Task;
00042 class Relation;
00043 class GanttView;
00044 
00045 
00046 class ItemBase
00047 {
00048 protected:
00049     KDGanttViewTaskLink::LinkType kdLinkType(int relationType);
00050 };
00051 
00052 
00054 
00055 class GanttViewSummaryItem : public KDGanttViewSummaryItem, public ItemBase
00056 {
00057 public:
00058     GanttViewSummaryItem(KDGanttView *parent, Node *node);
00059     GanttViewSummaryItem(KDGanttViewItem *parent, Node *node);
00060 
00061     Node *getNode() { return m_node; }
00062     void insertRelations(GanttView *view);
00063     KDGanttViewItem *find(Node *node);
00064     KDGanttViewItem *find(KDGanttViewItem *item, Node *node);
00065     KDGanttView *ganttView() const { return m_view; }
00066     bool isDrawn() const { return m_drawn; }
00067     void setDrawn(bool drawn) { m_drawn = drawn; }
00068 
00069 protected:
00070     Node *m_node;  // can be Project or Task
00071     KDGanttView *m_view;
00072     bool m_drawn;
00073 };
00074 
00076 
00077 class GanttViewTaskItem : public KDGanttViewTaskItem, public ItemBase
00078 {
00079 public:
00080     GanttViewTaskItem(KDGanttView *parent, KPlato::Task *task);
00081     GanttViewTaskItem(KDGanttViewItem *parent, KPlato::Task *task);
00082 
00083     KPlato::Task *getTask() const { return m_task; }
00084     void insertRelations(GanttView *view);
00085     KDGanttViewItem *find(Node *node);
00086     KDGanttViewItem *find(KDGanttViewItem *item, Node *node);
00087     KDGanttView *ganttView() const { return m_view; }
00088     bool isDrawn() const { return m_drawn; }
00089     void setDrawn(bool drawn) { m_drawn = drawn; }
00090     
00091 protected:
00092     KPlato::Task *m_task;
00093     KDGanttView *m_view;
00094     bool m_drawn;
00095 };
00096 
00098 
00099 class GanttViewEventItem : public KDGanttViewEventItem, public ItemBase
00100 {
00101 public:
00102     GanttViewEventItem(KDGanttView *parent, KPlato::Task *task);
00103     GanttViewEventItem(KDGanttViewItem *parent, KPlato::Task *task);
00104 
00105     KPlato::Task *getTask() { return m_task; }
00106     void insertRelations(GanttView *view);
00107     KDGanttViewItem *find(Node *node);
00108     KDGanttViewItem *find(KDGanttViewItem *item, Node *node);
00109     KDGanttView *ganttView() const { return m_view; }
00110     bool isDrawn() const { return m_drawn; }
00111     void setDrawn(bool drawn) { m_drawn = drawn; }
00112     
00113 protected:
00114     KPlato::Task *m_task;
00115     KDGanttView *m_view;
00116     bool m_drawn;
00117 };
00118 
00119 }  //KPlato namespace
00120 
00121 #endif

Généré le Wed Nov 22 23:40:55 2006 pour KPlato par  doxygen 1.5.1-p1