pqCustomViewpointsToolbar.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 pqCustomViewpointsToolbar_h
5 #define pqCustomViewpointsToolbar_h
6 
8 
9 #include <QPixmap>
10 #include <QPointer>
11 #include <QToolBar>
12 
17 class QAction;
19 
21 {
22  Q_OBJECT
23  typedef QToolBar Superclass;
24 
25 public:
27  const QString& title, pqCustomViewpointsController* controller, QWidget* parentObject = nullptr)
28  : Superclass(title, parentObject)
29  , Controller(controller)
30  , BasePixmap(64, 64)
31  {
32  this->constructor();
33  }
35  pqCustomViewpointsController* controller, QWidget* parentObject = nullptr)
36  : Superclass(parentObject)
37  , Controller(controller)
38  , BasePixmap(64, 64)
39  {
40  this->constructor();
41  }
42  pqCustomViewpointsToolbar(QWidget* parentObject = nullptr)
43  : Superclass(parentObject)
44  , Controller(nullptr)
45  , BasePixmap(64, 64)
46  {
47  this->constructor();
48  }
49  ~pqCustomViewpointsToolbar() override = default;
50 
51 public:
56  void updateCustomViewpointActions();
57 
58 protected Q_SLOTS:
63  void updateEnabledState();
64 
70  void configureCustomViewpoints();
71 
75  void applyCustomViewpoint();
76 
81  void addCurrentViewpointToCustomViewpoints();
82 
87  void setToCurrentViewpoint();
88 
92  void deleteCustomViewpoint();
93 
94 private:
95  Q_DISABLE_COPY(pqCustomViewpointsToolbar)
96  void constructor();
97 
98  pqCustomViewpointsController* Controller;
99  QPointer<QAction> PlusAction;
100  QPointer<QAction> ConfigAction;
101  QPixmap BasePixmap;
102  QPixmap PlusPixmap;
103  QPixmap ConfigPixmap;
104  QVector<QPointer<QAction>> ViewpointActions;
105 };
106 
107 #endif
#define PQAPPLICATIONCOMPONENTS_EXPORT
pqCustomViewpointsToolbar(pqCustomViewpointsController *controller, QWidget *parentObject=nullptr)
Base class for custom viewpoints controllers.
pqCustomViewpointsToolbar(QWidget *parentObject=nullptr)
pqCustomViewpointsToolbar(const QString &title, pqCustomViewpointsController *controller, QWidget *parentObject=nullptr)