itom  4.1.0
dialogLoadedPlugins.h
1 /* ********************************************************************
2  itom software
3  URL: http://www.uni-stuttgart.de/ito
4  Copyright (C) 2020, Institut fuer Technische Optik (ITO),
5  Universitaet Stuttgart, Germany
6 
7  This file is part of itom.
8 
9  itom is free software; you can redistribute it and/or modify it
10  under the terms of the GNU Library General Public Licence as published by
11  the Free Software Foundation; either version 2 of the Licence, or (at
12  your option) any later version.
13 
14  itom is distributed in the hope that it will be useful, but
15  WITHOUT ANY WARRANTY; without even the implied warranty of
16  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library
17  General Public Licence for more details.
18 
19  You should have received a copy of the GNU Library General Public License
20  along with itom. If not, see <http://www.gnu.org/licenses/>.
21 *********************************************************************** */
22 
23 #ifndef DIALOGLOADEDPLUGINS_H
24 #define DIALOGLOADEDPLUGINS_H
25 
26 #include "../global.h"
27 
28 #include <qdialog.h>
29 #include <qlist.h>
30 #include <qcolor.h>
31 #include <qtreewidget.h>
32 #include <qfileiconprovider.h>
33 
34 #include "ui_dialogLoadedPlugins.h"
35 
36 namespace ito {
37 
38 struct PluginLoadStatus; //forward declaration
39 
40 class DialogLoadedPlugins : public QDialog
41 {
42  Q_OBJECT
43 
44  Q_PROPERTY(QColor pluginBackgroundColor READ pluginBackgroundColor WRITE setPluginBackgroundColor DESIGNABLE true);
45 
46 public:
47  DialogLoadedPlugins(QWidget *parent = NULL);
49 
50 protected:
51  void init();
52  void filter();
53  void setSortChar(int column, QTreeWidgetItem &item);
54 
55  QColor pluginBackgroundColor() const { return m_pluginBackgroundColor; }
56  void setPluginBackgroundColor(const QColor &color);
57 
58  Ui::DialogLoadedPlugins ui;
59  QList<PluginLoadStatus> m_content;
60  QList< QPair<int, QTreeWidgetItem*> > m_items;
61  QFileIconProvider *m_fileIconProvider;
62  QString m_windowTitle;
63  QString m_cmdMessage;
64  QString m_cmdWarning;
65  QString m_cmdError;
66  QString m_cmdIgnored;
67  QColor m_pluginBackgroundColor;
68 
69 private slots:
70  void on_onlyCompatibleCheck_clicked(bool /*value*/) { filter(); };
71  void on_cmdError_clicked(bool /*value*/) { filter(); };
72  void on_cmdWarning_clicked(bool /*value*/) { filter(); };
73  void on_cmdMessage_clicked(bool /*value*/) { filter(); };
74  void on_cmdIgnored_clicked(bool /*value*/) { filter(); };
75  void on_filterEdit_textChanged(const QString /*value*/) { filter(); };
76  void on_tree_itemSelectionChanged();
77 };
78 
79 } //end namespace ito
80 
81 #endif
Definition: dialogLoadedPlugins.h:40
Definition: apiFunctionsGraph.cpp:39