digiKam
dpluginaction.h
Go to the documentation of this file.
1 /* ============================================================
2  *
3  * This file is a part of digiKam project
4  * https://www.digikam.org
5  *
6  * Date : 2018-07-30
7  * Description : action container for external plugin
8  *
9  * Copyright (C) 2018-2022 by Gilles Caulier <caulier dot gilles at gmail dot com>
10  *
11  * This program is free software; you can redistribute it
12  * and/or modify it under the terms of the GNU General
13  * Public License as published by the Free Software Foundation;
14  * either version 2, or (at your option)
15  * any later version.
16  *
17  * This program is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  * GNU General Public License for more details.
21  *
22  * ============================================================ */
23 
24 #ifndef DIGIKAM_DPLUGIN_ACTION_H
25 #define DIGIKAM_DPLUGIN_ACTION_H
26 
27 // Qt includes
28 
29 #include <QString>
30 #include <QAction>
31 
32 // Local includes
33 
34 #include "digikam_export.h"
35 
36 namespace Digikam
37 {
38 
39 class DIGIKAM_EXPORT DPluginAction : public QAction
40 {
41  Q_OBJECT
42 
43 public:
44 
47  {
48  InvalidType = -1,
49 
50  Generic = 0,
51  Editor
52  };
53 
56  {
57  InvalidCat = -1,
58 
59  GenericExport = 0,
64 
70  EditorFilters
71  };
72 
73 public:
74 
75  explicit DPluginAction(QObject* const parent = nullptr);
76  ~DPluginAction() override;
77 
81  void setActionCategory(ActionCategory cat);
82  ActionCategory actionCategory() const;
83  QString actionCategoryToString() const;
84 
88  ActionType actionType() const;
89 
93  QString pluginId() const;
94 
98  QString xmlSection() const;
99 
104  QString toString() const;
105 
106  static bool pluginActionLessThan(DPluginAction* const a, DPluginAction* const b);
107 };
108 
109 } // namespace Digikam
110 
111 #endif // DIGIKAM_DPLUGIN_ACTION_H
Definition: dpluginaction.h:40
ActionCategory
Plugin action categories.
Definition: dpluginaction.h:56
@ GenericImport
Generic import action.
Definition: dpluginaction.h:60
@ EditorFile
Image Editor file action.
Definition: dpluginaction.h:65
@ GenericView
Generic View action (as Slideshow).
Definition: dpluginaction.h:63
@ EditorEnhance
Image Editor enhance action.
Definition: dpluginaction.h:67
@ EditorDecorate
Image Editor decorate action.
Definition: dpluginaction.h:69
@ GenericMetadata
Generic Metadata adjustement action.
Definition: dpluginaction.h:62
@ GenericTool
Generic processing action.
Definition: dpluginaction.h:61
@ EditorColors
Image Editor color correction action.
Definition: dpluginaction.h:66
@ EditorTransform
Image Editor transform action.
Definition: dpluginaction.h:68
ActionType
Plugin action types to resume where they can be used.
Definition: dpluginaction.h:47
Definition: datefolderview.cpp:43