File indexing completed on 2024-05-12 16:01:55
0001 /* 0002 * SPDX-FileCopyrightText: 2018 Dmitry Kazakov <dimula73@gmail.com> 0003 * 0004 * SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #ifndef KISUNDOACTIONSUPDATEMANAGER_H 0008 #define KISUNDOACTIONSUPDATEMANAGER_H 0009 0010 #include <QObject> 0011 #include <kis_signal_auto_connection.h> 0012 0013 class QAction; 0014 class KisDocument; 0015 0016 class KisUndoActionsUpdateManager : public QObject 0017 { 0018 Q_OBJECT 0019 public: 0020 KisUndoActionsUpdateManager(QAction *undoAction, QAction *redoAction, QObject *parent = 0); 0021 0022 void setCurrentDocument(KisDocument *document); 0023 0024 public Q_SLOTS: 0025 void slotUndoTextChanged(const QString &text); 0026 void slotRedoTextChanged(const QString &text); 0027 0028 private: 0029 QAction *m_undoAction; 0030 QAction *m_redoAction; 0031 0032 KisSignalAutoConnectionsStore m_documentConnections; 0033 }; 0034 0035 #endif // KISUNDOACTIONSUPDATEMANAGER_H