Slicer  4.8
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 = 0);
47 
50 
51  Q_INVOKABLE qSlicerExtensionsManagerModel* extensionsManagerModel()const;
52  Q_INVOKABLE void setExtensionsManagerModel(qSlicerExtensionsManagerModel* model);
53 
54 public slots:
55  void refreshInstallWidget();
56 
57 protected slots:
58  void onModelUpdated();
59 
60  void onCurrentTabChanged(int index);
61 
62  void onManageLinkActivated(const QUrl& link);
63  void onManageUrlChanged(const QUrl& newUrl);
64  void onInstallUrlChanged(const QUrl& newUrl);
65  void onSearchTextChanged(const QString& newText);
66 
67  void onCheckForUpdatesTriggered();
68  void onInstallFromFileTriggered();
69  void onMessageLogged(const QString& text, ctkErrorLogLevel::LogLevels level);
70 
71 protected:
72  virtual void timerEvent(QTimerEvent*);
73 
74  QScopedPointer<qSlicerExtensionsManagerWidgetPrivate> d_ptr;
75 
76 private:
77  Q_DECLARE_PRIVATE(qSlicerExtensionsManagerWidget);
78  Q_DISABLE_COPY(qSlicerExtensionsManagerWidget);
79 };
80 
81 #endif
QScopedPointer< qSlicerExtensionsManagerWidgetPrivate > d_ptr