File indexing completed on 2024-05-19 16:16:48
0001 /* 0002 SPDX-FileCopyrightText: 2006-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 GROUPMARKERS_H 0008 #define GROUPMARKERS_H 0009 0010 // ---------------------------------------------------------------------------- 0011 // QT Includes 0012 0013 // ---------------------------------------------------------------------------- 0014 // KDE Includes 0015 0016 // ---------------------------------------------------------------------------- 0017 // Project Includes 0018 0019 #include "groupmarker.h" 0020 0021 namespace eWidgets { 0022 enum class SortField; 0023 namespace Transaction { 0024 enum class Column; 0025 } 0026 namespace Register { 0027 enum class DetailColumn; 0028 } 0029 } 0030 namespace eMyMoney { 0031 namespace Account { 0032 enum class Type; 0033 } 0034 } 0035 0036 namespace KMyMoneyRegister 0037 { 0038 class RegisterItem; 0039 0040 class TypeGroupMarkerPrivate; 0041 class TypeGroupMarker : public GroupMarker 0042 { 0043 Q_DISABLE_COPY(TypeGroupMarker) 0044 0045 public: 0046 explicit TypeGroupMarker(Register* getParent, eWidgets::eRegister::CashFlowDirection dir, eMyMoney::Account::Type accType); 0047 ~TypeGroupMarker() override; 0048 0049 eWidgets::eRegister::CashFlowDirection sortType() const override; 0050 0051 private: 0052 Q_DECLARE_PRIVATE(TypeGroupMarker) 0053 }; 0054 0055 class PayeeGroupMarker : public GroupMarker 0056 { 0057 Q_DISABLE_COPY(PayeeGroupMarker) 0058 0059 public: 0060 explicit PayeeGroupMarker(Register* getParent, const QString& name); 0061 ~PayeeGroupMarker() override; 0062 0063 const QString& sortPayee() const override; 0064 }; 0065 0066 class CategoryGroupMarker : public GroupMarker 0067 { 0068 Q_DISABLE_COPY(CategoryGroupMarker) 0069 0070 public: 0071 explicit CategoryGroupMarker(Register* getParent, const QString& category); 0072 ~CategoryGroupMarker() override; 0073 0074 const QString& sortCategory() const override; 0075 const QString sortSecurity() const override; 0076 const char* className() override; 0077 }; 0078 0079 class ReconcileGroupMarkerPrivate; 0080 class ReconcileGroupMarker : public GroupMarker 0081 { 0082 Q_DISABLE_COPY(ReconcileGroupMarker) 0083 0084 public: 0085 explicit ReconcileGroupMarker(Register* getParent, eMyMoney::Split::State state); 0086 ~ReconcileGroupMarker() override; 0087 0088 eMyMoney::Split::State sortReconcileState() const override; 0089 0090 private: 0091 Q_DECLARE_PRIVATE(ReconcileGroupMarker) 0092 }; 0093 0094 } // namespace 0095 0096 #endif