File indexing completed on 2024-04-28 17:06:25

0001 /*
0002     SPDX-FileCopyrightText: 2010 Jan Lepper <krusader@users.sourceforge.net>
0003     SPDX-FileCopyrightText: 2010-2022 Krusader Krew <https://krusader.org>
0004 
0005     SPDX-License-Identifier: GPL-2.0-or-later
0006 */
0007 
0008 #ifndef VIEWACTIONS_H
0009 #define VIEWACTIONS_H
0010 
0011 #include "../actionsbase.h"
0012 
0013 // QtWidgets
0014 #include <QAction>
0015 
0016 class KrView;
0017 
0018 class ViewActions : public ActionsBase
0019 {
0020     Q_OBJECT
0021 public:
0022     ViewActions(QObject *parent, KrMainWindow *mainWindow);
0023 
0024 public slots:
0025     // zoom
0026     void zoomIn();
0027     void zoomOut();
0028     void defaultZoom();
0029 
0030     // filter
0031     void allFilter();
0032     // void execFilter();
0033     void customFilter();
0034 
0035     // selection
0036     void markAll();
0037     void unmarkAll();
0038     void markGroup();
0039     void unmarkGroup();
0040     void invertSelection();
0041     void restoreSelection();
0042     void markSameBaseName();
0043     void markSameExtension();
0044 
0045     void showOptionsMenu();
0046     void saveDefaultSettings();
0047     void applySettingsToOthers();
0048     void focusPanel();
0049     void togglePreviews(bool show);
0050 
0051     void refreshActions();
0052 
0053 public:
0054     QAction *actZoomIn, *actZoomOut, *actDefaultZoom;
0055     QAction *actSelect, *actUnselect, *actSelectAll, *actUnselectAll, *actInvert, *actRestoreSelection;
0056     QAction *actMarkSameBaseName, *actMarkSameExtension;
0057     KToggleAction *actTogglePreviews;
0058 
0059 protected:
0060     KrView *view();
0061 };
0062 
0063 #endif // VIEWACTIONS_H