pqCameraDialog.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: pqCameraDialog.h
5 
6  Copyright (c) 2005-2008 Sandia Corporation, Kitware Inc.
7  All rights reserved.
8 
9  ParaView is a free software; you can redistribute it and/or modify it
10  under the terms of the ParaView license version 1.2.
11 
12  See License_v1.2.txt for the full ParaView license.
13  A copy of this license can be obtained by contacting
14  Kitware Inc.
15  28 Corporate Drive
16  Clifton Park, NY 12065
17  USA
18 
19 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR
23 CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
24 EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25 PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
26 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
27 LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
28 NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 
31 =========================================================================*/
32 #ifndef pqCameraDialog_h
33 #define pqCameraDialog_h
34 
35 #include "pqDialog.h"
36 
37 class pqCameraDialogInternal;
38 class pqView;
39 class pqSettings;
41 
43 {
44  Q_OBJECT
45 public:
46  pqCameraDialog(QWidget* parent = nullptr, Qt::WindowFlags f = Qt::WindowFlags{});
47  ~pqCameraDialog() override;
48 
49  void SetCameraGroupsEnabled(bool enabled);
50 
54  static bool configureCustomViewpoints(QWidget* parentWidget, vtkSMRenderViewProxy* viewProxy);
55 
59  static bool addCurrentViewpointToCustomViewpoints(vtkSMRenderViewProxy* viewProxy);
60 
64  static bool applyCustomViewpoint(int CustomViewpointIndex, vtkSMRenderViewProxy* viewProxy);
65 
69  static bool deleteCustomViewpoint(int CustomViewpointIndex, vtkSMRenderViewProxy* viewProxy);
70 
74  static bool setToCurrentViewpoint(int CustomViewpointIndex, vtkSMRenderViewProxy* viewProxy);
75 
79  static QStringList CustomViewpointToolTips();
80 
84  static QStringList CustomViewpointConfigurations();
85 
86 public Q_SLOTS:
87  void setRenderModule(pqView*);
88 
89 private Q_SLOTS:
90  // Description:
91  // Choose a file and load/save camera properties.
92  void saveCameraConfiguration();
93  void loadCameraConfiguration();
94 
95  // Description:
96  // Assign/restore the current camera properties to
97  // a custom view button.
98  void configureCustomViewpoints();
99  void applyCustomViewpoint();
100  void addCurrentViewpointToCustomViewpoints();
101  void updateCustomViewpointButtons();
102 
103  void resetViewDirectionPosX();
104  void resetViewDirectionNegX();
105  void resetViewDirectionPosY();
106  void resetViewDirectionNegY();
107  void resetViewDirectionPosZ();
108  void resetViewDirectionNegZ();
109 
110  void resetViewDirection(
111  double look_x, double look_y, double look_z, double up_x, double up_y, double up_z);
112 
113  void applyCameraRoll();
114  void applyCameraElevation();
115  void applyCameraAzimuth();
116  void applyCameraZoomIn();
117  void applyCameraZoomOut();
118 
119  void resetRotationCenterWithCamera();
120 
121  void setInteractiveViewLinkOpacity(double value);
122  void setInteractiveViewLinkBackground(bool hideBackground);
123  void updateInteractiveViewLinkWidgets();
124 
125 protected:
126  void setupGUI();
127 
128 private:
129  pqCameraDialogInternal* Internal;
130 
131  enum CameraAdjustmentType
132  {
133  Roll = 0,
134  Elevation,
135  Azimuth,
136  Zoom
137  };
138  void adjustCamera(CameraAdjustmentType enType, double value);
139 };
140 
141 #endif
#define PQCOMPONENTS_EXPORT
This is a PQ abstraction of a generic view module.
Definition: pqView.h:54
pqSettings extends QSettings to add support for following:
Definition: pqSettings.h:47
implementation for View that includes render window and renderers.
enabled
value
This is a QDialog subclass that is aware of the undo-redo sub-system.
Definition: pqDialog.h:53