2025-07-23 21:20:34 +08:00
|
|
|
// SPDX-FileCopyrightText: 2025 Gary Wang <git@blumia.net>
|
|
|
|
|
//
|
|
|
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
|
|
|
|
|
|
#ifndef ACTIONMANAGER_H
|
|
|
|
|
#define ACTIONMANAGER_H
|
|
|
|
|
|
|
|
|
|
#include <QAction>
|
|
|
|
|
|
|
|
|
|
class MainWindow;
|
2026-07-12 21:00:11 +08:00
|
|
|
class PlaylistManager;
|
|
|
|
|
class GraphicsView;
|
2025-07-23 21:20:34 +08:00
|
|
|
|
2026-07-03 15:12:15 +08:00
|
|
|
/// Action Manager is separated from Main Window
|
|
|
|
|
/// to manage all actions specifically.
|
2025-07-23 21:20:34 +08:00
|
|
|
class ActionManager
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
explicit ActionManager() = default;
|
|
|
|
|
~ActionManager() = default;
|
|
|
|
|
|
|
|
|
|
void setupAction(MainWindow * mainWindow);
|
|
|
|
|
void setupShortcuts();
|
2026-07-12 21:00:11 +08:00
|
|
|
|
|
|
|
|
public slots:
|
|
|
|
|
void updateActionState(PlaylistManager* pm, GraphicsView* gv);
|
2025-07-23 21:20:34 +08:00
|
|
|
|
|
|
|
|
public:
|
2026-07-12 21:00:11 +08:00
|
|
|
QAction *actionCopyPixmap;
|
|
|
|
|
QAction *actionCopyFilePath;
|
|
|
|
|
|
|
|
|
|
QAction *actionPrevPicture;
|
|
|
|
|
QAction *actionNextPicture;
|
2025-07-23 21:20:34 +08:00
|
|
|
|
|
|
|
|
QAction *actionActualSize;
|
2026-07-12 21:00:11 +08:00
|
|
|
QAction *actionFitToScreen;
|
|
|
|
|
QAction *actionFitByWidth;
|
|
|
|
|
QAction *actionFitByHeight;
|
2025-07-23 21:20:34 +08:00
|
|
|
QAction *actionZoomIn;
|
|
|
|
|
QAction *actionZoomOut;
|
2026-07-12 21:00:11 +08:00
|
|
|
|
|
|
|
|
QAction *actionFlipHorizontal;
|
|
|
|
|
QAction *actionFlipVertical;
|
2025-07-23 21:20:34 +08:00
|
|
|
QAction *actionRotateClockwise;
|
|
|
|
|
QAction *actionRotateCounterClockwise;
|
|
|
|
|
|
2026-07-12 21:00:11 +08:00
|
|
|
QAction *actionToggleAvoidResetTransform;
|
|
|
|
|
QAction *actionToggleCheckerboard;
|
2025-07-23 21:20:34 +08:00
|
|
|
QAction *actionTogglePauseAnimation;
|
|
|
|
|
QAction *actionAnimationNextFrame;
|
|
|
|
|
|
|
|
|
|
QAction *actionTrash;
|
|
|
|
|
QAction *actionLocateInFileManager;
|
|
|
|
|
QAction *actionProperties;
|
2026-07-12 21:00:11 +08:00
|
|
|
|
|
|
|
|
QAction *actionSettings;
|
|
|
|
|
QAction *actionHelp;
|
2025-07-23 21:20:34 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif // ACTIONMANAGER_H
|