File indexing completed on 2024-05-12 16:43:57
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 FANCYDATEGROUPMARKERS_H 0008 #define FANCYDATEGROUPMARKERS_H 0009 0010 // ---------------------------------------------------------------------------- 0011 // QT Includes 0012 0013 // ---------------------------------------------------------------------------- 0014 // KDE Includes 0015 0016 // ---------------------------------------------------------------------------- 0017 // Project Includes 0018 0019 #include "fancydategroupmarker.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 Register; 0039 0040 class StatementGroupMarkerPrivate; 0041 class StatementGroupMarker : public FancyDateGroupMarker 0042 { 0043 Q_DISABLE_COPY(StatementGroupMarker) 0044 0045 public: 0046 explicit StatementGroupMarker(Register* getParent, eWidgets::eRegister::CashFlowDirection dir, const QDate& date, const QString& txt); 0047 ~StatementGroupMarker() override; 0048 0049 eWidgets::eRegister::CashFlowDirection sortType() const override; 0050 int sortSamePostDate() const override; 0051 0052 private: 0053 Q_DECLARE_PRIVATE(StatementGroupMarker) 0054 }; 0055 0056 0057 class SimpleDateGroupMarker : public FancyDateGroupMarker 0058 { 0059 Q_DISABLE_COPY(SimpleDateGroupMarker) 0060 0061 public: 0062 explicit SimpleDateGroupMarker(Register* getParent, const QDate& date, const QString& txt); 0063 ~SimpleDateGroupMarker() override; 0064 0065 void paintRegisterCell(QPainter *painter, QStyleOptionViewItem &option, const QModelIndex &index) override; 0066 int rowHeightHint() const override; 0067 const char* className() override; 0068 }; 0069 0070 class FiscalYearGroupMarker : public FancyDateGroupMarker 0071 { 0072 Q_DISABLE_COPY(FiscalYearGroupMarker) 0073 0074 public: 0075 explicit FiscalYearGroupMarker(Register* getParent, const QDate& date, const QString& txt); 0076 ~FiscalYearGroupMarker() override; 0077 0078 const char* className() override; 0079 int sortSamePostDate() const override; 0080 }; 0081 0082 } // namespace 0083 0084 #endif