00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef KPTRESOURCEAPPOINTMENTSVIEW_H
00021 #define KPTRESOURCEAPPOINTMENTSVIEW_H
00022
00023 #include "kptcontext.h"
00024 #include "kptdoublelistviewbase.h"
00025 #include "kpteffortcostmap.h"
00026
00027 #include <QLabel>
00028
00029 class QComboBox;
00030 class Q3DateEdit;
00031 class QPushButton;
00032 class QSplitter;
00033 class QTreeWidget;
00034 class QTreeWidgetItem;
00035 class QLabel;
00036 class QPushButton;
00037
00038 class K3ListView;
00039 class K3ListViewItem;
00040 class KPrinter;
00041
00042 namespace KPlato
00043 {
00044
00045 class View;
00046 class Project;
00047 class Resource;
00048 class Node;
00049
00050 class ResourceGroup;
00051 class Resource;
00052
00053 class ResourceAppointmentsView : public DoubleListViewBase
00054 {
00055 Q_OBJECT
00056 public:
00057
00058 ResourceAppointmentsView(View *view, QWidget *parent);
00059
00060
00061
00062 void zoom(double zoom);
00063
00064 View *mainView() const { return m_mainview; }
00065 void draw(Resource *resource, const QDate &start, const QDate &end);
00066 void draw();
00067 void print(KPrinter &printer);
00068 void clear();
00069
00070
00071
00072
00073 virtual void createSlaveItems();
00074
00075 protected slots:
00076 void slotUpdate();
00077
00078 private:
00079 class NodeItem : public DoubleListViewBase::MasterListItem {
00080 public:
00081 NodeItem(Node *n, QTreeWidget *parent, bool highlight=false);
00082 NodeItem(Node *n, QTreeWidgetItem *parent, bool highlight=false);
00083 NodeItem(QString text, QTreeWidget *parent, bool highlight=false);
00084 NodeItem(QString text, QTreeWidgetItem *parent, bool highlight=false);
00085
00086 Node *node;
00087 EffortCostMap effortMap;
00088 };
00089
00090 private:
00091 View *m_mainview;
00092
00093 int m_defaultFontSize;
00094 Resource *m_resource;
00095 QDate m_start;
00096 QDate m_end;
00097 NodeItem *m_availItem;
00098 NodeItem *m_totalItem;
00099 };
00100
00101 }
00102
00103
00104 #endif // KPTTASKAPPOINTMENTSVIEW_H