File indexing completed on 2024-05-19 05:08:36
0001 /* 0002 SPDX-FileCopyrightText: 2002-2018 Thomas Baumgart <tbaumgart@kde.org> 0003 SPDX-FileCopyrightText: 2017-2018 Łukasz Wojniłowicz <lukasz.wojnilowicz@gmail.com> 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #ifndef KTRANSACTIONFILTER_H 0008 #define KTRANSACTIONFILTER_H 0009 0010 #include "kmm_widgets_export.h" 0011 0012 // ---------------------------------------------------------------------------- 0013 // QT Includes 0014 0015 #include <QWidget> 0016 0017 // ---------------------------------------------------------------------------- 0018 // KDE Includes 0019 0020 // ---------------------------------------------------------------------------- 0021 // Project Includes 0022 0023 class QTreeWidgetItem; 0024 class MyMoneyTransactionFilter; 0025 class KMyMoneyAccountSelector; 0026 class MyMoneyReport; 0027 class DateRangeDlg; 0028 0029 /** 0030 * @author Thomas Baumgart 0031 * @author Łukasz Wojniłowicz 0032 */ 0033 0034 class KTransactionFilterPrivate; 0035 class KMM_WIDGETS_EXPORT KTransactionFilter : public QWidget 0036 { 0037 Q_OBJECT 0038 Q_DISABLE_COPY(KTransactionFilter) 0039 0040 public: 0041 /** 0042 @param withEquityAccounts set to false to hide equity accounts in account page 0043 */ 0044 explicit KTransactionFilter(QWidget *parent = nullptr, bool withEquityAccounts = false, bool withInvestments = false, bool withDataTab = true); 0045 ~KTransactionFilter(); 0046 0047 MyMoneyTransactionFilter setupFilter(); 0048 void resetFilter(MyMoneyReport& rep); 0049 KMyMoneyAccountSelector* categoriesView(); 0050 DateRangeDlg* dateRange(); 0051 0052 /** 0053 * This slot opens the detailed help page in khelpcenter. The 0054 * anchor for the information is taken from m_helpAnchor. 0055 */ 0056 void slotShowHelp(); 0057 void slotReset(); 0058 0059 private Q_SLOTS: 0060 void slotUpdateSelections(); 0061 0062 void slotAmountSelected(); 0063 void slotAmountRangeSelected(); 0064 0065 void slotSelectAllPayees(); 0066 void slotDeselectAllPayees(); 0067 0068 void slotSelectAllTags(); 0069 void slotDeselectAllTags(); 0070 0071 void slotNrSelected(); 0072 void slotNrRangeSelected(); 0073 0074 Q_SIGNALS: 0075 0076 /** 0077 * This signal is sent out when a selection has been made. It is 0078 * used to control the state of the Search button. 0079 * The Search button is only active when a selection has been made 0080 * (i.e. notEmpty == true) 0081 */ 0082 void selectionNotEmpty(bool); 0083 0084 private: 0085 Q_DECLARE_PRIVATE(KTransactionFilter) 0086 KTransactionFilterPrivate * const d_ptr; 0087 }; 0088 0089 #endif