1 /*****************************************************************************
2  * Copyright (C) 2010 Jan Lepper <krusader@users.sourceforge.net>            *
3  * Copyright (C) 2010-2019 Krusader Krew [https://krusader.org]              *
4  *                                                                           *
5  * This file is part of Krusader [https://krusader.org].                     *
6  *                                                                           *
7  * Krusader is free software: you can redistribute it and/or modify          *
8  * it under the terms of the GNU General Public License as published by      *
9  * the Free Software Foundation, either version 2 of the License, or         *
10  * (at your option) any later version.                                       *
11  *                                                                           *
12  * Krusader is distributed in the hope that it will be useful,               *
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of            *
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the             *
15  * GNU General Public License for more details.                              *
16  *                                                                           *
17  * You should have received a copy of the GNU General Public License         *
18  * along with Krusader.  If not, see [http://www.gnu.org/licenses/].         *
19  *****************************************************************************/
20 
21 #ifndef LISTPANELACTIONS_H
22 #define LISTPANELACTIONS_H
23 
24 #include "../actionsbase.h"
25 
26 // QtWidgets
27 #include <QAction>
28 
29 class KrMainWindow;
30 class KrPanel;
31 class ListPanelFunc;
32 
33 class ListPanelActions : public ActionsBase
34 {
35     Q_OBJECT
36 public:
37     ListPanelActions(QObject *parent, KrMainWindow *mainWindow);
38 
39 public slots:
40     // set view type
41     void setView(int id);
42 
43     // navigation
44     void openLeftBookmarks();
45     void openRightBookmarks();
46     void openLeftHistory();
47     void openRightHistory();
48     void openLeftMedia();
49     void openRightMedia();
50 
51     void activePanelChanged();
52     void guiUpdated();
53 
54 public:
55     QAction *actRenameF2, *actViewFileF3, *actEditFileF4, *actCopyF5, *actMoveF6, *actNewFolderF7,
56         *actDeleteF8, *actTerminalF9;
57     QAction *actNewFileShiftF4, *actCopyDelayedF5, *actMoveDelayedShiftF6;
58     QAction *actProperties, *actPack, *actUnpack, *actTest, *actCompDirs, *actCalculate, *actSync;
59     QAction *actFTPConnect, *actFTPNewConnect, *actFTPDisconnect;
60     QAction *actLocationBar, *actJumpBack, *actSetJumpBack;
61     QAction *actCreateChecksum, *actMatchChecksum;
62     QAction *actCopy, *actCut, *actPaste;
63     QAction *actHistoryBackward, *actHistoryForward, *actDirUp, *actRoot, *actHome, *actCdToOther;
64     QAction *actSyncBrowse, *actCancelRefresh;
65 
66     QHash<int/*id*/, QAction *> setViewActions;
67 
68 protected:
69     KrPanel *activePanel();
70     KrPanel *leftPanel();
71     KrPanel *rightPanel();
72 
73     ActionGroup _gui, _func;
74 };
75 
76 #endif // LISTPANELACTIONS_H
77