/************************* * * * * * * * * * * * * *************************** Copyright (c) 1999-2005 Ryan Bobko ryan@ostrich-emulators.com This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ************************** * * * * * * * * * * * * **************************/ #ifndef ACCTREPORT_H #define ACCTREPORT_H #include "reporter.h" class AccountsReport : public ReportBase { public: static const AccountsInfo pinfo; AccountsReport(); virtual ~AccountsReport(); virtual const PluginInfo& info() const; virtual void selected( QDate& start, QDate& stop, bool& enableacctsel, bool& enablemultiselect ); virtual auto_ptr generate( uint journalid, QHaccResultSet * accounts, const QDate& start, const QDate& end, QString& title ); virtual auto_ptr generate( QHaccResultSet * accounts, vector selectors, QString& title ); QString writereport( const QString& title, const QHaccResultSet * data ); virtual QString description() const; static QString sdescription(); virtual QString understands() const; static QString sunderstands(); private: auto_ptr igen( auto_ptr trans ); bool homeok( const QString& home, uint& jid, auto_ptr& accts, QDate& start, QDate& stop, QString& err ); }; #endif