Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
QmitkPipInstallDialog Class Reference

Reusable dialog for installing Python packages via pip. More...

#include <QmitkPipInstallDialog.h>

Inheritance diagram for QmitkPipInstallDialog:
Collaboration diagram for QmitkPipInstallDialog:

Public Types

enum class  Mode { Install , Update }
 Whether the dialog presents a fresh install or an in-place update. More...
 

Public Member Functions

 QmitkPipInstallDialog (const mitk::PipInstallSpec &spec, QWidget *parent=nullptr, Mode mode=Mode::Install)
 
 ~QmitkPipInstallDialog () override
 

Protected Member Functions

void closeEvent (QCloseEvent *event) override
 
void showEvent (QShowEvent *event) override
 
void reject () override
 

Detailed Description

Reusable dialog for installing Python packages via pip.

Presents a simple, non-technical installation dialog with a progress bar and per-package status label. Designed for end users who do not need to see raw pip output or manage package versions.

Usage:

spec.name = "nnInteractive";
torchGroup.requirements = { "torch>=2.8.0,<2.9.0" };
torchGroup.indexUrl = "https://download.pytorch.org/whl/cu128";
spec.groups.push_back(torchGroup);
appGroup.requirements = { "nninteractive>=1.1.2,<2.0.0" };
spec.groups.push_back(appGroup);
QmitkPipInstallDialog dialog(spec, parent);
if (dialog.exec() == QDialog::Accepted) { ... }
Reusable dialog for installing Python packages via pip.
A set of packages that share the same pip options.
std::vector< std::string > requirements
Full specification for a pip installation run.
std::vector< PipInstallGroup > groups
See also
QmitkPipInstaller, mitk::PipInstallSpec

Definition at line 59 of file QmitkPipInstallDialog.h.

Member Enumeration Documentation

◆ Mode

Whether the dialog presents a fresh install or an in-place update.

Only affects user-facing wording (window title, description, button labels, success message) and hides the Advanced-settings button in Update mode. The underlying install engine is identical; an update is driven by passing –upgrade in the spec's group extra pip arguments.

Enumerator
Install 
Update 

Definition at line 71 of file QmitkPipInstallDialog.h.

Constructor & Destructor Documentation

◆ QmitkPipInstallDialog()

QmitkPipInstallDialog::QmitkPipInstallDialog ( const mitk::PipInstallSpec &  spec,
QWidget *  parent = nullptr,
Mode  mode = Mode::Install 
)
explicit

◆ ~QmitkPipInstallDialog()

QmitkPipInstallDialog::~QmitkPipInstallDialog ( )
override

Member Function Documentation

◆ closeEvent()

void QmitkPipInstallDialog::closeEvent ( QCloseEvent *  event)
overrideprotected

◆ reject()

void QmitkPipInstallDialog::reject ( )
overrideprotected

◆ showEvent()

void QmitkPipInstallDialog::showEvent ( QShowEvent *  event)
overrideprotected

The documentation for this class was generated from the following file: