pqComparativeCueWidget.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 pqComparativeCueWidget_h
5 #define pqComparativeCueWidget_h
6 
7 #include "pqComponentsModule.h"
8 #include "pqTimer.h"
9 #include "vtkSmartPointer.h"
10 #include <QTableWidget>
11 
14 class vtkSMProxy;
15 
21 class PQCOMPONENTS_EXPORT pqComparativeCueWidget : public QTableWidget
22 {
23  Q_OBJECT
24  typedef QTableWidget Superclass;
25 
26 public:
27  pqComparativeCueWidget(QWidget* parent = nullptr);
28  ~pqComparativeCueWidget() override;
29 
33  void setCue(vtkSMProxy*);
35 
36  QSize size() const { return this->Size; }
37 
38  // Returns if this cue can accept more than 1 value as a parameter value.
39  bool acceptsMultipleValues() const;
40 
41 public Q_SLOTS: // NOLINT(readability-redundant-access-specifiers)
45  void setSize(int w, int h)
46  {
47  this->Size = QSize(w, h);
48  this->updateGUIOnIdle();
49  }
50 
51 Q_SIGNALS:
52  // triggered every time the user changes the values.
53  void valuesChanged();
54 
55 protected Q_SLOTS:
59  void updateGUI();
60 
61  void updateGUIOnIdle() { this->IdleUpdateTimer.start(); }
62 
63  void onSelectionChanged() { this->SelectionChanged = true; }
64 
65  void onCellChanged(int x, int y);
66 
67 protected: // NOLINT(readability-redundant-access-specifiers)
72  void mouseReleaseEvent(QMouseEvent* evt) override;
73 
74  void editRange();
75 
76 private:
77  Q_DISABLE_COPY(pqComparativeCueWidget)
78 
79  vtkEventQtSlotConnect* VTKConnect;
80  bool InUpdateGUI;
81  bool SelectionChanged;
82  pqTimer IdleUpdateTimer;
83  QSize Size;
85 };
86 
87 #endif
#define PQCOMPONENTS_EXPORT
cue used for parameter animation by the comparative view.
pqComparativeCueWidget is designed to be used by pqComparativeVisPanel to show/edit the values for an...
void setSize(int w, int h)
Set the comparative grid size.
proxy for a VTK object(s) on a server
Definition: vtkSMProxy.h:140