pqProxyAction.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-License-Identifier: BSD-3-Clause
3 
4 #ifndef pqProxyAction_h
5 #define pqProxyAction_h
6 
7 #include "pqComponentsModule.h"
8 
9 #include <QObject>
10 #include <QPointer>
11 
12 class QAction;
13 class pqOutputPort;
14 class vtkSMProxy;
15 
26 class PQCOMPONENTS_EXPORT pqProxyAction : public QObject
27 {
28  Q_OBJECT
29  typedef QObject Superclass;
30 
31 public:
32  pqProxyAction(QObject* parent, QAction* action);
33  ~pqProxyAction() override;
34 
38  QAction* GetAction();
39 
43  bool IsEnabled();
44 
48  QString GetDisplayName();
49 
53  QIcon GetIcon();
54 
59  QString GetRequirement();
60 
64  QString GetProxyName();
65 
69  QString GetProxyGroup();
70 
74  QString GetDocumentation();
75 
79  static QString GetProxyDocumentation(QAction*);
80 
84  static vtkSMProxy* GetProxyPrototype(QAction*);
85 
89  static QString GetProxyName(QAction*);
90 
94  static QString GetProxyGroup(QAction*);
95 
100  static void updateActionsState(QList<QAction*> actions);
101 
102 private:
106  static void updateActionStatus(
107  QAction* action, bool enabled, const QList<pqOutputPort*>& outputPorts);
108 
112  static QList<pqOutputPort*> getOutputPorts();
113 
114  QPointer<QAction> Action;
115 };
116 
117 #endif
pqOutputPort is a server manager model item for an output port of any pqPipelineSource item...
Definition: pqOutputPort.h:29
#define PQCOMPONENTS_EXPORT
proxy for a VTK object(s) on a server
Definition: vtkSMProxy.h:140
enabled
: a wrapper around a QAction used for proxy creation.
Definition: pqProxyAction.h:26