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 class QDoubleSpinBox;
42 
44 {
45  Q_OBJECT
46 public:
47  pqCameraDialog(QWidget* parent = nullptr, Qt::WindowFlags f = Qt::WindowFlags{});
48  ~pqCameraDialog() override;
49 
50  void SetCameraGroupsEnabled(bool enabled);
51 
55  static bool configureCustomViewpoints(QWidget* parentWidget, vtkSMRenderViewProxy* viewProxy);
56 
60  static bool addCurrentViewpointToCustomViewpoints(vtkSMRenderViewProxy* viewProxy);
61 
65  static bool applyCustomViewpoint(int CustomViewpointIndex, vtkSMRenderViewProxy* viewProxy);
66 
70  static bool deleteCustomViewpoint(int CustomViewpointIndex, vtkSMRenderViewProxy* viewProxy);
71 
75  static bool setToCurrentViewpoint(int CustomViewpointIndex, vtkSMRenderViewProxy* viewProxy);
76 
80  static QStringList CustomViewpointToolTips();
81 
85  static QStringList CustomViewpointConfigurations();
86 
87 public Q_SLOTS: // NOLINT(readability-redundant-access-specifiers)
88  void setRenderModule(pqView*);
89 
90 private Q_SLOTS:
91  // Description:
92  // Choose a file and load/save camera properties.
93  void saveCameraConfiguration();
94  void loadCameraConfiguration();
95 
96  // Description:
97  // Assign/restore the current camera properties to
98  // a custom view button.
99  void configureCustomViewpoints();
100  void applyCustomViewpoint();
101  void addCurrentViewpointToCustomViewpoints();
102  void updateCustomViewpointButtons();
103 
104  void resetViewDirectionPosX();
105  void resetViewDirectionNegX();
106  void resetViewDirectionPosY();
107  void resetViewDirectionNegY();
108  void resetViewDirectionPosZ();
109  void resetViewDirectionNegZ();
110 
111  void resetViewDirection(
112  double look_x, double look_y, double look_z, double up_x, double up_y, double up_z);
113 
114  void applyIsometricView();
115  void applyCameraRollPlus();
116  void applyCameraRollMinus();
117  void applyCameraElevationPlus();
118  void applyCameraElevationMinus();
119  void applyCameraAzimuthPlus();
120  void applyCameraAzimuthMinus();
121  void applyCameraZoomIn();
122  void applyCameraZoomOut();
123 
124  void resetRotationCenterWithCamera();
125 
126  void setInteractiveViewLinkOpacity(double value);
127  void setInteractiveViewLinkBackground(bool hideBackground);
128  void updateInteractiveViewLinkWidgets();
129 
130 protected:
131  void setupGUI();
132 
133 private:
134  pqCameraDialogInternal* Internal;
135 };
136 
137 #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