summaryrefslogtreecommitdiffstats
path: root/kmymoney2/widgets/kmymoneyforecastlistviewitem.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/kmymoneyforecastlistviewitem.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/kmymoneyforecastlistviewitem.h')
-rw-r--r--kmymoney2/widgets/kmymoneyforecastlistviewitem.h65
1 files changed, 65 insertions, 0 deletions
diff --git a/kmymoney2/widgets/kmymoneyforecastlistviewitem.h b/kmymoney2/widgets/kmymoneyforecastlistviewitem.h
new file mode 100644
index 0000000..7e48945
--- /dev/null
+++ b/kmymoney2/widgets/kmymoneyforecastlistviewitem.h
@@ -0,0 +1,65 @@
+/***************************************************************************
+ kmymoneyforecastlistviewitem.h
+ -------------------
+ begin : Sun Nov 25 2007
+ copyright : (C) 2007 by Alvaro Soliverez
+ email : asoliverez@gmail.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. *
+ * *
+ ***************************************************************************/
+
+#ifndef KMYMONEYFORECASTLISTVIEWITEM_H
+#define KMYMONEYFORECASTLISTVIEWITEM_H
+
+// ----------------------------------------------------------------------------
+// QT Includes
+
+#include <qobject.h>
+
+// ----------------------------------------------------------------------------
+// KDE Includes
+
+#include <klistview.h>
+
+// ----------------------------------------------------------------------------
+// Project Includes
+
+/**
+ * This class implements a derived version of a KListViewItem that
+ * allows printing negative numbers in red
+ *
+ * @author Alvaro Soliverez
+ */
+class KMyMoneyForecastListViewItem : public KListViewItem
+{
+public:
+
+ KMyMoneyForecastListViewItem(QListView* parent, QListViewItem* after, bool isNegative);
+
+ ~KMyMoneyForecastListViewItem();
+
+ void setNegative(bool isNegative);
+
+ void setText( int column, const QString &text, const bool &negative = false );
+
+ /**
+ * use my own paint method
+ */
+ void paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int alignment);
+
+
+private:
+
+ bool m_negative;
+
+ QMap<int, QColor> m_columnsColor;
+};
+
+#endif