pqParaViewBehaviors.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 pqParaViewBehaviors_h
5 #define pqParaViewBehaviors_h
6 
8 
9 #include "vtkParaViewDeprecation.h" // for PARAVIEW_DEPRECATED_IN_5_13_0
10 #include "vtkSetGet.h" // for VTK_LEGACY.
11 
12 #include <QFlags>
13 #include <QObject>
14 
15 class QMainWindow;
16 
41 #define PQ_BEHAVIOR_DEFINE_METHODS(_name) \
42  static void setEnable##_name(bool val) { pqParaViewBehaviors::_name = val; } \
43  static bool enable##_name() { return pqParaViewBehaviors::_name; }
44 
45 #define PQ_BEHAVIOR_DEFINE_METHODS_LEGACY(_name) \
46  VTK_LEGACY(static void setEnable##_name(bool val) { pqParaViewBehaviors::_name = val; }); \
47  VTK_LEGACY(static bool enable##_name() { return pqParaViewBehaviors::_name; });
48 
49 #define PQ_BEHAVIOR_DECLARE_FLAG(_name) static bool _name;
50 
52 {
53  Q_OBJECT
54  typedef QObject Superclass;
55 
56 public:
57  PQ_BEHAVIOR_DEFINE_METHODS(StandardPropertyWidgets);
58  PQ_BEHAVIOR_DEFINE_METHODS(StandardViewFrameActions);
59  PQ_BEHAVIOR_DEFINE_METHODS(StandardRecentlyUsedResourceLoader);
60  PQ_BEHAVIOR_DEFINE_METHODS(DataTimeStepBehavior);
61  PQ_BEHAVIOR_DEFINE_METHODS(SpreadSheetVisibilityBehavior);
62  PQ_BEHAVIOR_DEFINE_METHODS(PipelineContextMenuBehavior);
63  PQ_BEHAVIOR_DEFINE_METHODS(BlockContentMenu);
64  PQ_BEHAVIOR_DEFINE_METHODS(ObjectPickingBehavior);
65  PQ_BEHAVIOR_DEFINE_METHODS(DefaultViewBehavior);
66  PQ_BEHAVIOR_DEFINE_METHODS(UndoRedoBehavior);
67  PQ_BEHAVIOR_DEFINE_METHODS(AlwaysConnectedBehavior);
68  PQ_BEHAVIOR_DEFINE_METHODS(CrashRecoveryBehavior);
69  PQ_BEHAVIOR_DEFINE_METHODS(AutoLoadPluginXMLBehavior);
70  PQ_BEHAVIOR_DEFINE_METHODS(PluginDockWidgetsBehavior);
71  PQ_BEHAVIOR_DEFINE_METHODS(VerifyRequiredPluginBehavior);
72  PQ_BEHAVIOR_DEFINE_METHODS(PluginActionGroupBehavior);
73  PQ_BEHAVIOR_DEFINE_METHODS(PluginToolBarBehavior);
74  PQ_BEHAVIOR_DEFINE_METHODS(CommandLineOptionsBehavior);
75  PQ_BEHAVIOR_DEFINE_METHODS(PersistentMainWindowStateBehavior);
76  PQ_BEHAVIOR_DEFINE_METHODS(CollaborationBehavior);
77  PQ_BEHAVIOR_DEFINE_METHODS(ViewStreamingBehavior);
78  PQ_BEHAVIOR_DEFINE_METHODS(PluginSettingsBehavior);
80  PQ_BEHAVIOR_DEFINE_METHODS(QuickLaunchShortcuts);
81  PQ_BEHAVIOR_DEFINE_METHODS(LockPanelsBehavior);
82  PQ_BEHAVIOR_DEFINE_METHODS(PythonShellResetBehavior);
83  PQ_BEHAVIOR_DEFINE_METHODS(CustomShortcutBehavior);
84  PQ_BEHAVIOR_DEFINE_METHODS(MainWindowEventBehavior);
85 
87 
92  PQ_BEHAVIOR_DEFINE_METHODS(UsageLoggingBehavior);
94 
96 
100  PQ_BEHAVIOR_DEFINE_METHODS(LiveSourceBehavior);
102 
104 
112  PQ_BEHAVIOR_DEFINE_METHODS(WheelNeedsFocusBehavior);
114 
115  pqParaViewBehaviors(QMainWindow* window, QObject* parent = nullptr);
116  ~pqParaViewBehaviors() override;
117 
118 private:
119  Q_DISABLE_COPY(pqParaViewBehaviors)
120 
121  PQ_BEHAVIOR_DECLARE_FLAG(StandardPropertyWidgets);
122  PQ_BEHAVIOR_DECLARE_FLAG(StandardViewFrameActions);
123  PQ_BEHAVIOR_DECLARE_FLAG(StandardRecentlyUsedResourceLoader);
124  PQ_BEHAVIOR_DECLARE_FLAG(DataTimeStepBehavior);
125  PQ_BEHAVIOR_DECLARE_FLAG(SpreadSheetVisibilityBehavior);
126  PQ_BEHAVIOR_DECLARE_FLAG(PipelineContextMenuBehavior);
127  PQ_BEHAVIOR_DECLARE_FLAG(BlockContentMenu);
128  PQ_BEHAVIOR_DECLARE_FLAG(ObjectPickingBehavior);
129  PQ_BEHAVIOR_DECLARE_FLAG(DefaultViewBehavior);
130  PQ_BEHAVIOR_DECLARE_FLAG(UndoRedoBehavior);
131  PQ_BEHAVIOR_DECLARE_FLAG(AlwaysConnectedBehavior);
132  PQ_BEHAVIOR_DECLARE_FLAG(CrashRecoveryBehavior);
133  PQ_BEHAVIOR_DECLARE_FLAG(AutoLoadPluginXMLBehavior);
134  PQ_BEHAVIOR_DECLARE_FLAG(PluginDockWidgetsBehavior);
135  PQ_BEHAVIOR_DECLARE_FLAG(VerifyRequiredPluginBehavior);
136  PQ_BEHAVIOR_DECLARE_FLAG(PluginActionGroupBehavior);
137  PQ_BEHAVIOR_DECLARE_FLAG(PluginToolBarBehavior);
138  PQ_BEHAVIOR_DECLARE_FLAG(CommandLineOptionsBehavior);
139  PQ_BEHAVIOR_DECLARE_FLAG(PersistentMainWindowStateBehavior);
140  PQ_BEHAVIOR_DECLARE_FLAG(CollaborationBehavior);
141  PQ_BEHAVIOR_DECLARE_FLAG(ViewStreamingBehavior);
142  PQ_BEHAVIOR_DECLARE_FLAG(PluginSettingsBehavior);
143  PQ_BEHAVIOR_DECLARE_FLAG(ApplyBehavior);
144  PQ_BEHAVIOR_DECLARE_FLAG(QuickLaunchShortcuts);
145  PQ_BEHAVIOR_DECLARE_FLAG(LockPanelsBehavior);
146  PQ_BEHAVIOR_DECLARE_FLAG(PythonShellResetBehavior);
147  PQ_BEHAVIOR_DECLARE_FLAG(WheelNeedsFocusBehavior);
148  PQ_BEHAVIOR_DECLARE_FLAG(LiveSourceBehavior);
149  PQ_BEHAVIOR_DECLARE_FLAG(CustomShortcutBehavior);
150  PQ_BEHAVIOR_DECLARE_FLAG(MainWindowEventBehavior);
151  PQ_BEHAVIOR_DECLARE_FLAG(UsageLoggingBehavior);
152 };
153 
154 #undef PQ_BEHAVIOR_DECLARE_FLAG
155 #undef PQ_BEHAVIOR_DEFINE_METHODS
156 
157 #endif
#define PQ_BEHAVIOR_DEFINE_METHODS(_name)
#define PQAPPLICATIONCOMPONENTS_EXPORT
creates all standard ParaView behaviourspqParaViewBehaviors creates all the behaviors used by ParaVie...
#define PQ_BEHAVIOR_DECLARE_FLAG(_name)