def test_run(self):

        if not QtWidgets.qApp:
            QtWidgets.QApplication([])

        widget = QtWidgets.QWidget()
        widget.show()

        progress = QtProgress(widget)

        progress.start(title='Test Bar',
                       text='Doing stuff',
                       min_value=100,
                       max_value=300,
                       init_value=100)

        time.sleep(.1)

        progress.update(value=150, text='Updating')

        time.sleep(.1)

        progress.add(quantum=50, text='Updating')

        time.sleep(.1)

        print("canceled? %s" % progress.canceled)

        progress.end()
Beispiel #2
0
    def stop_emulation(self):
        logger.debug("stop SIS")
        if self.sis:
            progress = QtProgress(self)
            progress.start(title="Halting", text="Wait while threads stop")
            progress.update(value=20)
            self.sis.stop()

            progress.update(value=30)
            self.sis = None

            progress.end()

        self.enable_commands(enable=True)
Beispiel #3
0
    def stop_listening(self):
        logger.debug("stop Topside")
        if self.topside:
            progress = QtProgress(self)
            progress.start(title="Halting", text="Wait while threads stop")
            progress.update(value=20)
            self.topside.stop()

            progress.update(value=30)
            self.topside.join()
            self.topside = None

            progress.end()

        self._active = False
        self.info_viewer.hide()
Beispiel #4
0
    def stop_emulation(self):
        logger.debug("stop SIS")
        if self.sis:
            progress = QtProgress(self)
            progress.start(title="Halting", text="Wait while threads stop")
            progress.update(value=20)
            self.sis.stop()

            progress.update(value=30)
            self.sis.join()
            self.sis = None

            progress.end()

        self._active = False
        self.info_viewer.hide()
Beispiel #5
0
import time
import logging
from PySide2 import QtWidgets

from hyo2.abc.app.qt_progress import QtProgress
from hyo2.abc.lib.logging import set_logging

logger = logging.getLogger(__name__)
set_logging(ns_list=["hyo2.abc"])

app = QtWidgets.QApplication([])

widget = QtWidgets.QWidget()
widget.show()

progress = QtProgress(parent=widget)

progress.start(title='Test Bar', text='Doing stuff')

time.sleep(.1)

progress.update(value=30, text='Updating')

time.sleep(.1)

print("canceled? %s" % progress.canceled)

progress.end()