00001 /* This file is part of the KDE project 00002 Copyright (C) 2005 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; either 00007 version 2 of the License, or (at your option) any later version. 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 KPTTASKAPPOINTMENTSVIEW_H 00021 #define KPTTASKAPPOINTMENTSVIEW_H 00022 00023 #include "kptcontext.h" 00024 #include "kptdoublelistviewbase.h" 00025 #include "kpteffortcostmap.h" 00026 00027 class QComboBox; 00028 class QPushButton; 00029 class QSplitter; 00030 class QTreeWidgetItem; 00031 class QLabel; 00032 class QPushButton; 00033 00034 class KPrinter; 00035 00036 namespace KPlato 00037 { 00038 00039 class Project; 00040 class Resource; 00041 class Task; 00042 00043 class ResourceGroup; 00044 class Resource; 00045 class ResourceItemPrivate; 00046 00047 class TaskAppointmentsView : public DoubleListViewBase 00048 { 00049 Q_OBJECT 00050 public: 00051 00052 TaskAppointmentsView( QWidget *parent ); 00053 00054 //~TaskAppointmentsView(); 00055 00056 void setZoom( double zoom ); 00057 00058 void draw(); 00059 void draw( Task *task ); 00060 void print( KPrinter &printer ); 00061 void clear(); 00062 00063 //virtual bool setContext(Context::TaskAppointmentsView &context); 00064 //virtual void getContext(Context::TaskAppointmentsView &context) const; 00065 00066 virtual void createSlaveItems(); 00067 00068 protected slots: 00069 void slotUpdate(); 00070 00071 private: 00072 class ResourceItem : public DoubleListViewBase::MasterListItem 00073 { 00074 public: 00075 ResourceItem( Resource *r, QTreeWidget *parent, bool highlight = false ); 00076 ResourceItem( Resource *r, QTreeWidgetItem *parent, bool highlight = false ); 00077 ResourceItem( QString text, QTreeWidgetItem *parent, bool highlight = false ); 00078 00079 Resource *resource; 00080 EffortCostMap effortMap; 00081 }; 00082 00083 private: 00084 00085 int m_defaultFontSize; 00086 Task *m_task; 00087 }; 00088 00089 } //KPlato namespace 00090 00091 00092 #endif // KPTTASKAPPOINTMENTSVIEW_H