X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/39fcc8945051365ae240e0bf92fcb3403d77caed..d0898592a17d14fc8d48fc5cba71f3d57f0a1856:/src/dolphinremoveaction.h diff --git a/src/dolphinremoveaction.h b/src/dolphinremoveaction.h index f9a1b98be..7c3b49279 100644 --- a/src/dolphinremoveaction.h +++ b/src/dolphinremoveaction.h @@ -1,32 +1,20 @@ -/*************************************************************************** - * Copyright (C) 2013 by Dawit Alemayehu + * SPDX-FileCopyrightText: 2017 Elvis Angelaccio + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef DOLPHINREMOVEACTION_H #define DOLPHINREMOVEACTION_H #include "dolphin_export.h" +#include + #include #include -#include - /** * A QAction that manages the delete based on the current state of * the Shift key or the parameter passed to update. @@ -38,11 +26,20 @@ class DOLPHIN_EXPORT DolphinRemoveAction : public QAction { Q_OBJECT public: + + enum class ShiftState { + Unknown, + Pressed, + Released + }; + DolphinRemoveAction(QObject* parent, KActionCollection* collection); + /** - * Updates this action key based on the state of the Shift key. + * Updates this action key based on @p shiftState. + * Default value is QueryShiftState, meaning it will query QGuiApplication::modifiers(). */ - void update(); + void update(ShiftState shiftState = ShiftState::Unknown); private Q_SLOTS: void slotRemoveActionTriggered();