File indexing completed on 2024-05-12 16:44:07

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 SELECTEDTRANSACTIONS_H
0008 #define SELECTEDTRANSACTIONS_H
0009 
0010 // ----------------------------------------------------------------------------
0011 // QT Includes
0012 
0013 #include <QList>
0014 #include <QMetaType>
0015 
0016 // ----------------------------------------------------------------------------
0017 // KDE Includes
0018 
0019 // ----------------------------------------------------------------------------
0020 // Project Includes
0021 
0022 #include "selectedtransaction.h"
0023 
0024 namespace KMyMoneyRegister
0025 {
0026 class Register;
0027 
0028 class SelectedTransactions: public QList<SelectedTransaction>
0029 {
0030 public:
0031     // TODO: find out how to move this ctor out of header
0032     SelectedTransactions() {} // krazy:exclude=inline
0033     explicit  SelectedTransactions(const Register* r);
0034 
0035     /**
0036     * @return the highest warnLevel of all transactions in the list
0037     */
0038     SelectedTransaction::warnLevel_t warnLevel() const;
0039 
0040     bool canModify() const;
0041     bool canDuplicate() const;
0042 };
0043 
0044 } // namespace
0045 
0046 Q_DECLARE_METATYPE(KMyMoneyRegister::SelectedTransactions)
0047 
0048 #endif
0049