Slicer  4.11
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
qSlicerExtensionsRestoreWidget.h
Go to the documentation of this file.
1 
2 #ifndef __qSlicerExtensionsRestoreWidget_h
3 #define __qSlicerExtensionsRestoreWidget_h
4 
5 // CTK includes
6 #include <ctkErrorLogLevel.h>
7 
8 // Qt includes
9 #include <QWidget>
10 #include <QVariant>
11 
12 // QtGUI includes
13 #include "qSlicerBaseQTGUIExport.h"
14 
15 class qSlicerExtensionsRestoreWidgetPrivate;
17 
18 class Q_SLICER_BASE_QTGUI_EXPORT qSlicerExtensionsRestoreWidget
19  : public QWidget
20 {
21  Q_OBJECT
22  Q_PROPERTY(QString searchText READ searchText WRITE setSearchText)
23 public:
25  typedef QWidget Superclass;
26 
28  explicit qSlicerExtensionsRestoreWidget(QWidget* parent = nullptr);
29 
32 
33  Q_INVOKABLE qSlicerExtensionsManagerModel* extensionsManagerModel()const;
34  Q_INVOKABLE void setExtensionsManagerModel(qSlicerExtensionsManagerModel* model);
35 
37  QString searchText()const;
38 
39  // Actions
40  QAction* selectAllAction() const;
41  QAction* deselectAllAction() const;
42  QAction* installSelectedAction() const;
43 
44  // Events
45  void changeEvent(QEvent* e) override;
46  void showEvent(QShowEvent* event) override;
47 
49  int pendingOperationsCount() const;
50 
51 public slots:
52  void setSearchText(const QString& newText);
53 
54 protected slots :
55  void onSelectAllExtensionsTriggered();
56  void onDeselectAllExtensionsTriggered();
57  void onInstallSelectedExtensionsTriggered();
58  void onCheckOnStartupChanged(int state);
59  void onSilentInstallOnStartupChanged(int state);
60  void onProgressChanged(const QString& extensionName, qint64 received, qint64 total);
61  void onInstallationFinished(QString extensionName);
62  void onExtensionHistoryGatheredOnStartup(const QVariantMap&);
63 
64 protected:
65  QScopedPointer<qSlicerExtensionsRestoreWidgetPrivate> d_ptr;
66 
67 private:
68  Q_DECLARE_PRIVATE(qSlicerExtensionsRestoreWidget);
69  Q_DISABLE_COPY(qSlicerExtensionsRestoreWidget);
70 };
71 
72 #endif
QScopedPointer< qSlicerExtensionsRestoreWidgetPrivate > d_ptr