head 1.9; access; symbols; locks; strict; comment @ * @; 1.9 date 2004.05.27.21.48.41; author ms; state Exp; branches; next 1.8; 1.8 date 2003.11.20.11.31.20; author ms; state Exp; branches; next 1.7; 1.7 date 2003.02.25.09.29.31; author ms; state Exp; branches; next 1.6; 1.6 date 2003.02.21.23.44.36; author ms; state Exp; branches; next 1.5; 1.5 date 2003.02.20.21.09.58; author ms; state Exp; branches; next 1.4; 1.4 date 2003.02.20.16.48.00; author ms; state Exp; branches; next 1.3; 1.3 date 2003.02.19.18.23.16; author ms; state Exp; branches; next 1.2; 1.2 date 2003.02.18.18.27.46; author ms; state Exp; branches; next 1.1; 1.1 date 2003.02.17.17.16.18; author ms; state Exp; branches; next ; desc @@ 1.9 log @Modernize copyright text in source and graphic headers. @ text @// // OSSP asgui - Accounting system graphical user interface // Copyright (c) 2002-2004 The OSSP Project (http://www.ossp.org/) // Copyright (c) 2002-2004 Ralf S. Engelschall // Copyright (c) 2002-2004 Michael Schloh von Bennewitz // Copyright (c) 2002-2004 Cable & Wireless Telecommunications Services GmbH // // This file is part of OSSP asgui, an accounting system graphical user // interface which can be found at http://www.ossp.org/pkg/tool/asgui/. // // Permission to use, copy, modify, and distribute this software for // any purpose with or without fee is hereby granted, provided that // the above copyright notice and this permission notice appear in all // copies. // // THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED // WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. // IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF // USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND // ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, // OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT // OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // // as_reportpanel.h: ISO C++ interface // #ifndef REPORTPANEL_H #define REPORTPANEL_H #include #include #include class TiTable; class Preferences; class QVBoxLayout; class QHBoxLayout; class QGridLayout; class QPushButton; class QTextEdit; class QToolButton; class QButtonGroup; class QPopupMenu; class QPrinter; namespace AS { class Reportpanel : public QDialog { Q_OBJECT public: Reportpanel(TiTable *, Preferences *, QWidget *pParent = 0, const char *kszName = 0, bool bModal = true, WFlags Flags = 0); // ~Reportpanel(void); // No need to destroy widgets, because qt does it for us public: QButtonGroup *m_pWeekmonthgroup; QToolButton *m_pWeeklybutt; QToolButton *m_pMonthlybutt; QTextEdit *m_pBrowser; QPushButton *m_pSavebutt; QPushButton *m_pDismissbutt; QPushButton *m_pPrintbutt; protected: QVBoxLayout *m_pFormlay; QVBoxLayout *m_pGrouplay; QHBoxLayout *m_pToolay; QHBoxLayout *m_pPushlay; QHBoxLayout *m_pWeekmonthlay; QPopupMenu *m_pWeekpop; QPopupMenu *m_pMonthpop; private: int m_nWeeks; int m_nMonths; TiTable *m_pReptable; Preferences *m_pReprefs; #ifndef QT_NO_PRINTER QPrinter *m_pPrinter; #endif public slots: int exec(void); protected slots: virtual void saveReport(void); virtual void printReport(void); virtual void textChange(void); virtual void reportWeeks(int nMenuid = -1); virtual void reportMonths(int nMenuid = -1); private: void writeHeader(int); void writeHeader(int, int); void writeHeader(QString); void writeHeader(QString, QString); void writeFooter(void); QString getWeektotals(QDate Refer = QDate::currentDate(), int nWeeks = 1); QString getWeekdetails(QDate Refer = QDate::currentDate(), int nWeeks = 1); QString getMonthtotals(QDate Refer = QDate::currentDate(), int nMonths = 1); QString getMonthdetails(QDate Refer = QDate::currentDate(), int nMonths = 1); }; } // namespace AS #endif // REPORTPANEL_H @ 1.8 log @Handle the time consuming bureaucracy of changing a company name. @ text @d3 4 a6 4 // Copyright (c) 2002-2003 The OSSP Project (http://www.ossp.org/) // Copyright (c) 2002-2003 Ralf S. Engelschall // Copyright (c) 2002-2003 Michael Schloh von Bennewitz // Copyright (c) 2002-2003 Cable & Wireless Telecommunications Services GmbH @ 1.7 log @Hook in number dialog for arbitrary weeks and months user entry, add postscript printing, remove 'both' button, and fix detailed and total calculating algorhythms. This no longer depends on a date-sorted table. @ text @a3 1 // Copyright (c) 2002-2003 Cable & Wireless Deutschland (http://www.cw.com/de/) d6 1 @ 1.6 log @Completed summary and detailed listing logic by using a hashtable to index account items, and nearly finish this pig of a class. @ text @d50 1 a66 1 QToolButton *m_pBothbutt; d70 1 d86 3 d95 1 a98 1 virtual void reportBoth(int nMenuid = -1); @ 1.5 log @Added logic to iterate over multiple weeks or months according to user preferences, and overloaded writeHeader to make header writing more flexible. @ text @d102 4 a105 2 QString getWeek(QDate Refer = QDate::currentDate()); QString getMonth(QDate Refer = QDate::currentDate()); @ 1.4 log @Vast report generation improvements and additions. @ text @d97 4 a100 1 void writeHeader(void); @ 1.3 log @Added necessary coupling between report panel and table and preferences to get local reports working. Fixed some strings, and removed hard coded text in favour of pref values. @ text @a44 1 class QGroupBox; d48 4 d58 2 a59 3 Reportpanel(TiTable *pTable, Preferences *pPreferences, QWidget *pParent = 0, const char *kszName = 0, bool bModal = true, WFlags Flags = 0); d63 1 a63 1 QGroupBox *m_pGroupbox; d76 3 d81 2 d86 3 d92 3 a94 2 virtual void reportWeeks(int nWeeks = 1); virtual void reportMonths(int nMonths = 1); d98 1 d102 1 @ 1.2 log @Added logic to save to a file the contents of the report display window, and generally added to the Reportpanel class. @ text @d37 1 d40 2 d55 3 a57 1 Reportpanel(QWidget *pParent = 0, const char *kszName = 0, bool bModal = true, WFlags Flags = 0); d75 4 d87 2 a88 2 void writeWeek(void); void writeMonth(void); @ 1.1 log @Implemented new class Reportpanel. @ text @d44 1 a44 1 class QTextBrowser; d60 1 a60 1 QTextBrowser *m_pBrowser; d71 1 a71 1 void saveReport(void); d73 7 @