1 /*****************************************************************************
2  * Copyright (C) 2000 Shie Erlich <krusader@users.sourceforge.net>           *
3  * Copyright (C) 2000 Rafi Yanai <krusader@users.sourceforge.net>            *
4  * Copyright (C) 2004-2019 Krusader Krew [https://krusader.org]              *
5  *                                                                           *
6  * This file is part of Krusader [https://krusader.org].                     *
7  *                                                                           *
8  * Krusader is free software: you can redistribute it and/or modify          *
9  * it under the terms of the GNU General Public License as published by      *
10  * the Free Software Foundation, either version 2 of the License, or         *
11  * (at your option) any later version.                                       *
12  *                                                                           *
13  * Krusader is distributed in the hope that it will be useful,               *
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of            *
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the             *
16  * GNU General Public License for more details.                              *
17  *                                                                           *
18  * You should have received a copy of the GNU General Public License         *
19  * along with Krusader.  If not, see [http://www.gnu.org/licenses/].         *
20  *****************************************************************************/
21 
22 #ifndef KRACTIONS_H
23 #define KRACTIONS_H
24 
25 // QtCore
26 #include <QObject>
27 // QtWidgets
28 #include <QAction>
29 
30 #include <KWidgetsAddons/KToggleAction>
31 
32 class Krusader;
33 
34 class KrActions : public QObject
35 {
36     Q_OBJECT
37 public:
KrActions(QObject * parent)38     explicit KrActions(QObject *parent) : QObject(parent) {}
39 
40     // Actions
41     static QAction *actCompare;
42     static QAction *actCmdlinePopup, *actLocate, *actSwitchFullScreenTE;
43     static QAction *actDiskUsage, *actSavePosition;
44     static QAction *actHomeTerminal, *actProfiles;
45     static QAction *actMountMan, *actNewTool, *actSwapPanels, *actSwapSides;
46     static QAction *actKonfigurator, *actToolsSetup, *actFind;
47     static QAction *actRemoteEncoding;
48     static QAction *actSelectColorMask, *actMultiRename, *actOpenLeftBm, *actOpenRightBm, *actAddBookmark;
49     static QAction *actSplit;
50     static QAction *actCombine;
51     static QAction *actUserMenu;
52     static QAction *actManageUseractions;
53 #ifdef SYNCHRONIZER_ENABLED
54     static QAction *actSyncDirs;
55 #endif
56     static QAction *actVerticalMode;
57     static QAction *actEmptyTrash, *actTrashBin;
58     static QAction *actPopularUrls;
59     static KToggleAction *actToggleTerminal;
60     static QAction *actSelectNewerAndSingle, *actSelectNewer, *actSelectSingle,
61     *actSelectDifferentAndSingle, *actSelectDifferent;
62     static QAction *actF10Quit;
63     /** actions for setting the execution mode of commands from commanddline */
64     static QAction *actExecStartAndForget,
65     *actExecCollectSeparate, *actExecCollectTogether,
66     *actExecTerminalExternal, *actExecTerminalEmbedded;
67     static KToggleAction *actToggleFnkeys, *actToggleCmdline,
68     *actShowStatusBar, *actToggleHidden, *actCompareDirs;
69 
70     static QAction **compareArray[];
71     /** actions for setting the execution mode of commands from commanddline */
72     static QAction **execTypeArray[];
73 
74     /** JobMan toolbar actions */
75     static QAction *actJobProgress;
76     static QAction *actJobControl;
77     static QAction *actJobMode;
78     static QAction *actJobUndo;
79 
80 
81 #ifdef __KJSEMBED__
82     static QAction *actShowJSConsole;
83 #endif
84 
85     static void setupActions(Krusader *krusader);
86 };
87 
88 // krusader's actions - things krusader can do!
89 #define krHomeTerm        KrActions::actHomeTerminal   // open terminal@home dir
90 #define krRemoteEncoding  KrActions::actRemoteEncoding // remote encoding menu
91 #define krMountMan        KrActions::actMountMan       // run Mount-manager
92 #define krNewTool         KrActions::actNewTool        // Add a new tool to menu
93 #define krKonfigurator    KrActions::actKonfigurator
94 #define krToolsSetup      KrActions::actToolsSetup     // setup the tools menu
95 #define krRoot            KrActions::actRoot
96 #define krFind            KrActions::actFind           // find files
97 #define krMultiRename     KrActions::actMultiRename
98 //#define krToggleSortByExt KrActions::actToggleSortByExt// Sort by extension
99 #define krSwitchFullScreenTE KrActions::actSwitchFullScreenTE
100 #define krCmdlinePopup    KrActions::actCmdlinePopup
101 #define krSplit           KrActions::actSplit
102 #define krCombine         KrActions::actCombine
103 #define krUserMenu        KrActions::actUserMenu
104 #define krPopularUrls     KrActions::actPopularUrls
105 
106 #ifdef __KJSEMBED__
107 #define krJSConsole  KrActions::actShowJSConsole
108 #endif
109 
110 #endif
111