kplato

kpttaskappointmentsview.h

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 QDateEdit;
00029 class QPushButton;
00030 class QSplitter;
00031 class QListViewItem;
00032 class QLabel;
00033 class QPushButton;
00034 
00035 class KListView;
00036 class KListViewItem;
00037 class KPrinter;
00038 
00039 namespace KPlato
00040 {
00041 
00042 class Project;
00043 class Resource;
00044 class Task;
00045 
00046 class ResourceGroup;
00047 class Resource;
00048 class ResourceItemPrivate;
00049 
00050 class TaskAppointmentsView : public DoubleListViewBase
00051 {
00052     Q_OBJECT
00053 public:
00054 
00055     TaskAppointmentsView(QWidget *parent);
00056 
00057     //~TaskAppointmentsView();
00058 
00059     void zoom(double zoom);
00060 
00061     void draw();
00062     void draw(Task *task);
00063     virtual void drawContents(QPainter* painter);
00064     void print(KPrinter &printer);
00065     void clear();
00066     
00067     //virtual bool setContext(Context::TaskAppointmentsView &context);
00068     //virtual void getContext(Context::TaskAppointmentsView &context) const;
00069 
00070     virtual void createSlaveItems();
00071     
00072 protected slots:
00073     void slotUpdate();
00074     
00075 private:
00076     class ResourceItem : public DoubleListViewBase::MasterListItem {
00077     public:
00078         ResourceItem(Resource *r, QListView *parent, bool highlight=false);
00079         ResourceItem(Resource *r, QListViewItem *parent, bool highlight=false);
00080         ResourceItem(QString text, QListViewItem *parent, bool highlight=false);
00081         
00082         Resource *resource;
00083         EffortCostMap effortMap;
00084     };
00085     
00086 private:
00087     
00088     int m_defaultFontSize;
00089     Task *m_task;
00090 };
00091 
00092 }  //KPlato namespace
00093 
00094 
00095 #endif // KPTTASKAPPOINTMENTSVIEW_H
KDE Home | KDE Accessibility Home | Description of Access Keys