install_dialog.py¶
Overview¶
This file contains 5 documented elements.
Classes¶
InstallDialog¶
No description available.
A modal QDialog subclass that displays a progress interface for sequentially installing a list of packages. Upon initialization, it renders a status label and a QProgressBar, then immediately spawns a background thread to execute the installation of each package via install(), updating the label and progress bar after each step. Once all packages have been processed, the dialog sets the label to "Installation complete" and closes itself by calling self.accept().
Inherits from: QDialog
Methods¶
init(self, packages)¶
No description available.
Initializes an InstallDialog instance by calling the parent QDialog constructor and storing the provided packages argument as an instance attribute. After initialization, calls initUI() to set up the dialog's user interface components.
Parameters:
- packages — The packages value assigned to self.packages.
initUI(self)¶
No description available.
Initializes and configures the user interface for the package installer dialog. It constructs a vertical layout containing a QLabel displaying the text "Installing required packages..." and a QProgressBar, sets the window title to "Package Installer", and positions the window at coordinates (300, 300) with a size of 300x100 pixels. After rendering the widget via show(), it spawns a background thread to execute the install_packages method.
install_packages(self)¶
Iterates over the list of packages stored in self.packages, updating the dialog label with the current package name and advancing the progress bar value proportionally for each step. Calls install(package) for each package in sequence. Upon completion, sets the label text to "Installation complete" and closes the dialog by calling self.accept().
Functions¶
show_install_dialog(packages)¶
No description available.
Creates an InstallDialog instance with the provided packages argument and displays it as a modal dialog by calling exec(). This function serves as a convenience wrapper for constructing and immediately executing the installation dialog. It takes no return value.
Parameters:
- packages