VTK  9.3.20240419
vtkQtView.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-FileCopyrightText: Copyright 2009 Sandia Corporation
3 // SPDX-License-Identifier: LicenseRef-BSD-3-Clause-Sandia-USGov
15 #ifndef vtkQtView_h
16 #define vtkQtView_h
17 
18 #include "vtkView.h"
19 #include "vtkViewsQtModule.h" // For export macro
20 
21 #include <QObject> // Needed to hook into Qt
22 
23 VTK_ABI_NAMESPACE_BEGIN
24 class VTKVIEWSQT_EXPORT vtkQtView
25  : public QObject
26  , public vtkView
27 {
28  Q_OBJECT
29 public:
30  vtkTypeMacro(vtkQtView, vtkView);
31  void PrintSelf(ostream& os, vtkIndent indent) override;
32 
39  virtual QWidget* GetWidget() = 0;
40 
46  virtual void ProcessQtEvents();
47 
53 
59  virtual bool SaveImage(VTK_FILEPATH const char* fileName);
60 
61 protected:
63  ~vtkQtView() override;
64 
65 private:
66  vtkQtView(const vtkQtView&) = delete;
67  void operator=(const vtkQtView&) = delete;
68 };
69 
70 VTK_ABI_NAMESPACE_END
71 #endif
72 // VTK-HeaderTest-Exclude: vtkQtView.h
a simple class to control print indentation
Definition: vtkIndent.h:108
Superclass for Qt widget-based views.
Definition: vtkQtView.h:27
~vtkQtView() override
virtual void ProcessQtEventsNoUserInput()
Calls QApplication::processEvents(QEventLoop::ExcludeUserInputEvents).
virtual QWidget * GetWidget()=0
Get the main container of this view (a QWidget).
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual void ProcessQtEvents()
Calls QApplication::processEvents().
virtual bool SaveImage(VTK_FILEPATH const char *fileName)
Save an image.
The superclass for all views.
Definition: vtkView.h:49
#define VTK_FILEPATH