digiKam
dpluginconfview.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-12-31
7  * Description : configuration view 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_CONF_VIEW_H
25 #define DIGIKAM_DPLUGIN_CONF_VIEW_H
26 
27 // Qt includes
28 
29 #include <QString>
30 #include <QTreeWidgetItem>
31 #include <QTreeWidget>
32 
33 // Local includes
34 
35 #include "dpluginloader.h"
36 #include "digikam_export.h"
37 #include "dpluginaction.h"
38 
39 namespace Digikam
40 {
41 
42 class DIGIKAM_EXPORT DPluginConfView : public QTreeWidget
43 {
44  Q_OBJECT
45 
46 public:
47 
51  explicit DPluginConfView(QWidget* const parent = nullptr);
52  ~DPluginConfView() override;
53 
57  void apply();
58 
62  int actived() const;
63 
67  int count() const;
68 
72  int itemsVisible() const;
73 
77  int itemsWithVisiblyProperty() const;
78 
82  void selectAll() override;
83 
87  void clearAll();
88 
92  void setFilter(const QString& filter, Qt::CaseSensitivity cs);
93 
97  QString filter() const;
98 
99  DPlugin* plugin(QTreeWidgetItem* const item) const;
100 
101 protected:
102 
103  QTreeWidgetItem* appendPlugin(DPlugin* const);
104 
105  virtual void loadPlugins() = 0;
106 
107 Q_SIGNALS:
108 
114 
115 private:
116 
117  class Private;
118  Private* const d;
119 };
120 
121 } // namespace Digikam
122 
123 #endif // DIGIKAM_DPLUGIN_CONF_VIEW_H
Definition: dpluginconfview.h:43
virtual void loadPlugins()=0
Definition: dplugin.h:61
Definition: datefolderview.cpp:43