summaryrefslogtreecommitdiffstats
path: root/kmymoney2/views/kscheduledview.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/views/kscheduledview.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/views/kscheduledview.h')
-rw-r--r--kmymoney2/views/kscheduledview.h149
1 files changed, 149 insertions, 0 deletions
diff --git a/kmymoney2/views/kscheduledview.h b/kmymoney2/views/kscheduledview.h
new file mode 100644
index 0000000..9eac41a
--- /dev/null
+++ b/kmymoney2/views/kscheduledview.h
@@ -0,0 +1,149 @@
+/***************************************************************************
+ kscheduledview.h - description
+ -------------------
+ begin : Sun Jan 27 2002
+ copyright : (C) 2000-2002 by Michael Edwardes
+ Javier Campos Morales <[email protected]>
+ Felix Rodriguez <[email protected]>
+ Thomas Baumgart <[email protected]>
+ Kevin Tambascio <[email protected]>
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * 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 KSCHEDULEDVIEW_H
+#define KSCHEDULEDVIEW_H
+
+// ----------------------------------------------------------------------------
+// QT Includes
+
+#include <qwidget.h>
+#include <qlistview.h>
+
+// ----------------------------------------------------------------------------
+// KDE Includes
+
+class KListViewSearchLineWidget;
+
+// ----------------------------------------------------------------------------
+// Project Includes
+
+#include "kscheduledviewdecl.h"
+#include <kmymoney/mymoneyfile.h>
+#include <kmymoney/mymoneyaccount.h>
+#include "../widgets/kmymoneyscheduledcalendar.h"
+
+class KPopupMenu;
+
+/**
+ * Contains all the scheduled transactions be they bills, deposits or transfers.
+ * Encapsulates all the operations including adding, editing and deleting.
+ * Used by the KMyMoneyView class to show the view.
+ *
+ * @author Michael Edwardes 2000-2002
+ * $Id: kscheduledview.h,v 1.33 2009/03/01 19:13:08 ipwizard Exp $
+ *
+ * @short A class to encapsulate recurring transaction operations.
+ */
+class KScheduledView : public KScheduledViewDecl
+{
+ Q_OBJECT
+
+public:
+ /**
+ * Standard constructor for QWidgets.
+ */
+ KScheduledView(QWidget *parent=0, const char *name=0);
+
+ /**
+ * Standard destructor.
+ */
+ ~KScheduledView();
+
+ /**
+ * Called by KMyMoneyView.
+ */
+ void show();
+
+public slots:
+ void slotSelectSchedule(const QString& schedule);
+ void slotReloadView(void);
+
+signals:
+ void scheduleSelected(const MyMoneySchedule& schedule);
+ void openContextMenu(void);
+ void skipSchedule(void);
+ void enterSchedule(void);
+ void editSchedule(void);
+
+protected slots:
+ /**
+ * Shows the context menu when the user right clicks or presses
+ * a 'windows' key when an item is selected.
+ *
+ * @param view a pointer to the view
+ * @param item a pointer to the current selected listview item
+ * @param pos The position to popup
+ * @return none
+ **/
+ void slotListViewContextMenu(KListView* view, QListViewItem* item, const QPoint& pos);
+
+ void slotListItemExecuted(QListViewItem*, const QPoint&, int);
+
+ void slotAccountActivated(int);
+
+ void slotListViewCollapsed(QListViewItem* item);
+ void slotListViewExpanded(QListViewItem* item);
+
+ void slotBriefSkipClicked(const MyMoneySchedule& schedule, const QDate&);
+ void slotBriefEnterClicked(const MyMoneySchedule& schedule, const QDate&);
+
+ void slotTimerDone(void);
+
+ void slotSetSelectedItem(QListViewItem* item);
+
+ void slotRearrange(void);
+
+private:
+ /// The selected schedule id in the list view.
+ QString m_selectedSchedule;
+
+ /// Read config file
+ void readConfig(void);
+
+ /// Write config file
+ void writeConfig(void);
+
+ /**
+ * Refresh the view.
+ */
+ void refresh(bool full=true, const QString& schedId = QString());
+
+ /**
+ * Loads the accounts into the combo box.
+ */
+// void loadAccounts(void);
+
+ KPopupMenu *m_kaccPopup;
+ QStringList m_filterAccounts;
+ bool m_openBills;
+ bool m_openDeposits;
+ bool m_openTransfers;
+ bool m_openLoans;
+ bool m_needReload;
+
+ /**
+ * Search widget for the list
+ */
+ KListViewSearchLineWidget* m_searchWidget;
+};
+
+#endif