summaryrefslogtreecommitdiffstats
path: root/kmymoney2/widgets/scheduledtransaction.h
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-07-04 22:38:03 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-07-04 22:38:03 +0000
commitdadc34655c3ab961b0b0b94a10eaaba710f0b5e8 (patch)
tree99e72842fe687baea16376a147619b6048d7e441 /kmymoney2/widgets/scheduledtransaction.h
downloadkmymoney-dadc34655c3ab961b0b0b94a10eaaba710f0b5e8.tar.gz
kmymoney-dadc34655c3ab961b0b0b94a10eaaba710f0b5e8.zip
Added kmymoney
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kmymoney@1239792 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kmymoney2/widgets/scheduledtransaction.h')
-rw-r--r--kmymoney2/widgets/scheduledtransaction.h86
1 files changed, 86 insertions, 0 deletions
diff --git a/kmymoney2/widgets/scheduledtransaction.h b/kmymoney2/widgets/scheduledtransaction.h
new file mode 100644
index 0000000..836ceee
--- /dev/null
+++ b/kmymoney2/widgets/scheduledtransaction.h
@@ -0,0 +1,86 @@
+/***************************************************************************
+ scheduledtransaction.h
+ -------------------
+ begin : Tue Aug 19 2008
+ copyright : (C) 2008 by Thomas Baumgart
+ email : Thomas Baumgart <ipwizard@users.sourceforge.net>
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * 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. *
+ * *
+ ***************************************************************************/
+
+#ifndef SCHEDULEDTRANSACTION_H
+#define SCHEDULEDTRANSACTION_H
+
+// ----------------------------------------------------------------------------
+// QT Includes
+
+// ----------------------------------------------------------------------------
+// KDE Includes
+
+// ----------------------------------------------------------------------------
+// Project Includes
+
+#include <kmymoney/transaction.h>
+
+namespace KMyMoneyTransactionForm {
+ class TransactionForm;
+}; // namespace
+
+namespace KMyMoneyRegister {
+
+class StdTransactionScheduled : public StdTransaction
+{
+public:
+ StdTransactionScheduled(Register* parent, const MyMoneyTransaction& transaction, const MyMoneySplit& split, int uniqueId);
+ virtual ~StdTransactionScheduled() {}
+
+ virtual const char* className(void) { return "StdTransactionScheduled"; }
+
+ /**
+ * This method sets the general paramaters required for the painting of a cell
+ * in the register. These are:
+ *
+ * - background color (alternating)
+ * - background color (imported transaction)
+ * - background color (matched transaction)
+ * - background color (selected transaction)
+ * - cellRect (area covering the cell)
+ * - textRect (area covering the text)
+ * - color of the pen to do the painting of text and lines
+ *
+ * @param painter pointer to the QPainter object
+ * @param row vertical index of cell in register
+ * @param col horizontal index of cell in register
+ * @param cellRect ref to QRect object receiving the area information for the cell
+ * @param textRect ref to QRect object receiving the area information for the text
+ * @param cg ref to QColorGroup object receiving the color information to be used
+ * @param brush ref to QBrush object receiveing the brush information to be used
+ */
+ virtual bool paintRegisterCellSetup(QPainter* painter, int& row, int& col, QRect& cellRect, QRect& textRect, QColorGroup& cg, QBrush& brush);
+
+ bool isSelectable(void) const { return true; }
+ bool canHaveFocus(void) const { return true; }
+ virtual bool isScheduled(void) const { return true; }
+
+ virtual int sortSamePostDate(void) const { return 4; }
+
+// virtual void paintRegisterGrid(QPainter* painter, int row, int col, const QRect& r, const QColorGroup& cg) const;
+
+// void registerCellText(QString& txt, int& align, int row, int col, QPainter* painter = 0);
+
+private:
+ unsigned int m_drawCounter;
+};
+
+}; // namespace
+
+#endif
+// vim:cin:si:ai:et:ts=2:sw=2:
+