1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110
|
/*
* The TaskJuggler Project Management Software
*
* Copyright (c) 2001, 2002, 2003, 2004, 2005 by Chris Schlaeger <cs@kde.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of version 2 of the GNU General Public License as
* published by the Free Software Foundation.
*
* $Id$
*/
#ifndef _ReportManager_h_
#define _ReportManager_h_
#include <list>
#include <qobject.h>
#include <qptrlist.h>
#include "ManagedReportInfo.h"
class QWidgetStack;
class QString;
class QListViewItem;
class KMainWindow;
class KSelectAction;
class KListView;
class KListViewSearchLine;
class KURL;
class Project;
class Report;
class CoreAttributes;
class Report;
class ReportManager : public QObject
{
Q_OBJECT
public:
ReportManager(KMainWindow* mainWindow, QWidgetStack* v, KListView* b,
KListViewSearchLine* s);
virtual ~ReportManager();
void updateReportList(const Project* pr);
ManagedReportInfo* getCurrentReport() const;
QListViewItem* getFirstInteractiveReportItem() const;
QWidgetStack* getReportStack() const { return reportStack; }
void setFocusToReport() const;
void enableReportActions(bool enable);
bool generateReport(QListViewItem*);
bool showReport(QListViewItem*, bool& showReport);
void showRMBMenu(QListViewItem*, const QPoint&, int, bool& errors,
bool& showReport);
bool isProjectLoaded() const;
void setLoadingProject(bool lp);
void clear();
void print();
signals:
void signalChangeStatusBar(const QString& text);
void signalEditCoreAttributes(CoreAttributes* ca);
void signalEditReport(const Report* report);
void signalEditFile(const KURL& url);
public slots:
void zoomIn();
void zoomOut();
void zoomTo();
void updateZoomSelector(const QStringList& items, unsigned int current);
void closeCurrentReport();
void changeStatusBar(const QString& text);
void editCoreAttributes(CoreAttributes* ca);
void editReport(const Report* report);
private:
void updateReportBrowser();
KMainWindow* mainWindow;
KSelectAction* zoomSelector;
const Project* project;
QWidgetStack* reportStack;
KListView* browser;
KListViewSearchLine* searchLine;
KListViewItem* qtReports;
KListViewItem* htmlReports;
KListViewItem* csvReports;
KListViewItem* xmlReports;
KListViewItem* icalReports;
KListViewItem* exportReports;
std::list<ManagedReportInfo*> reports;
bool loadingProject;
} ;
#endif
|