Slicer  4.10
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
qSlicerExtensionsManageWidget.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 __qSlicerExtensionsManageWidget_h
22 #define __qSlicerExtensionsManageWidget_h
23 
24 // Qt includes
25 #include <QListWidget>
26 #include <QUrl>
27 
28 // QtGUI includes
29 #include "qSlicerBaseQTGUIExport.h"
30 
31 class qSlicerExtensionsItemDelegate;
33 class qSlicerExtensionsManageWidgetPrivate;
34 
35 class Q_SLICER_BASE_QTGUI_EXPORT qSlicerExtensionsManageWidget
36  : public QListWidget
37 {
38  Q_OBJECT
39 public:
41  typedef QListWidget Superclass;
42 
44  explicit qSlicerExtensionsManageWidget(QWidget* parent = 0);
45 
48 
49  Q_INVOKABLE qSlicerExtensionsManagerModel* extensionsManagerModel()const;
50  Q_INVOKABLE void setExtensionsManagerModel(qSlicerExtensionsManagerModel* model);
51 
52 signals:
53  void linkActivated(const QUrl& link);
54 
55 public slots:
56  void displayExtensionDetails(const QString& extensionName);
57 
58 protected slots:
59  void setExtensionEnabled(const QString& extensionName);
60  void setExtensionDisabled(const QString& extensionName);
61  void setExtensionUpdateAvailable(const QString& extensionName);
62  void scheduleExtensionForUninstall(const QString& extensionName);
63  void cancelExtensionScheduledForUninstall(const QString& extensionName);
64  void scheduleExtensionForUpdate(const QString& extensionName);
65  void cancelExtensionScheduledForUpdate(const QString& extensionName);
66  void onModelUpdated();
67  void onIconDownloadComplete(const QString& extensionName);
68  void onLinkActivated(const QString& link);
69  void onExtensionInstalled(const QString& extensionName);
70  void onExtensionScheduledForUninstall(const QString& extensionName);
71  void onExtensionCancelledScheduleForUninstall(const QString& extensionName);
72  void setExtensionUpdateScheduled(const QString& extensionName);
73  void setExtensionUpdateCanceled(const QString& extensionName);
74  void setExtensionUpdateDownloadProgress(
75  const QString& extensionName, qint64 received, qint64 total);
76  void onModelExtensionEnabledChanged(const QString& extensionName, bool enabled);
77 
78 protected:
79  QScopedPointer<qSlicerExtensionsManageWidgetPrivate> d_ptr;
80 
81 private:
82  Q_DECLARE_PRIVATE(qSlicerExtensionsManageWidget);
83  Q_DISABLE_COPY(qSlicerExtensionsManageWidget);
84 
85  friend class qSlicerExtensionsItemDelegate;
86 };
87 
88 #endif
89 
QScopedPointer< qSlicerExtensionsManageWidgetPrivate > d_ptr
QListWidget Superclass
Superclass typedef.