MEPP2 Project
PluginDialog.hpp
Go to the documentation of this file.
1 // Copyright (c) 2012-2019 University of Lyon and CNRS (France).
2 // All rights reserved.
3 //
4 // This file is part of MEPP2; you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published
6 // by the Free Software Foundation; either version 3 of the License,
7 // or (at your option) any later version.
8 //
9 // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
10 // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
11 #pragma once
12 
13 
14 #if defined _MSC_VER
15 #pragma warning(push)
16 #pragma warning(disable : 4267) // for VS-2015 // MANDATORY when PCL is ON !!!
17 #endif
18 
19 
20 #include <QDialog>
21 #include <QIcon>
22 
23 QT_BEGIN_NAMESPACE
24 class QLabel;
25 class QPushButton;
26 //class QStringList;
27 class QTreeWidget;
28 class QTreeWidgetItem;
29 QT_END_NAMESPACE
30 
31 namespace FEVV {
32 
33 class PluginDialog : public QDialog
34 {
35  Q_OBJECT
36 
37 public:
38  PluginDialog(const QString &path,
39  const QStringList &fileNames,
40  QWidget *parent = 0);
41 
42 private:
43  void findPlugins(const QString &path, const QStringList &fileNames);
44  void populateTreeWidget(QObject *plugin, const QString &text);
45  void addItems(QTreeWidgetItem *pluginItem,
46  const char *interfaceName,
47  const QStringList &features);
48 
49  QLabel *label;
50  QTreeWidget *treeWidget;
51  QPushButton *okButton;
53  QIcon featureIcon;
54 };
55 
56 } // namespace FEVV
57 
58 
59 #ifndef Q_MOC_RUN
60 // implementation
61 #include "PluginDialog.inl"
62 #endif // Q_MOC_RUN
63 
64 
65 #if defined _MSC_VER
66 #pragma warning(pop)
67 #endif
FEVV::PluginDialog::okButton
QPushButton * okButton
Definition: PluginDialog.hpp:51
FEVV::PluginDialog::interfaceIcon
QIcon interfaceIcon
Definition: PluginDialog.hpp:52
PluginDialog.inl
FEVV::PluginDialog
Definition: PluginDialog.hpp:34
FEVV
Interfaces for plugins These interfaces will be used for different plugins.
Definition: Assert.h:16
FEVV::PluginDialog::findPlugins
void findPlugins(const QString &path, const QStringList &fileNames)
Definition: PluginDialog.inl:64
FEVV::PluginDialog::PluginDialog
PluginDialog(const QString &path, const QStringList &fileNames, QWidget *parent=0)
Definition: PluginDialog.inl:27
FEVV::PluginDialog::addItems
void addItems(QTreeWidgetItem *pluginItem, const char *interfaceName, const QStringList &features)
Definition: PluginDialog.inl:113
FEVV::PluginDialog::treeWidget
QTreeWidget * treeWidget
Definition: PluginDialog.hpp:50
FEVV::PluginDialog::label
QLabel * label
Definition: PluginDialog.hpp:49
FEVV::PluginDialog::featureIcon
QIcon featureIcon
Definition: PluginDialog.hpp:53
FEVV::PluginDialog::populateTreeWidget
void populateTreeWidget(QObject *plugin, const QString &text)
Definition: PluginDialog.inl:89