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 GROUPMARKER_H 0008 #define GROUPMARKER_H 0009 0010 // ---------------------------------------------------------------------------- 0011 // QT Includes 0012 0013 // ---------------------------------------------------------------------------- 0014 // KDE Includes 0015 0016 // ---------------------------------------------------------------------------- 0017 // Project Includes 0018 0019 #include "registeritem.h" 0020 0021 namespace KMyMoneyRegister 0022 { 0023 class Register; 0024 0025 class GroupMarkerPrivate; 0026 class GroupMarker : public RegisterItem 0027 { 0028 Q_DISABLE_COPY(GroupMarker) 0029 0030 public: 0031 explicit GroupMarker(Register* getParent, const QString& txt); 0032 ~GroupMarker() override; 0033 0034 void setText(const QString& txt); 0035 QString text() const; 0036 bool isSelectable() const override; 0037 bool canHaveFocus() const override; 0038 int numRows() const; 0039 const char* className() override; 0040 bool isErroneous() const override; 0041 void paintRegisterCell(QPainter *painter, QStyleOptionViewItem &option, const QModelIndex &index) override; 0042 void paintFormCell(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) override; 0043 0044 int rowHeightHint() const override; 0045 0046 bool matches(const RegisterFilter&) const override; 0047 int sortSamePostDate() const override; 0048 void setErroneous(bool condition = true); 0049 0050 protected: 0051 GroupMarker(GroupMarkerPrivate &dd, Register *parent, const QString& txt); 0052 Q_DECLARE_PRIVATE(GroupMarker) 0053 }; 0054 0055 } // namespace 0056 0057 #endif