Slicer  5.1
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
qSlicerModuleFinderDialog.h
Go to the documentation of this file.
1 /*==============================================================================
2 
3  Program: 3D Slicer
4 
5  Copyright (c) Kitware Inc.
6 
7  See COPYRIGHT.txt
8  or http://www.slicer.org/copyright/copyright.txt for details.
9 
10  Unless required by applicable law or agreed to in writing, software
11  distributed under the License is distributed on an "AS IS" BASIS,
12  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  See the License for the specific language governing permissions and
14  limitations under the License.
15 
16 ==============================================================================*/
17 
18 #ifndef __qSlicerModuleFinderDialog_h
19 #define __qSlicerModuleFinderDialog_h
20 
21 // Qt includes
22 #include <QDialog>
23 
24 // CTK includes
25 #include <ctkPimpl.h>
26 
27 // Slicer includes
28 #include "qSlicerBaseQTGUIExport.h"
29 
31 class QItemSelection;
33 class qSlicerModuleFinderDialogPrivate;
34 
35 //------------------------------------------------------------------------------
36 class Q_SLICER_BASE_QTGUI_EXPORT qSlicerModuleFinderDialog : public QDialog
37 {
38  Q_OBJECT
39  Q_PROPERTY(QString currentModuleName READ currentModuleName)
40 public:
41  typedef QDialog Superclass;
42  qSlicerModuleFinderDialog(QWidget* parent=nullptr);
43  ~qSlicerModuleFinderDialog() override;
44 
45  QString currentModuleName() const;
46 
47  Q_INVOKABLE void setFocusToModuleTitleFilter();
48 
49 public Q_SLOTS:
51  void setFactoryManager(qSlicerAbstractModuleFactoryManager* manager);
52  void setModuleTitleFilterText(const QString& text);
53  void setSearchInAllText(bool searchAll);
54  void setShowBuiltInModules(bool show);
55  void setShowTestingModules(bool show);
56 
57 protected Q_SLOTS:
58  void onSelectionChanged(const QItemSelection& selected, const QItemSelection& deselected);
59  void onModuleTitleFilterTextChanged();
60 
61 protected:
62  QScopedPointer<qSlicerModuleFinderDialogPrivate> d_ptr;
63  bool eventFilter(QObject* target, QEvent* event) override;
64 
65 private:
66  Q_DECLARE_PRIVATE(qSlicerModuleFinderDialog);
67  Q_DISABLE_COPY(qSlicerModuleFinderDialog);
68 };
69 
70 #endif
QScopedPointer< qSlicerModuleFinderDialogPrivate > d_ptr