pqReloadFilesReaction.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 pqReloadFilesReaction_h
5 #define pqReloadFilesReaction_h
6 
7 #include "pqReaction.h"
8 
9 class vtkSMSourceProxy;
10 
18 class PQAPPLICATIONCOMPONENTS_EXPORT pqReloadFilesReaction : public pqReaction
19 {
20  Q_OBJECT
21  typedef pqReaction Superclass;
22 
23 public:
25  {
27  AllSources
28  };
29 
30  pqReloadFilesReaction(QAction* parent = nullptr, ReloadModes reloadMode = ActiveSource);
31  ~pqReloadFilesReaction() override;
32 
36  bool reloadSources();
37 
41  static bool reload(vtkSMSourceProxy* proxy);
42 
43 protected:
44  void onTriggered() override { this->reloadSources(); }
45  void updateEnableState() override;
46 
47 private:
48  Q_DISABLE_COPY(pqReloadFilesReaction)
49 
50  ReloadModes ReloadMode;
51 };
52 
53 #endif
void onTriggered() override
Called when the action is triggered.
virtual void updateEnableState()
Definition: pqReaction.h:48
This is a superclass just to make it easier to collect all such reactions.
Definition: pqReaction.h:25
proxy for a VTK source on a server
pqReloadFilesReaction adds handler code to reload the active reader or all readers depending on the R...