def __init__(self, parent=None): # List View of results # Only Title Search and Playlist Search use this QScrollArea.__init__(self) self.setParent(parent) # Make QScrollArea transparent self.setStyleSheet( "QScrollArea { background-color: transparent } .QFrame { background-color: transparent }" ) self.setWidgetResizable(True) self.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff) # Add touch screen control to QScrollArea QScroller.grabGesture(self, QScroller.LeftMouseButtonGesture) # Set layout settings of the QScrollArea self.layout = QVBoxLayout() self.layout.setContentsMargins(0, 0, 0, 0) self.layout.setSpacing(0) # A separate QWidget is needed to properly use QScrollArea frame = QFrame() frame.setLayout(self.layout) self.setWidget(frame)
def __init__(self, parent=None): QScrollArea.__init__(self) self.setParent(parent) # Make QScrollArea transparent self.setStyleSheet( "QScrollArea { background-color: transparent } .QFrame { background-color: transparent }" ) self.setWidgetResizable(True) self.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff) # Add Touch Gestures to menu. QScroller.grabGesture(self, QScroller.LeftMouseButtonGesture) # Set layout settings self.layout = QVBoxLayout() self.layout.setContentsMargins(0, 0, 0, 0) self.layout.setSpacing(0) # A singular widget frame is needed to set the scroll area properly. frame = QFrame() frame.setLayout(self.layout) self.setWidget(frame) self.updateQueue()
def setupUi(self, CategoryReportWidget): if not CategoryReportWidget.objectName(): CategoryReportWidget.setObjectName(u"CategoryReportWidget") CategoryReportWidget.resize(636, 345) self.verticalLayout = QVBoxLayout(CategoryReportWidget) self.verticalLayout.setSpacing(0) self.verticalLayout.setObjectName(u"verticalLayout") self.verticalLayout.setContentsMargins(0, 0, 0, 0) self.ReportParamsFrame = QFrame(CategoryReportWidget) self.ReportParamsFrame.setObjectName(u"ReportParamsFrame") self.ReportParamsFrame.setFrameShape(QFrame.Panel) self.ReportParamsFrame.setFrameShadow(QFrame.Sunken) self.gridLayout = QGridLayout(self.ReportParamsFrame) self.gridLayout.setSpacing(6) self.gridLayout.setObjectName(u"gridLayout") self.gridLayout.setContentsMargins(2, 2, 2, 2) self.ReportFrameSpacer = QSpacerItem(40, 20, QSizePolicy.Expanding, QSizePolicy.Minimum) self.gridLayout.addItem(self.ReportFrameSpacer, 0, 3, 1, 1) self.ReportRange = DateRangeSelector(self.ReportParamsFrame) self.ReportRange.setObjectName(u"ReportRange") self.ReportRange.setProperty("ItemsList", u"QTD;YTD;this_year;last_year") self.gridLayout.addWidget(self.ReportRange, 0, 0, 1, 1) self.ReportCategoryLbl = QLabel(self.ReportParamsFrame) self.ReportCategoryLbl.setObjectName(u"ReportCategoryLbl") self.gridLayout.addWidget(self.ReportCategoryLbl, 0, 1, 1, 1) self.ReportCategoryEdit = CategorySelector(self.ReportParamsFrame) self.ReportCategoryEdit.setObjectName(u"ReportCategoryEdit") self.gridLayout.addWidget(self.ReportCategoryEdit, 0, 2, 1, 1) self.verticalLayout.addWidget(self.ReportParamsFrame) self.ReportTableView = QTableView(CategoryReportWidget) self.ReportTableView.setObjectName(u"ReportTableView") self.ReportTableView.setFrameShape(QFrame.Panel) self.ReportTableView.setFrameShadow(QFrame.Sunken) self.ReportTableView.setEditTriggers(QAbstractItemView.NoEditTriggers) self.ReportTableView.setAlternatingRowColors(True) self.ReportTableView.setGridStyle(Qt.DotLine) self.ReportTableView.setWordWrap(False) self.ReportTableView.verticalHeader().setVisible(False) self.ReportTableView.verticalHeader().setMinimumSectionSize(20) self.ReportTableView.verticalHeader().setDefaultSectionSize(20) self.verticalLayout.addWidget(self.ReportTableView) self.retranslateUi(CategoryReportWidget) QMetaObject.connectSlotsByName(CategoryReportWidget)
def setupUi(self, ProfitLossReportWidget): if not ProfitLossReportWidget.objectName(): ProfitLossReportWidget.setObjectName(u"ProfitLossReportWidget") ProfitLossReportWidget.resize(648, 301) self.verticalLayout = QVBoxLayout(ProfitLossReportWidget) self.verticalLayout.setSpacing(0) self.verticalLayout.setObjectName(u"verticalLayout") self.verticalLayout.setContentsMargins(0, 0, 0, 0) self.ReportParamsFrame = QFrame(ProfitLossReportWidget) self.ReportParamsFrame.setObjectName(u"ReportParamsFrame") self.ReportParamsFrame.setFrameShape(QFrame.Panel) self.ReportParamsFrame.setFrameShadow(QFrame.Sunken) self.horizontalLayout = QHBoxLayout(self.ReportParamsFrame) self.horizontalLayout.setSpacing(6) self.horizontalLayout.setObjectName(u"horizontalLayout") self.horizontalLayout.setContentsMargins(2, 2, 2, 2) self.ReportRange = DateRangeSelector(self.ReportParamsFrame) self.ReportRange.setObjectName(u"ReportRange") self.ReportRange.setProperty("ItemsList", u"QTD;YTD;this_year;last_year") self.horizontalLayout.addWidget(self.ReportRange) self.ReportAccountLbl = QLabel(self.ReportParamsFrame) self.ReportAccountLbl.setObjectName(u"ReportAccountLbl") self.horizontalLayout.addWidget(self.ReportAccountLbl) self.ReportAccountBtn = AccountButton(self.ReportParamsFrame) self.ReportAccountBtn.setObjectName(u"ReportAccountBtn") self.horizontalLayout.addWidget(self.ReportAccountBtn) self.ReportFrameSpacer = QSpacerItem(40, 20, QSizePolicy.Expanding, QSizePolicy.Minimum) self.horizontalLayout.addItem(self.ReportFrameSpacer) self.verticalLayout.addWidget(self.ReportParamsFrame) self.ReportTableView = QTableView(ProfitLossReportWidget) self.ReportTableView.setObjectName(u"ReportTableView") self.ReportTableView.setFrameShape(QFrame.Panel) self.ReportTableView.setFrameShadow(QFrame.Sunken) self.ReportTableView.setEditTriggers(QAbstractItemView.NoEditTriggers) self.ReportTableView.setAlternatingRowColors(True) self.ReportTableView.setGridStyle(Qt.DotLine) self.ReportTableView.setWordWrap(False) self.ReportTableView.verticalHeader().setVisible(False) self.ReportTableView.verticalHeader().setMinimumSectionSize(20) self.ReportTableView.verticalHeader().setDefaultSectionSize(20) self.verticalLayout.addWidget(self.ReportTableView) self.retranslateUi(ProfitLossReportWidget) QMetaObject.connectSlotsByName(ProfitLossReportWidget)
def __init__(self): self.db = ClientesDB() QWidget.__init__(self) font = QFont() font.setBold(True) # Labels em Negrito # Labels: self.label_title = QLabel("Novo Cliente") self.label_title.setFont(font) self.label_nome = QLabel("Nome Completo:") self.label_nome.setFont(font) self.label_endereco = QLabel("Endereço:") self.label_endereco.setFont(font) self.label_numero = QLabel("Número:") self.label_numero.setFont(font) self.label_cpf = QLabel("CPF:") self.label_cpf.setFont(font) # Entries: self.entry_nome = QLineEdit() self.entry_endereco = QTextEdit() self.entry_numero = QLineEdit() self.entry_cpf = QLineEdit() # Botões; self.button_salvar = QPushButton("&Salvar") self.button_salvar.clicked.connect(self.salvar_cliente) self.button_salvar.setShortcut("Ctrl+S") self.button_cancelar = QPushButton("Cancelar") self.button_cancelar.clicked.connect(self.limpar) self.button_cancelar.setShortcut("ESC") # Linha self.line = QFrame() self.line.setFrameShape(QFrame.HLine) self.line.setFrameShadow(QFrame.Sunken) self.line.setLineWidth(0) self.line.setMidLineWidth(1) # Leiaute: self.layout = QVBoxLayout() self.layout_buttons = QHBoxLayout() self.layout.addWidget(self.label_title) self.layout.addWidget(self.line) self.layout.addWidget(self.label_nome) self.layout.addWidget(self.entry_nome) self.layout.addWidget(self.label_numero) self.layout.addWidget(self.entry_numero) self.layout.addWidget(self.label_cpf) self.layout.addWidget(self.entry_cpf) self.layout.addWidget(self.label_endereco) self.layout.addWidget(self.entry_endereco) self.layout_buttons.addWidget(self.button_salvar) self.layout_buttons.addWidget(self.button_cancelar) self.layout.addStretch(2) self.layout.addLayout(self.layout_buttons) self.setLayout(self.layout)
def setupUi(self, HoldingsWidget): if not HoldingsWidget.objectName(): HoldingsWidget.setObjectName(u"HoldingsWidget") HoldingsWidget.resize(1066, 589) self.verticalLayout = QVBoxLayout(HoldingsWidget) self.verticalLayout.setSpacing(0) self.verticalLayout.setObjectName(u"verticalLayout") self.verticalLayout.setContentsMargins(0, 0, 0, 0) self.HoldingsParamsFrame = QFrame(HoldingsWidget) self.HoldingsParamsFrame.setObjectName(u"HoldingsParamsFrame") self.HoldingsParamsFrame.setFrameShape(QFrame.Panel) self.HoldingsParamsFrame.setFrameShadow(QFrame.Sunken) self.horizontalLayout_8 = QHBoxLayout(self.HoldingsParamsFrame) self.horizontalLayout_8.setSpacing(6) self.horizontalLayout_8.setObjectName(u"horizontalLayout_8") self.horizontalLayout_8.setContentsMargins(2, 2, 2, 2) self.HoldingsDate = QDateEdit(self.HoldingsParamsFrame) self.HoldingsDate.setObjectName(u"HoldingsDate") self.HoldingsDate.setDateTime( QDateTime(QDate(2020, 11, 24), QTime(21, 0, 0))) self.HoldingsDate.setCalendarPopup(True) self.HoldingsDate.setTimeSpec(Qt.UTC) self.horizontalLayout_8.addWidget(self.HoldingsDate) self.HoldingsCurrencyLbl = QLabel(self.HoldingsParamsFrame) self.HoldingsCurrencyLbl.setObjectName(u"HoldingsCurrencyLbl") self.horizontalLayout_8.addWidget(self.HoldingsCurrencyLbl) self.HoldingsCurrencyCombo = CurrencyComboBox(self.HoldingsParamsFrame) self.HoldingsCurrencyCombo.setObjectName(u"HoldingsCurrencyCombo") self.horizontalLayout_8.addWidget(self.HoldingsCurrencyCombo) self.horizontalSpacer = QSpacerItem(1411, 20, QSizePolicy.Expanding, QSizePolicy.Minimum) self.horizontalLayout_8.addItem(self.horizontalSpacer) self.verticalLayout.addWidget(self.HoldingsParamsFrame) self.HoldingsTableView = QTreeView(HoldingsWidget) self.HoldingsTableView.setObjectName(u"HoldingsTableView") self.HoldingsTableView.setFrameShape(QFrame.Panel) self.HoldingsTableView.setAlternatingRowColors(True) self.HoldingsTableView.setAnimated(True) self.HoldingsTableView.setAllColumnsShowFocus(True) self.verticalLayout.addWidget(self.HoldingsTableView) self.retranslateUi(HoldingsWidget) QMetaObject.connectSlotsByName(HoldingsWidget)
def left(self, Form): if not Form.objectName(): Form.setObjectName(u"Form") self.leftgrip = QFrame(Form) self.leftgrip.setObjectName(u"left") self.leftgrip.setGeometry(QRect(0, 10, 10, 480)) self.leftgrip.setMinimumSize(QSize(10, 0)) self.leftgrip.setCursor(QCursor(Qt.SizeHorCursor)) self.leftgrip.setStyleSheet(u"background-color: rgb(255, 121, 198);") self.leftgrip.setFrameShape(QFrame.NoFrame) self.leftgrip.setFrameShadow(QFrame.Raised)
def right(self, Form): if not Form.objectName(): Form.setObjectName(u"Form") Form.resize(500, 500) self.rightgrip = QFrame(Form) self.rightgrip.setObjectName(u"right") self.rightgrip.setGeometry(QRect(0, 0, 10, 500)) self.rightgrip.setMinimumSize(QSize(10, 0)) self.rightgrip.setCursor(QCursor(Qt.SizeHorCursor)) self.rightgrip.setStyleSheet(u"background-color: rgb(255, 0, 127);") self.rightgrip.setFrameShape(QFrame.NoFrame) self.rightgrip.setFrameShadow(QFrame.Raised)
def initUI(self): col = QColor(0, 0, 0) self.btn = QPushButton("Dialog", self) self.btn.move(20, 20) self.btn.clicked.connect(self.showDialog) self.frm = QFrame(self) self.frm.setStyleSheet("QWidget {background-color: %s}" % col.name()) self.frm.setGeometry(130, 22, 100, 100) self.setGeometry(300, 300, 250, 180) self.setWindowTitle("Color dialog")
def __init__(self, editor: PresetEditor, game: GameDescription): super().__init__(editor) self.setupUi(self) self.game_description = game self._during_batch_update = False self._row_widget_for_node = {} world_list = self.game_description.world_list nodes_by_world = collections.defaultdict(list) node_names = {} pickup_match = re.compile(r"Pickup \(([^\)]+)\)") for world in world_list.worlds: for is_dark_world in dark_world_flags(world): for area in world.areas: if area.in_dark_aether != is_dark_world: continue for node in area.nodes: if isinstance(node, PickupNode): nodes_by_world[world.correct_name( is_dark_world)].append(node) match = pickup_match.match(node.name) if match is not None: node_name = match.group(1) else: node_name = node.name node_names[ node] = f"{world_list.nodes_to_area(node).name} ({node_name})" for world_name in sorted(nodes_by_world.keys()): spoiler = Foldable(world_name) vbox_layout = QtWidgets.QVBoxLayout() first_node = True for node in sorted(nodes_by_world[world_name], key=node_names.get): if not first_node: separator_line = QFrame() separator_line.setFrameShape(QFrame.HLine) separator_line.setFrameShadow(QFrame.Sunken) transparent = QGraphicsOpacityEffect(separator_line) transparent.setOpacity(0.33) separator_line.setGraphicsEffect(transparent) vbox_layout.addWidget(separator_line) else: first_node = False row_widget = LocationPoolRowWidget(node, node_names[node]) vbox_layout.addWidget(row_widget) row_widget.changed.connect( functools.partial(self._on_location_changed, row_widget)) self._row_widget_for_node[node] = row_widget spoiler.set_content_layout(vbox_layout) self.locations_scroll_area_layout.addWidget(spoiler) self.locations_scroll_area_layout.addItem( QSpacerItem(5, 5, QSizePolicy.Expanding, QSizePolicy.Expanding))
def __init__(self, parent): super(MainWindow, self).__init__() self._width = 360 self._height = 320 self.setMinimumSize(self._width, self._height) self.setMaximumSize(self._width, self._height) #self.resize(self._width, self._height) self.setWindowTitle('0-бед or 0-bet') self.VBox = QVBoxLayout(self) self.VBox.setContentsMargins(5, 5, 5, 5) self.restText = QLabel(self) self.restText.setText("Список заведений: ") self.restTable = QTableView(self) self.sep1 = QFrame(self) self.sep1.setFrameShape(QFrame.HLine) self.sep1.setFrameShadow(QFrame.Sunken) self.restUnitName = QLineEdit(self) self.restAddButt = QPushButton(self) self.restAddButt.setText('Добавить заведение') self.restRmvButt = QPushButton(self) self.restRmvButt.setText('Удалить заведение') self.sep2 = QFrame(self) self.sep2.setFrameShape(QFrame.HLine) self.sep2.setFrameShadow(QFrame.Sunken) self.restLotteryButt = QPushButton(self) self.restLotteryButt.setText('Лотерея') self.VBox.addWidget(self.restText) self.VBox.addWidget(self.restTable) self.VBox.addWidget(self.sep1) self.VBox.addWidget(self.restUnitName) self.VBox.addWidget(self.restAddButt) self.VBox.addWidget(self.restRmvButt) self.VBox.addWidget(self.sep2) self.VBox.addWidget(self.restLotteryButt) self.setLayout(self.VBox) self.restAddButt.clicked.connect(self.addRestItem) self.restLotteryButt.clicked.connect(self.startLottery) self.restRmvButt.clicked.connect(self.removeRestItem) self.restTable.clicked.connect(self.selectRest) self.name_list = [] self.reqCount_list = [] self.sg = Sig() parent.sg.updateTable.connect(self.updTbl)
def _add_preview_color_square_to_layout(self, layout: QLayout, default_color: tuple[int, int, int]): color_square = QFrame(self.game_changes_box) color_square.setMinimumSize(QSize(22, 22)) color_square.setSizePolicy( QSizePolicy(QSizePolicy.Fixed, QSizePolicy.Fixed)) color_square.setStyleSheet( 'background-color: rgb({},{},{})'.format(*default_color)) layout.addWidget(color_square) return color_square
def __init__(self, title: str, initially_folded: bool = True, parent: QWidget = None): super().__init__(parent) self._folded = initially_folded self._toggleButton = QToolButton(self) self._toggleButton.setStyleSheet("QToolButton { height: 20px; }") font = self._toggleButton.font() font.setBold(True) font.setPixelSize(13) self._toggleButton.setFont(font) self._toggleButton.setMaximumHeight(20) self._toggleButton.setToolButtonStyle( Qt.ToolButtonStyle.ToolButtonTextBesideIcon) self._toggleButton.setArrowType(Qt.ArrowType.RightArrow) self._toggleButton.setText(title) self._toggleButton.setCheckable(True) self._toggleButton.setChecked(False) self._toggleButton.clicked.connect(self._on_click) self._headerLine = QFrame(self) self._headerLine.setFrameShape(QFrame.HLine) self._headerLine.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Maximum) self._contentArea = QFrame(self) self._contentArea.setObjectName("foldable_contentArea") self._contentArea.setStyleSheet( "#foldable_contentArea { border: none; }") self._contentArea.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Minimum) self._mainLayout = QGridLayout(self) self._mainLayout.setVerticalSpacing(0) self._mainLayout.setContentsMargins(0, 0, 0, 0) self._mainLayout.addWidget(self._toggleButton, 0, 0, 1, 1, Qt.AlignLeft) self._mainLayout.addWidget(self._headerLine, 0, 1, 1, 1) self._mainLayout.addWidget(self._contentArea, 1, 0, 1, 2)
def setupUi(self, IncomeSpendingReportWidget): if not IncomeSpendingReportWidget.objectName(): IncomeSpendingReportWidget.setObjectName( u"IncomeSpendingReportWidget") IncomeSpendingReportWidget.resize(595, 347) self.verticalLayout = QVBoxLayout(IncomeSpendingReportWidget) self.verticalLayout.setSpacing(0) self.verticalLayout.setObjectName(u"verticalLayout") self.verticalLayout.setContentsMargins(0, 0, 0, 0) self.ReportParamsFrame = QFrame(IncomeSpendingReportWidget) self.ReportParamsFrame.setObjectName(u"ReportParamsFrame") self.ReportParamsFrame.setFrameShape(QFrame.Panel) self.ReportParamsFrame.setFrameShadow(QFrame.Sunken) self.horizontalLayout = QHBoxLayout(self.ReportParamsFrame) self.horizontalLayout.setSpacing(6) self.horizontalLayout.setObjectName(u"horizontalLayout") self.horizontalLayout.setContentsMargins(2, 2, 2, 2) self.ReportRange = DateRangeSelector(self.ReportParamsFrame) self.ReportRange.setObjectName(u"ReportRange") self.ReportRange.setProperty("ItemsList", u"QTD;YTD;this_year;last_year") self.horizontalLayout.addWidget(self.ReportRange) self.horizontalSpacer = QSpacerItem(40, 20, QSizePolicy.Expanding, QSizePolicy.Minimum) self.horizontalLayout.addItem(self.horizontalSpacer) self.verticalLayout.addWidget(self.ReportParamsFrame) self.ReportTreeView = QTreeView(IncomeSpendingReportWidget) self.ReportTreeView.setObjectName(u"ReportTreeView") self.ReportTreeView.setEditTriggers(QAbstractItemView.NoEditTriggers) self.ReportTreeView.setAlternatingRowColors(True) self.ReportTreeView.header().setStretchLastSection(False) self.verticalLayout.addWidget(self.ReportTreeView) self.retranslateUi(IncomeSpendingReportWidget) QMetaObject.connectSlotsByName(IncomeSpendingReportWidget)
def createEditor(self, parent, option, index): editor = QFrame(parent) layout = QHBoxLayout(editor) text = QLineEdit(parent=editor) button = QPushButton(QIcon(":/icons/edit-white-48dp.svg"), "", parent=editor) layout.setContentsMargins(0, 0, 0, 0) layout.setSpacing(0) editor.setLayout(layout) text.setFrame(False) text.setSizePolicy(QSizePolicy.Preferred, QSizePolicy.Expanding) button.setSizePolicy(QSizePolicy.Fixed, QSizePolicy.Expanding) layout.addWidget(text) layout.addWidget(button) button.clicked.connect(self.edit_dialog) return editor
class Ex(QWidget): def __init__(self): super().__init__() self.initUI() def initUI(self): col = QColor(0, 0, 0) self.btn = QPushButton("Dialog", self) self.btn.move(20, 20) self.btn.clicked.connect(self.showDialog) self.frm = QFrame(self) self.frm.setStyleSheet("QWidget {background-color: %s}" % col.name()) self.frm.setGeometry(130, 22, 100, 100) self.setGeometry(300, 300, 250, 180) self.setWindowTitle("Color dialog") def showDialog(self): col = QColorDialog.getColor() if col.isValid(): self.frm.setStyleSheet("QWidget {background-color: %s}" % col.name())
def setupUi(self, Dialog): if not Dialog.objectName(): Dialog.setObjectName(u"Dialog") Dialog.resize(400, 120) Dialog.setMinimumSize(QSize(400, 120)) Dialog.setMaximumSize(QSize(400, 120)) self.verticalLayout = QVBoxLayout(Dialog) self.verticalLayout.setObjectName(u"verticalLayout") self.verticalLayout.setContentsMargins(9, 9, 9, 9) self.bg_diag = QFrame(Dialog) self.bg_diag.setObjectName(u"bg_diag") self.bg_diag.setStyleSheet(u"background-color: rgb(29, 0, 86);\n" "border-radius: 10px;") self.bg_diag.setFrameShape(QFrame.NoFrame) self.bg_diag.setFrameShadow(QFrame.Raised) self.tittle_bar = QFrame(self.bg_diag) self.tittle_bar.setObjectName(u"tittle_bar") self.tittle_bar.setGeometry(QRect(10, 10, 361, 31)) self.tittle_bar.setFrameShape(QFrame.StyledPanel) self.tittle_bar.setFrameShadow(QFrame.Raised) self.lbl_userLogado = QLabel(self.tittle_bar) self.lbl_userLogado.setObjectName(u"lbl_userLogado") self.lbl_userLogado.setGeometry(QRect(25, -9, 311, 41)) self.lbl_userLogado.setStyleSheet(u"color: rgb(255, 255, 255);\n" "font: 18pt \"Segoe UI\";") self.pushButton = QPushButton(self.bg_diag) self.pushButton.setObjectName(u"pushButton") self.pushButton.setGeometry(QRect(161, 60, 61, 31)) self.pushButton.setStyleSheet(u"background-color: rgb(53, 159, 159);\n" "color: rgb(255, 255, 255);\n" "font: 18pt \"Segoe UI\";\n" "") self.verticalLayout.addWidget(self.bg_diag) self.retranslateUi(Dialog) QMetaObject.connectSlotsByName(Dialog)
def __init__(self): QMainWindow.__init__(self) self.inicializar_db() self.setWindowTitle("Tião Automecânica - Clientes") self.widget = QWidget() # Janelas w1, w2 = Buscador(), NovoCliente() w1.status_signal.connect(self.atualizar_status) w2.status_signal.connect(self.atualizar_status) # Leiaute self.line = QFrame() self.line.setFrameShape(QFrame.VLine) self.line.setFrameShadow(QFrame.Sunken) self.line.setLineWidth(0) self.line.setMidLineWidth(1) self.layout = QGridLayout() self.layout.addWidget(w1, 0, 0, 1, 1) self.layout.addWidget(self.line, 0, 1, 1, 1) self.layout.addWidget(w2, 0, 1, 1, 2) self.widget.setLayout(self.layout) self.setCentralWidget(self.widget) # Menu self.menu = QMenuBar() self.setMenuBar(self.menu) self.sobre = QAction("Sobre", self) self.sobre.setShortcut("F1") self.menu.addAction(self.sobre) self.sobre.triggered.connect(self.info) # Status self.status = QStatusBar() self.setStatusBar(self.status) self.status_label = QLabel("Pronto") self.status.addWidget(self.status_label)
def __init__(self, parent=None): QScrollArea.__init__(self) self.setParent(parent) # Make QScrollArea transparent self.setStyleSheet( "QScrollArea { background-color: transparent } .QFrame { background-color: transparent }" ) self.setWidgetResizable(True) self.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff) # Add Touch Gestures to menu. QScroller.grabGesture(self, QScroller.LeftMouseButtonGesture) # Layout settings self.layout = QGridLayout() self.layout.setContentsMargins(0, 0, 0, 0) self.layout.setSpacing(0) # QScrollArea requires a separate QWidget to work properly frame = QFrame() frame.setLayout(self.layout) self.setWidget(frame)
def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.l, m = load_gif(self) self.l.setGeometry(0, 0, 20, 20) self.app: QApplication = QApplication.instance() self.calc: QThread = QThread() self.frm: QFrame = QFrame(self) self.tray_icon_menu: QMenu = QMenu(self) self.tray_icon: QSystemTrayIcon = QSystemTrayIcon(self) self.app.view_main = self Setting() About() self.init_settings() self.init_main_window() self.init_tray_icon() self.init_frm() self.setAttribute(Qt.WA_TransparentForMouseEvents) self.shortcut_settings = QShortcut(QKeySequence("Ctrl+,"), self) self.shortcut_settings.activated.connect(self.show_settings) self.shortcut_refresh = QShortcut(QKeySequence("Ctrl+r"), self) self.shortcut_refresh.activated.connect(self.start_to_hope) self.shortcut_refresh = QShortcut(QKeySequence("Ctrl+q"), self) self.shortcut_refresh.activated.connect(self.close) if 'darwin' in sys.platform: menubar = self.menuBar() hope_menu = menubar.addMenu('Hope') hope_menu.addAction( QAction('About', self, triggered=self.show_about)) hope_menu.addAction( QAction('Settings', self, triggered=self.show_settings)) self.show() # self.show_settings() self.start_to_check_update()
def bottom(self, Form): if not Form.objectName(): Form.setObjectName(u"Form") self.container_bottom = QFrame(Form) self.container_bottom.setObjectName(u"container_bottom") self.container_bottom.setGeometry(QRect(0, 0, 500, 10)) self.container_bottom.setMinimumSize(QSize(0, 10)) self.container_bottom.setMaximumSize(QSize(16777215, 10)) self.container_bottom.setFrameShape(QFrame.NoFrame) self.container_bottom.setFrameShadow(QFrame.Raised) self.bottom_layout = QHBoxLayout(self.container_bottom) self.bottom_layout.setSpacing(0) self.bottom_layout.setObjectName(u"bottom_layout") self.bottom_layout.setContentsMargins(0, 0, 0, 0) self.bottom_left = QFrame(self.container_bottom) self.bottom_left.setObjectName(u"bottom_left") self.bottom_left.setMinimumSize(QSize(10, 10)) self.bottom_left.setMaximumSize(QSize(10, 10)) self.bottom_left.setCursor(QCursor(Qt.SizeBDiagCursor)) self.bottom_left.setStyleSheet(u"background-color: rgb(33, 37, 43);") self.bottom_left.setFrameShape(QFrame.NoFrame) self.bottom_left.setFrameShadow(QFrame.Raised) self.bottom_layout.addWidget(self.bottom_left) self.bottom = QFrame(self.container_bottom) self.bottom.setObjectName(u"bottom") self.bottom.setCursor(QCursor(Qt.SizeVerCursor)) self.bottom.setStyleSheet(u"background-color: rgb(85, 170, 0);") self.bottom.setFrameShape(QFrame.NoFrame) self.bottom.setFrameShadow(QFrame.Raised) self.bottom_layout.addWidget(self.bottom) self.bottom_right = QFrame(self.container_bottom) self.bottom_right.setObjectName(u"bottom_right") self.bottom_right.setMinimumSize(QSize(10, 10)) self.bottom_right.setMaximumSize(QSize(10, 10)) self.bottom_right.setCursor(QCursor(Qt.SizeFDiagCursor)) self.bottom_right.setStyleSheet(u"background-color: rgb(33, 37, 43);") self.bottom_right.setFrameShape(QFrame.NoFrame) self.bottom_right.setFrameShadow(QFrame.Raised) self.bottom_layout.addWidget(self.bottom_right)
class Foldable(QWidget): _mainLayout: QGridLayout _toggleButton: QToolButton _headerLine: QFrame _contentArea: QScrollArea _folded: bool def __init__(self, title: str, initially_folded: bool = True, parent: QWidget = None): super().__init__(parent) self._folded = initially_folded self._toggleButton = QToolButton(self) self._toggleButton.setStyleSheet("QToolButton { height: 20px; }") font = self._toggleButton.font() font.setBold(True) font.setPixelSize(13) self._toggleButton.setFont(font) self._toggleButton.setMaximumHeight(20) self._toggleButton.setToolButtonStyle( Qt.ToolButtonStyle.ToolButtonTextBesideIcon) self._toggleButton.setArrowType(Qt.ArrowType.RightArrow) self._toggleButton.setText(title) self._toggleButton.setCheckable(True) self._toggleButton.setChecked(False) self._toggleButton.clicked.connect(self._on_click) self._headerLine = QFrame(self) self._headerLine.setFrameShape(QFrame.HLine) self._headerLine.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Maximum) self._contentArea = QFrame(self) self._contentArea.setObjectName("foldable_contentArea") self._contentArea.setStyleSheet( "#foldable_contentArea { border: none; }") self._contentArea.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Minimum) self._mainLayout = QGridLayout(self) self._mainLayout.setVerticalSpacing(0) self._mainLayout.setContentsMargins(0, 0, 0, 0) self._mainLayout.addWidget(self._toggleButton, 0, 0, 1, 1, Qt.AlignLeft) self._mainLayout.addWidget(self._headerLine, 0, 1, 1, 1) self._mainLayout.addWidget(self._contentArea, 1, 0, 1, 2) @property def contents(self): return self._contentArea def _on_click(self, checked: bool): if self._folded: self._unfold() else: self._fold() def _unfold(self): self._folded = False self._contentArea.show() self._toggleButton.setArrowType(Qt.ArrowType.DownArrow) def _fold(self): self._folded = True self._contentArea.hide() self._toggleButton.setArrowType(Qt.ArrowType.RightArrow) def set_content_layout(self, content_layout: QLayout): self._contentArea.setLayout(content_layout) if self._folded: self._fold() else: self._unfold()
def setupUi(self, MainWindow): if not MainWindow.objectName(): MainWindow.setObjectName(u"MainWindow") MainWindow.resize(450, 520) MainWindow.setMinimumSize(QSize(450, 520)) MainWindow.setMaximumSize(QSize(450, 520)) self.centralwidget = QWidget(MainWindow) self.centralwidget.setObjectName(u"centralwidget") self.bg_frame_2 = QVBoxLayout(self.centralwidget) self.bg_frame_2.setSpacing(0) self.bg_frame_2.setObjectName(u"bg_frame_2") self.bg_frame_2.setContentsMargins(10, 10, 10, 10) self.bg_frame = QFrame(self.centralwidget) self.bg_frame.setObjectName(u"bg_frame") self.bg_frame.setStyleSheet(u"background-color: rgb(29, 0, 86);\n" "border-radius: 10px;") self.bg_frame.setFrameShape(QFrame.NoFrame) self.bg_frame.setFrameShadow(QFrame.Raised) self.tittle_bar = QFrame(self.bg_frame) self.tittle_bar.setObjectName(u"tittle_bar") self.tittle_bar.setGeometry(QRect(10, 10, 411, 31)) self.tittle_bar.setFrameShape(QFrame.StyledPanel) self.tittle_bar.setFrameShadow(QFrame.Raised) self.label = QLabel(self.tittle_bar) self.label.setObjectName(u"label") self.label.setGeometry(QRect(10, 0, 61, 31)) self.label.setStyleSheet(u"color: rgb(255, 255, 255);\n" "font: 18pt \"Segoe UI\";") self.button_close = QPushButton(self.tittle_bar) self.button_close.setObjectName(u"button_close") self.button_close.setGeometry(QRect(380, 0, 21, 24)) self.button_close.setStyleSheet(u"background-color: rgb(152, 0, 0);\n" "font: 14pt \"Segoe UI\";") self.button_minimize = QPushButton(self.tittle_bar) self.button_minimize.setObjectName(u"button_minimize") self.button_minimize.setGeometry(QRect(350, 0, 21, 24)) self.button_minimize.setStyleSheet( u"background-color: rgb(53, 159, 159);\n" "font: 14pt \"Segoe UI\";") self.user_login = QLineEdit(self.bg_frame) self.user_login.setObjectName(u"user_login") self.user_login.setGeometry(QRect(60, 160, 301, 51)) self.user_login.setStyleSheet(u"background-color: rgb(53, 159, 159);\n" "") self.pass_login = QLineEdit(self.bg_frame) self.pass_login.setObjectName(u"pass_login") self.pass_login.setGeometry(QRect(60, 281, 301, 51)) self.pass_login.setStyleSheet(u"background-color: rgb(53, 159, 159);\n" "") self.user_lbl = QLabel(self.bg_frame) self.user_lbl.setObjectName(u"user_lbl") self.user_lbl.setGeometry(QRect(170, 110, 81, 41)) self.user_lbl.setStyleSheet(u"color: rgb(255, 255, 255);\n" "font: 18pt \"Segoe UI\";") self.senha_lbl = QLabel(self.bg_frame) self.senha_lbl.setObjectName(u"senha_lbl") self.senha_lbl.setGeometry(QRect(179, 230, 71, 41)) self.senha_lbl.setStyleSheet(u"color: rgb(255, 255, 255);\n" "font: 18pt \"Segoe UI\";") self.btn_login = QPushButton(self.bg_frame) self.btn_login.setObjectName(u"btn_login") self.btn_login.setGeometry(QRect(160, 360, 101, 41)) self.btn_login.setStyleSheet(u"background-color: rgb(53, 159, 159);\n" "color: rgb(255, 255, 255);\n" "font: 18pt \"Segoe UI\";\n" "") self.bg_frame_2.addWidget(self.bg_frame) MainWindow.setCentralWidget(self.centralwidget) self.retranslateUi(MainWindow) QMetaObject.connectSlotsByName(MainWindow)
def setup(self, main_window: QMainWindow) -> None: """ Initialize the UI. :param main_window: An instance of the `QMainWindow` class. :type main_window: :class:`QMainWindow` """ main_window.setObjectName("main_window") main_window.setWindowTitle("TeaseAI") main_window.resize(1137, 751) main_window.setSizePolicy(*EXP_EXP) main_window.setTabShape(QTabWidget.Rounded) self.menubar = QMenuBar(main_window) self.menubar.setObjectName("menubar") self.menubar.setGeometry(0, 0, 1137, 23) self.file_menu = QMenu("File", self.menubar) self.file_menu.setObjectName("file_men") self.server_menu = QMenu("Server", self.menubar) self.server_menu.setObjectName("server_men") self.options_menu = QMenu("Options", self.menubar) self.options_menu.setObjectName("options_men") self.media_menu = QMenu("Media", self.menubar) self.media_menu.setObjectName("media_men") main_window.setMenuBar(self.menubar) self.exit = QAction("Exit", main_window) self.exit.setObjectName("exit") self.start_server = QAction("Start Server", main_window) self.start_server.setObjectName("start_server") self.connect_server = QAction("Connect to Server", main_window) self.connect_server.setObjectName("connect_server") self.kill_server = QAction("Kill Server", main_window) self.kill_server.setObjectName("kill_server") self.options = QAction("Options", main_window) self.options.setObjectName("options") self.start_webcam = QAction("Start Webcam", main_window) self.start_webcam.setObjectName("start_webcam") self.start_webcam.setCheckable(False) self.centralwidget = QWidget(main_window) self.centralwidget.setObjectName("centralwidget") self.centralwidget.setContentsMargins(QMargins(0, 0, 0, 0)) self.centralwidget.setSizePolicy(*EXP_EXP) self.grid_layout = QGridLayout(self.centralwidget) self.media = QFrame(self.centralwidget) self.media.setObjectName("media") self.media.setSizePolicy(*EXP_EXP) self.media.setMinimumSize(200, 200) self.media.setStyleSheet("background: #000;") self.grid_layout.addWidget(self.media, 0, 0, 5, 1) self.users_label = QLabel(" Online users:", self.centralwidget) self.users_label.setObjectName("users_label") self.users_label.setMinimumSize(300, 15) self.users_label.setMaximumSize(300, 15) self.grid_layout.addWidget(self.users_label, 0, 1, 1, 2) self.online = QPlainTextEdit("", self.centralwidget) self.online.setObjectName("online") self.online.setSizePolicy(*FIX_FIX) self.online.setMinimumSize(300, 50) self.online.setMaximumSize(300, 50) self.online.setStyleSheet("margin-left: 3px;" + SUNKEN) self.online.setLineWidth(2) self.online.setVerticalScrollBarPolicy(Qt.ScrollBarAlwaysOff) self.online.setHorizontalScrollBarPolicy(Qt.ScrollBarAlwaysOff) self.online.setSizeAdjustPolicy(QAbstractScrollArea.AdjustIgnored) self.online.setReadOnly(True) self.grid_layout.addWidget(self.online, 1, 1, 1, 2) self.chat = QPlainTextEdit("", self.centralwidget) self.chat.setObjectName("chat") self.chat.setSizePolicy(*FIX_EXP) self.chat.setMinimumSize(300, 0) self.chat.setMaximumSize(300, INFINITE) self.chat.setStyleSheet("margin-bottom: 3px; margin-top: 8px;" + SUNKEN) self.chat.setLineWidth(2) self.chat.setReadOnly(True) self.chat.setHorizontalScrollBarPolicy(Qt.ScrollBarAlwaysOff) self.grid_layout.addWidget(self.chat, 2, 1, 1, 2) self.input = QLineEdit(self.centralwidget) self.input.setObjectName("input") self.input.setSizePolicy(*FIX_FIX) self.input.setMinimumSize(224, 30) self.input.setMaximumSize(224, 30) self.input.setStyleSheet(SUNKEN) self.input.setEchoMode(QLineEdit.Normal) self.input.setClearButtonEnabled(True) self.grid_layout.addWidget(self.input, 3, 1, 1, 1) self.submit = QPushButton("Submit", self.centralwidget) self.submit.setObjectName("submit") self.submit.setSizePolicy(*FIX_FIX) self.submit.setMinimumSize(70, 30) self.submit.setMaximumSize(70, 30) self.grid_layout.addWidget(self.submit, 3, 2, 1, 1) self.tabs = QTabWidget(self.centralwidget) self.tabs.setObjectName("tabs") self.tabs.setSizePolicy(*FIX_FIX) self.tabs.setMinimumSize(300, 150) self.tabs.setMaximumSize(300, 150) self.tab = QWidget() self.tab.setObjectName("tab") self.tabs.addTab(self.tab, "Actions") self.tab2 = QWidget() self.tab2.setObjectName("tab2") self.tabs.addTab(self.tab2, "My Media") self.tab3 = QWidget() self.tab3.setObjectName("tab3") self.tab3.setSizePolicy(*FIX_FIX) self.grid_layout2 = QGridLayout(self.tab3) self.grid_layout2.setHorizontalSpacing(0) self.grid_layout2.setVerticalSpacing(3) self.grid_layout2.setContentsMargins(3, -1, 3, -1) self.server_folder = QLineEdit(self.tab3) self.server_folder.setObjectName("server_folder") self.grid_layout2.addWidget(self.server_folder, 0, 0, 1, 3) self.srv_browse = QPushButton("BROWSE", self.tab3) self.srv_browse.setObjectName("srv_browse") self.srv_browse.setStyleSheet("background: transparent;\n" " color: #4d4940;\n" " font-size: 8pt;\n" " font-weight: 450;\n" " padding: 6px;\n") self.grid_layout2.addWidget(self.srv_browse, 0, 3, 1, 1) self.back_button = QPushButton("", self.tab3) self.back_button.setObjectName("back_button") self.back_button.setSizePolicy(*FIX_FIX) self.back_button.setMaximumSize(SEVENTY_FIVE) self.back_button.setCursor(QCursor(Qt.PointingHandCursor)) self.back_button.setStyleSheet("border: 0;\n" "background: transparent;") icon = QIcon() icon.addFile(":/newPrefix/back_button.png", SIXTY_FOUR, QIcon.Normal, QIcon.Off) self.back_button.setIcon(icon) self.back_button.setIconSize(SIXTY_FOUR) self.grid_layout2.addWidget(self.back_button, 1, 0, 1, 1) self.play_button = QPushButton("", self.tab3) self.play_button.setObjectName("play_button") self.play_button.setSizePolicy(*FIX_FIX) self.play_button.setMaximumSize(SEVENTY_FIVE) self.play_button.setCursor(QCursor(Qt.PointingHandCursor)) self.play_button.setStyleSheet("border: 0;\n" "background: transparent;") icon1 = QIcon() icon1.addFile(":/newPrefix/play_button.png", SIXTY_FOUR, QIcon.Normal, QIcon.Off) self.play_button.setIcon(icon1) self.play_button.setIconSize(SIXTY_FOUR) self.grid_layout2.addWidget(self.play_button, 1, 1, 1, 1) self.stop_button = QPushButton("", self.tab3) self.stop_button.setObjectName("stop_button") self.stop_button.setSizePolicy(*FIX_FIX) self.stop_button.setMaximumSize(SEVENTY_FIVE) self.stop_button.setCursor(QCursor(Qt.PointingHandCursor)) self.stop_button.setStyleSheet("border: 0;\n" "background: transparent;") icon2 = QIcon() icon2.addFile(":/newPrefix/stop_button.png", SIXTY_FOUR, QIcon.Normal, QIcon.Off) self.stop_button.setIcon(icon2) self.stop_button.setIconSize(SIXTY_FOUR) self.grid_layout2.addWidget(self.stop_button, 1, 2, 1, 1) self.fast_forward = QPushButton("", self.tab3) self.fast_forward.setObjectName("fast_forward") self.fast_forward.setSizePolicy(*FIX_FIX) self.fast_forward.setMaximumSize(SEVENTY_FIVE) self.fast_forward.setCursor(QCursor(Qt.PointingHandCursor)) self.fast_forward.setStyleSheet("border: 0;\n" "background: transparent;") icon3 = QIcon() icon3.addFile(":/newPrefix/fast_forward.png", SIXTY_FOUR, QIcon.Normal, QIcon.Off) self.fast_forward.setIcon(icon3) self.fast_forward.setIconSize(SIXTY_FOUR) self.grid_layout2.addWidget(self.fast_forward, 1, 3, 1, 1) self.tabs.addTab(self.tab3, "Server Media") self.grid_layout.addWidget(self.tabs, 4, 1, 1, 2) main_window.setCentralWidget(self.centralwidget) self.statusbar = QStatusBar(main_window) self.statusbar.setObjectName("statusbar") self.statusbar.setEnabled(True) self.statusbar.setStyleSheet("margin-bottom: 5px;") self.statusbar.setSizePolicy(*EXP_FIX) self.statusbar.setMinimumSize(INFINITE, 30) self.statusbar.setMaximumSize(INFINITE, 30) self.statusbar.setSizeGripEnabled(False) main_window.setStatusBar(self.statusbar) self.menubar.addAction(self.file_menu.menuAction()) self.menubar.addAction(self.server_menu.menuAction()) self.menubar.addAction(self.options_menu.menuAction()) self.menubar.addAction(self.media_menu.menuAction()) self.file_menu.addAction(self.exit) self.server_menu.addAction(self.start_server) self.server_menu.addAction(self.connect_server) self.server_menu.addAction(self.kill_server) self.options_menu.addAction(self.options) self.media_menu.addAction(self.start_webcam) self.exit.triggered.connect(main_window.close) self.tabs.setCurrentIndex(0) QMetaObject.connectSlotsByName(main_window) self.exit.setStatusTip("Exit the program.") self.start_server.setStatusTip("Initialize a local server instance.") self.connect_server.setStatusTip("Connect to a remote server.") self.kill_server.setStatusTip("Shut down a running local server.") self.options.setStatusTip("Open the options menu.") self.start_webcam.setStatusTip("Start webcam feed.") self.tooltip = QLabel("", self.statusbar) tooltip_policy = QSizePolicy(*EXP_FIX) tooltip_policy.setHorizontalStretch(100) self.tooltip.setSizePolicy(tooltip_policy) self.tooltip.setMinimumSize(INFINITE, 26) self.tooltip.setMaximumSize(INFINITE, 26) self.server_status = QLabel("Server status:", self.statusbar) self.server_status.setSizePolicy(*FIX_FIX) self.server_status.setMinimumSize(300, 26) self.server_status.setMaximumSize(300, 26) self.client_status = QLabel("Client status:", self.statusbar) self.client_status.setSizePolicy(*FIX_FIX) self.client_status.setMinimumSize(302, 26) self.client_status.setMaximumSize(302, 26) self.statusbar.addPermanentWidget(self.tooltip) self.statusbar.addPermanentWidget(self.server_status) self.statusbar.addPermanentWidget(self.client_status) self.tooltip.setStyleSheet(SUNKEN + "margin-left: 4px;\ margin-right: 0px;") self.client_status.setStyleSheet(SUNKEN + "margin-right: 7px;") self.server_status.setStyleSheet(SUNKEN + "margin-right: 2px;\ margin-left: 2px;") self.statusbar.messageChanged.connect(main_window.status_tip)
def __init__(self, persepolis_setting): super().__init__() # MainWindow self.persepolis_setting = persepolis_setting # add support for other languages locale = str(self.persepolis_setting.value('settings/locale')) QLocale.setDefault(QLocale(locale)) self.translator = QTranslator() if self.translator.load(':/translations/locales/ui_' + locale, 'ts'): QCoreApplication.installTranslator(self.translator) # set ui direction ui_direction = self.persepolis_setting.value('ui_direction') if ui_direction == 'rtl': self.setLayoutDirection(Qt.RightToLeft) elif ui_direction in 'ltr': self.setLayoutDirection(Qt.LeftToRight) icons = ':/' + \ str(self.persepolis_setting.value('settings/icons')) + '/' self.setWindowTitle( QCoreApplication.translate("mainwindow_ui_tr", "Persepolis Download Manager")) self.setWindowIcon( QIcon.fromTheme('persepolis', QIcon(':/persepolis.svg'))) self.centralwidget = QWidget(self) self.verticalLayout = QVBoxLayout(self.centralwidget) # enable drag and drop self.setAcceptDrops(True) # frame self.frame = QFrame(self.centralwidget) # download_table_horizontalLayout download_table_horizontalLayout = QHBoxLayout() horizontal_splitter = QSplitter(Qt.Horizontal) vertical_splitter = QSplitter(Qt.Vertical) # category_tree self.category_tree_qwidget = QWidget(self) category_tree_verticalLayout = QVBoxLayout() self.category_tree = CategoryTreeView(self) category_tree_verticalLayout.addWidget(self.category_tree) self.category_tree_model = QStandardItemModel() self.category_tree.setModel(self.category_tree_model) category_table_header = [ QCoreApplication.translate("mainwindow_ui_tr", 'Category') ] self.category_tree_model.setHorizontalHeaderLabels( category_table_header) self.category_tree.header().setStretchLastSection(True) self.category_tree.header().setDefaultAlignment(Qt.AlignCenter) # queue_panel self.queue_panel_widget = QWidget(self) queue_panel_verticalLayout_main = QVBoxLayout(self.queue_panel_widget) # queue_panel_show_button self.queue_panel_show_button = QPushButton(self) queue_panel_verticalLayout_main.addWidget(self.queue_panel_show_button) # queue_panel_widget_frame self.queue_panel_widget_frame = QFrame(self) self.queue_panel_widget_frame.setFrameShape(QFrame.StyledPanel) self.queue_panel_widget_frame.setFrameShadow(QFrame.Raised) queue_panel_verticalLayout_main.addWidget( self.queue_panel_widget_frame) queue_panel_verticalLayout = QVBoxLayout(self.queue_panel_widget_frame) queue_panel_verticalLayout_main.setContentsMargins(50, -1, 50, -1) # start_end_frame self.start_end_frame = QFrame(self) # start time start_verticalLayout = QVBoxLayout(self.start_end_frame) self.start_checkBox = QCheckBox(self) start_verticalLayout.addWidget(self.start_checkBox) self.start_frame = QFrame(self) self.start_frame.setFrameShape(QFrame.StyledPanel) self.start_frame.setFrameShadow(QFrame.Raised) start_frame_verticalLayout = QVBoxLayout(self.start_frame) self.start_time_qDataTimeEdit = MyQDateTimeEdit(self.start_frame) self.start_time_qDataTimeEdit.setDisplayFormat('H:mm') start_frame_verticalLayout.addWidget(self.start_time_qDataTimeEdit) start_verticalLayout.addWidget(self.start_frame) # end time self.end_checkBox = QCheckBox(self) start_verticalLayout.addWidget(self.end_checkBox) self.end_frame = QFrame(self) self.end_frame.setFrameShape(QFrame.StyledPanel) self.end_frame.setFrameShadow(QFrame.Raised) end_frame_verticalLayout = QVBoxLayout(self.end_frame) self.end_time_qDateTimeEdit = MyQDateTimeEdit(self.end_frame) self.end_time_qDateTimeEdit.setDisplayFormat('H:mm') end_frame_verticalLayout.addWidget(self.end_time_qDateTimeEdit) start_verticalLayout.addWidget(self.end_frame) self.reverse_checkBox = QCheckBox(self) start_verticalLayout.addWidget(self.reverse_checkBox) queue_panel_verticalLayout.addWidget(self.start_end_frame) # limit_after_frame self.limit_after_frame = QFrame(self) # limit_checkBox limit_verticalLayout = QVBoxLayout(self.limit_after_frame) self.limit_checkBox = QCheckBox(self) limit_verticalLayout.addWidget(self.limit_checkBox) # limit_frame self.limit_frame = QFrame(self) self.limit_frame.setFrameShape(QFrame.StyledPanel) self.limit_frame.setFrameShadow(QFrame.Raised) limit_verticalLayout.addWidget(self.limit_frame) limit_frame_verticalLayout = QVBoxLayout(self.limit_frame) # limit_spinBox limit_frame_horizontalLayout = QHBoxLayout() self.limit_spinBox = QDoubleSpinBox(self) self.limit_spinBox.setMinimum(1) self.limit_spinBox.setMaximum(1023) limit_frame_horizontalLayout.addWidget(self.limit_spinBox) # limit_comboBox self.limit_comboBox = QComboBox(self) self.limit_comboBox.addItem("") self.limit_comboBox.addItem("") limit_frame_horizontalLayout.addWidget(self.limit_comboBox) limit_frame_verticalLayout.addLayout(limit_frame_horizontalLayout) # limit_pushButton self.limit_pushButton = QPushButton(self) limit_frame_verticalLayout.addWidget(self.limit_pushButton) # after_checkBox self.after_checkBox = QCheckBox(self) limit_verticalLayout.addWidget(self.after_checkBox) # after_frame self.after_frame = QFrame(self) self.after_frame.setFrameShape(QFrame.StyledPanel) self.after_frame.setFrameShadow(QFrame.Raised) limit_verticalLayout.addWidget(self.after_frame) after_frame_verticalLayout = QVBoxLayout(self.after_frame) # after_comboBox self.after_comboBox = QComboBox(self) self.after_comboBox.addItem("") after_frame_verticalLayout.addWidget(self.after_comboBox) # after_pushButton self.after_pushButton = QPushButton(self) after_frame_verticalLayout.addWidget(self.after_pushButton) queue_panel_verticalLayout.addWidget(self.limit_after_frame) category_tree_verticalLayout.addWidget(self.queue_panel_widget) # keep_awake_checkBox self.keep_awake_checkBox = QCheckBox(self) queue_panel_verticalLayout.addWidget(self.keep_awake_checkBox) self.category_tree_qwidget.setLayout(category_tree_verticalLayout) horizontal_splitter.addWidget(self.category_tree_qwidget) # download table widget self.download_table_content_widget = QWidget(self) download_table_content_widget_verticalLayout = QVBoxLayout( self.download_table_content_widget) # download_table self.download_table = DownloadTableWidget(self) vertical_splitter.addWidget(self.download_table) horizontal_splitter.addWidget(self.download_table_content_widget) self.download_table.setColumnCount(13) self.download_table.setSelectionBehavior(QAbstractItemView.SelectRows) self.download_table.setEditTriggers(QAbstractItemView.NoEditTriggers) self.download_table.verticalHeader().hide() # hide column of GID and column of link. self.download_table.setColumnHidden(8, True) self.download_table.setColumnHidden(9, True) download_table_header = [ QCoreApplication.translate("mainwindow_ui_tr", 'File Name'), QCoreApplication.translate("mainwindow_ui_tr", 'Status'), QCoreApplication.translate("mainwindow_ui_tr", 'Size'), QCoreApplication.translate("mainwindow_ui_tr", 'Downloaded'), QCoreApplication.translate("mainwindow_ui_tr", 'Percentage'), QCoreApplication.translate("mainwindow_ui_tr", 'Connections'), QCoreApplication.translate("mainwindow_ui_tr", 'Transfer Rate'), QCoreApplication.translate("mainwindow_ui_tr", 'Estimated Time Left'), 'Gid', QCoreApplication.translate("mainwindow_ui_tr", 'Link'), QCoreApplication.translate("mainwindow_ui_tr", 'First Try Date'), QCoreApplication.translate("mainwindow_ui_tr", 'Last Try Date'), QCoreApplication.translate("mainwindow_ui_tr", 'Category') ] self.download_table.setHorizontalHeaderLabels(download_table_header) # fixing the size of download_table when window is Maximized! self.download_table.horizontalHeader().setSectionResizeMode( QHeaderView.ResizeMode.Interactive) self.download_table.horizontalHeader().setStretchLastSection(True) horizontal_splitter.setStretchFactor(0, 3) # category_tree width horizontal_splitter.setStretchFactor(1, 10) # ratio of tables's width # video_finder_widget self.video_finder_widget = QWidget(self) video_finder_horizontalLayout = QHBoxLayout(self.video_finder_widget) self.muxing_pushButton = QPushButton(self) self.muxing_pushButton.setIcon(QIcon(icons + 'video_finder')) video_finder_horizontalLayout.addWidget(self.muxing_pushButton) video_finder_horizontalLayout.addSpacing(20) video_audio_verticalLayout = QVBoxLayout() self.video_label = QLabel(self) video_audio_verticalLayout.addWidget(self.video_label) self.audio_label = QLabel(self) video_audio_verticalLayout.addWidget(self.audio_label) video_finder_horizontalLayout.addLayout(video_audio_verticalLayout) status_muxing_verticalLayout = QVBoxLayout() self.video_finder_status_label = QLabel(self) status_muxing_verticalLayout.addWidget(self.video_finder_status_label) self.muxing_status_label = QLabel(self) status_muxing_verticalLayout.addWidget(self.muxing_status_label) video_finder_horizontalLayout.addLayout(status_muxing_verticalLayout) vertical_splitter.addWidget(self.video_finder_widget) download_table_content_widget_verticalLayout.addWidget( vertical_splitter) download_table_horizontalLayout.addWidget(horizontal_splitter) self.frame.setLayout(download_table_horizontalLayout) self.verticalLayout.addWidget(self.frame) self.setCentralWidget(self.centralwidget) # menubar self.menubar = QMenuBar(self) self.menubar.setGeometry(QRect(0, 0, 600, 24)) self.setMenuBar(self.menubar) fileMenu = self.menubar.addMenu( QCoreApplication.translate("mainwindow_ui_tr", '&File')) editMenu = self.menubar.addMenu( QCoreApplication.translate("mainwindow_ui_tr", '&Edit')) viewMenu = self.menubar.addMenu( QCoreApplication.translate("mainwindow_ui_tr", '&View')) downloadMenu = self.menubar.addMenu( QCoreApplication.translate("mainwindow_ui_tr", '&Download')) queueMenu = self.menubar.addMenu( QCoreApplication.translate("mainwindow_ui_tr", '&Queue')) videoFinderMenu = self.menubar.addMenu( QCoreApplication.translate("mainwindow_ui_tr", 'V&ideo Finder')) helpMenu = self.menubar.addMenu( QCoreApplication.translate("mainwindow_ui_tr", '&Help')) # viewMenu submenus sortMenu = viewMenu.addMenu( QCoreApplication.translate("mainwindow_ui_tr", 'Sort by')) # statusbar self.statusbar = QStatusBar(self) self.setStatusBar(self.statusbar) self.statusbar.showMessage( QCoreApplication.translate("mainwindow_ui_tr", "Persepolis Download Manager")) # toolBar self.toolBar2 = QToolBar(self) self.addToolBar(Qt.TopToolBarArea, self.toolBar2) self.toolBar2.setWindowTitle( QCoreApplication.translate("mainwindow_ui_tr", 'Menu')) self.toolBar2.setFloatable(False) self.toolBar2.setMovable(False) self.toolBar = QToolBar(self) self.addToolBar(Qt.TopToolBarArea, self.toolBar) self.toolBar.setWindowTitle( QCoreApplication.translate("mainwindow_ui_tr", 'Toolbar')) self.toolBar.setFloatable(False) self.toolBar.setMovable(False) #toolBar and menubar and actions self.persepolis_setting.beginGroup('settings/shortcuts') # videoFinderAddLinkAction self.videoFinderAddLinkAction = QAction( QIcon(icons + 'video_finder'), QCoreApplication.translate("mainwindow_ui_tr", 'Find Video Links...'), self, statusTip=QCoreApplication.translate( "mainwindow_ui_tr", 'Download video or audio from Youtube, Vimeo, etc.'), triggered=self.showVideoFinderAddLinkWindow) self.videoFinderAddLinkAction_shortcut = QShortcut( self.persepolis_setting.value('video_finder_shortcut'), self, self.showVideoFinderAddLinkWindow) videoFinderMenu.addAction(self.videoFinderAddLinkAction) # stopAllAction self.stopAllAction = QAction(QIcon(icons + 'stop_all'), QCoreApplication.translate( "mainwindow_ui_tr", 'Stop All Active Downloads'), self, statusTip='Stop All Active Downloads', triggered=self.stopAllDownloads) downloadMenu.addAction(self.stopAllAction) # sort_file_name_Action self.sort_file_name_Action = QAction(QCoreApplication.translate( "mainwindow_ui_tr", 'File Name'), self, triggered=self.sortByName) sortMenu.addAction(self.sort_file_name_Action) # sort_file_size_Action self.sort_file_size_Action = QAction(QCoreApplication.translate( "mainwindow_ui_tr", 'File Size'), self, triggered=self.sortBySize) sortMenu.addAction(self.sort_file_size_Action) # sort_first_try_date_Action self.sort_first_try_date_Action = QAction( QCoreApplication.translate("mainwindow_ui_tr", 'First Try Date'), self, triggered=self.sortByFirstTry) sortMenu.addAction(self.sort_first_try_date_Action) # sort_last_try_date_Action self.sort_last_try_date_Action = QAction(QCoreApplication.translate( "mainwindow_ui_tr", 'Last Try Date'), self, triggered=self.sortByLastTry) sortMenu.addAction(self.sort_last_try_date_Action) # sort_download_status_Action self.sort_download_status_Action = QAction(QCoreApplication.translate( "mainwindow_ui_tr", 'Download Status'), self, triggered=self.sortByStatus) sortMenu.addAction(self.sort_download_status_Action) # trayAction self.trayAction = QAction( QCoreApplication.translate("mainwindow_ui_tr", 'Show System Tray Icon'), self, statusTip=QCoreApplication.translate("mainwindow_ui_tr", "Show/Hide system tray icon"), triggered=self.showTray) self.trayAction.setCheckable(True) viewMenu.addAction(self.trayAction) # showMenuBarAction self.showMenuBarAction = QAction( QCoreApplication.translate("mainwindow_ui_tr", 'Show Menubar'), self, statusTip=QCoreApplication.translate("mainwindow_ui_tr", 'Show Menubar'), triggered=self.showMenuBar) self.showMenuBarAction.setCheckable(True) viewMenu.addAction(self.showMenuBarAction) # showSidePanelAction self.showSidePanelAction = QAction( QCoreApplication.translate("mainwindow_ui_tr", 'Show Side Panel'), self, statusTip=QCoreApplication.translate("mainwindow_ui_tr", 'Show Side Panel'), triggered=self.showSidePanel) self.showSidePanelAction.setCheckable(True) viewMenu.addAction(self.showSidePanelAction) # minimizeAction self.minimizeAction = QAction( QIcon(icons + 'minimize'), QCoreApplication.translate("mainwindow_ui_tr", 'Minimize to System Tray'), self, statusTip=QCoreApplication.translate("mainwindow_ui_tr", "Minimize to System Tray"), triggered=self.minMaxTray) self.minimizeAction_shortcut = QShortcut( self.persepolis_setting.value('hide_window_shortcut'), self, self.minMaxTray) viewMenu.addAction(self.minimizeAction) # addlinkAction self.addlinkAction = QAction( QIcon(icons + 'add'), QCoreApplication.translate("mainwindow_ui_tr", 'Add New Download Link...'), self, statusTip=QCoreApplication.translate("mainwindow_ui_tr", "Add New Download Link"), triggered=self.addLinkButtonPressed) self.addlinkAction_shortcut = QShortcut( self.persepolis_setting.value('add_new_download_shortcut'), self, self.addLinkButtonPressed) fileMenu.addAction(self.addlinkAction) # importText self.addtextfileAction = QAction( QIcon(icons + 'file'), QCoreApplication.translate("mainwindow_ui_tr", 'Import Links from Text File...'), self, statusTip=QCoreApplication.translate( "mainwindow_ui_tr", 'Create a text file and put links in it, line by line!'), triggered=self.importText) self.addtextfileAction_shortcut = QShortcut( self.persepolis_setting.value('import_text_shortcut'), self, self.importText) fileMenu.addAction(self.addtextfileAction) # resumeAction self.resumeAction = QAction( QIcon(icons + 'play'), QCoreApplication.translate("mainwindow_ui_tr", 'Resume Download'), self, statusTip=QCoreApplication.translate("mainwindow_ui_tr", "Resume Download"), triggered=self.resumeButtonPressed) downloadMenu.addAction(self.resumeAction) # pauseAction self.pauseAction = QAction( QIcon(icons + 'pause'), QCoreApplication.translate("mainwindow_ui_tr", 'Pause Download'), self, statusTip=QCoreApplication.translate("mainwindow_ui_tr", "Pause Download"), triggered=self.pauseButtonPressed) downloadMenu.addAction(self.pauseAction) # stopAction self.stopAction = QAction( QIcon(icons + 'stop'), QCoreApplication.translate("mainwindow_ui_tr", 'Stop Download'), self, statusTip=QCoreApplication.translate("mainwindow_ui_tr", "Stop/Cancel Download"), triggered=self.stopButtonPressed) downloadMenu.addAction(self.stopAction) # propertiesAction self.propertiesAction = QAction( QIcon(icons + 'setting'), QCoreApplication.translate("mainwindow_ui_tr", 'Properties'), self, statusTip=QCoreApplication.translate("mainwindow_ui_tr", "Properties"), triggered=self.propertiesButtonPressed) downloadMenu.addAction(self.propertiesAction) # progressAction self.progressAction = QAction( QIcon(icons + 'window'), QCoreApplication.translate("mainwindow_ui_tr", 'Progress'), self, statusTip=QCoreApplication.translate("mainwindow_ui_tr", "Progress"), triggered=self.progressButtonPressed) downloadMenu.addAction(self.progressAction) # openFileAction self.openFileAction = QAction( QIcon(icons + 'file'), QCoreApplication.translate("mainwindow_ui_tr", 'Open File...'), self, statusTip=QCoreApplication.translate("mainwindow_ui_tr", 'Open File...'), triggered=self.openFile) fileMenu.addAction(self.openFileAction) # openDownloadFolderAction self.openDownloadFolderAction = QAction( QIcon(icons + 'folder'), QCoreApplication.translate("mainwindow_ui_tr", 'Open Download Folder'), self, statusTip=QCoreApplication.translate("mainwindow_ui_tr", 'Open Download Folder'), triggered=self.openDownloadFolder) fileMenu.addAction(self.openDownloadFolderAction) # openDefaultDownloadFolderAction self.openDefaultDownloadFolderAction = QAction( QIcon(icons + 'folder'), QCoreApplication.translate("mainwindow_ui_tr", 'Open Default Download Folder'), self, statusTip=QCoreApplication.translate( "mainwindow_ui_tr", 'Open Default Download Folder'), triggered=self.openDefaultDownloadFolder) fileMenu.addAction(self.openDefaultDownloadFolderAction) # exitAction self.exitAction = QAction( QIcon(icons + 'exit'), QCoreApplication.translate("mainwindow_ui_tr", 'Exit'), self, statusTip=QCoreApplication.translate("mainwindow_ui_tr", "Exit"), triggered=self.closeAction) self.exitAction_shortcut = QShortcut( self.persepolis_setting.value('quit_shortcut'), self, self.closeAction) fileMenu.addAction(self.exitAction) # clearAction self.clearAction = QAction(QIcon(icons + 'multi_remove'), QCoreApplication.translate( "mainwindow_ui_tr", 'Clear Download List'), self, statusTip=QCoreApplication.translate( "mainwindow_ui_tr", 'Clear all items in download list'), triggered=self.clearDownloadList) editMenu.addAction(self.clearAction) # removeSelectedAction self.removeSelectedAction = QAction( QIcon(icons + 'remove'), QCoreApplication.translate("mainwindow_ui_tr", 'Remove Selected Downloads from List'), self, statusTip=QCoreApplication.translate( "mainwindow_ui_tr", 'Remove Selected Downloads from List'), triggered=self.removeSelected) self.removeSelectedAction_shortcut = QShortcut( self.persepolis_setting.value('remove_shortcut'), self, self.removeSelected) editMenu.addAction(self.removeSelectedAction) self.removeSelectedAction.setEnabled(False) # deleteSelectedAction self.deleteSelectedAction = QAction( QIcon(icons + 'trash'), QCoreApplication.translate("mainwindow_ui_tr", 'Delete Selected Download Files'), self, statusTip=QCoreApplication.translate( "mainwindow_ui_tr", 'Delete Selected Download Files'), triggered=self.deleteSelected) self.deleteSelectedAction_shortcut = QShortcut( self.persepolis_setting.value('delete_shortcut'), self, self.deleteSelected) editMenu.addAction(self.deleteSelectedAction) self.deleteSelectedAction.setEnabled(False) # moveSelectedDownloadsAction self.moveSelectedDownloadsAction = QAction( QIcon(icons + 'folder'), QCoreApplication.translate( "mainwindow_ui_tr", 'Move Selected Download Files to Another Folder...'), self, statusTip=QCoreApplication.translate( "mainwindow_ui_tr", 'Move Selected Download Files to Another Folder'), triggered=self.moveSelectedDownloads) editMenu.addAction(self.moveSelectedDownloadsAction) self.moveSelectedDownloadsAction.setEnabled(False) # createQueueAction self.createQueueAction = QAction( QIcon(icons + 'add_queue'), QCoreApplication.translate("mainwindow_ui_tr", 'Create New Queue...'), self, statusTip=QCoreApplication.translate("mainwindow_ui_tr", 'Create new download queue'), triggered=self.createQueue) queueMenu.addAction(self.createQueueAction) # removeQueueAction self.removeQueueAction = QAction( QIcon(icons + 'remove_queue'), QCoreApplication.translate("mainwindow_ui_tr", 'Remove Queue'), self, statusTip=QCoreApplication.translate("mainwindow_ui_tr", 'Remove this queue'), triggered=self.removeQueue) queueMenu.addAction(self.removeQueueAction) # startQueueAction self.startQueueAction = QAction( QIcon(icons + 'start_queue'), QCoreApplication.translate("mainwindow_ui_tr", 'Start this queue'), self, statusTip=QCoreApplication.translate("mainwindow_ui_tr", 'Start Queue'), triggered=self.startQueue) queueMenu.addAction(self.startQueueAction) # stopQueueAction self.stopQueueAction = QAction( QIcon(icons + 'stop_queue'), QCoreApplication.translate("mainwindow_ui_tr", 'Stop this queue'), self, statusTip=QCoreApplication.translate("mainwindow_ui_tr", 'Stop Queue'), triggered=self.stopQueue) queueMenu.addAction(self.stopQueueAction) # moveUpSelectedAction self.moveUpSelectedAction = QAction( QIcon(icons + 'multi_up'), QCoreApplication.translate("mainwindow_ui_tr", 'Move Selected Items Up'), self, statusTip=QCoreApplication.translate( "mainwindow_ui_tr", 'Move currently selected items up by one row'), triggered=self.moveUpSelected) self.moveUpSelectedAction_shortcut = QShortcut( self.persepolis_setting.value('move_up_selection_shortcut'), self, self.moveUpSelected) queueMenu.addAction(self.moveUpSelectedAction) # moveDownSelectedAction self.moveDownSelectedAction = QAction( QIcon(icons + 'multi_down'), QCoreApplication.translate("mainwindow_ui_tr", 'Move Selected Items Down'), self, statusTip=QCoreApplication.translate( "mainwindow_ui_tr", 'Move currently selected items down by one row'), triggered=self.moveDownSelected) self.moveDownSelectedAction_shortcut = QShortcut( self.persepolis_setting.value('move_down_selection_shortcut'), self, self.moveDownSelected) queueMenu.addAction(self.moveDownSelectedAction) # preferencesAction self.preferencesAction = QAction( QIcon(icons + 'preferences'), QCoreApplication.translate("mainwindow_ui_tr", 'Preferences'), self, statusTip=QCoreApplication.translate("mainwindow_ui_tr", 'Preferences'), triggered=self.openPreferences, menuRole=QAction.MenuRole.PreferencesRole) editMenu.addAction(self.preferencesAction) # aboutAction self.aboutAction = QAction( QIcon(icons + 'about'), QCoreApplication.translate("mainwindow_ui_tr", 'About'), self, statusTip=QCoreApplication.translate("mainwindow_ui_tr", 'About'), triggered=self.openAbout, menuRole=QAction.MenuRole.AboutRole) helpMenu.addAction(self.aboutAction) # issueAction self.issueAction = QAction( QIcon(icons + 'about'), QCoreApplication.translate("mainwindow_ui_tr", 'Report an Issue'), self, statusTip=QCoreApplication.translate("mainwindow_ui_tr", 'Report an issue'), triggered=self.reportIssue) helpMenu.addAction(self.issueAction) # updateAction self.updateAction = QAction( QIcon(icons + 'about'), QCoreApplication.translate("mainwindow_ui_tr", 'Check for Newer Version'), self, statusTip=QCoreApplication.translate("mainwindow_ui_tr", 'Check for newer release'), triggered=self.newUpdate) helpMenu.addAction(self.updateAction) # logAction self.logAction = QAction( QIcon(icons + 'about'), QCoreApplication.translate("mainwindow_ui_tr", 'Show Log File'), self, statusTip=QCoreApplication.translate("mainwindow_ui_tr", 'Help'), triggered=self.showLog) helpMenu.addAction(self.logAction) # helpAction self.helpAction = QAction( QIcon(icons + 'about'), QCoreApplication.translate("mainwindow_ui_tr", 'Help'), self, statusTip=QCoreApplication.translate("mainwindow_ui_tr", 'Help'), triggered=self.persepolisHelp) helpMenu.addAction(self.helpAction) self.persepolis_setting.endGroup() self.qmenu = MenuWidget(self) self.toolBar2.addWidget(self.qmenu) # labels self.queue_panel_show_button.setText( QCoreApplication.translate("mainwindow_ui_tr", "Hide Options")) self.start_checkBox.setText( QCoreApplication.translate("mainwindow_ui_tr", "Start Time")) self.end_checkBox.setText( QCoreApplication.translate("mainwindow_ui_tr", "End Time")) self.reverse_checkBox.setText( QCoreApplication.translate("mainwindow_ui_tr", "Download bottom of\n the list first")) self.limit_checkBox.setText( QCoreApplication.translate("mainwindow_ui_tr", "Limit Speed")) self.limit_comboBox.setItemText(0, "KiB/s") self.limit_comboBox.setItemText(1, "MiB/s") self.limit_pushButton.setText( QCoreApplication.translate("mainwindow_ui_tr", "Apply")) self.after_checkBox.setText( QCoreApplication.translate("mainwindow_ui_tr", "After download")) self.after_comboBox.setItemText( 0, QCoreApplication.translate("mainwindow_ui_tr", "Shut Down")) self.keep_awake_checkBox.setText( QCoreApplication.translate("mainwindow_ui_tr", "Keep System Awake!")) self.keep_awake_checkBox.setToolTip( QCoreApplication.translate( "mainwindow_ui_tr", "<html><head/><body><p>This option will prevent the system from going to sleep.\ It is necessary if your power manager is suspending the system automatically. </p></body></html>" )) self.after_pushButton.setText( QCoreApplication.translate("mainwindow_ui_tr", "Apply")) self.muxing_pushButton.setText( QCoreApplication.translate("mainwindow_ui_tr", "Start Mixing")) self.video_label.setText( QCoreApplication.translate("mainwindow_ui_tr", "<b>Video File Status: </b>")) self.audio_label.setText( QCoreApplication.translate("mainwindow_ui_tr", "<b>Audio File Status: </b>")) self.video_finder_status_label.setText( QCoreApplication.translate("mainwindow_ui_tr", "<b>Status: </b>")) self.muxing_status_label.setText( QCoreApplication.translate("mainwindow_ui_tr", "<b>Mixing status: </b>"))
class Ui_DealsReportWidget(object): def setupUi(self, DealsReportWidget): if not DealsReportWidget.objectName(): DealsReportWidget.setObjectName(u"DealsReportWidget") DealsReportWidget.resize(821, 280) self.verticalLayout = QVBoxLayout(DealsReportWidget) self.verticalLayout.setSpacing(0) self.verticalLayout.setObjectName(u"verticalLayout") self.verticalLayout.setContentsMargins(0, 0, 0, 0) self.ReportParamsFrame = QFrame(DealsReportWidget) self.ReportParamsFrame.setObjectName(u"ReportParamsFrame") self.ReportParamsFrame.setFrameShape(QFrame.Panel) self.ReportParamsFrame.setFrameShadow(QFrame.Sunken) self.horizontalLayout = QHBoxLayout(self.ReportParamsFrame) self.horizontalLayout.setSpacing(6) self.horizontalLayout.setObjectName(u"horizontalLayout") self.horizontalLayout.setContentsMargins(2, 2, 2, 2) self.ReportRange = DateRangeSelector(self.ReportParamsFrame) self.ReportRange.setObjectName(u"ReportRange") self.ReportRange.setProperty("ItemsList", u"QTD;YTD;this_year;last_year") self.horizontalLayout.addWidget(self.ReportRange) self.ReportGroupCheck = QCheckBox(self.ReportParamsFrame) self.ReportGroupCheck.setObjectName(u"ReportGroupCheck") self.horizontalLayout.addWidget(self.ReportGroupCheck) self.ReportAccountLbl = QLabel(self.ReportParamsFrame) self.ReportAccountLbl.setObjectName(u"ReportAccountLbl") self.horizontalLayout.addWidget(self.ReportAccountLbl) self.ReportAccountBtn = AccountButton(self.ReportParamsFrame) self.ReportAccountBtn.setObjectName(u"ReportAccountBtn") self.horizontalLayout.addWidget(self.ReportAccountBtn) self.ReportFrameSpacer = QSpacerItem(40, 20, QSizePolicy.Expanding, QSizePolicy.Minimum) self.horizontalLayout.addItem(self.ReportFrameSpacer) self.verticalLayout.addWidget(self.ReportParamsFrame) self.ReportTableView = QTableView(DealsReportWidget) self.ReportTableView.setObjectName(u"ReportTableView") self.ReportTableView.setFrameShape(QFrame.Panel) self.ReportTableView.setFrameShadow(QFrame.Sunken) self.ReportTableView.setEditTriggers(QAbstractItemView.NoEditTriggers) self.ReportTableView.setAlternatingRowColors(True) self.ReportTableView.setGridStyle(Qt.DotLine) self.ReportTableView.setWordWrap(False) self.ReportTableView.verticalHeader().setVisible(False) self.ReportTableView.verticalHeader().setMinimumSectionSize(20) self.ReportTableView.verticalHeader().setDefaultSectionSize(20) self.verticalLayout.addWidget(self.ReportTableView) self.retranslateUi(DealsReportWidget) QMetaObject.connectSlotsByName(DealsReportWidget) # setupUi def retranslateUi(self, DealsReportWidget): DealsReportWidget.setWindowTitle( QCoreApplication.translate("DealsReportWidget", u"Deals", None)) self.ReportGroupCheck.setText( QCoreApplication.translate("DealsReportWidget", u"Group dates", None)) self.ReportAccountLbl.setText( QCoreApplication.translate("DealsReportWidget", u"Account:", None))
def setupUi(self, ConfigCapture_UI): if not ConfigCapture_UI.objectName(): ConfigCapture_UI.setObjectName(u"ConfigCapture_UI") ConfigCapture_UI.resize(525, 520) self.gridLayout_8 = QGridLayout(ConfigCapture_UI) self.gridLayout_8.setObjectName(u"gridLayout_8") self.gridLayout_8.setContentsMargins(0, 0, -1, -1) self.label = QLabel(ConfigCapture_UI) self.label.setObjectName(u"label") self.gridLayout_8.addWidget(self.label, 0, 0, 1, 1) self.kcfg_defaultcapture = QComboBox(ConfigCapture_UI) self.kcfg_defaultcapture.addItem("") self.kcfg_defaultcapture.addItem("") self.kcfg_defaultcapture.setObjectName(u"kcfg_defaultcapture") sizePolicy = QSizePolicy(QSizePolicy.Expanding, QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.kcfg_defaultcapture.sizePolicy().hasHeightForWidth()) self.kcfg_defaultcapture.setSizePolicy(sizePolicy) self.gridLayout_8.addWidget(self.kcfg_defaultcapture, 0, 1, 1, 1) self.tabWidget = QTabWidget(ConfigCapture_UI) self.tabWidget.setObjectName(u"tabWidget") self.tabWidget.setMinimumSize(QSize(401, 0)) self.ffmpeg_tab = QWidget() self.ffmpeg_tab.setObjectName(u"ffmpeg_tab") self.gridLayout = QGridLayout(self.ffmpeg_tab) self.gridLayout.setObjectName(u"gridLayout") self.line = QFrame(self.ffmpeg_tab) self.line.setObjectName(u"line") self.line.setFrameShape(QFrame.HLine) self.line.setFrameShadow(QFrame.Sunken) self.gridLayout.addWidget(self.line, 10, 0, 4, 8) self.label_9 = QLabel(self.ffmpeg_tab) self.label_9.setObjectName(u"label_9") self.gridLayout.addWidget(self.label_9, 3, 0, 1, 2) self.kcfg_alsachannels = QSpinBox(self.ffmpeg_tab) self.kcfg_alsachannels.setObjectName(u"kcfg_alsachannels") self.gridLayout.addWidget(self.kcfg_alsachannels, 15, 6, 1, 2) self.label_24 = QLabel(self.ffmpeg_tab) self.label_24.setObjectName(u"label_24") sizePolicy1 = QSizePolicy(QSizePolicy.Maximum, QSizePolicy.Preferred) sizePolicy1.setHorizontalStretch(0) sizePolicy1.setVerticalStretch(0) sizePolicy1.setHeightForWidth( self.label_24.sizePolicy().hasHeightForWidth()) self.label_24.setSizePolicy(sizePolicy1) self.gridLayout.addWidget(self.label_24, 18, 0, 1, 2) self.label_4 = QLabel(self.ffmpeg_tab) self.label_4.setObjectName(u"label_4") self.gridLayout.addWidget(self.label_4, 5, 0, 1, 2) self.kcfg_v4l_format = QComboBox(self.ffmpeg_tab) self.kcfg_v4l_format.setObjectName(u"kcfg_v4l_format") self.gridLayout.addWidget(self.kcfg_v4l_format, 3, 3, 1, 5) self.label_11 = QLabel(self.ffmpeg_tab) self.label_11.setObjectName(u"label_11") self.gridLayout.addWidget(self.label_11, 15, 5, 1, 1) self.horizontalSpacer_5 = QSpacerItem(127, 21, QSizePolicy.Expanding, QSizePolicy.Minimum) self.gridLayout.addItem(self.horizontalSpacer_5, 9, 3, 1, 2) self.config_v4l = QPushButton(self.ffmpeg_tab) self.config_v4l.setObjectName(u"config_v4l") self.gridLayout.addWidget(self.config_v4l, 9, 5, 1, 3) self.kcfg_v4l_alsadevice = QComboBox(self.ffmpeg_tab) self.kcfg_v4l_alsadevice.setObjectName(u"kcfg_v4l_alsadevice") sizePolicy2 = QSizePolicy(QSizePolicy.MinimumExpanding, QSizePolicy.Fixed) sizePolicy2.setHorizontalStretch(0) sizePolicy2.setVerticalStretch(0) sizePolicy2.setHeightForWidth( self.kcfg_v4l_alsadevice.sizePolicy().hasHeightForWidth()) self.kcfg_v4l_alsadevice.setSizePolicy(sizePolicy2) self.gridLayout.addWidget(self.kcfg_v4l_alsadevice, 15, 0, 1, 5) self.label_31 = QLabel(self.ffmpeg_tab) self.label_31.setObjectName(u"label_31") self.gridLayout.addWidget(self.label_31, 7, 0, 1, 3) self.p_progressive = QLabel(self.ffmpeg_tab) self.p_progressive.setObjectName(u"p_progressive") self.gridLayout.addWidget(self.p_progressive, 9, 0, 1, 2) self.label_30 = QLabel(self.ffmpeg_tab) self.label_30.setObjectName(u"label_30") self.gridLayout.addWidget(self.label_30, 1, 0, 1, 2) self.label_14 = QLabel(self.ffmpeg_tab) self.label_14.setObjectName(u"label_14") self.gridLayout.addWidget(self.label_14, 2, 0, 1, 2) self.v4l_profile_box = QHBoxLayout() self.v4l_profile_box.setObjectName(u"v4l_profile_box") self.gridLayout.addLayout(self.v4l_profile_box, 18, 3, 1, 5) self.kcfg_detectedv4ldevices = QComboBox(self.ffmpeg_tab) self.kcfg_detectedv4ldevices.setObjectName(u"kcfg_detectedv4ldevices") self.gridLayout.addWidget(self.kcfg_detectedv4ldevices, 1, 3, 1, 5) self.p_aspect = QLabel(self.ffmpeg_tab) self.p_aspect.setObjectName(u"p_aspect") self.gridLayout.addWidget(self.p_aspect, 6, 3, 1, 5) self.label_23 = QLabel(self.ffmpeg_tab) self.label_23.setObjectName(u"label_23") self.gridLayout.addWidget(self.label_23, 6, 0, 1, 2) self.kcfg_v4l_captureaudio = QCheckBox(self.ffmpeg_tab) self.kcfg_v4l_captureaudio.setObjectName(u"kcfg_v4l_captureaudio") self.gridLayout.addWidget(self.kcfg_v4l_captureaudio, 14, 0, 1, 8) self.verticalSpacer = QSpacerItem(20, 40, QSizePolicy.Minimum, QSizePolicy.Expanding) self.gridLayout.addItem(self.verticalSpacer, 20, 1, 1, 3) self.kcfg_v4l_capturevideo = QCheckBox(self.ffmpeg_tab) self.kcfg_v4l_capturevideo.setObjectName(u"kcfg_v4l_capturevideo") self.gridLayout.addWidget(self.kcfg_v4l_capturevideo, 0, 0, 1, 8) self.label_6 = QLabel(self.ffmpeg_tab) self.label_6.setObjectName(u"label_6") self.gridLayout.addWidget(self.label_6, 4, 0, 1, 1) self.line_2 = QFrame(self.ffmpeg_tab) self.line_2.setObjectName(u"line_2") self.line_2.setFrameShape(QFrame.HLine) self.line_2.setFrameShadow(QFrame.Sunken) self.gridLayout.addWidget(self.line_2, 17, 0, 1, 8) self.label_32 = QLabel(self.ffmpeg_tab) self.label_32.setObjectName(u"label_32") self.gridLayout.addWidget(self.label_32, 8, 0, 1, 2) self.p_size = QLabel(self.ffmpeg_tab) self.p_size.setObjectName(u"p_size") self.gridLayout.addWidget(self.p_size, 4, 3, 1, 5) self.p_display = QLabel(self.ffmpeg_tab) self.p_display.setObjectName(u"p_display") self.gridLayout.addWidget(self.p_display, 7, 3, 1, 5) self.kcfg_video4vdevice = QLineEdit(self.ffmpeg_tab) self.kcfg_video4vdevice.setObjectName(u"kcfg_video4vdevice") self.gridLayout.addWidget(self.kcfg_video4vdevice, 2, 3, 1, 5) self.p_colorspace = QLabel(self.ffmpeg_tab) self.p_colorspace.setObjectName(u"p_colorspace") self.gridLayout.addWidget(self.p_colorspace, 8, 3, 1, 5) self.p_fps = QLabel(self.ffmpeg_tab) self.p_fps.setObjectName(u"p_fps") self.gridLayout.addWidget(self.p_fps, 5, 3, 1, 5) self.tabWidget.addTab(self.ffmpeg_tab, "") self.screen_grab_tab = QWidget() self.screen_grab_tab.setObjectName(u"screen_grab_tab") self.gridLayout_5 = QGridLayout(self.screen_grab_tab) self.gridLayout_5.setObjectName(u"gridLayout_5") self.kcfg_grab_hide_mouse = QCheckBox(self.screen_grab_tab) self.kcfg_grab_hide_mouse.setObjectName(u"kcfg_grab_hide_mouse") self.gridLayout_5.addWidget(self.kcfg_grab_hide_mouse, 3, 0, 1, 4) self.horizontalSpacer_2 = QSpacerItem(237, 20, QSizePolicy.Expanding, QSizePolicy.Minimum) self.gridLayout_5.addItem(self.horizontalSpacer_2, 2, 2, 1, 1) self.verticalSpacer_3 = QSpacerItem(383, 160, QSizePolicy.Minimum, QSizePolicy.Expanding) self.gridLayout_5.addItem(self.verticalSpacer_3, 8, 0, 1, 3) self.label_screengrab = QLabel(self.screen_grab_tab) self.label_screengrab.setObjectName(u"label_screengrab") sizePolicy1.setHeightForWidth( self.label_screengrab.sizePolicy().hasHeightForWidth()) self.label_screengrab.setSizePolicy(sizePolicy1) self.gridLayout_5.addWidget(self.label_screengrab, 5, 0, 1, 1) self.kcfg_grab_capture_type = QComboBox(self.screen_grab_tab) self.kcfg_grab_capture_type.addItem("") self.kcfg_grab_capture_type.addItem("") self.kcfg_grab_capture_type.setObjectName(u"kcfg_grab_capture_type") self.gridLayout_5.addWidget(self.kcfg_grab_capture_type, 0, 0, 1, 3) self.screen_grab_profile_box = QHBoxLayout() self.screen_grab_profile_box.setObjectName(u"screen_grab_profile_box") self.gridLayout_5.addLayout(self.screen_grab_profile_box, 5, 1, 1, 2) self.label_18 = QLabel(self.screen_grab_tab) self.label_18.setObjectName(u"label_18") self.gridLayout_5.addWidget(self.label_18, 2, 0, 1, 1) self.region_group = QFrame(self.screen_grab_tab) self.region_group.setObjectName(u"region_group") self.region_group.setFrameShape(QFrame.StyledPanel) self.region_group.setFrameShadow(QFrame.Raised) self.gridLayout_3 = QGridLayout(self.region_group) self.gridLayout_3.setObjectName(u"gridLayout_3") self.horizontalLayout = QHBoxLayout() self.horizontalLayout.setObjectName(u"horizontalLayout") self.kcfg_grab_follow_mouse = QCheckBox(self.region_group) self.kcfg_grab_follow_mouse.setObjectName(u"kcfg_grab_follow_mouse") self.horizontalLayout.addWidget(self.kcfg_grab_follow_mouse) self.kcfg_grab_hide_frame = QCheckBox(self.region_group) self.kcfg_grab_hide_frame.setObjectName(u"kcfg_grab_hide_frame") self.horizontalLayout.addWidget(self.kcfg_grab_hide_frame) self.horizontalSpacer_4 = QSpacerItem(40, 20, QSizePolicy.Expanding, QSizePolicy.Minimum) self.horizontalLayout.addItem(self.horizontalSpacer_4) self.gridLayout_3.addLayout(self.horizontalLayout, 0, 0, 1, 3) self.label_19 = QLabel(self.region_group) self.label_19.setObjectName(u"label_19") self.gridLayout_3.addWidget(self.label_19, 1, 0, 1, 1) self.kcfg_grab_offsetx = QSpinBox(self.region_group) self.kcfg_grab_offsetx.setObjectName(u"kcfg_grab_offsetx") sizePolicy.setHeightForWidth( self.kcfg_grab_offsetx.sizePolicy().hasHeightForWidth()) self.kcfg_grab_offsetx.setSizePolicy(sizePolicy) self.kcfg_grab_offsetx.setMaximum(5000) self.kcfg_grab_offsetx.setValue(0) self.gridLayout_3.addWidget(self.kcfg_grab_offsetx, 1, 1, 1, 1) self.kcfg_grab_offsety = QSpinBox(self.region_group) self.kcfg_grab_offsety.setObjectName(u"kcfg_grab_offsety") sizePolicy.setHeightForWidth( self.kcfg_grab_offsety.sizePolicy().hasHeightForWidth()) self.kcfg_grab_offsety.setSizePolicy(sizePolicy) self.kcfg_grab_offsety.setMaximum(5000) self.kcfg_grab_offsety.setValue(0) self.gridLayout_3.addWidget(self.kcfg_grab_offsety, 1, 2, 1, 1) self.label_20 = QLabel(self.region_group) self.label_20.setObjectName(u"label_20") self.gridLayout_3.addWidget(self.label_20, 2, 0, 1, 1) self.kcfg_grab_width = QSpinBox(self.region_group) self.kcfg_grab_width.setObjectName(u"kcfg_grab_width") self.kcfg_grab_width.setMinimum(1) self.kcfg_grab_width.setMaximum(5000) self.kcfg_grab_width.setValue(1280) self.gridLayout_3.addWidget(self.kcfg_grab_width, 2, 1, 1, 1) self.kcfg_grab_height = QSpinBox(self.region_group) self.kcfg_grab_height.setObjectName(u"kcfg_grab_height") self.kcfg_grab_height.setMinimum(1) self.kcfg_grab_height.setMaximum(5000) self.kcfg_grab_height.setValue(720) self.gridLayout_3.addWidget(self.kcfg_grab_height, 2, 2, 1, 1) self.gridLayout_5.addWidget(self.region_group, 1, 0, 1, 3) self.kcfg_grab_fps = QDoubleSpinBox(self.screen_grab_tab) self.kcfg_grab_fps.setObjectName(u"kcfg_grab_fps") self.kcfg_grab_fps.setMinimum(1.000000000000000) self.kcfg_grab_fps.setMaximum(1000.000000000000000) self.gridLayout_5.addWidget(self.kcfg_grab_fps, 2, 1, 1, 1) self.tabWidget.addTab(self.screen_grab_tab, "") self.decklink_tab = QWidget() self.decklink_tab.setObjectName(u"decklink_tab") self.gridLayout_6 = QGridLayout(self.decklink_tab) self.gridLayout_6.setObjectName(u"gridLayout_6") self.kcfg_decklink_capturedevice = QComboBox(self.decklink_tab) self.kcfg_decklink_capturedevice.setObjectName( u"kcfg_decklink_capturedevice") sizePolicy.setHeightForWidth( self.kcfg_decklink_capturedevice.sizePolicy().hasHeightForWidth()) self.kcfg_decklink_capturedevice.setSizePolicy(sizePolicy) self.gridLayout_6.addWidget(self.kcfg_decklink_capturedevice, 0, 1, 1, 1) self.kcfg_decklink_filename = QLineEdit(self.decklink_tab) self.kcfg_decklink_filename.setObjectName(u"kcfg_decklink_filename") self.gridLayout_6.addWidget(self.kcfg_decklink_filename, 5, 1, 1, 1) self.label_16 = QLabel(self.decklink_tab) self.label_16.setObjectName(u"label_16") sizePolicy1.setHeightForWidth( self.label_16.sizePolicy().hasHeightForWidth()) self.label_16.setSizePolicy(sizePolicy1) self.gridLayout_6.addWidget(self.label_16, 2, 0, 1, 1) self.label_29 = QLabel(self.decklink_tab) self.label_29.setObjectName(u"label_29") self.gridLayout_6.addWidget(self.label_29, 5, 0, 1, 1) self.verticalSpacer_4 = QSpacerItem(20, 327, QSizePolicy.Minimum, QSizePolicy.Expanding) self.gridLayout_6.addItem(self.verticalSpacer_4, 6, 1, 1, 1) self.label_27 = QLabel(self.decklink_tab) self.label_27.setObjectName(u"label_27") self.gridLayout_6.addWidget(self.label_27, 0, 0, 1, 1) self.decklink_profile_box = QHBoxLayout() self.decklink_profile_box.setSpacing(0) self.decklink_profile_box.setObjectName(u"decklink_profile_box") self.gridLayout_6.addLayout(self.decklink_profile_box, 2, 1, 1, 1) self.tabWidget.addTab(self.decklink_tab, "") self.audio_tab = QWidget() self.audio_tab.setObjectName(u"audio_tab") self.gridLayout_2 = QGridLayout(self.audio_tab) self.gridLayout_2.setObjectName(u"gridLayout_2") self.label_5 = QLabel(self.audio_tab) self.label_5.setObjectName(u"label_5") self.gridLayout_2.addWidget(self.label_5, 5, 0, 1, 1) self.label_2 = QLabel(self.audio_tab) self.label_2.setObjectName(u"label_2") self.gridLayout_2.addWidget(self.label_2, 3, 0, 1, 1) self.verticalSpacer_2 = QSpacerItem(20, 661, QSizePolicy.Minimum, QSizePolicy.Expanding) self.gridLayout_2.addItem(self.verticalSpacer_2, 6, 1, 1, 1) self.label_3 = QLabel(self.audio_tab) self.label_3.setObjectName(u"label_3") self.gridLayout_2.addWidget(self.label_3, 4, 0, 1, 1) self.audiocapturesamplerate = QComboBox(self.audio_tab) self.audiocapturesamplerate.setObjectName(u"audiocapturesamplerate") self.gridLayout_2.addWidget(self.audiocapturesamplerate, 5, 1, 1, 1) self.kcfg_audiocapturevolume = QSlider(self.audio_tab) self.kcfg_audiocapturevolume.setObjectName(u"kcfg_audiocapturevolume") self.kcfg_audiocapturevolume.setMaximum(100) self.kcfg_audiocapturevolume.setSliderPosition(100) self.kcfg_audiocapturevolume.setTracking(True) self.kcfg_audiocapturevolume.setOrientation(Qt.Horizontal) self.kcfg_audiocapturevolume.setInvertedAppearance(False) self.kcfg_audiocapturevolume.setInvertedControls(False) self.kcfg_audiocapturevolume.setTickPosition(QSlider.TicksAbove) self.gridLayout_2.addWidget(self.kcfg_audiocapturevolume, 3, 1, 1, 1) self.audiocapturechannels = QComboBox(self.audio_tab) self.audiocapturechannels.setObjectName(u"audiocapturechannels") self.gridLayout_2.addWidget(self.audiocapturechannels, 4, 1, 1, 1) self.kcfg_defaultaudiocapture = QComboBox(self.audio_tab) self.kcfg_defaultaudiocapture.setObjectName( u"kcfg_defaultaudiocapture") self.gridLayout_2.addWidget(self.kcfg_defaultaudiocapture, 1, 1, 1, 1) self.label_33 = QLabel(self.audio_tab) self.label_33.setObjectName(u"label_33") self.gridLayout_2.addWidget(self.label_33, 1, 0, 1, 1) self.labelNoAudioDevices = QLabel(self.audio_tab) self.labelNoAudioDevices.setObjectName(u"labelNoAudioDevices") font = QFont() font.setPointSize(10) self.labelNoAudioDevices.setFont(font) self.gridLayout_2.addWidget(self.labelNoAudioDevices, 2, 0, 1, 2) self.tabWidget.addTab(self.audio_tab, "") self.gridLayout_8.addWidget(self.tabWidget, 1, 0, 1, 2) QWidget.setTabOrder(self.kcfg_defaultcapture, self.tabWidget) QWidget.setTabOrder(self.tabWidget, self.kcfg_grab_capture_type) QWidget.setTabOrder(self.kcfg_grab_capture_type, self.kcfg_grab_follow_mouse) QWidget.setTabOrder(self.kcfg_grab_follow_mouse, self.kcfg_grab_hide_frame) QWidget.setTabOrder(self.kcfg_grab_hide_frame, self.kcfg_grab_offsetx) QWidget.setTabOrder(self.kcfg_grab_offsetx, self.kcfg_grab_offsety) QWidget.setTabOrder(self.kcfg_grab_offsety, self.kcfg_grab_width) QWidget.setTabOrder(self.kcfg_grab_width, self.kcfg_grab_height) self.retranslateUi(ConfigCapture_UI) self.tabWidget.setCurrentIndex(0) QMetaObject.connectSlotsByName(ConfigCapture_UI)
def setupUi(self, TaxEstimationDialog): if not TaxEstimationDialog.objectName(): TaxEstimationDialog.setObjectName(u"TaxEstimationDialog") TaxEstimationDialog.resize(754, 191) self.verticalLayout = QVBoxLayout(TaxEstimationDialog) self.verticalLayout.setSpacing(2) self.verticalLayout.setObjectName(u"verticalLayout") self.verticalLayout.setContentsMargins(0, 0, 0, 0) self.horizontalLayout = QHBoxLayout() self.horizontalLayout.setSpacing(2) self.horizontalLayout.setObjectName(u"horizontalLayout") self.RateFrame = QFrame(TaxEstimationDialog) self.RateFrame.setObjectName(u"RateFrame") self.RateFrame.setFrameShape(QFrame.StyledPanel) self.RateFrame.setFrameShadow(QFrame.Raised) self.horizontalLayout_2 = QHBoxLayout(self.RateFrame) self.horizontalLayout_2.setObjectName(u"horizontalLayout_2") self.horizontalLayout_2.setContentsMargins(0, 0, 0, 0) self.LastQuoteLbl = QLabel(self.RateFrame) self.LastQuoteLbl.setObjectName(u"LastQuoteLbl") font = QFont() font.setBold(True) self.LastQuoteLbl.setFont(font) self.horizontalLayout_2.addWidget(self.LastQuoteLbl) self.QuoteLbl = QLabel(self.RateFrame) self.QuoteLbl.setObjectName(u"QuoteLbl") self.horizontalLayout_2.addWidget(self.QuoteLbl) self.RateSpacer = QSpacerItem(40, 20, QSizePolicy.Expanding, QSizePolicy.Minimum) self.horizontalLayout_2.addItem(self.RateSpacer) self.horizontalLayout.addWidget(self.RateFrame) self.QuoteFrame = QFrame(TaxEstimationDialog) self.QuoteFrame.setObjectName(u"QuoteFrame") self.QuoteFrame.setFrameShape(QFrame.StyledPanel) self.QuoteFrame.setFrameShadow(QFrame.Raised) self.horizontalLayout_3 = QHBoxLayout(self.QuoteFrame) self.horizontalLayout_3.setObjectName(u"horizontalLayout_3") self.horizontalLayout_3.setContentsMargins(0, 0, 0, 0) self.CurrentRateLbl = QLabel(self.QuoteFrame) self.CurrentRateLbl.setObjectName(u"CurrentRateLbl") self.CurrentRateLbl.setFont(font) self.horizontalLayout_3.addWidget(self.CurrentRateLbl) self.RateLbl = QLabel(self.QuoteFrame) self.RateLbl.setObjectName(u"RateLbl") self.horizontalLayout_3.addWidget(self.RateLbl) self.QuoteSpacer = QSpacerItem(40, 20, QSizePolicy.Expanding, QSizePolicy.Minimum) self.horizontalLayout_3.addItem(self.QuoteSpacer) self.horizontalLayout.addWidget(self.QuoteFrame) self.verticalLayout.addLayout(self.horizontalLayout) self.DealsView = QTableView(TaxEstimationDialog) self.DealsView.setObjectName(u"DealsView") self.DealsView.setSelectionBehavior(QAbstractItemView.SelectRows) self.DealsView.verticalHeader().setVisible(False) self.DealsView.verticalHeader().setMinimumSectionSize(20) self.DealsView.verticalHeader().setDefaultSectionSize(20) self.verticalLayout.addWidget(self.DealsView) self.retranslateUi(TaxEstimationDialog) QMetaObject.connectSlotsByName(TaxEstimationDialog)
def setupUi(self): self.centralwidget = QWidget(self) with open(resource_path('style.css'), 'r') as file: self.centralwidget.setStyleSheet(file.read()) self.appswidget = QWidget(self.centralwidget) self.appswidget.setGeometry(50, 0, 490, 470) self.appswidget.setProperty('class', 'appswidget') self.sidebar = QFrame(self.centralwidget) self.sidebar.setFrameShape(QFrame.StyledPanel) self.sidebar.setGeometry(0, 0, 50, 470) self.sidebar.setProperty('class', 'sidebar') self.refresh_btn = QPushButton(self.sidebar) self.refresh_btn.setGeometry(QRect(0, 0, 51, 51)) self.refresh_btn.setProperty('class', 'sidebar_btns') self.refresh_btn.setIcon(QIcon(':/icon/refresh_icon.png')) self.refresh_btn.setIconSize(QSize(24, 24)) self.refresh_bind = QShortcut(QKeySequence('Ctrl+R'), self) self.store_btn = QPushButton(self.sidebar) self.store_btn.setGeometry(QRect(0, 51, 51, 51)) self.store_btn.setProperty('class', 'sidebar_btns') self.store_btn.setIcon(QIcon(':/icon/store_icon.png')) self.store_btn.setIconSize(QSize(24, 24)) self.store_bind = QShortcut(QKeySequence('Ctrl+S'), self) self.homepage_btn = QPushButton(self.sidebar) self.homepage_btn.setGeometry(QRect(0, 102, 51, 51)) self.homepage_btn.setProperty('class', 'sidebar_btns') self.homepage_btn.setIcon(QIcon(':/icon/github_icon.png')) self.homepage_btn.setIconSize(QSize(24, 24)) self.homepage_bind = QShortcut(QKeySequence('Ctrl+G'), self) self.about_btn = QPushButton(self.sidebar) self.about_btn.setGeometry(QRect(0, 153, 51, 51)) self.about_btn.setProperty('class', 'sidebar_btns') self.about_btn.setIcon(QIcon(':/icon/about_icon.png')) self.about_btn.setIconSize(QSize(24, 24)) self.about_bind = QShortcut(QKeySequence('Ctrl+A'), self) self.quit_btn = QPushButton(self.sidebar) self.quit_btn.setGeometry(QRect(0, 420, 51, 51)) self.quit_btn.setProperty('class', 'sidebar_btns_quit') self.quit_btn.setIcon(QIcon(':/icon/quit_icon.png')) self.quit_btn.setIconSize(QSize(24, 24)) self.quit_bind = QShortcut(QKeySequence('Ctrl+Q'), self) self.font = QFont() self.font.setPointSize(8) self.font.setStyleStrategy(QFont.PreferAntialias) self.label_refresh = QLabel(self.appswidget) self.label_refresh.setFont(self.font) self.label_refresh.setGeometry(QRect(20, 10, 441, 15)) self.label_info = QLabel(self.appswidget) self.label_info.setFont(self.font) self.label_info.setGeometry(QRect(20, 10, 441, 30)) self.progressbar = QProgressBar(self.appswidget) self.progressbar.setGeometry(QRect(20, 30, 441, 20)) self.layout_widget_checkboxes = QWidget(self.appswidget) self.layout_widget_checkboxes.setGeometry(QRect(20, 55, 155, 311)) self.layout_checkboxes = QVBoxLayout(self.layout_widget_checkboxes) self.layout_checkboxes.setContentsMargins(0, 0, 0, 0) self.layout_widget_checkboxes_2 = QWidget(self.appswidget) self.layout_widget_checkboxes_2.setGeometry(QRect(175, 55, 155, 311)) self.layout_checkboxes_2 = QVBoxLayout(self.layout_widget_checkboxes_2) self.layout_checkboxes_2.setContentsMargins(0, 0, 0, 0) self.layout_widget_checkboxes_3 = QWidget(self.appswidget) self.layout_widget_checkboxes_3.setGeometry(QRect(330, 55, 155, 311)) self.layout_checkboxes_3 = QVBoxLayout(self.layout_widget_checkboxes_3) self.layout_checkboxes_3.setContentsMargins(0, 0, 0, 0) self.layout_widget_labels = QWidget(self.appswidget) self.layout_widget_labels.setGeometry(QRect(20, 390, 350, 16)) self.layout_labels = QHBoxLayout(self.layout_widget_labels) self.layout_labels.setContentsMargins(0, 0, 0, 0) self.label_space = QLabel(self.appswidget) self.label_space.setFont(self.font) self.layout_labels.addWidget(self.label_space) self.label_size = QLabel(self.appswidget) self.label_size.setFont(self.font) self.layout_labels.addWidget(self.label_size) self.layout_widget_buttons = QWidget(self.appswidget) self.layout_widget_buttons.setGeometry(QRect(20, 420, 454, 31)) self.layout_buttons = QHBoxLayout(self.layout_widget_buttons) self.layout_buttons.setContentsMargins(0, 0, 0, 0) self.button_select_all = QPushButton(self.layout_widget_buttons) self.button_select_all.setIcon(QIcon(':/icon/check_icon.png')) self.button_select_all.setIconSize(QSize(18, 18)) self.button_select_all.setLayoutDirection(Qt.RightToLeft) self.layout_buttons.addWidget(self.button_select_all) self.button_select_all.setMinimumSize(100, 30) self.button_select_all.setProperty('class', 'Aqua') self.button_deselect_all = QPushButton(self.layout_widget_buttons) self.button_deselect_all.setIcon(QIcon(':/icon/cancel_icon.png')) self.button_deselect_all.setIconSize(QSize(18, 18)) self.button_deselect_all.setLayoutDirection(Qt.RightToLeft) self.layout_buttons.addWidget(self.button_deselect_all) self.button_deselect_all.setMinimumSize(100, 30) self.button_deselect_all.setProperty('class', 'Aqua') self.layout_buttons.addStretch() self.button_uninstall = QPushButton(self.layout_widget_buttons) self.button_uninstall.setIcon(QIcon(':/icon/trash_icon.png')) self.button_uninstall.setIconSize(QSize(18, 18)) self.button_uninstall.setLayoutDirection(Qt.RightToLeft) self.layout_buttons.addWidget(self.button_uninstall) self.button_uninstall.setMinimumSize(100, 30) self.button_uninstall.setProperty('class', 'Grapefruit') self.setCentralWidget(self.centralwidget) self.retranslateUi() QMetaObject.connectSlotsByName(self)
class Ui_MainWindow(QMainWindow): def __init__(self): super().__init__() self.setWindowIcon(QIcon(resource_path('icon.ico'))) self.setFixedSize(540, 470) def setupUi(self): self.centralwidget = QWidget(self) with open(resource_path('style.css'), 'r') as file: self.centralwidget.setStyleSheet(file.read()) self.appswidget = QWidget(self.centralwidget) self.appswidget.setGeometry(50, 0, 490, 470) self.appswidget.setProperty('class', 'appswidget') self.sidebar = QFrame(self.centralwidget) self.sidebar.setFrameShape(QFrame.StyledPanel) self.sidebar.setGeometry(0, 0, 50, 470) self.sidebar.setProperty('class', 'sidebar') self.refresh_btn = QPushButton(self.sidebar) self.refresh_btn.setGeometry(QRect(0, 0, 51, 51)) self.refresh_btn.setProperty('class', 'sidebar_btns') self.refresh_btn.setIcon(QIcon(':/icon/refresh_icon.png')) self.refresh_btn.setIconSize(QSize(24, 24)) self.refresh_bind = QShortcut(QKeySequence('Ctrl+R'), self) self.store_btn = QPushButton(self.sidebar) self.store_btn.setGeometry(QRect(0, 51, 51, 51)) self.store_btn.setProperty('class', 'sidebar_btns') self.store_btn.setIcon(QIcon(':/icon/store_icon.png')) self.store_btn.setIconSize(QSize(24, 24)) self.store_bind = QShortcut(QKeySequence('Ctrl+S'), self) self.homepage_btn = QPushButton(self.sidebar) self.homepage_btn.setGeometry(QRect(0, 102, 51, 51)) self.homepage_btn.setProperty('class', 'sidebar_btns') self.homepage_btn.setIcon(QIcon(':/icon/github_icon.png')) self.homepage_btn.setIconSize(QSize(24, 24)) self.homepage_bind = QShortcut(QKeySequence('Ctrl+G'), self) self.about_btn = QPushButton(self.sidebar) self.about_btn.setGeometry(QRect(0, 153, 51, 51)) self.about_btn.setProperty('class', 'sidebar_btns') self.about_btn.setIcon(QIcon(':/icon/about_icon.png')) self.about_btn.setIconSize(QSize(24, 24)) self.about_bind = QShortcut(QKeySequence('Ctrl+A'), self) self.quit_btn = QPushButton(self.sidebar) self.quit_btn.setGeometry(QRect(0, 420, 51, 51)) self.quit_btn.setProperty('class', 'sidebar_btns_quit') self.quit_btn.setIcon(QIcon(':/icon/quit_icon.png')) self.quit_btn.setIconSize(QSize(24, 24)) self.quit_bind = QShortcut(QKeySequence('Ctrl+Q'), self) self.font = QFont() self.font.setPointSize(8) self.font.setStyleStrategy(QFont.PreferAntialias) self.label_refresh = QLabel(self.appswidget) self.label_refresh.setFont(self.font) self.label_refresh.setGeometry(QRect(20, 10, 441, 15)) self.label_info = QLabel(self.appswidget) self.label_info.setFont(self.font) self.label_info.setGeometry(QRect(20, 10, 441, 30)) self.progressbar = QProgressBar(self.appswidget) self.progressbar.setGeometry(QRect(20, 30, 441, 20)) self.layout_widget_checkboxes = QWidget(self.appswidget) self.layout_widget_checkboxes.setGeometry(QRect(20, 55, 155, 311)) self.layout_checkboxes = QVBoxLayout(self.layout_widget_checkboxes) self.layout_checkboxes.setContentsMargins(0, 0, 0, 0) self.layout_widget_checkboxes_2 = QWidget(self.appswidget) self.layout_widget_checkboxes_2.setGeometry(QRect(175, 55, 155, 311)) self.layout_checkboxes_2 = QVBoxLayout(self.layout_widget_checkboxes_2) self.layout_checkboxes_2.setContentsMargins(0, 0, 0, 0) self.layout_widget_checkboxes_3 = QWidget(self.appswidget) self.layout_widget_checkboxes_3.setGeometry(QRect(330, 55, 155, 311)) self.layout_checkboxes_3 = QVBoxLayout(self.layout_widget_checkboxes_3) self.layout_checkboxes_3.setContentsMargins(0, 0, 0, 0) self.layout_widget_labels = QWidget(self.appswidget) self.layout_widget_labels.setGeometry(QRect(20, 390, 350, 16)) self.layout_labels = QHBoxLayout(self.layout_widget_labels) self.layout_labels.setContentsMargins(0, 0, 0, 0) self.label_space = QLabel(self.appswidget) self.label_space.setFont(self.font) self.layout_labels.addWidget(self.label_space) self.label_size = QLabel(self.appswidget) self.label_size.setFont(self.font) self.layout_labels.addWidget(self.label_size) self.layout_widget_buttons = QWidget(self.appswidget) self.layout_widget_buttons.setGeometry(QRect(20, 420, 454, 31)) self.layout_buttons = QHBoxLayout(self.layout_widget_buttons) self.layout_buttons.setContentsMargins(0, 0, 0, 0) self.button_select_all = QPushButton(self.layout_widget_buttons) self.button_select_all.setIcon(QIcon(':/icon/check_icon.png')) self.button_select_all.setIconSize(QSize(18, 18)) self.button_select_all.setLayoutDirection(Qt.RightToLeft) self.layout_buttons.addWidget(self.button_select_all) self.button_select_all.setMinimumSize(100, 30) self.button_select_all.setProperty('class', 'Aqua') self.button_deselect_all = QPushButton(self.layout_widget_buttons) self.button_deselect_all.setIcon(QIcon(':/icon/cancel_icon.png')) self.button_deselect_all.setIconSize(QSize(18, 18)) self.button_deselect_all.setLayoutDirection(Qt.RightToLeft) self.layout_buttons.addWidget(self.button_deselect_all) self.button_deselect_all.setMinimumSize(100, 30) self.button_deselect_all.setProperty('class', 'Aqua') self.layout_buttons.addStretch() self.button_uninstall = QPushButton(self.layout_widget_buttons) self.button_uninstall.setIcon(QIcon(':/icon/trash_icon.png')) self.button_uninstall.setIconSize(QSize(18, 18)) self.button_uninstall.setLayoutDirection(Qt.RightToLeft) self.layout_buttons.addWidget(self.button_uninstall) self.button_uninstall.setMinimumSize(100, 30) self.button_uninstall.setProperty('class', 'Grapefruit') self.setCentralWidget(self.centralwidget) self.retranslateUi() QMetaObject.connectSlotsByName(self) def retranslateUi(self): QToolTip.setFont(self.font) self.setWindowTitle(QCoreApplication.translate("Title", "PyDebloatX")) self.label_info.setText(QCoreApplication.translate("Label", "")) self.app_name_list = list( ( # Convert tuple to list, because lupdate ignores initial lists QCoreApplication.translate("AppName", "3D Builder"), QCoreApplication.translate("AppName", "3D Viewer"), QCoreApplication.translate("AppName", "Alarms and Clock"), QCoreApplication.translate("AppName", "Calculator"), QCoreApplication.translate("AppName", "Calendar and Mail"), QCoreApplication.translate("AppName", "Camera"), QCoreApplication.translate("AppName", "Feedback Hub"), QCoreApplication.translate("AppName", "Get Help"), QCoreApplication.translate("AppName", "Groove Music"), QCoreApplication.translate("AppName", "Maps"), QCoreApplication.translate("AppName", "Messaging"), QCoreApplication.translate("AppName", "Mixed Reality Portal"), QCoreApplication.translate("AppName", "Mobile Plans"), QCoreApplication.translate("AppName", "Money"), QCoreApplication.translate("AppName", "Movies && TV"), QCoreApplication.translate("AppName", "News"), QCoreApplication.translate("AppName", "Office"), QCoreApplication.translate("AppName", "OneNote"), QCoreApplication.translate("AppName", "Paint 3D"), QCoreApplication.translate("AppName", "People"), QCoreApplication.translate("AppName", "Photos"), QCoreApplication.translate("AppName", "Print 3D"), QCoreApplication.translate("AppName", "Skype"), QCoreApplication.translate("AppName", "Snip && Sketch"), QCoreApplication.translate("AppName", "Solitaire"), QCoreApplication.translate("AppName", "Sports"), QCoreApplication.translate("AppName", "Spotify"), QCoreApplication.translate("AppName", "Sticky Notes"), QCoreApplication.translate("AppName", "Tips"), QCoreApplication.translate("AppName", "Translator"), QCoreApplication.translate("AppName", "Voice Recorder"), QCoreApplication.translate("AppName", "Weather"), QCoreApplication.translate("AppName", "Xbox"), QCoreApplication.translate("AppName", "Xbox Game Bar"), QCoreApplication.translate("AppName", "Your Phone"))) self.tooltip_list = list(( QCoreApplication.translate( "ToolTip", "View, create, and personalize 3D objects."), QCoreApplication.translate( "ToolTip", "View 3D models and animations in real-time."), QCoreApplication.translate( "ToolTip", "A combination of alarm clock, world clock, timer, and stopwatch." ), QCoreApplication.translate( "ToolTip", "A calculator that includes standard, scientific, and programmer modes, as well as a unit converter." ), QCoreApplication.translate( "ToolTip", "Stay up to date with email and schedule managing."), QCoreApplication.translate( "ToolTip", "Point and shoot to take pictures on Windows 10."), QCoreApplication.translate( "ToolTip", "Provide feedback about Windows and apps by sharing suggestions or problems." ), QCoreApplication.translate( "ToolTip", "Provide a way to ask a question and get recommended solutions or contact assisted support." ), QCoreApplication.translate( "ToolTip", "Listen to music on Windows, iOS, and Android devices."), QCoreApplication.translate( "ToolTip", "Search for places to get directions, business info, and reviews." ), QCoreApplication.translate( "ToolTip", "Quick, reliable SMS, MMS and RCS messaging from your phone."), QCoreApplication.translate( "ToolTip", "Discover Windows Mixed Reality and dive into more than 3,000 games and VR experiences from Steam VR and Microsoft Store." ), QCoreApplication.translate( "ToolTip", "Sign up for a data plan and connect with mobile operators in your area. You will need a supported SIM card." ), QCoreApplication.translate( "ToolTip", "Finance calculators, currency exchange rates and commodity prices from around the world." ), QCoreApplication.translate( "ToolTip", "All your movies and TV shows, all in one place, on all your devices." ), QCoreApplication.translate( "ToolTip", "Deliver breaking news and trusted, in-depth reporting from the world\'s best journalists." ), QCoreApplication.translate( "ToolTip", "Find all your Office apps and files in one place."), QCoreApplication.translate( "ToolTip", "Digital notebook for capturing and organizing everything across your devices." ), QCoreApplication.translate( "ToolTip", "Make 2D masterpieces or 3D models that you can play with from all angles." ), QCoreApplication.translate( "ToolTip", "Connect with all your friends, family, colleagues, and acquaintances in one place." ), QCoreApplication.translate( "ToolTip", "View and edit your photos and videos, make movies, and create albums." ), QCoreApplication.translate( "ToolTip", "Quickly and easily prepare objects for 3D printing on your PC." ), QCoreApplication.translate( "ToolTip", "Instant message, voice or video call application."), QCoreApplication.translate( "ToolTip", "Quickly annotate screenshots, photos and other images and save, paste or share with other apps." ), QCoreApplication.translate( "ToolTip", "Solitaire is one of the most played computer card games of all time." ), QCoreApplication.translate( "ToolTip", "Live scores and in-depth game experiences for more than 150 leagues." ), QCoreApplication.translate( "ToolTip", "Play your favorite songs and albums free on Windows 10 with Spotify." ), QCoreApplication.translate( "ToolTip", "Create notes, type, ink or add a picture, add text formatting, or stick them to the desktop." ), QCoreApplication.translate( "ToolTip", "Provide users with information and tips about operating system features." ), QCoreApplication.translate( "ToolTip", "Translate text and speech, have translated conversations, and even download AI-powered language packs to use offline." ), QCoreApplication.translate( "ToolTip", "Record sounds, lectures, interviews, and other events."), QCoreApplication.translate( "ToolTip", "Latest weather conditions, accurate 10-day and hourly forecasts." ), QCoreApplication.translate( "ToolTip", "Browse the catalogue, view recommendations, and discover PC games with Xbox Game Pass." ), QCoreApplication.translate( "ToolTip", "Instant access to widgets for screen capture and sharing, and chatting with Xbox friends." ), QCoreApplication.translate( "ToolTip", "Link your Android phone and PC to view and reply to text messages, access mobile apps, and receive notifications." ))) self.app_data_list = [{ "name": "*Microsoft.3DBuilder*", "link": "/?PFN=Microsoft.3DBuilder_8wekyb3d8bbwe", "size": 0 }, { "name": "*Microsoft.Microsoft3DViewer*", "link": "/?PFN=Microsoft.Microsoft3DViewer_8wekyb3d8bbwe", "size": 0 }, { "name": "*Microsoft.WindowsAlarms*", "link": "/?PFN=Microsoft.WindowsAlarms_8wekyb3d8bbwe", "size": 0 }, { "name": "*Microsoft.WindowsCalculator*", "link": "/?PFN=Microsoft.WindowsCalculator_8wekyb3d8bbwe", "size": 0 }, { "name": "*microsoft.windowscommunicationsapps*", "link": "/?PFN=Microsoft.windowscommunicationsapps_8wekyb3d8bbwe", "size": 0 }, { "name": "*Microsoft.WindowsCamera*", "link": "/?PFN=Microsoft.WindowsCamera_8wekyb3d8bbwe", "size": 0 }, { "name": "*Microsoft.WindowsFeedbackHub*", "link": "/?PFN=Microsoft.WindowsFeedbackHub_8wekyb3d8bbwe", "size": 0 }, { "name": "*Microsoft.GetHelp*", "link": "/?PFN=Microsoft.Gethelp_8wekyb3d8bbwe", "size": 0 }, { "name": "*Microsoft.ZuneMusic*", "link": "/?PFN=Microsoft.ZuneMusic_8wekyb3d8bbwe", "size": 0 }, { "name": "*Microsoft.WindowsMaps*", "link": "/?PFN=Microsoft.WindowsMaps_8wekyb3d8bbwe", "size": 0 }, { "name": "*Microsoft.Messaging*", "link": "/?PFN=Microsoft.Messaging_8wekyb3d8bbwe", "size": 0 }, { "name": "*Microsoft.MixedReality.Portal*", "link": "/?PFN=Microsoft.MixedReality.Portal_8wekyb3d8bbwe", "size": 0 }, { "name": "*Microsoft.OneConnect*", "link": "/?PFN=Microsoft.OneConnect_8wekyb3d8bbwe", "size": 0 }, { "name": "*Microsoft.BingFinance*", "link": "/?PFN=Microsoft.BingFinance_8wekyb3d8bbwe", "size": 0 }, { "name": "*Microsoft.ZuneVideo*", "link": "/?PFN=Microsoft.ZuneVideo_8wekyb3d8bbwe", "size": 0 }, { "name": "*Microsoft.BingNews*", "link": "/?PFN=Microsoft.BingNews_8wekyb3d8bbwe", "size": 0 }, { "name": "*Microsoft.MicrosoftOfficeHub*", "link": "/?PFN=Microsoft.MicrosoftOfficeHub_8wekyb3d8bbwe", "size": 0 }, { "name": "*Microsoft.Office.OneNote*", "link": "/?PFN=Microsoft.Office.OneNote_8wekyb3d8bbwe", "size": 0 }, { "name": "*Microsoft.MSPaint*", "link": "/?PFN=Microsoft.MSPaint_8wekyb3d8bbwe", "size": 0 }, { "name": "*Microsoft.People*", "link": "/?PFN=Microsoft.People_8wekyb3d8bbwe", "size": 0 }, { "name": "*Microsoft.Windows.Photos*", "link": "/?PFN=Microsoft.Windows.Photos_8wekyb3d8bbwe", "size": 0 }, { "name": "*Microsoft.Print3D*", "link": "/?PFN=Microsoft.Print3D_8wekyb3d8bbwe", "size": 0 }, { "name": "*Microsoft.SkypeApp*", "link": "/?PFN=Microsoft.SkypeApp_kzf8qxf38zg5c", "size": 0 }, { "name": "*Microsoft.ScreenSketch*", "link": "/?PFN=Microsoft.ScreenSketch_8wekyb3d8bbwe", "size": 0 }, { "name": "*Microsoft.MicrosoftSolitaireCollection*", "link": "/?PFN=Microsoft.MicrosoftSolitaireCollection_8wekyb3d8bbwe", "size": 0 }, { "name": "*Microsoft.BingSports*", "link": "/?PFN=Microsoft.BingSports_8wekyb3d8bbwe", "size": 0 }, { "name": "*SpotifyAB.SpotifyMusic*", "link": "/?PFN=SpotifyAB.SpotifyMusic_zpdnekdrzrea0", "size": 0 }, { "name": "*Microsoft.MicrosoftStickyNotes*", "link": "/?PFN=Microsoft.MicrosoftStickyNotes_8wekyb3d8bbwe", "size": 0 }, { "name": "*Microsoft.Getstarted*", "link": "/?PFN=Microsoft.Getstarted_8wekyb3d8bbwe", "size": 0 }, { "name": "*Microsoft.BingTranslator*", "link": "/?PFN=Microsoft.BingTranslator_8wekyb3d8bbwe", "size": 0 }, { "name": "*Microsoft.WindowsSoundRecorder*", "link": "/?PFN=Microsoft.WindowsSoundRecorder_8wekyb3d8bbwe", "size": 0 }, { "name": "*Microsoft.BingWeather*", "link": "/?PFN=Microsoft.BingWeather_8wekyb3d8bbwe", "size": 0 }, { "name": "*Microsoft.GamingApp*", "link": "/?PFN=Microsoft.GamingApp_8wekyb3d8bbwe", "size": 0 }, { "name": "*Xbox*", "link": "/?PFN=Microsoft.XboxGameOverlay_8wekyb3d8bbwe", "size": 0 }, { "name": "*Microsoft.YourPhone*", "link": "/?PFN=Microsoft.YourPhone_8wekyb3d8bbwe", "size": 0 }] if version.parse(platform.version()) >= version.parse("10.0.19041"): insort(self.app_name_list, QCoreApplication.translate("AppName", "Cortana")) cortana_index = self.app_name_list.index("Cortana") self.tooltip_list.insert( cortana_index, QCoreApplication.translate("ToolTip", "Personal intelligence assistant.")) self.app_data_list.insert( cortana_index, { "name": "*Microsoft.549981C3F5F10*", "link": "/?PFN=Microsoft.549981C3F5F10_8wekyb3d8bbwe", "size": 0 }) self.checkbox_list = [] for i, _ in enumerate(self.app_name_list): self.checkbox_list.append(QCheckBox()) if i % 3 == 2: self.layout_checkboxes_3.addWidget(self.checkbox_list[i]) elif i % 3 == 1: self.layout_checkboxes_2.addWidget(self.checkbox_list[i]) else: self.layout_checkboxes.addWidget(self.checkbox_list[i]) self.apps_dict = {} for i, checkbox in enumerate(self.checkbox_list): checkbox.setText(self.app_name_list[i]) checkbox.setToolTip(self.tooltip_list[i]) checkbox.setFont(self.font) self.apps_dict[checkbox] = self.app_data_list[i] self.label_space.setText( QCoreApplication.translate("Label", "Total amount of disk space:")) self.label_size.setText(QCoreApplication.translate("Label", "0 MB")) self.button_select_all.setText( QCoreApplication.translate("Button", "Select All")) self.button_deselect_all.setText( QCoreApplication.translate("Button", "Deselect All")) self.button_uninstall.setText( QCoreApplication.translate("Button", "Uninstall"))