┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/itemactions/movetonewfolderitemaction.h
diff options
context:
space:
mode:
authorAhmet Hakan Çelik <[email protected]>2024-05-23 13:25:03 +0000
committerFelix Ernst <[email protected]>2024-05-23 13:25:03 +0000
commitd448f4f35d286cae45a62f5a9c1a3be81202f92b (patch)
treead4cc9c8cf2caaabacfa43af91b00fd79bba77a9 /src/itemactions/movetonewfolderitemaction.h
parent35f999f39118c71255e4f79230460a5b5e220936 (diff)
Add "Move to New Folder…" action
This commit introduces an action which creates a new folder with a name specified by the user and moves all the currently selected items there in one go. This action is implemented as a KFileItemActionPlugin which means users can disable it on Dolphin's context menu settings page. BUG: 484555
Diffstat (limited to 'src/itemactions/movetonewfolderitemaction.h')
-rw-r--r--src/itemactions/movetonewfolderitemaction.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/itemactions/movetonewfolderitemaction.h b/src/itemactions/movetonewfolderitemaction.h
new file mode 100644
index 000000000..e690a35e1
--- /dev/null
+++ b/src/itemactions/movetonewfolderitemaction.h
@@ -0,0 +1,28 @@
+/*
+ * SPDX-FileCopyrightText: 2024 Ahmet Hakan Çelik <[email protected]>
+ *
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ */
+
+#ifndef MOVETONEWFOLDERITEMACTION_H
+#define MOVETONEWFOLDERITEMACTION_H
+
+#include <KAbstractFileItemActionPlugin>
+#include <KFileItemListProperties>
+
+class QAction;
+class QWidget;
+
+class KNewFileMenu;
+
+class MoveToNewFolderItemAction : public KAbstractFileItemActionPlugin
+{
+ Q_OBJECT
+
+public:
+ MoveToNewFolderItemAction(QObject *parent);
+
+ QList<QAction *> actions(const KFileItemListProperties &fileItemInfos, QWidget *parentWidget) override;
+};
+
+#endif // MOVETONEWFOLDERITEMACTION_H