pqPipelineContextMenuBehavior.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 #ifndef pqPipelineContextMenuBehavior_h
5 #define pqPipelineContextMenuBehavior_h
6 
8 #include "vtkType.h"
9 #include <QList> // needed for QList.
10 #include <QObject>
11 #include <QPoint> // needed for QPoint.
12 #include <QPointer>
13 
17 class pqView;
18 class QAction;
19 class QMenu;
20 
30 {
31  Q_OBJECT
32  typedef QObject Superclass;
33 
34 public:
35  pqPipelineContextMenuBehavior(QObject* parent = nullptr);
37 
38 protected Q_SLOTS:
39 
44  void onViewAdded(pqView*);
45 
46 protected: // NOLINT(readability-redundant-access-specifiers)
57  virtual void buildMenu(pqDataRepresentation* repr, unsigned int blockIndex, int rank);
58 
65  bool eventFilter(QObject* caller, QEvent* e) override;
66 
67  QMenu* Menu;
68  QPoint Position;
69 
70 private:
71  Q_DISABLE_COPY(pqPipelineContextMenuBehavior)
72 };
73 
74 #endif
pqDataRepresentation is the superclass for a display for a pqPipelineSource i.e.
This behavior manages showing up of a context menu with sensible pipeline related actions for changin...
This is PQ representation for a single display.
#define PQAPPLICATIONCOMPONENTS_EXPORT
This is a PQ abstraction of a generic view module.
Definition: pqView.h:26
Interface class for plugins that add a context menu to pqViews.