Exemple #1
0
    def setupUi(self, Dialog, worker_text, show_output = False, icon=True):
        self.Dialog = Dialog
        self.Dialog.setObjectName("Dialog")

        Dialog.setWindowTitle("Lade...")
        Dialog.setStyleSheet(
            "background-color: {}; color: white".format(get_color(blue_7))
        )
        # Dialog.setSizePolicy(SizePolicy_fixed)
        # Dialog.setFixedSize(Dialog.size())
        # Dialog.setWindowFlags(QtCore.Qt.FramelessWindowHint)
        if icon == True:
            pixmap = QtGui.QPixmap(logo_path)
            Dialog.setWindowIcon(QtGui.QIcon(logo_path))
            Dialog.setWindowFlags(
                QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint
            )
        else:
            Dialog.setWindowFlags(QtCore.Qt.Dialog | QtCore.Qt.CustomizeWindowHint | QtCore.Qt.WindowTitleHint)
        # Dialog.setSizePolicy(QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed))
        gridLayout = create_new_gridlayout(Dialog)
        gridLayout.setSizeConstraint(QtWidgets.QHBoxLayout.SetFixedSize)

        if icon == True:
            pixmap = QtGui.QPixmap(logo_cria_button_path)
            # Dialog.setPixmap(pixmap.scaled(110, 110, QtCore.Qt.KeepAspectRatio))
            image = QtWidgets.QLabel(Dialog)
            image.setObjectName("image")
            image.setPixmap(pixmap.scaled(30, 30, QtCore.Qt.KeepAspectRatio))

        self.label = QtWidgets.QLabel(Dialog)
        self.label.setObjectName("label")
        self.label.setText(worker_text)
        self.label.setStyleSheet("padding: 20px")
        label_spinner = QtWidgets.QLabel(Dialog)
        self.label.setObjectName("label_spinner")
        label_spinner.setFixedSize(30, 30)
        spinner = QtWaitingSpinner(label_spinner)
        spinner.setRoundness(70.0)
        # spinner.setMinimumTrailOpacity(10.0)
        # spinner.setTrailFadePercentage(60.0)
        spinner.setNumberOfLines(15)
        spinner.setLineLength(8)
        # spinner.setLineWidth(5)
        spinner.setInnerRadius(5)
        # spinner.setRevolutionsPerSecond(2)
        spinner.setColor(QtCore.Qt.white)
        spinner.start()  # starts spinning
        self.label.setAlignment(QtCore.Qt.AlignCenter)
        if icon == True:
            gridLayout.addWidget(image, 0,0,1,1)
        gridLayout.addWidget(self.label, 0,1,1,1)
        gridLayout.addWidget(label_spinner, 0,2,1,1)
        if show_output == True:
            self.plainTextEdit = QtWidgets.QPlainTextEdit(Dialog)
            self.plainTextEdit.setReadOnly(True)
            self.plainTextEdit.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
            self.plainTextEdit.setPlainText("Creating PDF file ...")
            self.plainTextEdit.setFixedHeight(70)
            gridLayout.addWidget(self.plainTextEdit, 1,0,1,3)
    def __init__(self, *args, **kwargs):
        QDialog.__init__(self, *args, **kwargs)
        self.setLayout(QVBoxLayout())
        btn = QPushButton("Submit", self)
        btn.clicked.connect(self.submit)
        self.spinner = QtWaitingSpinner(self)

        self.layout().addWidget(btn)
        self.layout().addWidget(self.spinner)
Exemple #3
0
 def initSpinner(self):
     self.spinner = QtWaitingSpinner(self,
                                     centerOnParent=True,
                                     disableParentWhenSpinning=True)
     self.spinner.setNumberOfLines(15)
     # self.spinner.setColor(QColor(81, 4, 71))
     self.spinner.setInnerRadius(20)  # 设置内圆大小
     self.spinner.setLineLength(15)  # 设置线长
     self.spinner.setLineWidth(5)  # 设置线宽
     self.spinner.setTrailFadePercentage(80)
Exemple #4
0
 def _createSpinner(self):
     self.spinner = QtWaitingSpinner(parent=self)
     self.spinner.setRoundness(70.0)
     self.spinner.setMinimumTrailOpacity(15.0)
     self.spinner.setTrailFadePercentage(70.0)
     self.spinner.setNumberOfLines(12)
     self.spinner.setLineLength(10)
     self.spinner.setLineWidth(5)
     self.spinner.setInnerRadius(10)
     self.spinner.setRevolutionsPerSecond(1)
     self.spinner.setColor(QColor(81, 4, 71))
Exemple #5
0
    def __init__(self, reactor, parent=None):
        super(DownloadDataDialog, self).__init__(parent)
        
        self.reactor = reactor
        self.spinner = QtWaitingSpinner(self, True, True, Qt.ApplicationModal)

        tabWidget = QTabWidget(self)
        tabWidget.addTab(MyTab(tabWidget), "MyTab")

        mainLayout = QVBoxLayout()
        mainLayout.addWidget(tabWidget)
        self.setLayout(mainLayout)

        self.setWindowTitle("Download option chain data from web")
Exemple #6
0
    def initUI(self):
        self.button = QWidgets.QPushButton("Start Spinner")  # +
        self.button.clicked.connect(self.toggle_spinner)

        self.spinner = QtWaitingSpinner(self, centerOnParent=False)

        self.grid = QWidgets.QGridLayout()
        self.grid.addWidget(self.button, 0, 0)

        #        self.grid.addWidget(self.spinner,0,1)        # ---
        self.grid.addWidget(self.spinner, 0, 1, 1, 2)  # +++    <---

        self.setLayout(self.grid)
        self.show()
Exemple #7
0
    def setupUi(self, Dialog, text):
        self.Dialog = Dialog
        self.Dialog.setObjectName("Dialog")

        Dialog.setWindowTitle("Lade...")
        Dialog.setStyleSheet(
            "background-color: {}; color: white".format("rgb(47, 69, 80)")
        )

        Dialog.setWindowFlags(Qt.Dialog | Qt.CustomizeWindowHint | Qt.WindowTitleHint)
        # Dialog.setSizePolicy(QSizePolicy(QSizePolicy.Fixed, QSizePolicy.Fixed))
        horizontalLayout = QHBoxLayout(Dialog)
        horizontalLayout.setObjectName("horizontal")
        horizontalLayout.setSizeConstraint(QHBoxLayout.SetFixedSize)

        # if icon == True:
        #     pixmap = QtGui.QPixmap(logo_cria_button_path)
        #     # Dialog.setPixmap(pixmap.scaled(110, 110, Qt.KeepAspectRatio))
        #     image = QLabel(Dialog)
        #     image.setObjectName("image")
        #     image.setPixmap(pixmap.scaled(30, 30, Qt.KeepAspectRatio))

        self.label = QLabel(Dialog)
        self.label.setObjectName("label")
        self.label.setText(text)
        self.label.setStyleSheet("padding: 20px")
        label_spinner = QLabel(Dialog)
        self.label.setObjectName("label_spinner")
        label_spinner.setFixedSize(30, 30)
        spinner = QtWaitingSpinner(label_spinner)
        spinner.setRoundness(70.0)
        # spinner.setMinimumTrailOpacity(10.0)
        # spinner.setTrailFadePercentage(60.0)
        spinner.setNumberOfLines(15)
        spinner.setLineLength(8)
        # spinner.setLineWidth(5)
        spinner.setInnerRadius(5)
        # spinner.setRevolutionsPerSecond(2)
        spinner.setColor(Qt.white)
        spinner.start()  # starts spinning
        self.label.setAlignment(Qt.AlignCenter)
        # if icon == True:
        #     horizontalLayout.addWidget(image)
        horizontalLayout.addWidget(self.label)
        horizontalLayout.addWidget(label_spinner)
Exemple #8
0
    def init_ui(self):
        grid = QGridLayout()
        groupbox1 = QGroupBox()
        groupbox1_layout = QHBoxLayout()
        groupbox2 = QGroupBox()
        groupbox2_layout = QGridLayout()
        button_hbox = QHBoxLayout()
        self.setLayout(grid)
        self.setWindowTitle("QtWaitingSpinner Demo")
        self.setWindowFlags(Qt.Dialog)

        # SPINNER
        self.spinner = QtWaitingSpinner(self)

        # Spinboxes
        self.sb_roundness = QDoubleSpinBox()
        self.sb_opacity = QDoubleSpinBox()
        self.sb_fadeperc = QDoubleSpinBox()
        self.sb_lines = QSpinBox()
        self.sb_line_length = QDoubleSpinBox()
        self.sb_line_width = QDoubleSpinBox()
        self.sb_inner_radius = QDoubleSpinBox()
        self.sb_rev_s = QDoubleSpinBox()

        # set spinbox default values
        self.sb_roundness.setValue(70)
        self.sb_roundness.setRange(0, 9999)
        self.sb_opacity.setValue(15)
        self.sb_opacity.setRange(0, 9999)
        self.sb_fadeperc.setValue(70)
        self.sb_fadeperc.setRange(0, 9999)
        self.sb_lines.setValue(12)
        self.sb_lines.setRange(1, 9999)
        self.sb_line_length.setValue(10)
        self.sb_line_length.setRange(0, 9999)
        self.sb_line_width.setValue(5)
        self.sb_line_width.setRange(0, 9999)
        self.sb_inner_radius.setValue(10)
        self.sb_inner_radius.setRange(0, 9999)
        self.sb_rev_s.setValue(1)
        self.sb_rev_s.setRange(0.1, 9999)

        # Buttons
        self.btn_start = QPushButton("Start")
        self.btn_stop = QPushButton("Stop")
        self.btn_pick_color = QPushButton("Pick Color")

        # Connects
        self.sb_roundness.valueChanged.connect(self.set_roundness)
        self.sb_opacity.valueChanged.connect(self.set_opacity)
        self.sb_fadeperc.valueChanged.connect(self.set_fadeperc)
        self.sb_lines.valueChanged.connect(self.set_lines)
        self.sb_line_length.valueChanged.connect(self.set_line_length)
        self.sb_line_width.valueChanged.connect(self.set_line_width)
        self.sb_inner_radius.valueChanged.connect(self.set_inner_radius)
        self.sb_rev_s.valueChanged.connect(self.set_rev_s)

        self.btn_start.clicked.connect(self.spinner_start)
        self.btn_stop.clicked.connect(self.spinner_stop)
        self.btn_pick_color.clicked.connect(self.show_color_picker)

        # Layout adds
        groupbox1_layout.addWidget(self.spinner)
        groupbox1.setLayout(groupbox1_layout)

        groupbox2_layout.addWidget(QLabel("Roundness:"), *(1, 1))
        groupbox2_layout.addWidget(self.sb_roundness, *(1, 2))
        groupbox2_layout.addWidget(QLabel("Opacity:"), *(2, 1))
        groupbox2_layout.addWidget(self.sb_opacity, *(2, 2))
        groupbox2_layout.addWidget(QLabel("Fade Perc:"), *(3, 1))
        groupbox2_layout.addWidget(self.sb_fadeperc, *(3, 2))
        groupbox2_layout.addWidget(QLabel("Lines:"), *(4, 1))
        groupbox2_layout.addWidget(self.sb_lines, *(4, 2))
        groupbox2_layout.addWidget(QLabel("Line Length:"), *(5, 1))
        groupbox2_layout.addWidget(self.sb_line_length, *(5, 2))
        groupbox2_layout.addWidget(QLabel("Line Width:"), *(6, 1))
        groupbox2_layout.addWidget(self.sb_line_width, *(6, 2))
        groupbox2_layout.addWidget(QLabel("Inner Radius:"), *(7, 1))
        groupbox2_layout.addWidget(self.sb_inner_radius, *(7, 2))
        groupbox2_layout.addWidget(QLabel("Rev/s:"), *(8, 1))
        groupbox2_layout.addWidget(self.sb_rev_s, *(8, 2))

        groupbox2.setLayout(groupbox2_layout)

        button_hbox.addWidget(self.btn_start)
        button_hbox.addWidget(self.btn_stop)
        button_hbox.addWidget(self.btn_pick_color)

        grid.addWidget(groupbox1, *(1, 1))
        grid.addWidget(groupbox2, *(1, 2))
        grid.addLayout(button_hbox, *(2, 1))

        self.spinner.start()
        self.show()
Exemple #9
0
    def __init__(self):
        super(Main, self).__init__()

        # build UI
        self.ui = WizardUI()
        self.ui.setup_ui(self)

        # connect signals
        self.threadpool = QThreadPool()

        self.keytree_dir_dict = {
            1: {'dirname': 'Home', 'dirparent': False, 'nfiles': 78, 'cumfiles': 123,
                'childkeys': {2}, 'mtime': 1330884000.0, 'selection_state': 1, 'exclusion_state': 0,
                'description': "Partial: some contents (files and/or folders) are relevant to the collection"},
            2: {'dirname': 'Work files', 'dirparent': 1, 'nfiles': 32, 'cumfiles': 45,
                'childkeys': {3, 4}, 'mtime': 1330797600.0, 'selection_state': 1, 'exclusion_state': 0,
                'description': "Partial: some contents (files and/or folders) are relevant to the collection"},
            3: {'dirname': 'Travel photos', 'dirparent': 2, 'nfiles': 6, 'cumfiles': 6,
                'childkeys': set(), 'mtime': 1330624800.0, 'selection_state': 0, 'exclusion_state': 0,
                'description': "Unchecked: this folder is simply not relevant to the collection"},
            4: {'dirname': 'Project A', 'dirparent': 2, 'nfiles': 1, 'cumfiles': 7,
                'childkeys': {5, 6}, 'mtime': 1325527200.0, 'selection_state': 2, 'exclusion_state': 0,
                'description': "Checked: this folder is relevant to the collection"},
            5: {'dirname': 'Drafts', 'dirparent': 4, 'nfiles': 2, 'cumfiles': 2,
                'childkeys': set(), 'mtime': 1255891200.0, 'selection_state': 2, 'exclusion_state': 0,
                'description': "Checked: this folder is relevant to the collection"},
            6: {'dirname': 'Bank transfer', 'dirparent': 4, 'nfiles': 4, 'cumfiles': 4,
                'childkeys': set(), 'mtime': 1322202000.0, 'selection_state': 0, 'exclusion_state': 2,
                'description': "Excluded: this folder is excluded (e.g., it contains sensitive information/work)"},
        }

        self.demo_dir_dict = {
            1: {'dirname': 'folder 1', 'dirparent': False, 'nfiles': 78, 'cumfiles': 123,
                'childkeys': {2}, 'mtime': 1330884000.0, 'selection_state': None, 'exclusion_state': None},
            2: {'dirname': 'folder 2', 'dirparent': 1, 'nfiles': 32, 'cumfiles': 45,
                'childkeys': {3, 4}, 'mtime': 1330797600.0, 'selection_state': None, 'exclusion_state': None},
            3: {'dirname': 'folder 3', 'dirparent': 2, 'nfiles': 6, 'cumfiles': 6,
                'childkeys': set(), 'mtime': 1330624800.0, 'selection_state': None, 'exclusion_state': None},
            4: {'dirname': 'folder 4', 'dirparent': 2, 'nfiles': 1, 'cumfiles': 7,
                'childkeys': {5, 6}, 'mtime': 1325527200.0, 'selection_state': None, 'exclusion_state': None},
            5: {'dirname': 'folder 5', 'dirparent': 4, 'nfiles': 2, 'cumfiles': 2,
                'childkeys': set(), 'mtime': 1255891200.0, 'selection_state': None, 'exclusion_state': None},
            6: {'dirname': 'folder 6', 'dirparent': 4, 'nfiles': 4, 'cumfiles': 4,
                'childkeys': set(), 'mtime': 1322202000.0, 'selection_state': None, 'exclusion_state': None},
        }

        self.spinner = QtWaitingSpinner(self, True, True, Qt.ApplicationModal)
        self.spinner.setRoundness(70.0)
        self.spinner.setMinimumTrailOpacity(15.0)
        self.spinner.setTrailFadePercentage(70.0)
        self.spinner.setNumberOfLines(12)
        self.spinner.setLineLength(30)
        self.spinner.setLineWidth(10)
        self.spinner.setInnerRadius(15)
        self.spinner.setRevolutionsPerSecond(1)

        keytree = KeyTreeOperations(
            self.ui.og_tree_key, self.threadpool, self.spinner)
        tree0 = TreeOperations(
            self.ui.og_tree_0, self.threadpool, self.spinner)
        tree1 = TreeOperations(
            self.ui.og_tree_1, self.threadpool, self.spinner,
            self.ui.select_btn_1, self.ui.save_btn_1, self.ui.load_btn_1, self.ui.less_btn_1)

        keytree.load_dir_dicts(self.keytree_dir_dict, checkable=False, expand_all=True)
        tree0.load_dir_dicts(self.demo_dir_dict, expand_all=True)
        self.ui.reset_demo_btn.clicked.connect(
            lambda: tree0.refresh_treeview(tree0.og_model, tree0.og_tree, self.demo_dir_dict, expand_all=True))
        tree1.select_btn.clicked.connect(lambda: self.select_tree_root(tree1))
        tree1.save_btn.clicked.connect(lambda: self.save_collected_data(tree1))
        tree1.load_btn.clicked.connect(lambda: self.load_collected_data(tree1))
        tree1.less_btn.clicked.connect(lambda: self.expand_to_depth(tree1, 0))
        self.ui.consent_savebutton.clicked.connect(self.save_consent)
        self.ui.wizardpage1.registerField("consentbox*", self.ui.consentbox)
Exemple #10
0
    def __init__(self, val, screenwidth, screenheight, parent=None):
        super().__init__(parent)
        self.setWindowTitle("qtube")

        app_exit_shortcuts = ["Ctrl+Q", "Ctrl+W"]
        for sc in app_exit_shortcuts:
            exitshortcut = QShortcut(QKeySequence(sc), self)
            exitshortcut.activated.connect(self.exit_seq)

        backshortcut = QShortcut(QKeySequence('Alt+Left'), self)
        backshortcut.activated.connect(self.on_back_clicked)

        self.setStyleSheet("background-color: " + BACKGROUND_COLOR + ";")

        self.mygroupbox = QGroupBox('')
        self.mygroupbox.setStyleSheet("color: " + FOREGROUND_COLOR +
                                      "; font-family: " + FONT +
                                      "; font-style: italic")
        self.myform = QFormLayout()
        labellist = []
        combolist = []

        self.mygroupbox.setLayout(self.myform)
        self.scroll = QScrollArea()
        self.scroll.setWidget(self.mygroupbox)
        self.scroll.setWidgetResizable(True)
        self.scroll.setStyleSheet("color: " + FOREGROUND_COLOR + ";")

        self.history = {
            'urls': [],
            'title_boxes': [],
            'data': [],
            'page_numbers': []
        }
        self.downloaded_videos = {'paths': [], 'short_titles': []}
        self.search = ''

        self.spinner = QtWaitingSpinner(self, False)
        self.spinner.setRoundness(70.0)
        self.spinner.setMinimumTrailOpacity(15.0)
        self.spinner.setTrailFadePercentage(70.0)
        self.spinner.setNumberOfLines(10)
        self.spinner.setLineLength(10)
        self.spinner.setLineWidth(4)
        self.spinner.setInnerRadius(4)
        self.spinner.setRevolutionsPerSecond(1.5)
        self.spinner.setColor(QColor(FOREGROUND_COLOR))

        # multi-threading
        QThread.currentThread().setObjectName(
            'main')  # threads can be named, useful for log output
        self.__workers_done = []
        self.__threads = []

        self.line = QLineEdit(self)
        self.line.returnPressed.connect(self.clickMethod)
        self.line.setStyleSheet("color: " + FOREGROUND_COLOR +
                                "; background-color: " + BACKGROUND_COLOR +
                                "; border: 1px solid " + FOREGROUND_COLOR +
                                "; font-family: " + FONT + ";")

        active_buttons = []
        self.inactive_buttons = []

        self.search_button = QPushButton()
        self.search_button.setText('Search')
        self.search_button.clicked.connect(self.clickMethod)
        active_buttons.append(self.search_button)

        self.home_button = QPushButton()
        self.home_button.setText('Home')
        self.home_button.clicked.connect(self.on_home_clicked)
        self.inactive_buttons.append(self.home_button)

        self.play_playlist_button = QPushButton()
        self.play_playlist_button.setText('Play All')
        self.play_playlist_button.clicked.connect(
            self.on_play_playlist_clicked)
        active_buttons.append(self.play_playlist_button)

        self.back_button = QPushButton()
        self.back_button.setText('Back')
        self.back_button.clicked.connect(self.on_back_clicked)
        self.inactive_buttons.append(self.back_button)

        for b in active_buttons:
            b.setStyleSheet("color: " + FOREGROUND_COLOR +
                            "; background-color: " + BACKGROUND_COLOR +
                            "; border: 1px solid " + FOREGROUND_COLOR +
                            "; font-family: " + FONT + ";")
            b.setCursor(Qt.PointingHandCursor)

        for b in self.inactive_buttons:
            b.setStyleSheet("color: " + INACTIVE_COLOR +
                            "; background-color: " + BACKGROUND_COLOR +
                            "; border: 1px solid " + INACTIVE_COLOR +
                            "; font-family: " + FONT + ";")

        self.download_label = QLabel()
        self.download_label.setText('0 downloads')
        self.download_label.setMaximumSize(QSize(110, 20))
        self.download_label.setStyleSheet("color: " + INACTIVE_COLOR +
                                          "; background-color: " +
                                          BACKGROUND_COLOR +
                                          "; font-family: " + FONT + ";")

        self.download_selector = QComboBox()
        self.download_selector.setStyleSheet("color: " + INACTIVE_COLOR +
                                             "; background-color: " +
                                             BACKGROUND_COLOR +
                                             "; font-family: " + FONT + ";")
        self.download_selector.currentIndexChanged.connect(
            self.select_download)

        self.download_to_play = ''

        self.play_downloaded_button = QPushButton()
        self.play_downloaded_button.setText('Play')
        self.play_downloaded_button.clicked.connect(self.on_play_downloaded)
        self.play_downloaded_button.setMaximumSize(QSize(50, 20))
        self.play_downloaded_button.setStyleSheet("color: " + INACTIVE_COLOR +
                                                  "; background-color: " +
                                                  BACKGROUND_COLOR +
                                                  "; border: 1px solid " +
                                                  INACTIVE_COLOR +
                                                  "; font-family: " + FONT +
                                                  ";")

        self.container = VideoContainer(PLAYER_SIZE)
        self.container.setAttribute(Qt.WA_DontCreateNativeAncestors)
        self.container.setAttribute(Qt.WA_NativeWindow)
        #self.container.sig_height.connect(self.resizeWindow)

        self.player = mpv.MPV(
            wid=str(int(self.container.winId())),
            ytdl=True,
            input_default_bindings=True,
            input_vo_keyboard=True,
            keep_open=True,
            reset_on_next_file='pause',
            osd_bar=True,
        )

        script_dir = str(Path.home()) + '/.config/mpv/scripts/'
        [
            self.player.command('load-script', script_dir + script)
            for script in os.listdir(script_dir)
        ]

        player_exit_shortcuts = ['q', 'ctrl+q', 'ctrl+w']
        for sc in player_exit_shortcuts:
            self.player.register_key_binding(sc, self.exit_seq)

        self.player.register_key_binding('f', self.fullscreen)
        self.player.register_key_binding('esc', self.fullscreen_off)
        self.isFullScreen = False

        self.player.register_key_binding('WHEEL_LEFT', 'seek 1')
        self.player.register_key_binding('WHEEL_RIGHT', 'seek -1')

        searchbarlayout = QHBoxLayout()
        searchbarlayout.addWidget(self.line)
        searchbarlayout.addWidget(self.search_button)
        searchbarlayout.addWidget(self.spinner)
        searchbar = QWidget()
        searchbar.setLayout(searchbarlayout)

        buttonrowlayout = QHBoxLayout()
        buttonrowlayout.addWidget(self.back_button)
        buttonrowlayout.addWidget(self.home_button)
        buttonrowlayout.addWidget(self.play_playlist_button)
        buttonrow = QWidget()
        buttonrow.setLayout(buttonrowlayout)

        downloadrowlayout = QHBoxLayout()
        downloadrowlayout.addWidget(self.download_label)
        downloadrowlayout.addWidget(self.download_selector)
        downloadrowlayout.addWidget(self.play_downloaded_button)
        downloadrow = QWidget()
        downloadrow.setLayout(downloadrowlayout)

        sublayout = QVBoxLayout()
        sublayout.addWidget(searchbar)
        sublayout.addWidget(buttonrow)
        sublayout.addWidget(self.scroll)
        sublayout.addWidget(downloadrow)
        self.left = QWidget()
        self.left.setLayout(sublayout)
        self.left.setFixedWidth(LIST_WIDTH)

        biglayout = QHBoxLayout(self)
        biglayout.addWidget(self.left)
        biglayout.addWidget(self.container)
        biglayout.setContentsMargins(0, 0, 0, 0)

        self.move(int((screenwidth - PLAYER_SIZE.width() - LIST_WIDTH) / 2),
                  int((screenheight - PLAYER_SIZE.height()) / 2))

        # load home page data
        self.spinner.start()

        idx = 'Home'
        worker = Worker(idx, HOME_URL, search=False)
        thread = QThread()
        thread.setObjectName('thread_' + idx)
        worker.moveToThread(thread)

        worker.sig_data.connect(self.on_click_data_received)

        self.sig_abort_workers.connect(worker.abort)

        thread.started.connect(worker.grabData)
        thread.start()
        self.__threads.append((thread, worker))
Exemple #11
0
	vStatusLayout=QVBoxLayout()
	statusArea=QTextEdit()
	statusArea.setReadOnly(1)
	statusArea.setLineWrapMode(QTextEdit.NoWrap)
	vStatusLayout.addWidget(statusArea)
	vStatusLayout.addWidget(statusBackButton)
	nodeStatusPage.setLayout(vStatusLayout)

	mainWin.addWidget(stackedWidget)

	msgBox=QMessageBox(parent=stackedWidget)
	mainWin.setFixedSize(geom.width()*.5, geom.height() *.6)
	mainWin.show()

	#waiting spinner
	waitSpin=QtWaitingSpinner(mainWin,True,True,Qt.ApplicationModal)
	waitSpin.setColor(QColor(71,23,246))
	waitSpin.setLineWidth(7)

	changeStyle(int(xConfig['SETTINGS']['THEME']))

	#Signals
	startSpinSig=workSignal()
	stopSpinSig=workSignal()
	grabWalletSig=workSignal()
	initiateWalletSig=workSignal()
	submitSendSig=workSignal()
	transactionSig=workSignal()
	balDocDone=workSignal()
	addrDocDone=workSignal()
	histDocDone=workSignal()