# Path: apasvo/gui/views/error.py
# def display_error_dlg(msg, additional_info=None, parent=None):


from PySide import QtCore
from PySide import QtGui
from apasvo.gui.views import error
        self.label_text = label_text
        self.cancel_button_text = cancel_button_text
        self.cancel_label_text = cancel_label_text
        self._init_ui()

    def _init_ui(self):
        self.label = QtGui.QLabel(self.label_text)
        self.pbar_widget = QtGui.QWidget(self)
        self.pbar = QtGui.QProgressBar(self.pbar_widget)
        self.pbar.setMinimum(0)
        self.pbar.setMaximum(0)
        self.button_cancel = QtGui.QPushButton(self.cancel_button_text,
                                               self.pbar_widget)
        self.hlayout = QtGui.QHBoxLayout(self.pbar_widget)
        self.hlayout.addWidget(self.pbar)
        self.hlayout.addWidget(self.button_cancel)
        self.layout = QtGui.QVBoxLayout(self)
        self.layout.addWidget(self.label)
        self.layout.addWidget(self.pbar_widget)
        self.button_cancel.clicked.connect(self.reject)

    def run(self, task):
        self.label.setText(self.label_text)
        self._task = task
        self._thread = QtCore.QThread(self)
        self._task.moveToThread(self._thread)
        self._thread.started.connect(self._task.run)
        self._task.finished.connect(self._thread.quit)
        self._task.finished.connect(self.accept)
        self._task.finished.connect(self._task.deleteLater)

# Path: apasvo/gui/views/error.py
# def display_error_dlg(msg, additional_info=None, parent=None):


# Path: apasvo/gui/views/processingdialog.py
from PySide import QtCore
from PySide import QtGui
from apasvo.gui.views import error

        self.label_text = label_text
        self.cancel_button_text = cancel_button_text
        self.cancel_label_text = cancel_label_text
        self._init_ui()

    def _init_ui(self):
        self.label = QtGui.QLabel(self.label_text)
        self.pbar_widget = QtGui.QWidget(self)
        self.pbar = QtGui.QProgressBar(self.pbar_widget)
        self.pbar.setMinimum(0)
        self.pbar.setMaximum(0)
        self.button_cancel = QtGui.QPushButton(self.cancel_button_text,
                                               self.pbar_widget)
        self.hlayout = QtGui.QHBoxLayout(self.pbar_widget)
        self.hlayout.addWidget(self.pbar)
        self.hlayout.addWidget(self.button_cancel)
        self.layout = QtGui.QVBoxLayout(self)
        self.layout.addWidget(self.label)
        self.layout.addWidget(self.pbar_widget)
        self.button_cancel.clicked.connect(self.reject)

    def run(self, task):
        self.label.setText(self.label_text)
        self._task = task
        self._thread = QtCore.QThread(self)
        self._task.moveToThread(self._thread)
        self._thread.started.connect(self._task.run)
        self._task.finished.connect(self._thread.quit)
        self._task.finished.connect(self.accept)
        self._task.finished.connect(self._task.deleteLater)

        self._task.error.connect(self.on_error)