summaryrefslogtreecommitdiffstats
path: root/kmymoney2/widgets/kmymoneypriceview.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/kmymoneypriceview.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/kmymoneypriceview.h')
-rw-r--r--kmymoney2/widgets/kmymoneypriceview.h87
1 files changed, 87 insertions, 0 deletions
diff --git a/kmymoney2/widgets/kmymoneypriceview.h b/kmymoney2/widgets/kmymoneypriceview.h
new file mode 100644
index 0000000..56907ac
--- /dev/null
+++ b/kmymoney2/widgets/kmymoneypriceview.h
@@ -0,0 +1,87 @@
+/***************************************************************************
+ kmymoneypriceview.h - description
+ -------------------
+ begin : Wed Mar 24 2004
+ copyright : (C) 2004 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 KMYMONEYPRICEVIEW_H
+#define KMYMONEYPRICEVIEW_H
+
+// ----------------------------------------------------------------------------
+// QT Includes
+
+#include <qwidget.h>
+// class QListViewItem;
+
+// ----------------------------------------------------------------------------
+// KDE Includes
+
+#include <kpopupmenu.h>
+#include <klistview.h>
+
+// ----------------------------------------------------------------------------
+// Project Includes
+
+#include <kmymoney/kmymoneylistviewitem.h>
+//#include <kmymoney/mymoneymoney.h>
+#include <kmymoney/mymoneyprice.h>
+
+/**
+ * @author Thomas Baumgart
+ */
+
+class KMyMoneyPriceItem : public KMyMoneyListViewItem
+{
+public:
+ KMyMoneyPriceItem(KListView *, const MyMoneyPrice& pr);
+ ~KMyMoneyPriceItem() {}
+
+ int compare(QListViewItem *p, int col, bool ascending) const;
+
+ const MyMoneyPrice& price(void) const { return m_pr; };
+
+private:
+ MyMoneyPrice m_pr;
+};
+
+
+class KMyMoneyPriceView : public KListView
+{
+ Q_OBJECT
+public:
+ KMyMoneyPriceView(QWidget *parent=0, const char *name=0);
+ ~KMyMoneyPriceView();
+
+protected:
+ /// the resize event
+ virtual void resizeEvent(QResizeEvent*);
+
+protected slots:
+ void slotListClicked(QListViewItem* item, const QPoint&, int);
+
+private slots:
+ void slotTimerDone(void);
+
+signals:
+ void newPrice(void);
+ void deletePrice(void);
+ void editPrice(void);
+ void onlinePriceUpdate(void);
+
+private:
+ KPopupMenu* m_contextMenu;
+ bool m_showAll;
+};
+
+#endif