pqConsoleWidgetEventTranslator.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 pqConsoleWidgetEventTranslator_h
5 #define pqConsoleWidgetEventTranslator_h
6 
7 #include "pqWidgetEventTranslator.h"
8 #include "pqWidgetsModule.h" // needed for EXPORT macro.
9 #include <QPointer> // needed for QPointer
10 
11 class pqConsoleWidget;
12 
17 class PQWIDGETS_EXPORT pqConsoleWidgetEventTranslator : public pqWidgetEventTranslator
18 {
19  Q_OBJECT
20  typedef pqWidgetEventTranslator Superclass;
21 
22 public:
23  pqConsoleWidgetEventTranslator(QObject* parent = nullptr);
25 
29  using Superclass::translateEvent;
30  bool translateEvent(QObject* target, QEvent* qtevent, bool& errorFlag) override;
31 
32 protected Q_SLOTS:
33  void recordCommand(const QString& text);
34 
35 private:
36  Q_DISABLE_COPY(pqConsoleWidgetEventTranslator)
37 
38  QPointer<pqConsoleWidget> CurrentObject;
39 };
40 
41 #endif
boost::graph_traits< vtkGraph *>::vertex_descriptor target(boost::graph_traits< vtkGraph *>::edge_descriptor e, vtkGraph *)
#define PQWIDGETS_EXPORT
pqConsoleWidgetEventTranslator is used to record events from pqConsoleWidget testing.
Qt widget that provides an interactive console - you can send text to the console by calling printStr...