Slicer 5.8
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
Loading...
Searching...
No Matches
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
37class qSlicerExtensionsManagerWidgetPrivate;
39
40class Q_SLICER_BASE_QTGUI_EXPORT qSlicerExtensionsManagerWidget
41 : public QWidget
42{
43 Q_OBJECT
44public:
46 typedef QWidget Superclass;
47
49 explicit qSlicerExtensionsManagerWidget(QWidget* parent = nullptr);
50
53
56
59
61
62signals:
63
66 void inBatchProcessing(bool batch);
67
68public slots:
70
73
76
77protected slots:
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
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);
99
100protected:
101 void timerEvent(QTimerEvent*) override;
102
104
105 QScopedPointer<qSlicerExtensionsManagerWidgetPrivate> d_ptr;
106
107private:
108 Q_DECLARE_PRIVATE(qSlicerExtensionsManagerWidget);
109 Q_DISABLE_COPY(qSlicerExtensionsManagerWidget);
110};
111
112#endif
Class querying and storing extensions data.
void setAutoUpdateCheck(bool toggle)
void setAutoInstallDependencies(bool toggle)
void timerEvent(QTimerEvent *) override
void onCurrentTabChanged(int index)
void onInstallUrlChanged(const QUrl &newUrl)
void inBatchProcessing(bool batch)
qSlicerExtensionsManagerWidget(QWidget *parent=nullptr)
Constructor.
void onManageUrlChanged(const QUrl &newUrl)
void onSearchTextChanged(const QString &newText)
bool confirmClose()
Shows a popup if operations are still in progress, asking if the user wants to stop them.
QScopedPointer< qSlicerExtensionsManagerWidgetPrivate > d_ptr
void onManageLinkActivated(const QUrl &link)
void setAutoUpdateInstall(bool toggle)
~qSlicerExtensionsManagerWidget() override
Destructor.
void updateAutoUpdateWidgetsFromModel()
Request update state of automatic extension update check and install checkbox states.
Q_INVOKABLE void setExtensionsManagerModel(qSlicerExtensionsManagerModel *model)
void onMessageLogged(const QString &text, ctkErrorLogLevel::LogLevels level)
Q_INVOKABLE qSlicerExtensionsManagerModel * extensionsManagerModel() const
void setFocusToSearchBox()
Set focus to search box (so that user can find a module just by start typing its name)