SMTK  @SMTK_VERSION@
Simulation Modeling Tool Kit
pqSMTKAttributeItemWidgetP.h
1 //=========================================================================
2 // Copyright (c) Kitware, Inc.
3 // All rights reserved.
4 // See LICENSE.txt for details.
5 //
6 // This software is distributed WITHOUT ANY WARRANTY; without even
7 // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
8 // PURPOSE. See the above copyright notice for more information.
9 //=========================================================================
10 #include "smtk/extension/paraview/widgets/pqSMTKAttributeItemWidget.h"
11 
12 #include "smtk/extension/qt/qtAttribute.h"
13 #include "smtk/extension/qt/qtBaseView.h"
14 #include "smtk/extension/qt/qtUIManager.h"
15 
16 #include "smtk/operation/Observer.h"
17 
18 #include "pqInteractivePropertyWidget.h"
19 
20 #include "vtkEventQtSlotConnect.h"
21 
22 #include <QCheckBox>
23 #include <QGridLayout>
24 #include <QLabel>
25 #include <QPointer>
26 
36 {
37 public:
38  enum class State
39  {
40  Idle,
44  };
45 
46  Internal(
48  QWidget* p,
50  Qt::Orientation orient)
51  : m_orientation(orient)
52  , m_overrideWhen(OverrideWhen::Unset)
53  , m_geometrySource(GeometrySource::BestGuess)
54  , m_fallbackStrategy(FallbackStrategy::Hide)
55  , m_state(State::Idle)
56  {
57  (void)itm;
58  (void)p;
59  (void)bview;
60  }
61 
62  // state of this item
63  QPointer<QGridLayout> m_layout;
64  QPointer<QLabel> m_label;
65  Qt::Orientation m_orientation;
66  pqInteractivePropertyWidget* m_pvwidget;
67  // pqDataRepresentation* m_pvrepr;
68  vtkNew<vtkEventQtSlotConnect> m_connector;
69  OverrideWhen m_overrideWhen;
70  GeometrySource m_geometrySource;
71  FallbackStrategy m_fallbackStrategy;
72 
73  // state of children
74  QMap<QWidget*, QPair<QLayout*, QWidget*>> m_children;
75 
76  smtk::operation::Observers::Key m_opObserver;
77  State m_state;
78 };
pqSMTKAttributeItemWidget::FallbackStrategy
FallbackStrategy
Specify how to size/place a widget.
Definition: pqSMTKAttributeItemWidget.h:53
smtk::extension::qtBaseView
A base class for all view types implemented using Qt.
Definition: qtBaseView.h:46
pqSMTKAttributeItemWidget::OverrideWhen
OverrideWhen
Specify when the widget may override values in the item.
Definition: pqSMTKAttributeItemWidget.h:44
pqSMTKAttributeItemWidget::Internal::State::UpdatingFromUI
@ UpdatingFromUI
Widget was manipulated by user.
pqSMTKAttributeItemWidget::Internal::State::UpdatingFromAttribute
@ UpdatingFromAttribute
Widget was manipulated by attribute system.
pqSMTKAttributeItemWidget::Internal::State
State
Definition: pqSMTKAttributeItemWidgetP.h:38
pqSMTKAttributeItemWidget::Internal::State::Interacting
@ Interacting
Widget is being manipulated by user; do not update item yet.
pqSMTKAttributeItemWidget::GeometrySource
GeometrySource
Specify how to size/place a widget.
Definition: pqSMTKAttributeItemWidget.h:62
pqSMTKAttributeItemWidget::Internal::State::Idle
@ Idle
Widget is not being manipulated by attribute system or user.
smtk::attribute::ItemPtr
smtk::shared_ptr< smtk::attribute::Item > ItemPtr
Definition: PublicPointerDefs.h:467
pqSMTKAttributeItemWidget::Internal
State shared by all ParaView-enabled qtItem widgets.
Definition: pqSMTKAttributeItemWidgetP.h:35