pqPluginDialog.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-FileCopyrightText: Copyright (c) Sandia Corporation
3 // SPDX-License-Identifier: BSD-3-Clause
4 
5 #ifndef pqPluginDialog_h
6 #define pqPluginDialog_h
7 
8 #include "pqComponentsModule.h"
9 #include <QDialog>
10 #include <QPointer>
11 
12 class QTreeWidget;
13 class QTreeWidgetItem;
14 class QPushButton;
15 class pqServer;
16 class vtkPVPluginInformation;
18 
19 namespace Ui
20 {
21 class pqPluginDialog;
22 }
23 
24 class PQCOMPONENTS_EXPORT pqPluginDialog : public QDialog
25 {
26  Q_OBJECT
27  typedef QDialog Superclass;
28 
29 public:
33  pqPluginDialog(pqServer* server, QWidget* p = nullptr);
37  ~pqPluginDialog() override;
38 
39 public Q_SLOTS: // NOLINT(readability-redundant-access-specifiers)
40  void loadLocalPlugin();
41  void loadRemotePlugin();
42 
43 protected Q_SLOTS:
44  void onPluginItemChanged(QTreeWidgetItem*, int);
45  void onRefresh();
46  void refresh();
47  void onLoadSelectedRemotePlugin();
48  void onLoadSelectedLocalPlugin();
49  void onRemoveSelectedRemotePlugin();
50  void onRemoveSelectedLocalPlugin();
51  void onRemoteSelectionChanged();
52  void onLocalSelectionChanged();
53  void resizeColumn(QTreeWidgetItem*);
54 
55 protected: // NOLINT(readability-redundant-access-specifiers)
56  void refreshLocal();
57  void refreshRemote();
58  void loadPlugin(pqServer* server, bool remote);
59  void loadPlugin(pqServer* server, const QString& file, bool remote);
60  void removePlugin(pqServer* server, const QString& file, bool remote);
61 
62  void setupTreeWidget(QTreeWidget* pluginTree);
63  void populatePluginTree(
64  QTreeWidget* pluginTree, vtkPVPluginsInformation* pluginList, bool remote);
65  void addInfoNodes(
66  QTreeWidgetItem* pluginNode, vtkPVPluginsInformation* plInfo, unsigned int index, bool remote);
67  vtkPVPluginsInformation* getPluginInfo(QTreeWidgetItem* pluginNode, unsigned int& index);
68  void updateEnableState(QTreeWidget*, QPushButton* removeButton, QPushButton* loadButton);
69  void loadSelectedPlugins(QList<QTreeWidgetItem*> selItems, pqServer* server, bool remote);
70  void removeSelectedPlugins(QList<QTreeWidgetItem*> selItems, pqServer* server, bool remote);
71  QString getStatusText(vtkPVPluginsInformation* plInfo, unsigned int cc);
72 
73 private Q_SLOTS:
75 
78  void onAddPluginConfigRemote();
79  void onAddPluginConfigLocal();
81 
82 private: // NOLINT(readability-redundant-access-specifiers)
84 
87  void addPluginConfigFile(bool remote);
88  void addPluginConfigFile(const QString& config, bool remote);
90 
91  QScopedPointer<Ui::pqPluginDialog> Ui;
92  pqServer* Server;
93  bool LoadingMultiplePlugins;
94 };
95 
96 #endif
#define PQCOMPONENTS_EXPORT
information about plugins tracked by vtkPVPluginTracker.
index
pqServer (should be renamed to pqSession) is a pqServerManagerModelItem subclass that represents a vt...
Definition: pqServer.h:35