class BaseUI(QWidget): def __init__(self, parent=None): super(BaseUI, self).__init__(parent) self.main_layout = None self.setup_ui() def init_layout(self): self.main_layout = QGridLayout() self.main_layout.setHorizontalSpacing(4) self.main_layout.setVerticalSpacing(4) self.main_layout.setContentsMargins(10, 10, 10, 10) self.main_layout.setAlignment(QtCore.Qt.AlignTop | QtCore.Qt.AlignLeft) self.setLayout(self.main_layout) def setup_ui(self): self.init_layout() def check_is_ready(self): if not self.isEnabled() or not self.isVisible(): return False output_dir = Globals.config.get(Globals.UserData.output_dir) if not (os.path.exists(output_dir) and os.path.isdir(output_dir)): Message.show_error("无效的输出目录!", self) return False # save_as_path = os.path.join(output_dir, Globals.config.get(Globals.UserData.font_save_name) + ".png") # if os.path.exists(save_as_path): # Message.show_error("已存在同名文件!", self) # return False return True
def __init__(self, parent, data): super(SegmentsWidget, self).__init__(parent) layout = QGridLayout() layout.setContentsMargins(0, 0, 0, 0) layout.setVerticalSpacing(1) layout.setHorizontalSpacing(UIContext.getScaledWindowSize(16, 16).width()) self.segments = [] for segment in data.segments: if segment.readable or segment.writable or segment.executable: self.segments.append(segment) self.segments.sort(key = lambda segment: segment.start) row = 0 for segment in self.segments: begin = "0x%x" % segment.start end = "0x%x" % segment.end permissions = "" if segment.readable: permissions += "r" else: permissions += "-" if segment.writable: permissions += "w" else: permissions += "-" if segment.executable: permissions += "x" else: permissions += "-" rangeLayout = QHBoxLayout() rangeLayout.setContentsMargins(0, 0, 0, 0) beginLabel = headers.ClickableAddressLabel(begin) dashLabel = QLabel("-") dashLabel.setFont(binaryninjaui.getMonospaceFont(self)) endLabel = headers.ClickableAddressLabel(end) rangeLayout.addWidget(beginLabel) rangeLayout.addWidget(dashLabel) rangeLayout.addWidget(endLabel) layout.addLayout(rangeLayout, row, 0) permissionsLabel = QLabel(permissions) permissionsLabel.setFont(binaryninjaui.getMonospaceFont(self)) layout.addWidget(permissionsLabel, row, 1) row += 1 layout.setColumnStretch(2, 1) self.setLayout(layout)
class UIBuilder(object): """Constructs the UI for a main application window""" 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)
class Ui_TaxExportDlg(object): def setupUi(self, TaxExportDlg): if not TaxExportDlg.objectName(): TaxExportDlg.setObjectName(u"TaxExportDlg") TaxExportDlg.resize(602, 315) self.gridLayout = QGridLayout(TaxExportDlg) self.gridLayout.setObjectName(u"gridLayout") self.gridLayout.setHorizontalSpacing(6) self.gridLayout.setContentsMargins(9, 9, 9, 9) self.line = QFrame(TaxExportDlg) self.line.setObjectName(u"line") self.line.setFrameShape(QFrame.HLine) self.line.setFrameShadow(QFrame.Sunken) self.gridLayout.addWidget(self.line, 4, 0, 1, 4) self.XlsSelectBtn = QPushButton(TaxExportDlg) self.XlsSelectBtn.setObjectName(u"XlsSelectBtn") sizePolicy = QSizePolicy(QSizePolicy.Minimum, QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.XlsSelectBtn.sizePolicy().hasHeightForWidth()) self.XlsSelectBtn.setSizePolicy(sizePolicy) self.gridLayout.addWidget(self.XlsSelectBtn, 3, 2, 1, 1) self.WarningLbl = QLabel(TaxExportDlg) self.WarningLbl.setObjectName(u"WarningLbl") font = QFont() font.setItalic(True) self.WarningLbl.setFont(font) self.gridLayout.addWidget(self.WarningLbl, 5, 0, 1, 4) self.DlsgGroup = QGroupBox(TaxExportDlg) self.DlsgGroup.setObjectName(u"DlsgGroup") sizePolicy1 = QSizePolicy(QSizePolicy.Preferred, QSizePolicy.Preferred) sizePolicy1.setHorizontalStretch(0) sizePolicy1.setVerticalStretch(0) sizePolicy1.setHeightForWidth( self.DlsgGroup.sizePolicy().hasHeightForWidth()) self.DlsgGroup.setSizePolicy(sizePolicy1) self.DlsgGroup.setFlat(False) self.DlsgGroup.setCheckable(True) self.DlsgGroup.setChecked(False) self.gridLayout_2 = QGridLayout(self.DlsgGroup) self.gridLayout_2.setSpacing(2) self.gridLayout_2.setObjectName(u"gridLayout_2") self.gridLayout_2.setContentsMargins(6, 6, 6, 6) self.InitialFileLbl = QLabel(self.DlsgGroup) self.InitialFileLbl.setObjectName(u"InitialFileLbl") self.gridLayout_2.addWidget(self.InitialFileLbl, 0, 0, 1, 1) self.DlsgOutFileName = QLineEdit(self.DlsgGroup) self.DlsgOutFileName.setObjectName(u"DlsgOutFileName") self.gridLayout_2.addWidget(self.DlsgOutFileName, 1, 1, 1, 1) self.DlsgInFileName = QLineEdit(self.DlsgGroup) self.DlsgInFileName.setObjectName(u"DlsgInFileName") self.gridLayout_2.addWidget(self.DlsgInFileName, 0, 1, 1, 1) self.OutputFileLbl = QLabel(self.DlsgGroup) self.OutputFileLbl.setObjectName(u"OutputFileLbl") self.gridLayout_2.addWidget(self.OutputFileLbl, 1, 0, 1, 1) self.DividendsOnly = QCheckBox(self.DlsgGroup) self.DividendsOnly.setObjectName(u"DividendsOnly") self.gridLayout_2.addWidget(self.DividendsOnly, 3, 0, 1, 3) self.OutputSelectBtn = QPushButton(self.DlsgGroup) self.OutputSelectBtn.setObjectName(u"OutputSelectBtn") self.gridLayout_2.addWidget(self.OutputSelectBtn, 1, 2, 1, 1) self.InitialSelectBtn = QPushButton(self.DlsgGroup) self.InitialSelectBtn.setObjectName(u"InitialSelectBtn") self.gridLayout_2.addWidget(self.InitialSelectBtn, 0, 2, 1, 1) self.IncomeSourceBroker = QCheckBox(self.DlsgGroup) self.IncomeSourceBroker.setObjectName(u"IncomeSourceBroker") self.IncomeSourceBroker.setChecked(True) self.gridLayout_2.addWidget(self.IncomeSourceBroker, 2, 0, 1, 3) self.gridLayout.addWidget(self.DlsgGroup, 7, 0, 1, 4) self.Year = QSpinBox(TaxExportDlg) self.Year.setObjectName(u"Year") self.Year.setAlignment(Qt.AlignRight | Qt.AlignTrailing | Qt.AlignVCenter) self.Year.setMinimum(2010) self.Year.setMaximum(2030) self.Year.setValue(2020) self.gridLayout.addWidget(self.Year, 1, 1, 1, 2) self.XlsFileName = QLineEdit(TaxExportDlg) self.XlsFileName.setObjectName(u"XlsFileName") sizePolicy2 = QSizePolicy(QSizePolicy.Expanding, QSizePolicy.Fixed) sizePolicy2.setHorizontalStretch(0) sizePolicy2.setVerticalStretch(0) sizePolicy2.setHeightForWidth( self.XlsFileName.sizePolicy().hasHeightForWidth()) self.XlsFileName.setSizePolicy(sizePolicy2) self.gridLayout.addWidget(self.XlsFileName, 3, 1, 1, 1) self.AccountWidget = AccountSelector(TaxExportDlg) self.AccountWidget.setObjectName(u"AccountWidget") self.gridLayout.addWidget(self.AccountWidget, 2, 1, 1, 2) self.YearLbl = QLabel(TaxExportDlg) self.YearLbl.setObjectName(u"YearLbl") self.gridLayout.addWidget(self.YearLbl, 1, 0, 1, 1) self.buttonBox = QDialogButtonBox(TaxExportDlg) self.buttonBox.setObjectName(u"buttonBox") self.buttonBox.setOrientation(Qt.Vertical) self.buttonBox.setStandardButtons(QDialogButtonBox.Cancel | QDialogButtonBox.Ok) self.gridLayout.addWidget(self.buttonBox, 1, 3, 3, 1) self.AccountLbl = QLabel(TaxExportDlg) self.AccountLbl.setObjectName(u"AccountLbl") self.gridLayout.addWidget(self.AccountLbl, 2, 0, 1, 1) self.XlsFileLbl = QLabel(TaxExportDlg) self.XlsFileLbl.setObjectName(u"XlsFileLbl") self.gridLayout.addWidget(self.XlsFileLbl, 3, 0, 1, 1) self.verticalSpacer = QSpacerItem(20, 40, QSizePolicy.Minimum, QSizePolicy.Expanding) self.gridLayout.addItem(self.verticalSpacer, 9, 0, 1, 1) self.NoSettlement = QCheckBox(TaxExportDlg) self.NoSettlement.setObjectName(u"NoSettlement") self.gridLayout.addWidget(self.NoSettlement, 8, 0, 1, 4) QWidget.setTabOrder(self.Year, self.XlsFileName) QWidget.setTabOrder(self.XlsFileName, self.XlsSelectBtn) QWidget.setTabOrder(self.XlsSelectBtn, self.DlsgGroup) QWidget.setTabOrder(self.DlsgGroup, self.DlsgInFileName) QWidget.setTabOrder(self.DlsgInFileName, self.InitialSelectBtn) QWidget.setTabOrder(self.InitialSelectBtn, self.DlsgOutFileName) QWidget.setTabOrder(self.DlsgOutFileName, self.OutputSelectBtn) self.retranslateUi(TaxExportDlg) self.buttonBox.accepted.connect(TaxExportDlg.accept) self.buttonBox.rejected.connect(TaxExportDlg.reject) QMetaObject.connectSlotsByName(TaxExportDlg) # setupUi def retranslateUi(self, TaxExportDlg): TaxExportDlg.setWindowTitle( QCoreApplication.translate( "TaxExportDlg", u"Select parameters and files for tax report", None)) #if QT_CONFIG(tooltip) self.XlsSelectBtn.setToolTip( QCoreApplication.translate("TaxExportDlg", u"Select file", None)) #endif // QT_CONFIG(tooltip) self.XlsSelectBtn.setText( QCoreApplication.translate("TaxExportDlg", u"...", None)) self.WarningLbl.setText( QCoreApplication.translate( "TaxExportDlg", u"Below functions are experimental - use it with care", None)) self.DlsgGroup.setTitle( QCoreApplication.translate( "TaxExportDlg", u"Update file \"\u0414\u0435\u043a\u043b\u0430\u0440\u0430\u0446\u0438\u044f\" (*.dc0)", None)) self.InitialFileLbl.setText( QCoreApplication.translate("TaxExportDlg", u"Initial file:", None)) #if QT_CONFIG(tooltip) self.DlsgOutFileName.setToolTip( QCoreApplication.translate( "TaxExportDlg", u"File where to store russian tax form", None)) #endif // QT_CONFIG(tooltip) #if QT_CONFIG(tooltip) self.DlsgInFileName.setToolTip( QCoreApplication.translate( "TaxExportDlg", u"File to use as a template for russian tax form", None)) #endif // QT_CONFIG(tooltip) self.OutputFileLbl.setText( QCoreApplication.translate("TaxExportDlg", u"Output file:", None)) self.DividendsOnly.setText( QCoreApplication.translate( "TaxExportDlg", u"Update only information about dividends", None)) #if QT_CONFIG(tooltip) self.OutputSelectBtn.setToolTip( QCoreApplication.translate("TaxExportDlg", u"Select file", None)) #endif // QT_CONFIG(tooltip) self.OutputSelectBtn.setText( QCoreApplication.translate("TaxExportDlg", u" ... ", None)) #if QT_CONFIG(tooltip) self.InitialSelectBtn.setToolTip( QCoreApplication.translate("TaxExportDlg", u"Select file", None)) #endif // QT_CONFIG(tooltip) self.InitialSelectBtn.setText( QCoreApplication.translate("TaxExportDlg", u" ... ", None)) self.IncomeSourceBroker.setText( QCoreApplication.translate("TaxExportDlg", u"Use broker name as income source", None)) self.Year.setSuffix("") #if QT_CONFIG(tooltip) self.XlsFileName.setToolTip( QCoreApplication.translate( "TaxExportDlg", u"File where to store tax report in Excel format", None)) #endif // QT_CONFIG(tooltip) #if QT_CONFIG(tooltip) self.AccountWidget.setToolTip( QCoreApplication.translate( "TaxExportDlg", u"Foreign account to prepare tax report for", None)) #endif // QT_CONFIG(tooltip) self.YearLbl.setText( QCoreApplication.translate("TaxExportDlg", u"Year:", None)) self.AccountLbl.setText( QCoreApplication.translate("TaxExportDlg", u"Account:", None)) self.XlsFileLbl.setText( QCoreApplication.translate("TaxExportDlg", u"Excel file:", None)) self.NoSettlement.setText( QCoreApplication.translate( "TaxExportDlg", u"Do not use settlement date for currency rates", None))
class Ui_Config(object): def setupUi(self, Config): if not Config.objectName(): Config.setObjectName(u"Config") Config.resize(600, 650) Config.setSizeGripEnabled(True) self.vboxLayout = QVBoxLayout(Config) self.vboxLayout.setSpacing(6) self.vboxLayout.setContentsMargins(11, 11, 11, 11) self.vboxLayout.setObjectName(u"vboxLayout") self.vboxLayout.setContentsMargins(8, 8, 8, 8) self.hboxLayout = QHBoxLayout() self.hboxLayout.setSpacing(6) self.hboxLayout.setObjectName(u"hboxLayout") self.hboxLayout.setContentsMargins(0, 0, 0, 0) self.ButtonGroup1 = QGroupBox(Config) self.ButtonGroup1.setObjectName(u"ButtonGroup1") sizePolicy = QSizePolicy(QSizePolicy.Preferred, QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.ButtonGroup1.sizePolicy().hasHeightForWidth()) self.ButtonGroup1.setSizePolicy(sizePolicy) self.vboxLayout1 = QVBoxLayout(self.ButtonGroup1) self.vboxLayout1.setSpacing(6) self.vboxLayout1.setContentsMargins(11, 11, 11, 11) self.vboxLayout1.setObjectName(u"vboxLayout1") self.vboxLayout1.setContentsMargins(11, 11, 11, 11) self.size_176_220 = QRadioButton(self.ButtonGroup1) self.size_176_220.setObjectName(u"size_176_220") self.vboxLayout1.addWidget(self.size_176_220) self.size_240_320 = QRadioButton(self.ButtonGroup1) self.size_240_320.setObjectName(u"size_240_320") self.vboxLayout1.addWidget(self.size_240_320) self.size_320_240 = QRadioButton(self.ButtonGroup1) self.size_320_240.setObjectName(u"size_320_240") self.vboxLayout1.addWidget(self.size_320_240) self.size_640_480 = QRadioButton(self.ButtonGroup1) self.size_640_480.setObjectName(u"size_640_480") self.vboxLayout1.addWidget(self.size_640_480) self.size_800_600 = QRadioButton(self.ButtonGroup1) self.size_800_600.setObjectName(u"size_800_600") self.vboxLayout1.addWidget(self.size_800_600) self.size_1024_768 = QRadioButton(self.ButtonGroup1) self.size_1024_768.setObjectName(u"size_1024_768") self.vboxLayout1.addWidget(self.size_1024_768) self.hboxLayout1 = QHBoxLayout() self.hboxLayout1.setSpacing(6) self.hboxLayout1.setObjectName(u"hboxLayout1") self.hboxLayout1.setContentsMargins(0, 0, 0, 0) self.size_custom = QRadioButton(self.ButtonGroup1) self.size_custom.setObjectName(u"size_custom") sizePolicy1 = QSizePolicy(QSizePolicy.Fixed, QSizePolicy.Fixed) sizePolicy1.setHorizontalStretch(0) sizePolicy1.setVerticalStretch(0) sizePolicy1.setHeightForWidth( self.size_custom.sizePolicy().hasHeightForWidth()) self.size_custom.setSizePolicy(sizePolicy1) self.hboxLayout1.addWidget(self.size_custom) self.size_width = QSpinBox(self.ButtonGroup1) self.size_width.setObjectName(u"size_width") self.size_width.setMinimum(1) self.size_width.setMaximum(1280) self.size_width.setSingleStep(16) self.size_width.setValue(400) self.hboxLayout1.addWidget(self.size_width) self.size_height = QSpinBox(self.ButtonGroup1) self.size_height.setObjectName(u"size_height") self.size_height.setMinimum(1) self.size_height.setMaximum(1024) self.size_height.setSingleStep(16) self.size_height.setValue(300) self.hboxLayout1.addWidget(self.size_height) self.vboxLayout1.addLayout(self.hboxLayout1) self.hboxLayout.addWidget(self.ButtonGroup1) self.ButtonGroup2 = QGroupBox(Config) self.ButtonGroup2.setObjectName(u"ButtonGroup2") self.vboxLayout2 = QVBoxLayout(self.ButtonGroup2) self.vboxLayout2.setSpacing(6) self.vboxLayout2.setContentsMargins(11, 11, 11, 11) self.vboxLayout2.setObjectName(u"vboxLayout2") self.vboxLayout2.setContentsMargins(11, 11, 11, 11) self.depth_1 = QRadioButton(self.ButtonGroup2) self.depth_1.setObjectName(u"depth_1") self.vboxLayout2.addWidget(self.depth_1) self.depth_4gray = QRadioButton(self.ButtonGroup2) self.depth_4gray.setObjectName(u"depth_4gray") self.vboxLayout2.addWidget(self.depth_4gray) self.depth_8 = QRadioButton(self.ButtonGroup2) self.depth_8.setObjectName(u"depth_8") self.vboxLayout2.addWidget(self.depth_8) self.depth_12 = QRadioButton(self.ButtonGroup2) self.depth_12.setObjectName(u"depth_12") self.vboxLayout2.addWidget(self.depth_12) self.depth_15 = QRadioButton(self.ButtonGroup2) self.depth_15.setObjectName(u"depth_15") self.vboxLayout2.addWidget(self.depth_15) self.depth_16 = QRadioButton(self.ButtonGroup2) self.depth_16.setObjectName(u"depth_16") self.vboxLayout2.addWidget(self.depth_16) self.depth_18 = QRadioButton(self.ButtonGroup2) self.depth_18.setObjectName(u"depth_18") self.vboxLayout2.addWidget(self.depth_18) self.depth_24 = QRadioButton(self.ButtonGroup2) self.depth_24.setObjectName(u"depth_24") self.vboxLayout2.addWidget(self.depth_24) self.depth_32 = QRadioButton(self.ButtonGroup2) self.depth_32.setObjectName(u"depth_32") self.vboxLayout2.addWidget(self.depth_32) self.depth_32_argb = QRadioButton(self.ButtonGroup2) self.depth_32_argb.setObjectName(u"depth_32_argb") self.vboxLayout2.addWidget(self.depth_32_argb) self.hboxLayout.addWidget(self.ButtonGroup2) self.vboxLayout.addLayout(self.hboxLayout) self.hboxLayout2 = QHBoxLayout() self.hboxLayout2.setSpacing(6) self.hboxLayout2.setObjectName(u"hboxLayout2") self.hboxLayout2.setContentsMargins(0, 0, 0, 0) self.TextLabel1_3 = QLabel(Config) self.TextLabel1_3.setObjectName(u"TextLabel1_3") self.hboxLayout2.addWidget(self.TextLabel1_3) self.skin = QComboBox(Config) self.skin.addItem("") self.skin.setObjectName(u"skin") sizePolicy2 = QSizePolicy(QSizePolicy.Expanding, QSizePolicy.Fixed) sizePolicy2.setHorizontalStretch(0) sizePolicy2.setVerticalStretch(0) sizePolicy2.setHeightForWidth( self.skin.sizePolicy().hasHeightForWidth()) self.skin.setSizePolicy(sizePolicy2) self.hboxLayout2.addWidget(self.skin) self.vboxLayout.addLayout(self.hboxLayout2) self.touchScreen = QCheckBox(Config) self.touchScreen.setObjectName(u"touchScreen") self.vboxLayout.addWidget(self.touchScreen) self.lcdScreen = QCheckBox(Config) self.lcdScreen.setObjectName(u"lcdScreen") self.vboxLayout.addWidget(self.lcdScreen) self.spacerItem = QSpacerItem(20, 10, QSizePolicy.Minimum, QSizePolicy.Expanding) self.vboxLayout.addItem(self.spacerItem) self.TextLabel1 = QLabel(Config) self.TextLabel1.setObjectName(u"TextLabel1") sizePolicy.setHeightForWidth( self.TextLabel1.sizePolicy().hasHeightForWidth()) self.TextLabel1.setSizePolicy(sizePolicy) self.TextLabel1.setWordWrap(True) self.vboxLayout.addWidget(self.TextLabel1) self.GroupBox1 = QGroupBox(Config) self.GroupBox1.setObjectName(u"GroupBox1") self.gridLayout = QGridLayout(self.GroupBox1) self.gridLayout.setSpacing(6) self.gridLayout.setContentsMargins(11, 11, 11, 11) self.gridLayout.setObjectName(u"gridLayout") self.gridLayout.setHorizontalSpacing(6) self.gridLayout.setVerticalSpacing(6) self.gridLayout.setContentsMargins(11, 11, 11, 11) self.TextLabel3 = QLabel(self.GroupBox1) self.TextLabel3.setObjectName(u"TextLabel3") self.gridLayout.addWidget(self.TextLabel3, 6, 0, 1, 1) self.bslider = QSlider(self.GroupBox1) self.bslider.setObjectName(u"bslider") palette = QPalette() brush = QBrush(QColor(128, 128, 128, 255)) brush.setStyle(Qt.SolidPattern) palette.setBrush(QPalette.Active, QPalette.WindowText, brush) brush1 = QBrush(QColor(0, 0, 255, 255)) brush1.setStyle(Qt.SolidPattern) palette.setBrush(QPalette.Active, QPalette.Button, brush1) brush2 = QBrush(QColor(127, 127, 255, 255)) brush2.setStyle(Qt.SolidPattern) palette.setBrush(QPalette.Active, QPalette.Light, brush2) brush3 = QBrush(QColor(38, 38, 255, 255)) brush3.setStyle(Qt.SolidPattern) palette.setBrush(QPalette.Active, QPalette.Midlight, brush3) brush4 = QBrush(QColor(0, 0, 127, 255)) brush4.setStyle(Qt.SolidPattern) palette.setBrush(QPalette.Active, QPalette.Dark, brush4) brush5 = QBrush(QColor(0, 0, 170, 255)) brush5.setStyle(Qt.SolidPattern) palette.setBrush(QPalette.Active, QPalette.Mid, brush5) brush6 = QBrush(QColor(0, 0, 0, 255)) brush6.setStyle(Qt.SolidPattern) palette.setBrush(QPalette.Active, QPalette.Text, brush6) brush7 = QBrush(QColor(255, 255, 255, 255)) brush7.setStyle(Qt.SolidPattern) palette.setBrush(QPalette.Active, QPalette.BrightText, brush7) palette.setBrush(QPalette.Active, QPalette.ButtonText, brush) palette.setBrush(QPalette.Active, QPalette.Base, brush7) brush8 = QBrush(QColor(220, 220, 220, 255)) brush8.setStyle(Qt.SolidPattern) palette.setBrush(QPalette.Active, QPalette.Window, brush8) palette.setBrush(QPalette.Active, QPalette.Shadow, brush6) brush9 = QBrush(QColor(10, 95, 137, 255)) brush9.setStyle(Qt.SolidPattern) palette.setBrush(QPalette.Active, QPalette.Highlight, brush9) palette.setBrush(QPalette.Active, QPalette.HighlightedText, brush7) palette.setBrush(QPalette.Active, QPalette.Link, brush6) palette.setBrush(QPalette.Active, QPalette.LinkVisited, brush6) brush10 = QBrush(QColor(232, 232, 232, 255)) brush10.setStyle(Qt.SolidPattern) palette.setBrush(QPalette.Active, QPalette.AlternateBase, brush10) palette.setBrush(QPalette.Inactive, QPalette.WindowText, brush) palette.setBrush(QPalette.Inactive, QPalette.Button, brush1) palette.setBrush(QPalette.Inactive, QPalette.Light, brush2) palette.setBrush(QPalette.Inactive, QPalette.Midlight, brush3) palette.setBrush(QPalette.Inactive, QPalette.Dark, brush4) palette.setBrush(QPalette.Inactive, QPalette.Mid, brush5) palette.setBrush(QPalette.Inactive, QPalette.Text, brush6) palette.setBrush(QPalette.Inactive, QPalette.BrightText, brush7) palette.setBrush(QPalette.Inactive, QPalette.ButtonText, brush) palette.setBrush(QPalette.Inactive, QPalette.Base, brush7) palette.setBrush(QPalette.Inactive, QPalette.Window, brush8) palette.setBrush(QPalette.Inactive, QPalette.Shadow, brush6) palette.setBrush(QPalette.Inactive, QPalette.Highlight, brush9) palette.setBrush(QPalette.Inactive, QPalette.HighlightedText, brush7) palette.setBrush(QPalette.Inactive, QPalette.Link, brush6) palette.setBrush(QPalette.Inactive, QPalette.LinkVisited, brush6) palette.setBrush(QPalette.Inactive, QPalette.AlternateBase, brush10) palette.setBrush(QPalette.Disabled, QPalette.WindowText, brush) palette.setBrush(QPalette.Disabled, QPalette.Button, brush1) palette.setBrush(QPalette.Disabled, QPalette.Light, brush2) palette.setBrush(QPalette.Disabled, QPalette.Midlight, brush3) palette.setBrush(QPalette.Disabled, QPalette.Dark, brush4) palette.setBrush(QPalette.Disabled, QPalette.Mid, brush5) palette.setBrush(QPalette.Disabled, QPalette.Text, brush6) palette.setBrush(QPalette.Disabled, QPalette.BrightText, brush7) palette.setBrush(QPalette.Disabled, QPalette.ButtonText, brush) palette.setBrush(QPalette.Disabled, QPalette.Base, brush7) palette.setBrush(QPalette.Disabled, QPalette.Window, brush8) palette.setBrush(QPalette.Disabled, QPalette.Shadow, brush6) palette.setBrush(QPalette.Disabled, QPalette.Highlight, brush9) palette.setBrush(QPalette.Disabled, QPalette.HighlightedText, brush7) palette.setBrush(QPalette.Disabled, QPalette.Link, brush6) palette.setBrush(QPalette.Disabled, QPalette.LinkVisited, brush6) palette.setBrush(QPalette.Disabled, QPalette.AlternateBase, brush10) self.bslider.setPalette(palette) self.bslider.setMaximum(400) self.bslider.setValue(100) self.bslider.setOrientation(Qt.Horizontal) self.gridLayout.addWidget(self.bslider, 6, 1, 1, 1) self.blabel = QLabel(self.GroupBox1) self.blabel.setObjectName(u"blabel") self.gridLayout.addWidget(self.blabel, 6, 2, 1, 1) self.TextLabel2 = QLabel(self.GroupBox1) self.TextLabel2.setObjectName(u"TextLabel2") self.gridLayout.addWidget(self.TextLabel2, 4, 0, 1, 1) self.gslider = QSlider(self.GroupBox1) self.gslider.setObjectName(u"gslider") palette1 = QPalette() palette1.setBrush(QPalette.Active, QPalette.WindowText, brush) brush11 = QBrush(QColor(0, 255, 0, 255)) brush11.setStyle(Qt.SolidPattern) palette1.setBrush(QPalette.Active, QPalette.Button, brush11) brush12 = QBrush(QColor(127, 255, 127, 255)) brush12.setStyle(Qt.SolidPattern) palette1.setBrush(QPalette.Active, QPalette.Light, brush12) brush13 = QBrush(QColor(38, 255, 38, 255)) brush13.setStyle(Qt.SolidPattern) palette1.setBrush(QPalette.Active, QPalette.Midlight, brush13) brush14 = QBrush(QColor(0, 127, 0, 255)) brush14.setStyle(Qt.SolidPattern) palette1.setBrush(QPalette.Active, QPalette.Dark, brush14) brush15 = QBrush(QColor(0, 170, 0, 255)) brush15.setStyle(Qt.SolidPattern) palette1.setBrush(QPalette.Active, QPalette.Mid, brush15) palette1.setBrush(QPalette.Active, QPalette.Text, brush6) palette1.setBrush(QPalette.Active, QPalette.BrightText, brush7) palette1.setBrush(QPalette.Active, QPalette.ButtonText, brush) palette1.setBrush(QPalette.Active, QPalette.Base, brush7) palette1.setBrush(QPalette.Active, QPalette.Window, brush8) palette1.setBrush(QPalette.Active, QPalette.Shadow, brush6) palette1.setBrush(QPalette.Active, QPalette.Highlight, brush9) palette1.setBrush(QPalette.Active, QPalette.HighlightedText, brush7) palette1.setBrush(QPalette.Active, QPalette.Link, brush6) palette1.setBrush(QPalette.Active, QPalette.LinkVisited, brush6) palette1.setBrush(QPalette.Active, QPalette.AlternateBase, brush10) palette1.setBrush(QPalette.Inactive, QPalette.WindowText, brush) palette1.setBrush(QPalette.Inactive, QPalette.Button, brush11) palette1.setBrush(QPalette.Inactive, QPalette.Light, brush12) palette1.setBrush(QPalette.Inactive, QPalette.Midlight, brush13) palette1.setBrush(QPalette.Inactive, QPalette.Dark, brush14) palette1.setBrush(QPalette.Inactive, QPalette.Mid, brush15) palette1.setBrush(QPalette.Inactive, QPalette.Text, brush6) palette1.setBrush(QPalette.Inactive, QPalette.BrightText, brush7) palette1.setBrush(QPalette.Inactive, QPalette.ButtonText, brush) palette1.setBrush(QPalette.Inactive, QPalette.Base, brush7) palette1.setBrush(QPalette.Inactive, QPalette.Window, brush8) palette1.setBrush(QPalette.Inactive, QPalette.Shadow, brush6) palette1.setBrush(QPalette.Inactive, QPalette.Highlight, brush9) palette1.setBrush(QPalette.Inactive, QPalette.HighlightedText, brush7) palette1.setBrush(QPalette.Inactive, QPalette.Link, brush6) palette1.setBrush(QPalette.Inactive, QPalette.LinkVisited, brush6) palette1.setBrush(QPalette.Inactive, QPalette.AlternateBase, brush10) palette1.setBrush(QPalette.Disabled, QPalette.WindowText, brush) palette1.setBrush(QPalette.Disabled, QPalette.Button, brush11) palette1.setBrush(QPalette.Disabled, QPalette.Light, brush12) palette1.setBrush(QPalette.Disabled, QPalette.Midlight, brush13) palette1.setBrush(QPalette.Disabled, QPalette.Dark, brush14) palette1.setBrush(QPalette.Disabled, QPalette.Mid, brush15) palette1.setBrush(QPalette.Disabled, QPalette.Text, brush6) palette1.setBrush(QPalette.Disabled, QPalette.BrightText, brush7) palette1.setBrush(QPalette.Disabled, QPalette.ButtonText, brush) palette1.setBrush(QPalette.Disabled, QPalette.Base, brush7) palette1.setBrush(QPalette.Disabled, QPalette.Window, brush8) palette1.setBrush(QPalette.Disabled, QPalette.Shadow, brush6) palette1.setBrush(QPalette.Disabled, QPalette.Highlight, brush9) palette1.setBrush(QPalette.Disabled, QPalette.HighlightedText, brush7) palette1.setBrush(QPalette.Disabled, QPalette.Link, brush6) palette1.setBrush(QPalette.Disabled, QPalette.LinkVisited, brush6) palette1.setBrush(QPalette.Disabled, QPalette.AlternateBase, brush10) self.gslider.setPalette(palette1) self.gslider.setMaximum(400) self.gslider.setValue(100) self.gslider.setOrientation(Qt.Horizontal) self.gridLayout.addWidget(self.gslider, 4, 1, 1, 1) self.glabel = QLabel(self.GroupBox1) self.glabel.setObjectName(u"glabel") self.gridLayout.addWidget(self.glabel, 4, 2, 1, 1) self.TextLabel7 = QLabel(self.GroupBox1) self.TextLabel7.setObjectName(u"TextLabel7") self.gridLayout.addWidget(self.TextLabel7, 0, 0, 1, 1) self.TextLabel8 = QLabel(self.GroupBox1) self.TextLabel8.setObjectName(u"TextLabel8") self.gridLayout.addWidget(self.TextLabel8, 0, 2, 1, 1) self.gammaslider = QSlider(self.GroupBox1) self.gammaslider.setObjectName(u"gammaslider") palette2 = QPalette() palette2.setBrush(QPalette.Active, QPalette.WindowText, brush) palette2.setBrush(QPalette.Active, QPalette.Button, brush7) palette2.setBrush(QPalette.Active, QPalette.Light, brush7) palette2.setBrush(QPalette.Active, QPalette.Midlight, brush7) brush16 = QBrush(QColor(127, 127, 127, 255)) brush16.setStyle(Qt.SolidPattern) palette2.setBrush(QPalette.Active, QPalette.Dark, brush16) brush17 = QBrush(QColor(170, 170, 170, 255)) brush17.setStyle(Qt.SolidPattern) palette2.setBrush(QPalette.Active, QPalette.Mid, brush17) palette2.setBrush(QPalette.Active, QPalette.Text, brush6) palette2.setBrush(QPalette.Active, QPalette.BrightText, brush7) palette2.setBrush(QPalette.Active, QPalette.ButtonText, brush) palette2.setBrush(QPalette.Active, QPalette.Base, brush7) palette2.setBrush(QPalette.Active, QPalette.Window, brush8) palette2.setBrush(QPalette.Active, QPalette.Shadow, brush6) palette2.setBrush(QPalette.Active, QPalette.Highlight, brush9) palette2.setBrush(QPalette.Active, QPalette.HighlightedText, brush7) palette2.setBrush(QPalette.Active, QPalette.Link, brush6) palette2.setBrush(QPalette.Active, QPalette.LinkVisited, brush6) palette2.setBrush(QPalette.Active, QPalette.AlternateBase, brush10) palette2.setBrush(QPalette.Inactive, QPalette.WindowText, brush) palette2.setBrush(QPalette.Inactive, QPalette.Button, brush7) palette2.setBrush(QPalette.Inactive, QPalette.Light, brush7) palette2.setBrush(QPalette.Inactive, QPalette.Midlight, brush7) palette2.setBrush(QPalette.Inactive, QPalette.Dark, brush16) palette2.setBrush(QPalette.Inactive, QPalette.Mid, brush17) palette2.setBrush(QPalette.Inactive, QPalette.Text, brush6) palette2.setBrush(QPalette.Inactive, QPalette.BrightText, brush7) palette2.setBrush(QPalette.Inactive, QPalette.ButtonText, brush) palette2.setBrush(QPalette.Inactive, QPalette.Base, brush7) palette2.setBrush(QPalette.Inactive, QPalette.Window, brush8) palette2.setBrush(QPalette.Inactive, QPalette.Shadow, brush6) palette2.setBrush(QPalette.Inactive, QPalette.Highlight, brush9) palette2.setBrush(QPalette.Inactive, QPalette.HighlightedText, brush7) palette2.setBrush(QPalette.Inactive, QPalette.Link, brush6) palette2.setBrush(QPalette.Inactive, QPalette.LinkVisited, brush6) palette2.setBrush(QPalette.Inactive, QPalette.AlternateBase, brush10) palette2.setBrush(QPalette.Disabled, QPalette.WindowText, brush) palette2.setBrush(QPalette.Disabled, QPalette.Button, brush7) palette2.setBrush(QPalette.Disabled, QPalette.Light, brush7) palette2.setBrush(QPalette.Disabled, QPalette.Midlight, brush7) palette2.setBrush(QPalette.Disabled, QPalette.Dark, brush16) palette2.setBrush(QPalette.Disabled, QPalette.Mid, brush17) palette2.setBrush(QPalette.Disabled, QPalette.Text, brush6) palette2.setBrush(QPalette.Disabled, QPalette.BrightText, brush7) palette2.setBrush(QPalette.Disabled, QPalette.ButtonText, brush) palette2.setBrush(QPalette.Disabled, QPalette.Base, brush7) palette2.setBrush(QPalette.Disabled, QPalette.Window, brush8) palette2.setBrush(QPalette.Disabled, QPalette.Shadow, brush6) palette2.setBrush(QPalette.Disabled, QPalette.Highlight, brush9) palette2.setBrush(QPalette.Disabled, QPalette.HighlightedText, brush7) palette2.setBrush(QPalette.Disabled, QPalette.Link, brush6) palette2.setBrush(QPalette.Disabled, QPalette.LinkVisited, brush6) palette2.setBrush(QPalette.Disabled, QPalette.AlternateBase, brush10) self.gammaslider.setPalette(palette2) self.gammaslider.setMaximum(400) self.gammaslider.setValue(100) self.gammaslider.setOrientation(Qt.Horizontal) self.gridLayout.addWidget(self.gammaslider, 0, 1, 1, 1) self.TextLabel1_2 = QLabel(self.GroupBox1) self.TextLabel1_2.setObjectName(u"TextLabel1_2") self.gridLayout.addWidget(self.TextLabel1_2, 2, 0, 1, 1) self.rlabel = QLabel(self.GroupBox1) self.rlabel.setObjectName(u"rlabel") self.gridLayout.addWidget(self.rlabel, 2, 2, 1, 1) self.rslider = QSlider(self.GroupBox1) self.rslider.setObjectName(u"rslider") palette3 = QPalette() palette3.setBrush(QPalette.Active, QPalette.WindowText, brush) brush18 = QBrush(QColor(255, 0, 0, 255)) brush18.setStyle(Qt.SolidPattern) palette3.setBrush(QPalette.Active, QPalette.Button, brush18) brush19 = QBrush(QColor(255, 127, 127, 255)) brush19.setStyle(Qt.SolidPattern) palette3.setBrush(QPalette.Active, QPalette.Light, brush19) brush20 = QBrush(QColor(255, 38, 38, 255)) brush20.setStyle(Qt.SolidPattern) palette3.setBrush(QPalette.Active, QPalette.Midlight, brush20) brush21 = QBrush(QColor(127, 0, 0, 255)) brush21.setStyle(Qt.SolidPattern) palette3.setBrush(QPalette.Active, QPalette.Dark, brush21) brush22 = QBrush(QColor(170, 0, 0, 255)) brush22.setStyle(Qt.SolidPattern) palette3.setBrush(QPalette.Active, QPalette.Mid, brush22) palette3.setBrush(QPalette.Active, QPalette.Text, brush6) palette3.setBrush(QPalette.Active, QPalette.BrightText, brush7) palette3.setBrush(QPalette.Active, QPalette.ButtonText, brush) palette3.setBrush(QPalette.Active, QPalette.Base, brush7) palette3.setBrush(QPalette.Active, QPalette.Window, brush8) palette3.setBrush(QPalette.Active, QPalette.Shadow, brush6) palette3.setBrush(QPalette.Active, QPalette.Highlight, brush9) palette3.setBrush(QPalette.Active, QPalette.HighlightedText, brush7) palette3.setBrush(QPalette.Active, QPalette.Link, brush6) palette3.setBrush(QPalette.Active, QPalette.LinkVisited, brush6) palette3.setBrush(QPalette.Active, QPalette.AlternateBase, brush10) palette3.setBrush(QPalette.Inactive, QPalette.WindowText, brush) palette3.setBrush(QPalette.Inactive, QPalette.Button, brush18) palette3.setBrush(QPalette.Inactive, QPalette.Light, brush19) palette3.setBrush(QPalette.Inactive, QPalette.Midlight, brush20) palette3.setBrush(QPalette.Inactive, QPalette.Dark, brush21) palette3.setBrush(QPalette.Inactive, QPalette.Mid, brush22) palette3.setBrush(QPalette.Inactive, QPalette.Text, brush6) palette3.setBrush(QPalette.Inactive, QPalette.BrightText, brush7) palette3.setBrush(QPalette.Inactive, QPalette.ButtonText, brush) palette3.setBrush(QPalette.Inactive, QPalette.Base, brush7) palette3.setBrush(QPalette.Inactive, QPalette.Window, brush8) palette3.setBrush(QPalette.Inactive, QPalette.Shadow, brush6) palette3.setBrush(QPalette.Inactive, QPalette.Highlight, brush9) palette3.setBrush(QPalette.Inactive, QPalette.HighlightedText, brush7) palette3.setBrush(QPalette.Inactive, QPalette.Link, brush6) palette3.setBrush(QPalette.Inactive, QPalette.LinkVisited, brush6) palette3.setBrush(QPalette.Inactive, QPalette.AlternateBase, brush10) palette3.setBrush(QPalette.Disabled, QPalette.WindowText, brush) palette3.setBrush(QPalette.Disabled, QPalette.Button, brush18) palette3.setBrush(QPalette.Disabled, QPalette.Light, brush19) palette3.setBrush(QPalette.Disabled, QPalette.Midlight, brush20) palette3.setBrush(QPalette.Disabled, QPalette.Dark, brush21) palette3.setBrush(QPalette.Disabled, QPalette.Mid, brush22) palette3.setBrush(QPalette.Disabled, QPalette.Text, brush6) palette3.setBrush(QPalette.Disabled, QPalette.BrightText, brush7) palette3.setBrush(QPalette.Disabled, QPalette.ButtonText, brush) palette3.setBrush(QPalette.Disabled, QPalette.Base, brush7) palette3.setBrush(QPalette.Disabled, QPalette.Window, brush8) palette3.setBrush(QPalette.Disabled, QPalette.Shadow, brush6) palette3.setBrush(QPalette.Disabled, QPalette.Highlight, brush9) palette3.setBrush(QPalette.Disabled, QPalette.HighlightedText, brush7) palette3.setBrush(QPalette.Disabled, QPalette.Link, brush6) palette3.setBrush(QPalette.Disabled, QPalette.LinkVisited, brush6) palette3.setBrush(QPalette.Disabled, QPalette.AlternateBase, brush10) self.rslider.setPalette(palette3) self.rslider.setMaximum(400) self.rslider.setValue(100) self.rslider.setOrientation(Qt.Horizontal) self.gridLayout.addWidget(self.rslider, 2, 1, 1, 1) self.PushButton3 = QPushButton(self.GroupBox1) self.PushButton3.setObjectName(u"PushButton3") self.gridLayout.addWidget(self.PushButton3, 8, 0, 1, 3) self.MyCustomWidget1 = GammaView(self.GroupBox1) self.MyCustomWidget1.setObjectName(u"MyCustomWidget1") self.gridLayout.addWidget(self.MyCustomWidget1, 0, 3, 9, 1) self.vboxLayout.addWidget(self.GroupBox1) self.hboxLayout3 = QHBoxLayout() self.hboxLayout3.setSpacing(6) self.hboxLayout3.setObjectName(u"hboxLayout3") self.hboxLayout3.setContentsMargins(0, 0, 0, 0) self.spacerItem1 = QSpacerItem(40, 20, QSizePolicy.Expanding, QSizePolicy.Minimum) self.hboxLayout3.addItem(self.spacerItem1) self.buttonOk = QPushButton(Config) self.buttonOk.setObjectName(u"buttonOk") self.buttonOk.setAutoDefault(True) self.hboxLayout3.addWidget(self.buttonOk) self.buttonCancel = QPushButton(Config) self.buttonCancel.setObjectName(u"buttonCancel") self.buttonCancel.setAutoDefault(True) self.hboxLayout3.addWidget(self.buttonCancel) self.vboxLayout.addLayout(self.hboxLayout3) self.retranslateUi(Config) self.size_width.valueChanged.connect(self.size_custom.click) self.size_height.valueChanged.connect(self.size_custom.click) self.buttonOk.setDefault(True) QMetaObject.connectSlotsByName(Config) # setupUi def retranslateUi(self, Config): Config.setWindowTitle( QCoreApplication.translate("Config", u"Configure", None)) self.ButtonGroup1.setTitle( QCoreApplication.translate("Config", u"Size", None)) self.size_176_220.setText( QCoreApplication.translate("Config", u"176x220 \"SmartPhone\"", None)) self.size_240_320.setText( QCoreApplication.translate("Config", u"240x320 \"PDA\"", None)) self.size_320_240.setText( QCoreApplication.translate("Config", u"320x240 \"TV\" / \"QVGA\"", None)) self.size_640_480.setText( QCoreApplication.translate("Config", u"640x480 \"VGA\"", None)) self.size_800_600.setText( QCoreApplication.translate("Config", u"800x600", None)) self.size_1024_768.setText( QCoreApplication.translate("Config", u"1024x768", None)) self.size_custom.setText( QCoreApplication.translate("Config", u"Custom", None)) self.ButtonGroup2.setTitle( QCoreApplication.translate("Config", u"Depth", None)) self.depth_1.setText( QCoreApplication.translate("Config", u"1 bit monochrome", None)) self.depth_4gray.setText( QCoreApplication.translate("Config", u"4 bit grayscale", None)) self.depth_8.setText( QCoreApplication.translate("Config", u"8 bit", None)) self.depth_12.setText( QCoreApplication.translate("Config", u"12 (16) bit", None)) self.depth_15.setText( QCoreApplication.translate("Config", u"15 bit", None)) self.depth_16.setText( QCoreApplication.translate("Config", u"16 bit", None)) self.depth_18.setText( QCoreApplication.translate("Config", u"18 bit", None)) self.depth_24.setText( QCoreApplication.translate("Config", u"24 bit", None)) self.depth_32.setText( QCoreApplication.translate("Config", u"32 bit", None)) self.depth_32_argb.setText( QCoreApplication.translate("Config", u"32 bit ARGB", None)) self.TextLabel1_3.setText( QCoreApplication.translate("Config", u"Skin", None)) self.skin.setItemText( 0, QCoreApplication.translate("Config", u"None", None)) self.touchScreen.setText( QCoreApplication.translate( "Config", u"Emulate touch screen (no mouse move)", None)) self.lcdScreen.setText( QCoreApplication.translate( "Config", u"Emulate LCD screen (Only with fixed zoom of 3.0 times magnification)", None)) self.TextLabel1.setText( QCoreApplication.translate( "Config", u"<p>Note that any applications using the virtual framebuffer will be terminated if you change the Size or Depth <i>above</i>. You may freely modify the Gamma <i>below</i>.", None)) self.GroupBox1.setTitle( QCoreApplication.translate("Config", u"Gamma", None)) self.TextLabel3.setText( QCoreApplication.translate("Config", u"Blue", None)) self.blabel.setText(QCoreApplication.translate("Config", u"1.0", None)) self.TextLabel2.setText( QCoreApplication.translate("Config", u"Green", None)) self.glabel.setText(QCoreApplication.translate("Config", u"1.0", None)) self.TextLabel7.setText( QCoreApplication.translate("Config", u"All", None)) self.TextLabel8.setText( QCoreApplication.translate("Config", u"1.0", None)) self.TextLabel1_2.setText( QCoreApplication.translate("Config", u"Red", None)) self.rlabel.setText(QCoreApplication.translate("Config", u"1.0", None)) self.PushButton3.setText( QCoreApplication.translate("Config", u"Set all to 1.0", None)) self.buttonOk.setText( QCoreApplication.translate("Config", u"&OK", None)) self.buttonCancel.setText( QCoreApplication.translate("Config", u"&Cancel", None))
class Ui_ProjectSettings_UI(object): def setupUi(self, ProjectSettings_UI): if not ProjectSettings_UI.objectName(): ProjectSettings_UI.setObjectName(u"ProjectSettings_UI") ProjectSettings_UI.resize(575, 685) self.gridLayout_3 = QGridLayout(ProjectSettings_UI) self.gridLayout_3.setObjectName(u"gridLayout_3") self.buttonBox = QDialogButtonBox(ProjectSettings_UI) self.buttonBox.setObjectName(u"buttonBox") self.buttonBox.setOrientation(Qt.Horizontal) self.buttonBox.setStandardButtons(QDialogButtonBox.Cancel | QDialogButtonBox.Ok) self.gridLayout_3.addWidget(self.buttonBox, 2, 0, 1, 1) self.tabWidget = QTabWidget(ProjectSettings_UI) self.tabWidget.setObjectName(u"tabWidget") self.tabWidget.setDocumentMode(True) self.tab = QWidget() self.tab.setObjectName(u"tab") self.gridLayout = QGridLayout(self.tab) self.gridLayout.setObjectName(u"gridLayout") self.previewparams = QPlainTextEdit(self.tab) self.previewparams.setObjectName(u"previewparams") sizePolicy = QSizePolicy(QSizePolicy.Expanding, QSizePolicy.Maximum) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.previewparams.sizePolicy().hasHeightForWidth()) self.previewparams.setSizePolicy(sizePolicy) self.previewparams.setReadOnly(True) self.gridLayout.addWidget(self.previewparams, 7, 0, 1, 4) self.label_2 = QLabel(self.tab) self.label_2.setObjectName(u"label_2") self.gridLayout.addWidget(self.label_2, 5, 0, 1, 1) self.audio_thumbs = QCheckBox(self.tab) self.audio_thumbs.setObjectName(u"audio_thumbs") self.gridLayout.addWidget(self.audio_thumbs, 5, 2, 1, 1) self.horizontalLayout_2 = QHBoxLayout() self.horizontalLayout_2.setObjectName(u"horizontalLayout_2") self.label_7 = QLabel(self.tab) self.label_7.setObjectName(u"label_7") self.horizontalLayout_2.addWidget(self.label_7) self.video_tracks = QSpinBox(self.tab) self.video_tracks.setObjectName(u"video_tracks") self.horizontalLayout_2.addWidget(self.video_tracks) self.label_8 = QLabel(self.tab) self.label_8.setObjectName(u"label_8") self.horizontalLayout_2.addWidget(self.label_8) self.audio_tracks = QSpinBox(self.tab) self.audio_tracks.setObjectName(u"audio_tracks") self.horizontalLayout_2.addWidget(self.audio_tracks) self.label = QLabel(self.tab) self.label.setObjectName(u"label") self.horizontalLayout_2.addWidget(self.label) self.audio_channels = QComboBox(self.tab) self.audio_channels.addItem("") self.audio_channels.addItem("") self.audio_channels.addItem("") self.audio_channels.setObjectName(u"audio_channels") sizePolicy1 = QSizePolicy(QSizePolicy.MinimumExpanding, QSizePolicy.Fixed) sizePolicy1.setHorizontalStretch(0) sizePolicy1.setVerticalStretch(0) sizePolicy1.setHeightForWidth( self.audio_channels.sizePolicy().hasHeightForWidth()) self.audio_channels.setSizePolicy(sizePolicy1) self.horizontalLayout_2.addWidget(self.audio_channels) self.gridLayout.addLayout(self.horizontalLayout_2, 4, 0, 1, 4) self.horizontalSpacer = QSpacerItem(229, 20, QSizePolicy.Expanding, QSizePolicy.Minimum) self.gridLayout.addItem(self.horizontalSpacer, 5, 3, 1, 1) self.profile_box = QGroupBox(self.tab) self.profile_box.setObjectName(u"profile_box") sizePolicy2 = QSizePolicy(QSizePolicy.Preferred, QSizePolicy.MinimumExpanding) sizePolicy2.setHorizontalStretch(0) sizePolicy2.setVerticalStretch(0) sizePolicy2.setHeightForWidth( self.profile_box.sizePolicy().hasHeightForWidth()) self.profile_box.setSizePolicy(sizePolicy2) self.profile_box.setFlat(True) self.gridLayout.addWidget(self.profile_box, 3, 0, 1, 4) self.label_4 = QLabel(self.tab) self.label_4.setObjectName(u"label_4") self.gridLayout.addWidget(self.label_4, 0, 0, 1, 4) self.video_thumbs = QCheckBox(self.tab) self.video_thumbs.setObjectName(u"video_thumbs") self.gridLayout.addWidget(self.video_thumbs, 5, 1, 1, 1) self.horizontalLayout_4 = QHBoxLayout() self.horizontalLayout_4.setObjectName(u"horizontalLayout_4") self.label_25 = QLabel(self.tab) self.label_25.setObjectName(u"label_25") sizePolicy3 = QSizePolicy(QSizePolicy.Maximum, QSizePolicy.Preferred) sizePolicy3.setHorizontalStretch(0) sizePolicy3.setVerticalStretch(0) sizePolicy3.setHeightForWidth( self.label_25.sizePolicy().hasHeightForWidth()) self.label_25.setSizePolicy(sizePolicy3) self.horizontalLayout_4.addWidget(self.label_25) self.preview_profile = KComboBox(self.tab) self.preview_profile.setObjectName(u"preview_profile") sizePolicy1.setHeightForWidth( self.preview_profile.sizePolicy().hasHeightForWidth()) self.preview_profile.setSizePolicy(sizePolicy1) self.horizontalLayout_4.addWidget(self.preview_profile) self.preview_showprofileinfo = QToolButton(self.tab) self.preview_showprofileinfo.setObjectName(u"preview_showprofileinfo") self.preview_showprofileinfo.setCheckable(True) self.horizontalLayout_4.addWidget(self.preview_showprofileinfo) self.preview_manageprofile = QToolButton(self.tab) self.preview_manageprofile.setObjectName(u"preview_manageprofile") self.horizontalLayout_4.addWidget(self.preview_manageprofile) self.gridLayout.addLayout(self.horizontalLayout_4, 6, 0, 1, 4) self.horizontalLayout = QHBoxLayout() self.horizontalLayout.setObjectName(u"horizontalLayout") self.custom_folder = QCheckBox(self.tab) self.custom_folder.setObjectName(u"custom_folder") self.horizontalLayout.addWidget(self.custom_folder) self.project_folder = KUrlRequester(self.tab) self.project_folder.setObjectName(u"project_folder") self.project_folder.setEnabled(False) self.horizontalLayout.addWidget(self.project_folder) self.gridLayout.addLayout(self.horizontalLayout, 1, 0, 1, 4) self.same_folder = QCheckBox(self.tab) self.same_folder.setObjectName(u"same_folder") self.gridLayout.addWidget(self.same_folder, 2, 0, 1, 4) self.tabWidget.addTab(self.tab, "") self.label_4.raise_() self.profile_box.raise_() self.label_2.raise_() self.video_thumbs.raise_() self.audio_thumbs.raise_() self.previewparams.raise_() self.same_folder.raise_() self.tab_4 = QWidget() self.tab_4.setObjectName(u"tab_4") self.verticalLayout = QVBoxLayout(self.tab_4) self.verticalLayout.setObjectName(u"verticalLayout") self.enable_proxy = QCheckBox(self.tab_4) self.enable_proxy.setObjectName(u"enable_proxy") self.verticalLayout.addWidget(self.enable_proxy) self.proxy_box = QGroupBox(self.tab_4) self.proxy_box.setObjectName(u"proxy_box") self.proxy_box.setEnabled(False) self.proxy_box.setFlat(True) self.proxy_box.setCheckable(False) self.proxy_box.setChecked(False) self.gridLayout_2 = QGridLayout(self.proxy_box) self.gridLayout_2.setObjectName(u"gridLayout_2") self.gridLayout_2.setHorizontalSpacing(6) self.gridLayout_2.setContentsMargins(0, 0, 0, 0) self.l_relPathProxyToOrig = QLabel(self.proxy_box) self.l_relPathProxyToOrig.setObjectName(u"l_relPathProxyToOrig") self.gridLayout_2.addWidget(self.l_relPathProxyToOrig, 10, 1, 1, 1) self.generate_imageproxy = QCheckBox(self.proxy_box) self.generate_imageproxy.setObjectName(u"generate_imageproxy") self.gridLayout_2.addWidget(self.generate_imageproxy, 3, 0, 1, 2) self.l_prefix_proxy = QLabel(self.proxy_box) self.l_prefix_proxy.setObjectName(u"l_prefix_proxy") self.gridLayout_2.addWidget(self.l_prefix_proxy, 11, 1, 1, 1) self.proxy_imagesize = QSpinBox(self.proxy_box) self.proxy_imagesize.setObjectName(u"proxy_imagesize") self.proxy_imagesize.setEnabled(False) self.proxy_imagesize.setMinimum(200) self.proxy_imagesize.setMaximum(100000) self.proxy_imagesize.setValue(800) self.gridLayout_2.addWidget(self.proxy_imagesize, 4, 2, 1, 4) self.label_24 = QLabel(self.proxy_box) self.label_24.setObjectName(u"label_24") sizePolicy3.setHeightForWidth( self.label_24.sizePolicy().hasHeightForWidth()) self.label_24.setSizePolicy(sizePolicy3) self.gridLayout_2.addWidget(self.label_24, 1, 0, 1, 1) self.proxy_minsize = QSpinBox(self.proxy_box) self.proxy_minsize.setObjectName(u"proxy_minsize") self.proxy_minsize.setMaximum(10000) self.proxy_minsize.setValue(1000) self.gridLayout_2.addWidget(self.proxy_minsize, 0, 2, 1, 4) self.l_prefix_clip = QLabel(self.proxy_box) self.l_prefix_clip.setObjectName(u"l_prefix_clip") self.gridLayout_2.addWidget(self.l_prefix_clip, 8, 1, 1, 1) self.proxy_profile = KComboBox(self.proxy_box) self.proxy_profile.setObjectName(u"proxy_profile") sizePolicy1.setHeightForWidth( self.proxy_profile.sizePolicy().hasHeightForWidth()) self.proxy_profile.setSizePolicy(sizePolicy1) self.gridLayout_2.addWidget(self.proxy_profile, 1, 1, 1, 2) self.proxy_showprofileinfo = QToolButton(self.proxy_box) self.proxy_showprofileinfo.setObjectName(u"proxy_showprofileinfo") self.proxy_showprofileinfo.setCheckable(True) self.gridLayout_2.addWidget(self.proxy_showprofileinfo, 1, 4, 1, 1) self.generate_proxy = QCheckBox(self.proxy_box) self.generate_proxy.setObjectName(u"generate_proxy") self.gridLayout_2.addWidget(self.generate_proxy, 0, 0, 1, 2) self.proxyparams = QPlainTextEdit(self.proxy_box) self.proxyparams.setObjectName(u"proxyparams") sizePolicy.setHeightForWidth( self.proxyparams.sizePolicy().hasHeightForWidth()) self.proxyparams.setSizePolicy(sizePolicy) self.proxyparams.setReadOnly(True) self.gridLayout_2.addWidget(self.proxyparams, 2, 0, 1, 6) self.image_label = QLabel(self.proxy_box) self.image_label.setObjectName(u"image_label") self.image_label.setEnabled(False) self.gridLayout_2.addWidget(self.image_label, 4, 0, 1, 2) self.le_relPathProxyToOrig = QLineEdit(self.proxy_box) self.le_relPathProxyToOrig.setObjectName(u"le_relPathProxyToOrig") self.le_relPathProxyToOrig.setEnabled(False) self.gridLayout_2.addWidget(self.le_relPathProxyToOrig, 10, 3, 1, 1) self.le_prefix_proxy = QLineEdit(self.proxy_box) self.le_prefix_proxy.setObjectName(u"le_prefix_proxy") self.le_prefix_proxy.setEnabled(False) self.gridLayout_2.addWidget(self.le_prefix_proxy, 11, 3, 1, 1) self.l_suffix_proxy = QLabel(self.proxy_box) self.l_suffix_proxy.setObjectName(u"l_suffix_proxy") self.gridLayout_2.addWidget(self.l_suffix_proxy, 12, 1, 1, 1) self.le_prefix_clip = QLineEdit(self.proxy_box) self.le_prefix_clip.setObjectName(u"le_prefix_clip") self.le_prefix_clip.setEnabled(False) self.gridLayout_2.addWidget(self.le_prefix_clip, 8, 3, 1, 1) self.le_suffix_proxy = QLineEdit(self.proxy_box) self.le_suffix_proxy.setObjectName(u"le_suffix_proxy") self.le_suffix_proxy.setEnabled(False) self.gridLayout_2.addWidget(self.le_suffix_proxy, 12, 3, 1, 1) self.proxy_imageminsize = QSpinBox(self.proxy_box) self.proxy_imageminsize.setObjectName(u"proxy_imageminsize") self.proxy_imageminsize.setMinimum(500) self.proxy_imageminsize.setMaximum(100000) self.proxy_imageminsize.setValue(2000) self.gridLayout_2.addWidget(self.proxy_imageminsize, 3, 2, 1, 4) self.l_suffix_clip = QLabel(self.proxy_box) self.l_suffix_clip.setObjectName(u"l_suffix_clip") self.gridLayout_2.addWidget(self.l_suffix_clip, 9, 1, 1, 1) self.l_relPathOrigToProxy = QLabel(self.proxy_box) self.l_relPathOrigToProxy.setObjectName(u"l_relPathOrigToProxy") self.gridLayout_2.addWidget(self.l_relPathOrigToProxy, 7, 1, 1, 1) self.le_relPathOrigToProxy = QLineEdit(self.proxy_box) self.le_relPathOrigToProxy.setObjectName(u"le_relPathOrigToProxy") self.le_relPathOrigToProxy.setEnabled(False) self.gridLayout_2.addWidget(self.le_relPathOrigToProxy, 7, 3, 1, 1) self.external_proxy_profile = QComboBox(self.proxy_box) self.external_proxy_profile.setObjectName(u"external_proxy_profile") self.gridLayout_2.addWidget(self.external_proxy_profile, 6, 1, 1, 5) self.proxy_resize = QSpinBox(self.proxy_box) self.proxy_resize.setObjectName(u"proxy_resize") self.proxy_resize.setMinimum(200) self.proxy_resize.setMaximum(100000) self.gridLayout_2.addWidget(self.proxy_resize, 5, 2, 1, 4) self.le_suffix_clip = QLineEdit(self.proxy_box) self.le_suffix_clip.setObjectName(u"le_suffix_clip") self.le_suffix_clip.setEnabled(False) self.gridLayout_2.addWidget(self.le_suffix_clip, 9, 3, 1, 1) self.external_proxy = QCheckBox(self.proxy_box) self.external_proxy.setObjectName(u"external_proxy") self.gridLayout_2.addWidget(self.external_proxy, 6, 0, 1, 1) self.checkProxy = QToolButton(self.proxy_box) self.checkProxy.setObjectName(u"checkProxy") self.gridLayout_2.addWidget(self.checkProxy, 1, 3, 1, 1) self.label_3 = QLabel(self.proxy_box) self.label_3.setObjectName(u"label_3") self.gridLayout_2.addWidget(self.label_3, 5, 0, 1, 1) self.proxy_manageprofile = QToolButton(self.proxy_box) self.proxy_manageprofile.setObjectName(u"proxy_manageprofile") self.gridLayout_2.addWidget(self.proxy_manageprofile, 1, 5, 1, 1) self.verticalSpacer = QSpacerItem(20, 40, QSizePolicy.Minimum, QSizePolicy.Expanding) self.gridLayout_2.addItem(self.verticalSpacer, 13, 1, 1, 1) self.verticalLayout.addWidget(self.proxy_box) self.tabWidget.addTab(self.tab_4, "") self.tab_3 = QWidget() self.tab_3.setObjectName(u"tab_3") self.gridLayout_6 = QGridLayout(self.tab_3) self.gridLayout_6.setObjectName(u"gridLayout_6") self.metadata_list = QTreeWidget(self.tab_3) self.metadata_list.setObjectName(u"metadata_list") self.metadata_list.setAlternatingRowColors(True) self.metadata_list.setRootIsDecorated(False) self.metadata_list.setAllColumnsShowFocus(True) self.metadata_list.setColumnCount(2) self.metadata_list.header().setVisible(False) self.gridLayout_6.addWidget(self.metadata_list, 0, 0, 1, 1) self.horizontalLayout_3 = QHBoxLayout() self.horizontalLayout_3.setObjectName(u"horizontalLayout_3") self.add_metadata = QToolButton(self.tab_3) self.add_metadata.setObjectName(u"add_metadata") self.horizontalLayout_3.addWidget(self.add_metadata) self.delete_metadata = QToolButton(self.tab_3) self.delete_metadata.setObjectName(u"delete_metadata") self.horizontalLayout_3.addWidget(self.delete_metadata) self.horizontalSpacer_3 = QSpacerItem(40, 20, QSizePolicy.Expanding, QSizePolicy.Minimum) self.horizontalLayout_3.addItem(self.horizontalSpacer_3) self.gridLayout_6.addLayout(self.horizontalLayout_3, 1, 0, 1, 1) self.tabWidget.addTab(self.tab_3, "") self.tab_2 = QWidget() self.tab_2.setObjectName(u"tab_2") self.gridLayout_4 = QGridLayout(self.tab_2) self.gridLayout_4.setObjectName(u"gridLayout_4") self.fonts_list = QListWidget(self.tab_2) self.fonts_list.setObjectName(u"fonts_list") self.fonts_list.setAlternatingRowColors(True) self.gridLayout_4.addWidget(self.fonts_list, 5, 0, 1, 5) self.files_list = QTreeWidget(self.tab_2) __qtreewidgetitem = QTreeWidgetItem() __qtreewidgetitem.setText(0, u"1") self.files_list.setHeaderItem(__qtreewidgetitem) self.files_list.setObjectName(u"files_list") self.files_list.setAlternatingRowColors(True) self.files_list.setRootIsDecorated(False) self.files_list.setItemsExpandable(False) self.files_list.setHeaderHidden(True) self.files_list.setExpandsOnDoubleClick(False) self.gridLayout_4.addWidget(self.files_list, 3, 0, 1, 5) self.label_12 = QLabel(self.tab_2) self.label_12.setObjectName(u"label_12") self.gridLayout_4.addWidget(self.label_12, 0, 0, 1, 2) self.used_count = QLabel(self.tab_2) self.used_count.setObjectName(u"used_count") self.gridLayout_4.addWidget(self.used_count, 0, 2, 1, 1) self.used_size = QLabel(self.tab_2) self.used_size.setObjectName(u"used_size") self.gridLayout_4.addWidget(self.used_size, 0, 3, 1, 1) self.label_6 = QLabel(self.tab_2) self.label_6.setObjectName(u"label_6") self.gridLayout_4.addWidget(self.label_6, 1, 0, 1, 1) self.unused_count = QLabel(self.tab_2) self.unused_count.setObjectName(u"unused_count") self.gridLayout_4.addWidget(self.unused_count, 1, 2, 1, 1) self.unused_size = QLabel(self.tab_2) self.unused_size.setObjectName(u"unused_size") self.gridLayout_4.addWidget(self.unused_size, 1, 3, 1, 1) self.delete_unused = QPushButton(self.tab_2) self.delete_unused.setObjectName(u"delete_unused") self.gridLayout_4.addWidget(self.delete_unused, 1, 4, 1, 1) self.list_search = KTreeWidgetSearchLine(self.tab_2) self.list_search.setObjectName(u"list_search") self.gridLayout_4.addWidget(self.list_search, 2, 3, 1, 2) self.label_13 = QLabel(self.tab_2) self.label_13.setObjectName(u"label_13") self.gridLayout_4.addWidget(self.label_13, 2, 0, 1, 1) self.label_fonts = QLabel(self.tab_2) self.label_fonts.setObjectName(u"label_fonts") self.gridLayout_4.addWidget(self.label_fonts, 4, 0, 1, 1) self.button_export = QPushButton(self.tab_2) self.button_export.setObjectName(u"button_export") self.gridLayout_4.addWidget(self.button_export, 6, 0, 1, 2) self.files_count = QLabel(self.tab_2) self.files_count.setObjectName(u"files_count") self.gridLayout_4.addWidget(self.files_count, 2, 2, 1, 1) self.tabWidget.addTab(self.tab_2, "") self.gridLayout_3.addWidget(self.tabWidget, 0, 0, 1, 1) self.retranslateUi(ProjectSettings_UI) self.buttonBox.accepted.connect(ProjectSettings_UI.accept) self.buttonBox.rejected.connect(ProjectSettings_UI.reject) self.custom_folder.toggled.connect(self.project_folder.setEnabled) self.enable_proxy.toggled.connect(self.proxy_box.setEnabled) self.external_proxy.toggled.connect( self.external_proxy_profile.setEnabled) self.tabWidget.setCurrentIndex(0) QMetaObject.connectSlotsByName(ProjectSettings_UI) # setupUi def retranslateUi(self, ProjectSettings_UI): ProjectSettings_UI.setWindowTitle( QCoreApplication.translate("ProjectSettings_UI", u"Project Settings", None)) self.label_2.setText( QCoreApplication.translate("ProjectSettings_UI", u"Thumbnails:", None)) self.audio_thumbs.setText( QCoreApplication.translate("ProjectSettings_UI", u"Audio", None)) self.label_7.setText( QCoreApplication.translate("ProjectSettings_UI", u"Video tracks:", None)) self.label_8.setText( QCoreApplication.translate("ProjectSettings_UI", u"Audio tracks:", None)) self.label.setText( QCoreApplication.translate("ProjectSettings_UI", u"Audio channels:", None)) self.audio_channels.setItemText( 0, QCoreApplication.translate("ProjectSettings_UI", u"2 Channels (Stereo)", None)) self.audio_channels.setItemText( 1, QCoreApplication.translate("ProjectSettings_UI", u"4 Channels", None)) self.audio_channels.setItemText( 2, QCoreApplication.translate("ProjectSettings_UI", u"6 Channels", None)) self.label_4.setText( QCoreApplication.translate( "ProjectSettings_UI", u"Project folder to store proxy clips, thumbnails, previews", None)) self.video_thumbs.setText( QCoreApplication.translate("ProjectSettings_UI", u"Video", None)) self.label_25.setText( QCoreApplication.translate("ProjectSettings_UI", u"Preview profile:", None)) self.preview_showprofileinfo.setText( QCoreApplication.translate("ProjectSettings_UI", u"...", None)) self.preview_manageprofile.setText( QCoreApplication.translate("ProjectSettings_UI", u"...", None)) self.custom_folder.setText( QCoreApplication.translate("ProjectSettings_UI", u"Custom project folder:", None)) self.same_folder.setText( QCoreApplication.translate( "ProjectSettings_UI", u"Use parent folder of the project file as project folder", None)) self.tabWidget.setTabText( self.tabWidget.indexOf(self.tab), QCoreApplication.translate("ProjectSettings_UI", u"Settings", None)) self.enable_proxy.setText( QCoreApplication.translate("ProjectSettings_UI", u"Enable proxy clips", None)) self.l_relPathProxyToOrig.setText( QCoreApplication.translate("ProjectSettings_UI", u"Relative path from proxy to clip:", None)) self.generate_imageproxy.setText( QCoreApplication.translate("ProjectSettings_UI", u"Generate for images larger than", None)) self.l_prefix_proxy.setText( QCoreApplication.translate("ProjectSettings_UI", u"Prefix of proxy:", None)) self.proxy_imagesize.setSuffix( QCoreApplication.translate("ProjectSettings_UI", u"pixels", None)) self.label_24.setText( QCoreApplication.translate("ProjectSettings_UI", u"Encoding profile:", None)) self.proxy_minsize.setSuffix( QCoreApplication.translate("ProjectSettings_UI", u"pixels", None)) self.l_prefix_clip.setText( QCoreApplication.translate("ProjectSettings_UI", u"Prefix of clip:", None)) self.proxy_showprofileinfo.setText( QCoreApplication.translate("ProjectSettings_UI", u"...", None)) self.generate_proxy.setText( QCoreApplication.translate("ProjectSettings_UI", u"Generate for videos larger than", None)) self.image_label.setText( QCoreApplication.translate("ProjectSettings_UI", u"Proxy image size", None)) self.l_suffix_proxy.setText( QCoreApplication.translate("ProjectSettings_UI", u"Suffix of proxy:", None)) self.proxy_imageminsize.setSuffix( QCoreApplication.translate("ProjectSettings_UI", u"pixels", None)) self.l_suffix_clip.setText( QCoreApplication.translate("ProjectSettings_UI", u"Suffix of clip:", None)) self.l_relPathOrigToProxy.setText( QCoreApplication.translate("ProjectSettings_UI", u"Relative path from clip to proxy:", None)) self.proxy_resize.setSuffix( QCoreApplication.translate("ProjectSettings_UI", u"pixels", None)) self.external_proxy.setText( QCoreApplication.translate("ProjectSettings_UI", u"Use external proxy clips", None)) self.checkProxy.setText( QCoreApplication.translate("ProjectSettings_UI", u"...", None)) self.label_3.setText( QCoreApplication.translate("ProjectSettings_UI", u"Proxy video resize (width)", None)) self.proxy_manageprofile.setText( QCoreApplication.translate("ProjectSettings_UI", u"...", None)) self.tabWidget.setTabText( self.tabWidget.indexOf(self.tab_4), QCoreApplication.translate("ProjectSettings_UI", u"Proxy", None)) ___qtreewidgetitem = self.metadata_list.headerItem() ___qtreewidgetitem.setText( 1, QCoreApplication.translate("ProjectSettings_UI", u"2", None)) ___qtreewidgetitem.setText( 0, QCoreApplication.translate("ProjectSettings_UI", u"1", None)) self.add_metadata.setText( QCoreApplication.translate("ProjectSettings_UI", u"...", None)) self.delete_metadata.setText( QCoreApplication.translate("ProjectSettings_UI", u"...", None)) self.tabWidget.setTabText( self.tabWidget.indexOf(self.tab_3), QCoreApplication.translate("ProjectSettings_UI", u"Metadata", None)) self.label_12.setText( QCoreApplication.translate("ProjectSettings_UI", u"Clips used in project:", None)) self.used_count.setText("") self.used_size.setText("") self.label_6.setText( QCoreApplication.translate("ProjectSettings_UI", u"Unused clips:", None)) self.unused_count.setText("") self.unused_size.setText("") self.delete_unused.setText( QCoreApplication.translate("ProjectSettings_UI", u"Delete files", None)) self.label_13.setText( QCoreApplication.translate("ProjectSettings_UI", u"Project files:", None)) self.label_fonts.setText( QCoreApplication.translate("ProjectSettings_UI", u"Fonts", None)) self.button_export.setText( QCoreApplication.translate("ProjectSettings_UI", u"Plain Text Export...", None)) self.files_count.setText("") self.tabWidget.setTabText( self.tabWidget.indexOf(self.tab_2), QCoreApplication.translate("ProjectSettings_UI", u"Project Files", None))
def __init__(self, parent, data): super(SectionsWidget, self).__init__(parent) layout = QGridLayout() layout.setContentsMargins(0, 0, 0, 0) layout.setVerticalSpacing(1) layout.setHorizontalSpacing(UIContext.getScaledWindowSize(16, 16).width()) maxNameLen = 0 for section in data.sections.values(): if len(section.name) > maxNameLen: maxNameLen = len(section.name) if maxNameLen > 32: maxNameLen = 32 self.sections = [] for section in data.sections.values(): if section.semantics != SectionSemantics.ExternalSectionSemantics: self.sections.append(section) self.sections.sort(key = lambda section: section.start) row = 0 for section in self.sections: name = section.name if len(name) > maxNameLen: name = name[:maxNameLen - 1] + "…" begin = "0x%x" % section.start end = "0x%x" % section.end typeName = section.type permissions = "" if data.is_offset_readable(section.start): permissions += "r" else: permissions += "-" if data.is_offset_writable(section.start): permissions += "w" else: permissions += "-" if data.is_offset_executable(section.start): permissions += "x" else: permissions += "-" semantics = "" if section.semantics == SectionSemantics.ReadOnlyCodeSectionSemantics: semantics = "Code" elif section.semantics == SectionSemantics.ReadOnlyDataSectionSemantics: semantics = "Read-only Data" elif section.semantics == SectionSemantics.ReadWriteDataSectionSemantics: semantics = "Writable Data" nameLabel = QLabel(name) nameLabel.setFont(binaryninjaui.getMonospaceFont(self)) layout.addWidget(nameLabel, row, 0) rangeLayout = QHBoxLayout() rangeLayout.setContentsMargins(0, 0, 0, 0) beginLabel = headers.ClickableAddressLabel(begin) dashLabel = QLabel("-") dashLabel.setFont(binaryninjaui.getMonospaceFont(self)) endLabel = headers.ClickableAddressLabel(end) rangeLayout.addWidget(beginLabel) rangeLayout.addWidget(dashLabel) rangeLayout.addWidget(endLabel) layout.addLayout(rangeLayout, row, 1) permissionsLabel = QLabel(permissions) permissionsLabel.setFont(binaryninjaui.getMonospaceFont(self)) layout.addWidget(permissionsLabel, row, 2) typeLabel = QLabel(typeName) typeLabel.setFont(binaryninjaui.getMonospaceFont(self)) layout.addWidget(typeLabel, row, 3) semanticsLabel = QLabel(semantics) semanticsLabel.setFont(binaryninjaui.getMonospaceFont(self)) layout.addWidget(semanticsLabel, row, 4) row += 1 layout.setColumnStretch(5, 1) self.setLayout(layout)