/* SPDX-FileCopyrightText: 2004 Esben Mose Hansen SPDX-FileCopyrightText: Andrew Stanley-Jones SPDX-License-Identifier: GPL-2.0-or-later */ #pragma once #include #include #include #include "klipper_export.h" class HistoryItem; class HistoryModel; class QAction; class KLIPPER_EXPORT HistoryCycler : public QObject { Q_OBJECT public: explicit HistoryCycler(QObject *parent); ~HistoryCycler() override; /** * @return next item in cycle, or null if at end */ std::shared_ptr nextInCycle() const; /** * @return previous item in cycle, or null if at top */ std::shared_ptr prevInCycle() const; /** * Cycle to next item */ void cycleNext(); /** * Cycle to prev item */ void cyclePrev(); private: std::shared_ptr m_model; QByteArray m_cycleStartUuid; };