pqCustomViewpointButtonDialog.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 pqCustomViewpointButtonDialog_h
5 #define pqCustomViewpointButtonDialog_h
6 
7 #include "pqComponentsModule.h"
8 
9 #include <QDialog>
10 #include <QLineEdit>
11 #include <QList>
12 #include <QPointer>
13 #include <QPushButton>
14 #include <QString>
15 #include <QStringList>
16 
17 class pqCustomViewpointButtonDialogUI;
19 
20 /*
21  * @class pqCustomViewpointDialog
22  * @brief Dialog for configuring custom view buttons.
23  *
24  * Provides the machinery for associating the current camera configuration
25  * to a custom view button, and importing or exporting all of the custom view
26  * button configurations.
27  *
28  * @section thanks Thanks
29  * This class was contributed by SciberQuest Inc.
30  *
31  * @sa pqCameraDialog
32  */
34 {
35  Q_OBJECT
36 
37 public:
41  pqCustomViewpointButtonDialog(QWidget* parent, Qt::WindowFlags f, QStringList& toolTips,
42  QStringList& configurations, QString& currentConfig);
43 
45 
49  const static QString DEFAULT_TOOLTIP;
50 
54  const static int MINIMUM_NUMBER_OF_ITEMS;
55 
59  const static int MAXIMUM_NUMBER_OF_ITEMS;
60 
65  void setToolTipsAndConfigurations(const QStringList& toolTips, const QStringList& configs);
66 
68 
73  void setToolTips(const QStringList& toolTips);
74  QStringList getToolTips();
76 
78 
83  void setConfigurations(const QStringList& configs);
84  QStringList getConfigurations();
86 
88 
91  void setCurrentConfiguration(const QString& config);
92  QString getCurrentConfiguration();
94 
95 private Q_SLOTS:
96  void appendRow();
97  void importConfigurations();
98  void exportConfigurations();
99  void clearAll();
100 
101  void assignCurrentViewpoint();
102  void deleteRow();
103 
104 private: // NOLINT(readability-redundant-access-specifiers)
105  pqCustomViewpointButtonDialog() = default;
106  QStringList Configurations;
107  QString CurrentConfiguration;
108  pqCustomViewpointButtonDialogUI* ui;
109 
110  friend class pqCustomViewpointButtonDialogUI;
111 };
112 #endif
#define PQCOMPONENTS_EXPORT
A reader for XML camera configuration.
static const int MINIMUM_NUMBER_OF_ITEMS
Constant variable that defines the minimum number of items.
static const QString DEFAULT_TOOLTIP
Constant variable that contains the default name for the tool tips.
static const int MAXIMUM_NUMBER_OF_ITEMS
Constant variable that defines the maximum number of items.