kplato
kptresourceappointmentsview.h00001
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 class QComboBox;
00028 class QDateEdit;
00029 class QPushButton;
00030 class QSplitter;
00031 class QListView;
00032 class QListViewItem;
00033 class QLabel;
00034 class QPushButton;
00035
00036 class KListView;
00037 class KListViewItem;
00038 class KPrinter;
00039
00040 namespace KPlato
00041 {
00042
00043 class View;
00044 class Project;
00045 class Resource;
00046 class Node;
00047
00048 class ResourceGroup;
00049 class Resource;
00050
00051 class ResourceAppointmentsView : public DoubleListViewBase
00052 {
00053 Q_OBJECT
00054 public:
00055
00056 ResourceAppointmentsView(View *view, QWidget *parent);
00057
00058
00059
00060 void zoom(double zoom);
00061
00062 View *mainView() const { return m_mainview; }
00063 void draw(Resource *resource, const QDate &start, const QDate &end);
00064 void draw();
00065 void print(KPrinter &printer);
00066 void clear();
00067
00068
00069
00070
00071 virtual void createSlaveItems();
00072
00073 protected slots:
00074 void slotUpdate();
00075
00076 private:
00077 class NodeItem : public DoubleListViewBase::MasterListItem {
00078 public:
00079 NodeItem(Node *n, QListView *parent, bool highlight=false);
00080 NodeItem(Node *n, QListViewItem *parent, bool highlight=false);
00081 NodeItem(QString text, QListView *parent, bool highlight=false);
00082 NodeItem(QString text, QListViewItem *parent, bool highlight=false);
00083
00084 Node *node;
00085 EffortCostMap effortMap;
00086 };
00087
00088 private:
00089 View *m_mainview;
00090
00091 int m_defaultFontSize;
00092 Resource *m_resource;
00093 QDate m_start;
00094 QDate m_end;
00095 NodeItem *m_availItem;
00096 NodeItem *m_totalItem;
00097 };
00098
00099 }
00100
00101
00102 #endif // KPTTASKAPPOINTMENTSVIEW_H
|