Slicer  5.3
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 // CTK includes
35 #include <ctkErrorLogLevel.h>
36 
37 class qSlicerExtensionsManagerWidgetPrivate;
39 
40 class Q_SLICER_BASE_QTGUI_EXPORT qSlicerExtensionsManagerWidget
41  : public QWidget
42 {
43  Q_OBJECT
44 public:
46  typedef QWidget Superclass;
47 
49  explicit qSlicerExtensionsManagerWidget(QWidget* parent = nullptr);
50 
53 
54  Q_INVOKABLE qSlicerExtensionsManagerModel* extensionsManagerModel()const;
55  Q_INVOKABLE void setExtensionsManagerModel(qSlicerExtensionsManagerModel* model);
56 
58  bool confirmClose();
59 
60  bool isInBatchProcessing();
61 
62 signals:
63 
66  void inBatchProcessing(bool batch);
67 
68 public slots:
69  void refreshInstallWidget();
70 
72  void updateAutoUpdateWidgetsFromModel();
73 
75  void setFocusToSearchBox();
76 
77 protected slots:
78  void onModelUpdated();
79 
80  void onCurrentTabChanged(int index);
81 
82  void onManageLinkActivated(const QUrl& link);
83  void onManageUrlChanged(const QUrl& newUrl);
84  void onInstallUrlChanged(const QUrl& newUrl);
85  void onSearchTextChanged(const QString& newText);
86 
87  void onCheckForUpdatesTriggered();
88  void onEditBookmarksTriggered();
89  void onInstallUpdatesTriggered();
90  void onInstallBookmarkedTriggered();
91  void onInstallFromFileTriggered();
92 
93  void setAutoUpdateCheck(bool toggle);
94  void setAutoUpdateInstall(bool toggle);
95  void setAutoInstallDependencies(bool toggle);
96 
97  void onMessageLogged(const QString& text, ctkErrorLogLevel::LogLevels level);
98  void onMessagesAcknowledged();
99 
100 protected:
101  void timerEvent(QTimerEvent*) override;
102 
103  void processSearchTextChange();
104 
105  QScopedPointer<qSlicerExtensionsManagerWidgetPrivate> d_ptr;
106 
107 private:
108  Q_DECLARE_PRIVATE(qSlicerExtensionsManagerWidget);
109  Q_DISABLE_COPY(qSlicerExtensionsManagerWidget);
110 };
111 
112 #endif
Class querying and storing extensions data.
QScopedPointer< qSlicerExtensionsManagerWidgetPrivate > d_ptr