20#ifndef KPTREPORTVIEW_H
21#define KPTREPORTVIEW_H
23#include "kptcontext.h"
24#include "kptproject.h"
26#include "kptresource.h"
27#include "kptduration.h"
28#include <tqsplitter.h>
31#include <tdelistview.h>
52class KugarReportViewer;
53class ReportTagsPrivate;
55class ReportView :
public TQSplitter
62 ReportView(View *view, TQWidget *parent);
68 void draw(
const TQString &report);
69 View *mainView()
const {
return m_mainview; }
71 void setup(KPrinter &printer);
72 void print(KPrinter &printer);
76 void getTemplateFile(
const TQString &tpl);
77 void openTemplateFile(
const TQString &file);
78 void loadTemplate(TQIODevice &dev);
79 void loadTemplate(TQDomDocument &doc);
80 void handleHeader(TQDomNode &node);
81 void handleDetail(TQDomElement &elem);
82 void handleKPlato(TQDomElement &elem);
83 void replaceTags(TQDomNode &node);
85 TQString setReportDetail();
86 TQString setTaskChildren(Node *node);
87 TQString setTaskDetail(Node *node);
88 TQStringList getProperties(TQDomElement &elem);
90 TQString setResourceDetail(Resource *res);
91 TQString setResourceGroupDetail(ResourceGroup *group);
93 TQString setDetail(
const TQString &source, TQStringList &properties, TQString &level);
95 virtual bool setContext(Context::Reportview &context);
96 virtual void getContext(Context::Reportview &context)
const;
98 void enableNavigationBtn();
101 void setFirstPageActionEnabled(
bool);
102 void setNextPageActionEnabled(
bool);
103 void setPriorPageActionEnabled(
bool);
104 void setLastPageActionEnabled(
bool);
107 void slotFirstPage();
113 void slotReportListClicked(TQListViewItem* item);
114 void slotReportListSelectionChanged(TQListViewItem* item);
117 class ReportItem :
public TDEListViewItem {
119 ReportItem(TDEListView *p, TQString name, TQString _url)
120 : TDEListViewItem(p, name),
125 void initReportList();
129 TDEListView *m_reportList;
130 KugarReportViewer *m_reportview;
131 int m_defaultFontSize;
133 TQDomDocument templateDoc;
135 ReportTagsPrivate *m_reportTags;
This class represents any node in the project, a node can be a project or a subproject or any task.