Slicer  4.11
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
qSlicerExtensionsManagerWidget.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  This file was originally developed by Jean-Christophe Fillion-Robin, Kitware Inc.
17  and was partially funded by NIH grant 3P41RR013218-12S1
18 
19 ==============================================================================*/
20 
21 #ifndef __qSlicerExtensionsManagerWidget_h
22 #define __qSlicerExtensionsManagerWidget_h
23 
24 // CTK includes
25 #include <ctkErrorLogLevel.h>
26 
27 // Qt includes
28 #include <QUrl>
29 #include <QWidget>
30 
31 // QtGUI includes
32 #include "qSlicerBaseQTGUIExport.h"
33 
34 class qSlicerExtensionsManagerWidgetPrivate;
36 
37 class Q_SLICER_BASE_QTGUI_EXPORT qSlicerExtensionsManagerWidget
38  : public QWidget
39 {
40  Q_OBJECT
41 public:
43  typedef QWidget Superclass;
44 
46  explicit qSlicerExtensionsManagerWidget(QWidget* parent = nullptr);
47 
50 
51  Q_INVOKABLE qSlicerExtensionsManagerModel* extensionsManagerModel()const;
52  Q_INVOKABLE void setExtensionsManagerModel(qSlicerExtensionsManagerModel* model);
53 
55  bool confirmClose();
56 
57 public slots:
58  void refreshInstallWidget();
59 
60 protected slots:
61  void onModelUpdated();
62 
63  void onCurrentTabChanged(int index);
64 
65  void onManageLinkActivated(const QUrl& link);
66  void onManageUrlChanged(const QUrl& newUrl);
67  void onInstallUrlChanged(const QUrl& newUrl);
68  void onSearchTextChanged(const QString& newText);
69 
70  void onCheckForUpdatesTriggered();
71  void onInstallFromFileTriggered();
72  void onMessageLogged(const QString& text, ctkErrorLogLevel::LogLevels level);
73 
74 protected:
75  void timerEvent(QTimerEvent*) override;
76 
77  void processSearchTextChange();
78 
79  QScopedPointer<qSlicerExtensionsManagerWidgetPrivate> d_ptr;
80 
81 private:
82  Q_DECLARE_PRIVATE(qSlicerExtensionsManagerWidget);
83  Q_DISABLE_COPY(qSlicerExtensionsManagerWidget);
84 };
85 
86 #endif
QScopedPointer< qSlicerExtensionsManagerWidgetPrivate > d_ptr