fix: avoid create menu actions everytime when trigger context menu.
fix the minor memory leak issue, also bring some possibility to implement custom keybinding. And oops I also did another feature in this commit.. Now we are able to set mouse wheel behavior in config dialog.
This commit is contained in:
30
app/actionmanager.h
Normal file
30
app/actionmanager.h
Normal file
@ -0,0 +1,30 @@
|
||||
#ifndef ACTIONMANAGER_H
|
||||
#define ACTIONMANAGER_H
|
||||
|
||||
#include <QAction>
|
||||
|
||||
class MainWindow;
|
||||
|
||||
class ActionManager
|
||||
{
|
||||
public:
|
||||
ActionManager();
|
||||
~ActionManager();
|
||||
|
||||
void setupAction(MainWindow * mainWindow);
|
||||
void retranslateUi(MainWindow *MainWindow);
|
||||
void setupShortcuts();
|
||||
|
||||
public:
|
||||
QAction *actionCopyPixmap;
|
||||
QAction *actionCopyFilePath;
|
||||
QAction *actionPaste;
|
||||
QAction *actionToggleStayOnTop;
|
||||
QAction *actionToggleProtectMode;
|
||||
QAction *actionSettings;
|
||||
QAction *actionHelp;
|
||||
QAction *actionProperties;
|
||||
QAction *actionQuitApp;
|
||||
};
|
||||
|
||||
#endif // ACTIONMANAGER_H
|
Reference in New Issue
Block a user