stdtransactionmatched.h

Go to the documentation of this file.
00001 /***************************************************************************
00002                           stdtransactionmatched.h
00003                              -------------------
00004     begin                : Sat May 31 2008
00005     copyright            : (C) 2008 by Thomas Baumgart
00006     email                : Thomas Baumgart <ipwizard@users.sourceforge.net>
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  ***************************************************************************/
00017 
00018 #ifndef STDTRANSACTIONMATCHED_H
00019 #define STDTRANSACTIONMATCHED_H
00020 
00021 // ----------------------------------------------------------------------------
00022 // QT Includes
00023 #include <qbrush.h>
00024 
00025 // ----------------------------------------------------------------------------
00026 // KDE Includes
00027 
00028 // ----------------------------------------------------------------------------
00029 // Project Includes
00030 
00031 #include <kmymoney/transaction.h>
00032 
00033 namespace KMyMoneyTransactionForm {
00034   class TransactionForm;
00035 }; // namespace
00036 
00037 namespace KMyMoneyRegister {
00038 
00039 class StdTransactionMatched : public StdTransaction
00040 {
00041   static const int m_additionalRows = 3;
00042 
00043 public:
00044   StdTransactionMatched(Register* parent, const MyMoneyTransaction& transaction, const MyMoneySplit& split, int uniqueId);
00045   virtual ~StdTransactionMatched() {}
00046 
00047   virtual const char* className(void) { return "StdTransactionMatched"; }
00048 
00069   virtual bool paintRegisterCellSetup(QPainter* painter, int& row, int& col, QRect& cellRect, QRect& textRect, QColorGroup& cg, QBrush& brush);
00070 
00071   virtual void paintRegisterGrid(QPainter* painter, int row, int col, const QRect& r, const QColorGroup& cg) const;
00072 
00073 #if 0
00074   virtual void paintRegisterCell(QPainter* painter, int row, int col, const QRect& r, bool selected, const QColorGroup& cg);
00075 
00076   bool formCellText(QString& txt, int& align, int row, int col, QPainter* painter = 0);
00077 
00078   int numColsForm(void) const { return 4; }
00079 
00080   void arrangeWidgetsInForm(QMap<QString, QWidget*>& editWidgets);
00081   void arrangeWidgetsInRegister(QMap<QString, QWidget*>& editWidgets);
00082   void tabOrderInForm(QWidgetList& tabOrderWidgets) const;
00083   void tabOrderInRegister(QWidgetList& tabOrderWidgets) const;
00084 
00085   int numRowsRegister(bool expanded) const;
00086 #endif
00087 
00088   void registerCellText(QString& txt, int& align, int row, int col, QPainter* painter = 0);
00089 
00093   int numRowsRegister(bool expanded) const { return StdTransaction::numRowsRegister(expanded) + m_additionalRows; }
00094 
00095 private:
00096   unsigned int         m_drawCounter;
00097 };
00098 
00099 }; // namespace
00100 
00101 #endif
00102 // vim:cin:si:ai:et:ts=2:sw=2:
00103 

Generated on Wed Jan 26 13:03:18 2011 for KMyMoney by  doxygen 1.5.6