SMTK  @SMTK_VERSION@
Simulation Modeling Tool Kit
qtSelectorView.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 
11 #ifndef smtk_extension_qtSelectorView_h
12 #define smtk_extension_qtSelectorView_h
13 
14 #include "smtk/extension/qt/Exports.h"
15 #include "smtk/extension/qt/qtBaseAttributeView.h"
16 
44 
45 namespace smtk
46 {
47 namespace extension
48 {
49 class SMTKQTEXT_EXPORT qtSelectorView : public qtBaseAttributeView
50 {
51  Q_OBJECT
52 
53 public:
55 
56  static qtBaseView* createViewWidget(const smtk::view::Information& info);
58  ~qtSelectorView() override;
59 
60  void getChildView(const std::string& viewType, QList<qtBaseView*>& views);
61  qtBaseView* getChildView(int pageIndex);
62 
63  virtual void addChildView(qtBaseView*, int viewEnumIndex);
64  virtual void clearChildViews();
65  const QList<qtBaseView*>& childViews() const;
66  //Returns true if the view does not contain any information to display
67  bool isEmpty() const override;
68  bool isValid() const override;
69 public Q_SLOTS:
70  void updateUI() override;
71  void showAdvanceLevelOverlay(bool show) override;
72  void updateModelAssociation() override;
73  void onShowCategory() override;
74  void selectionChanged();
75  void refreshSelector();
76 
77 protected:
78  void createWidget() override;
79  bool createSelector();
80  bool createChildren();
81 
82 private:
83  qtSelectorViewInternals* m_internals;
84 
85 }; // class
86 }; // namespace extension
87 }; // namespace smtk
88 
89 #endif
smtk
The main namespace for the Simulation Modeling Tool Kit (SMTK).
Definition: doc.h:33
smtk::extension::qtBaseAttributeView
Definition: qtBaseAttributeView.h:29
smtk::extension::qtBaseView
A base class for all view types implemented using Qt.
Definition: qtBaseView.h:46
smtk::extension::qtSelectorView
Definition: qtSelectorView.h:49
smtk::view::Information
A class for information passed to views during initialization.
Definition: Information.h:32
qtSelectorViewInternals
Definition: qtSelectorView.cxx:40
smtkTypenameMacro
#define smtkTypenameMacro(...)
Add typedefs to a class for identifcation.
Definition: SharedFromThis.h:98