def setupUi(self, MainWindow): if not MainWindow.objectName(): MainWindow.setObjectName(u"MainWindow") MainWindow.resize(659, 477) self.centralwidget = QWidget(MainWindow) self.centralwidget.setObjectName(u"centralwidget") self.verticalLayout = QVBoxLayout(self.centralwidget) self.verticalLayout.setObjectName(u"verticalLayout") self.verticalLayout.setContentsMargins(50, -1, 50, -1) self.pushButton = QPushButton(self.centralwidget) self.pushButton.setObjectName(u"pushButton") self.pushButton.setMinimumSize(QSize(0, 50)) font = QFont() font.setPointSize(16) self.pushButton.setFont(font) self.verticalLayout.addWidget(self.pushButton) MainWindow.setCentralWidget(self.centralwidget) self.menubar = QMenuBar(MainWindow) self.menubar.setObjectName(u"menubar") self.menubar.setGeometry(QRect(0, 0, 659, 27)) MainWindow.setMenuBar(self.menubar) self.statusbar = QStatusBar(MainWindow) self.statusbar.setObjectName(u"statusbar") MainWindow.setStatusBar(self.statusbar) self.retranslateUi(MainWindow) QMetaObject.connectSlotsByName(MainWindow)
def setupUi(self, Form): if not Form.objectName(): Form.setObjectName(u"Form") Form.resize(403, 803) self.verticalLayout = QVBoxLayout(Form) self.verticalLayout.setObjectName(u"verticalLayout") self.viewTabs = QTabWidget(Form) self.viewTabs.setObjectName(u"viewTabs") self.viewTabs.setDocumentMode(False) self.viewTabs.setMovable(True) self.demoTab = QWidget() self.demoTab.setObjectName(u"demoTab") self.verticalLayout_9 = QVBoxLayout(self.demoTab) self.verticalLayout_9.setObjectName(u"verticalLayout_9") self.viewTabs.addTab(self.demoTab, "") self.previewTab = QWidget() self.previewTab.setObjectName(u"previewTab") self.verticalLayout_3 = QVBoxLayout(self.previewTab) self.verticalLayout_3.setObjectName(u"verticalLayout_3") self.verticalLayout_2 = QVBoxLayout() self.verticalLayout_2.setObjectName(u"verticalLayout_2") self.verticalLayout_3.addLayout(self.verticalLayout_2) self.viewTabs.addTab(self.previewTab, "") self.verticalLayout.addWidget(self.viewTabs) self.retranslateUi(Form) self.viewTabs.setCurrentIndex(0) QMetaObject.connectSlotsByName(Form)
def loadUi(uifile, baseinstance=None, workingDirectory=None): """ Dynamically load a user interface from the given ``uifile``. ``uifile`` is a string containing a file name of the UI file to load. If ``baseinstance`` is ``None``, the a new instance of the top-level widget will be created. Otherwise, the user interface is created within the given ``baseinstance``. In this case ``baseinstance`` must be an instance of the top-level widget class in the UI file to load, or a subclass thereof. In other words, if you've created a ``QMainWindow`` interface in the designer, ``baseinstance`` must be a ``QMainWindow`` or a subclass thereof, too. You cannot load a ``QMainWindow`` UI file with a plain :class:`~PySide.QtGui.QWidget` as ``baseinstance``. :method:`~PySide.QtCore.QMetaObject.connectSlotsByName()` is called on the created user interface, so you can implemented your slots according to its conventions in your widget class. Return ``baseinstance``, if ``baseinstance`` is not ``None``. Otherwise return the newly created instance of the user interface. """ # We parse the UI file and import any required custom widgets customWidgets = _get_custom_widgets(uifile) loader = UiLoader(baseinstance, customWidgets) if workingDirectory is not None: loader.setWorkingDirectory(workingDirectory) widget = loader.load(uifile) QMetaObject.connectSlotsByName(widget) return widget
def setupUi(self, Dialog): if not Dialog.objectName(): Dialog.setObjectName(u"Dialog") Dialog.resize(400, 300) self.gridLayout = QGridLayout(Dialog) self.gridLayout.setObjectName(u"gridLayout") self.input = QLineEdit(Dialog) self.input.setObjectName(u"input") self.gridLayout.addWidget(self.input, 1, 0, 1, 1) self.send = QPushButton(Dialog) self.send.setObjectName(u"send") self.gridLayout.addWidget(self.send, 1, 1, 1, 1) self.output = QPlainTextEdit(Dialog) self.output.setObjectName(u"output") self.output.setReadOnly(True) self.output.setPlainText(u"Initializing WebChannel...") self.output.setBackgroundVisible(False) self.gridLayout.addWidget(self.output, 0, 0, 1, 2) self.retranslateUi(Dialog) QMetaObject.connectSlotsByName(Dialog)
def setupUi(self, Dialog): if not Dialog.objectName(): Dialog.setObjectName(u"Dialog") Dialog.resize(480, 150) self.buttonBox = QDialogButtonBox(Dialog) self.buttonBox.setObjectName(u"buttonBox") self.buttonBox.setGeometry(QRect(0, 100, 461, 32)) self.buttonBox.setOrientation(Qt.Horizontal) self.buttonBox.setStandardButtons(QDialogButtonBox.Apply|QDialogButtonBox.Cancel) self.label = QLabel(Dialog) self.label.setObjectName(u"label") self.label.setGeometry(QRect(10, 20, 81, 16)) self.label_2 = QLabel(Dialog) self.label_2.setObjectName(u"label_2") self.label_2.setGeometry(QRect(240, 20, 57, 14)) self.key = QLineEdit(Dialog) self.key.setObjectName(u"key") self.key.setGeometry(QRect(10, 40, 211, 22)) font = QFont() font.setFamilies([u"Monospace"]) self.key.setFont(font) self.val = QLineEdit(Dialog) self.val.setObjectName(u"val") self.val.setGeometry(QRect(240, 40, 211, 22)) font1 = QFont() self.val.setFont(font1) self.retranslateUi(Dialog) self.buttonBox.accepted.connect(Dialog.accept) self.buttonBox.rejected.connect(Dialog.reject) QMetaObject.connectSlotsByName(Dialog)
def setupUi(self, StackedWidget): if not StackedWidget.objectName(): StackedWidget.setObjectName(u"StackedWidget") StackedWidget.resize(400, 300) self.retranslateUi(StackedWidget) QMetaObject.connectSlotsByName(StackedWidget)
def setupUi(self, Form): if not Form.objectName(): Form.setObjectName(u"Form") Form.resize(400, 300) self.retranslateUi(Form) QMetaObject.connectSlotsByName(Form)
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 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 setupUi(self): self.centralwidget = QWidget(self) with open(resource_path('style.css'), 'r') as file: self.centralwidget.setStyleSheet(file.read()) self.layout_widget_about = QWidget(self.centralwidget) self.layout_widget_about.setGeometry(QRect(10, 10, 221, 81)) self.layout_about = QVBoxLayout(self.layout_widget_about) self.layout_about.setContentsMargins(0, 0, 0, 0) self.label_logo = QLabel(self.layout_widget_about) self.pixmap = QPixmap(resource_path('icon.ico')) self.pixmap = self.pixmap.scaledToWidth(30, Qt.SmoothTransformation) self.label_logo.setPixmap(self.pixmap) self.layout_about.addWidget(self.label_logo, 0, Qt.AlignHCenter) self.title_font = QFont() self.title_font.setPointSize(13) self.font = QFont() self.font.setPointSize(10) self.label_title = QLabel(self.layout_widget_about) self.title_font.setStyleStrategy(QFont.PreferAntialias) self.label_title.setFont(self.title_font) self.label_title.setLayoutDirection(Qt.LeftToRight) self.layout_about.addWidget(self.label_title, 0, Qt.AlignHCenter) self.label_version = QLabel(self.layout_widget_about) self.label_version.setFont(self.font) self.label_version.setLayoutDirection(Qt.LeftToRight) self.layout_about.addWidget(self.label_version, 0, Qt.AlignHCenter) self.layout_widget_about_2 = QWidget(self.centralwidget) self.layout_widget_about_2.setGeometry(QRect(10, 100, 221, 81)) self.layout_about_2 = QVBoxLayout(self.layout_widget_about_2) self.layout_about_2.setContentsMargins(0, 0, 0, 0) self.label_copyright = QLabel(self.layout_widget_about_2) self.label_copyright.setFont(self.font) self.label_copyright.setLayoutDirection(Qt.LeftToRight) self.layout_about_2.addWidget(self.label_copyright, 0, Qt.AlignHCenter) self.label_author = QLabel(self.layout_widget_about_2) self.label_author.setFont(self.font) self.label_author.setLayoutDirection(Qt.LeftToRight) self.layout_about_2.addWidget(self.label_author, 0, Qt.AlignHCenter) self.button_quit_about = QPushButton(self.layout_widget_about_2) self.layout_about_2.addWidget(self.button_quit_about) self.button_quit_about.setMinimumSize(100, 30) self.button_quit_about.setProperty('class', 'Aqua') self.setCentralWidget(self.centralwidget) self.retranslateUi() QMetaObject.connectSlotsByName(self)
def setup(self, dialog): dialog.resize(320, 132) dialog.setModal(True) dialog.setWindowTitle("Please Login to Continue") self.form_layout = QFormLayout(dialog) self.form_layout.setObjectName("formLayout") self.login_label = QLabel("Server requesting authentication", dialog) self.login_label.setObjectName("login_label") self.form_layout.setWidget(0, QFormLayout.SpanningRole, self.login_label) self.username_label = QLabel(dialog) self.username_label.setObjectName("username_label") self.form_layout.setWidget(1, QFormLayout.LabelRole, self.username_label) self.username = QLineEdit(dialog) self.username.setObjectName("username") self.username.setStatusTip("Enter your username.") self.form_layout.setWidget(1, QFormLayout.FieldRole, self.username) self.password_label = QLabel(dialog) self.password_label.setObjectName("password_label") self.form_layout.setWidget(2, QFormLayout.LabelRole, self.password_label) self.password = QLineEdit(dialog) self.password.setObjectName("password") self.password.setStatusTip("Enter your password.") self.password.setEchoMode(QLineEdit.PasswordEchoOnEdit) self.form_layout.setWidget(2, QFormLayout.FieldRole, self.password) self.save_username = QCheckBox("&Save username", dialog) self.save_username.setObjectName("save_username") self.form_layout.setWidget(3, QFormLayout.FieldRole, self.save_username) self.button_box = QDialogButtonBox(dialog) self.button_box.setObjectName("button_box") self.button_box.setOrientation(Qt.Horizontal) self.button_box.setStandardButtons(QDialogButtonBox.Cancel | QDialogButtonBox.Ok) self.form_layout.setWidget(4, QFormLayout.SpanningRole, self.button_box) self.button_box.accepted.connect(dialog.accept) self.button_box.rejected.connect(dialog.close) QMetaObject.connectSlotsByName(dialog)
def setupUi(self, Dialog): if not Dialog.objectName(): Dialog.setObjectName(u"Dialog") Dialog.resize(500, 400) Dialog.setSizeGripEnabled(False) self.main_layout = QVBoxLayout(Dialog) self.main_layout.setObjectName(u"main_layout") self.scrollArea = QScrollArea(Dialog) self.scrollArea.setObjectName(u"scrollArea") self.scrollArea.setWidgetResizable(True) self.credits_list = QWidget() self.credits_list.setObjectName(u"credits_list") self.credits_list.setGeometry(QRect(0, 0, 480, 349)) self.credits_layout = QGridLayout(self.credits_list) self.credits_layout.setObjectName(u"credits_layout") self.version_label = QLabel(self.credits_list) self.version_label.setObjectName(u"version_label") self.version_label.setAlignment(Qt.AlignRight | Qt.AlignTrailing | Qt.AlignVCenter) self.credits_layout.addWidget(self.version_label, 0, 0, 1, 1) self.version = QLabel(self.credits_list) self.version.setObjectName(u"version") sizePolicy = QSizePolicy(QSizePolicy.Expanding, QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.version.sizePolicy().hasHeightForWidth()) self.version.setSizePolicy(sizePolicy) self.credits_layout.addWidget(self.version, 0, 1, 1, 1) self.scrollArea.setWidget(self.credits_list) self.main_layout.addWidget(self.scrollArea) self.buttonBox = QDialogButtonBox(Dialog) self.buttonBox.setObjectName(u"buttonBox") self.buttonBox.setOrientation(Qt.Horizontal) self.buttonBox.setStandardButtons(QDialogButtonBox.Ok) self.main_layout.addWidget(self.buttonBox) self.retranslateUi(Dialog) self.buttonBox.accepted.connect(Dialog.accept) self.buttonBox.rejected.connect(Dialog.reject) QMetaObject.connectSlotsByName(Dialog)
def setupUi(self, centralTabs): if not centralTabs.objectName(): centralTabs.setObjectName(u"centralTabs") centralTabs.setEnabled(True) centralTabs.resize(342, 289) sizePolicy = QSizePolicy(QSizePolicy.Ignored, QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( centralTabs.sizePolicy().hasHeightForWidth()) centralTabs.setSizePolicy(sizePolicy) centralTabs.setAcceptDrops(True) centralTabs.setAutoFillBackground(False) centralTabs.setDocumentMode(True) centralTabs.setTabsClosable(False) centralTabs.setMovable(True) centralTabs.setTabBarAutoHide(False) self.demoPage = QWidget() self.demoPage.setObjectName(u"demoPage") self.demoPageLayout = QHBoxLayout(self.demoPage) self.demoPageLayout.setObjectName(u"demoPageLayout") self.stepsLayout = QVBoxLayout() self.stepsLayout.setSpacing(10) self.stepsLayout.setObjectName(u"stepsLayout") self.stepsLayout.setSizeConstraint(QLayout.SetMaximumSize) self.stepsLayout.setContentsMargins(0, 0, 0, 0) self.demoPageLayout.addLayout(self.stepsLayout) centralTabs.addTab(self.demoPage, "") self.scriptsPage = QWidget() self.scriptsPage.setObjectName(u"scriptsPage") self.horizontalLayoutWidget = QWidget(self.scriptsPage) self.horizontalLayoutWidget.setObjectName(u"horizontalLayoutWidget") self.horizontalLayoutWidget.setGeometry(QRect(210, 120, 74, 26)) self.scriptsLayout = QHBoxLayout(self.horizontalLayoutWidget) self.scriptsLayout.setObjectName(u"scriptsLayout") self.scriptsLayout.setContentsMargins(0, 0, 0, 0) centralTabs.addTab(self.scriptsPage, "") self.productionPage = QWidget() self.productionPage.setObjectName(u"productionPage") centralTabs.addTab(self.productionPage, "") self.retranslateUi(centralTabs) centralTabs.setCurrentIndex(0) QMetaObject.connectSlotsByName(centralTabs)
def setupUi(self, DemoDialog): if not DemoDialog.objectName(): DemoDialog.setObjectName(u"DemoDialog") DemoDialog.resize(400, 300) self.buttonBox = QDialogButtonBox(DemoDialog) self.buttonBox.setObjectName(u"buttonBox") self.buttonBox.setGeometry(QRect(30, 240, 341, 32)) self.buttonBox.setOrientation(Qt.Horizontal) self.buttonBox.setStandardButtons(QDialogButtonBox.Cancel | QDialogButtonBox.Ok) self.retranslateUi(DemoDialog) self.buttonBox.accepted.connect(DemoDialog.accept) self.buttonBox.rejected.connect(DemoDialog.reject) QMetaObject.connectSlotsByName(DemoDialog)
def setupUi(self, Form): if not Form.objectName(): Form.setObjectName(u"Form") Form.resize(529, 777) self.verticalLayout = QVBoxLayout(Form) self.verticalLayout.setObjectName(u"verticalLayout") self.stepsLayout = QVBoxLayout() self.stepsLayout.setSpacing(10) self.stepsLayout.setObjectName(u"stepsLayout") self.stepsLayout.setSizeConstraint(QLayout.SetMaximumSize) self.stepsLayout.setContentsMargins(0, 0, 0, 0) self.verticalLayout.addLayout(self.stepsLayout) self.retranslateUi(Form) QMetaObject.connectSlotsByName(Form)
def setupUi(self, MainWindow): if not MainWindow.objectName(): MainWindow.setObjectName(u"MainWindow") MainWindow.resize(353, 223) self.actionsetting = QAction(MainWindow) self.actionsetting.setObjectName(u"actionsetting") self.actionabout = QAction(MainWindow) self.actionabout.setObjectName(u"actionabout") self.actionimg_convert = QAction(MainWindow) self.actionimg_convert.setObjectName(u"actionimg_convert") self.centralwidget = QWidget(MainWindow) self.centralwidget.setObjectName(u"centralwidget") self.gridLayout_4 = QGridLayout(self.centralwidget) self.gridLayout_4.setObjectName(u"gridLayout_4") self.gridLayout_3 = QGridLayout() self.gridLayout_3.setObjectName(u"gridLayout_3") self.stackedWidget = QStackedWidget(self.centralwidget) self.stackedWidget.setObjectName(u"stackedWidget") self.stackedWidget.setMinimumSize(QSize(0, 0)) self.gridLayout_3.addWidget(self.stackedWidget, 0, 0, 1, 1) self.gridLayout_4.addLayout(self.gridLayout_3, 0, 0, 1, 1) MainWindow.setCentralWidget(self.centralwidget) self.menubar = QMenuBar(MainWindow) self.menubar.setObjectName(u"menubar") self.menubar.setGeometry(QRect(0, 0, 353, 22)) self.menuabout = QMenu(self.menubar) self.menuabout.setObjectName(u"menuabout") MainWindow.setMenuBar(self.menubar) self.statusbar = QStatusBar(MainWindow) self.statusbar.setObjectName(u"statusbar") MainWindow.setStatusBar(self.statusbar) self.menubar.addAction(self.menuabout.menuAction()) self.menuabout.addAction(self.actionabout) self.retranslateUi(MainWindow) self.stackedWidget.setCurrentIndex(-1) QMetaObject.connectSlotsByName(MainWindow)
def setupUi(self, UpdateQuotesDlg): if not UpdateQuotesDlg.objectName(): UpdateQuotesDlg.setObjectName(u"UpdateQuotesDlg") UpdateQuotesDlg.setWindowModality(Qt.ApplicationModal) UpdateQuotesDlg.resize(256, 107) self.gridLayout = QGridLayout(UpdateQuotesDlg) self.gridLayout.setObjectName(u"gridLayout") self.StartDateLbl = QLabel(UpdateQuotesDlg) self.StartDateLbl.setObjectName(u"StartDateLbl") self.gridLayout.addWidget(self.StartDateLbl, 0, 0, 1, 1) self.StartDateEdit = QDateEdit(UpdateQuotesDlg) self.StartDateEdit.setObjectName(u"StartDateEdit") self.StartDateEdit.setCalendarPopup(True) self.StartDateEdit.setTimeSpec(Qt.UTC) self.gridLayout.addWidget(self.StartDateEdit, 0, 1, 1, 1) self.buttonBox = QDialogButtonBox(UpdateQuotesDlg) self.buttonBox.setObjectName(u"buttonBox") self.buttonBox.setOrientation(Qt.Horizontal) self.buttonBox.setStandardButtons(QDialogButtonBox.Cancel|QDialogButtonBox.Ok) self.gridLayout.addWidget(self.buttonBox, 2, 1, 1, 1) self.EndDateLbl = QLabel(UpdateQuotesDlg) self.EndDateLbl.setObjectName(u"EndDateLbl") self.gridLayout.addWidget(self.EndDateLbl, 1, 0, 1, 1) self.EndDateEdit = QDateEdit(UpdateQuotesDlg) self.EndDateEdit.setObjectName(u"EndDateEdit") self.EndDateEdit.setCalendarPopup(True) self.EndDateEdit.setTimeSpec(Qt.UTC) self.gridLayout.addWidget(self.EndDateEdit, 1, 1, 1, 1) self.retranslateUi(UpdateQuotesDlg) self.buttonBox.accepted.connect(UpdateQuotesDlg.accept) self.buttonBox.rejected.connect(UpdateQuotesDlg.reject) QMetaObject.connectSlotsByName(UpdateQuotesDlg)
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 setupUi(self, sectionOp): if not sectionOp.objectName(): sectionOp.setObjectName(u"sectionOp") self.formLayout_6 = QFormLayout(sectionOp) self.formLayout_6.setObjectName(u"formLayout_6") self.sectionRulesListWidget = QListWidget(sectionOp) QListWidgetItem(self.sectionRulesListWidget) QListWidgetItem(self.sectionRulesListWidget) QListWidgetItem(self.sectionRulesListWidget) QListWidgetItem(self.sectionRulesListWidget) QListWidgetItem(self.sectionRulesListWidget) QListWidgetItem(self.sectionRulesListWidget) QListWidgetItem(self.sectionRulesListWidget) self.sectionRulesListWidget.setObjectName(u"sectionRulesListWidget") self.sectionRulesListWidget.setMaximumSize(QSize(16777215, 100)) self.formLayout_6.setWidget(1, QFormLayout.FieldRole, self.sectionRulesListWidget) self.label_10 = QLabel(sectionOp) self.label_10.setObjectName(u"label_10") self.label_10.setMaximumSize(QSize(16777215, 20)) self.formLayout_6.setWidget(0, QFormLayout.FieldRole, self.label_10) self.sectionCoverageLabel = QLabel(sectionOp) self.sectionCoverageLabel.setObjectName(u"sectionCoverageLabel") self.sectionCoverageLabel.setMaximumSize(QSize(16777215, 20)) self.formLayout_6.setWidget(2, QFormLayout.FieldRole, self.sectionCoverageLabel) self.label_11 = QLabel(sectionOp) self.label_11.setObjectName(u"label_11") self.label_11.setMaximumSize(QSize(16777215, 20)) self.formLayout_6.setWidget(3, QFormLayout.FieldRole, self.label_11) self.retranslateUi(sectionOp) QMetaObject.connectSlotsByName(sectionOp)
def setupUi(self, paceOp): if not paceOp.objectName(): paceOp.setObjectName(u"paceOp") self.formLayout_8 = QFormLayout(paceOp) self.formLayout_8.setObjectName(u"formLayout_8") self.comboBox = QComboBox(paceOp) self.comboBox.addItem("") self.comboBox.addItem("") self.comboBox.addItem("") self.comboBox.setObjectName(u"comboBox") self.formLayout_8.setWidget(0, QFormLayout.FieldRole, self.comboBox) self.label_8 = QLabel(paceOp) self.label_8.setObjectName(u"label_8") self.formLayout_8.setWidget(0, QFormLayout.LabelRole, self.label_8) self.retranslateUi(paceOp) QMetaObject.connectSlotsByName(paceOp)
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 setupUi(self, SelectAccountDlg): if not SelectAccountDlg.objectName(): SelectAccountDlg.setObjectName(u"SelectAccountDlg") SelectAccountDlg.resize(400, 141) self.verticalLayout = QVBoxLayout(SelectAccountDlg) self.verticalLayout.setObjectName(u"verticalLayout") self.DescriptionLbl = QLabel(SelectAccountDlg) self.DescriptionLbl.setObjectName(u"DescriptionLbl") self.verticalLayout.addWidget(self.DescriptionLbl) self.AccountWidget = AccountSelector(SelectAccountDlg) self.AccountWidget.setObjectName(u"AccountWidget") self.verticalLayout.addWidget(self.AccountWidget) self.ReuseAccount = QCheckBox(SelectAccountDlg) self.ReuseAccount.setObjectName(u"ReuseAccount") self.verticalLayout.addWidget(self.ReuseAccount) self.buttonBox = QDialogButtonBox(SelectAccountDlg) self.buttonBox.setObjectName(u"buttonBox") self.buttonBox.setOrientation(Qt.Horizontal) self.buttonBox.setStandardButtons(QDialogButtonBox.Ok) self.verticalLayout.addWidget(self.buttonBox) self.verticalSpacer = QSpacerItem(20, 40, QSizePolicy.Minimum, QSizePolicy.Expanding) self.verticalLayout.addItem(self.verticalSpacer) self.retranslateUi(SelectAccountDlg) self.buttonBox.accepted.connect(SelectAccountDlg.close) QMetaObject.connectSlotsByName(SelectAccountDlg)
def setupUi(self): # create title bar, content self.vboxWindow = QVBoxLayout(self) self.vboxWindow.setContentsMargins(0, 0, 0, 0) self.windowFrame = QWidget(self) self.windowFrame.setObjectName('windowFrame') self.vboxFrame = QVBoxLayout(self.windowFrame) self.vboxFrame.setContentsMargins(0, 0, 0, 0) self.titleBar = WindowDragger(self, self.windowFrame) self.titleBar.setObjectName('titleBar') self.titleBar.setSizePolicy( QSizePolicy(QSizePolicy.Preferred, QSizePolicy.Fixed)) self.hboxTitle = QHBoxLayout(self.titleBar) self.hboxTitle.setContentsMargins(0, 0, 0, 0) self.hboxTitle.setSpacing(0) self.lblTitle = QLabel('Title') self.lblTitle.setObjectName('lblTitle') self.lblTitle.setAlignment(Qt.AlignCenter) spButtons = QSizePolicy(QSizePolicy.Fixed, QSizePolicy.Fixed) self.btnMinimize = QToolButton(self.titleBar) self.btnMinimize.setObjectName('btnMinimize') self.btnMinimize.setSizePolicy(spButtons) self.btnRestore = QToolButton(self.titleBar) self.btnRestore.setObjectName('btnRestore') self.btnRestore.setSizePolicy(spButtons) self.btnMaximize = QToolButton(self.titleBar) self.btnMaximize.setObjectName('btnMaximize') self.btnMaximize.setSizePolicy(spButtons) self.btnClose = QToolButton(self.titleBar) self.btnClose.setObjectName('btnClose') self.btnClose.setSizePolicy(spButtons) self.vboxFrame.addWidget(self.titleBar) self.windowContent = QWidget(self.windowFrame) self.vboxFrame.addWidget(self.windowContent) self.vboxWindow.addWidget(self.windowFrame) if PLATFORM == "Darwin": self.hboxTitle.addWidget(self.btnClose) self.hboxTitle.addWidget(self.btnMinimize) self.hboxTitle.addWidget(self.btnRestore) self.hboxTitle.addWidget(self.btnMaximize) self.hboxTitle.addWidget(self.lblTitle) else: self.hboxTitle.addWidget(self.lblTitle) self.hboxTitle.addWidget(self.btnMinimize) self.hboxTitle.addWidget(self.btnRestore) self.hboxTitle.addWidget(self.btnMaximize) self.hboxTitle.addWidget(self.btnClose) # set window flags self.setWindowFlags(Qt.Window | Qt.FramelessWindowHint | Qt.WindowSystemMenuHint | Qt.WindowCloseButtonHint | Qt.WindowMinimizeButtonHint | Qt.WindowMaximizeButtonHint) if QT_VERSION >= (5, ): self.setAttribute(Qt.WA_TranslucentBackground) # set stylesheet with open(_FL_STYLESHEET) as stylesheet: self.setStyleSheet(stylesheet.read()) # automatically connect slots QMetaObject.connectSlotsByName(self)
def setupUi(self, ProfilesDialog_UI): if not ProfilesDialog_UI.objectName(): ProfilesDialog_UI.setObjectName(u"ProfilesDialog_UI") ProfilesDialog_UI.resize(594, 639) self.gridLayout_2 = QGridLayout(ProfilesDialog_UI) self.gridLayout_2.setObjectName(u"gridLayout_2") self.button_create = QToolButton(ProfilesDialog_UI) self.button_create.setObjectName(u"button_create") icon = QIcon() iconThemeName = u"document-new" if QIcon.hasThemeIcon(iconThemeName): icon = QIcon.fromTheme(iconThemeName) else: icon.addFile(u".", QSize(), QIcon.Normal, QIcon.Off) self.button_create.setIcon(icon) self.gridLayout_2.addWidget(self.button_create, 0, 4, 1, 1) self.label = QLabel(ProfilesDialog_UI) self.label.setObjectName(u"label") self.gridLayout_2.addWidget(self.label, 0, 0, 1, 1) self.button_delete = QToolButton(ProfilesDialog_UI) self.button_delete.setObjectName(u"button_delete") self.button_delete.setEnabled(False) icon1 = QIcon() iconThemeName = u"delete" if QIcon.hasThemeIcon(iconThemeName): icon1 = QIcon.fromTheme(iconThemeName) else: icon1.addFile(u".", QSize(), QIcon.Normal, QIcon.Off) self.button_delete.setIcon(icon1) self.gridLayout_2.addWidget(self.button_delete, 0, 6, 1, 1) self.properties = QGroupBox(ProfilesDialog_UI) self.properties.setObjectName(u"properties") self.gridLayout = QGridLayout(self.properties) self.gridLayout.setObjectName(u"gridLayout") self.aspect_den = QSpinBox(self.properties) self.aspect_den.setObjectName(u"aspect_den") self.aspect_den.setMinimum(1) self.aspect_den.setMaximum(10000) self.gridLayout.addWidget(self.aspect_den, 4, 3, 1, 1) self.size_w = QSpinBox(self.properties) self.size_w.setObjectName(u"size_w") self.size_w.setMinimum(1) self.size_w.setMaximum(10000) self.gridLayout.addWidget(self.size_w, 1, 1, 1, 1) self.size_h = QSpinBox(self.properties) self.size_h.setObjectName(u"size_h") self.size_h.setMinimum(1) self.size_h.setMaximum(10000) self.gridLayout.addWidget(self.size_h, 1, 3, 1, 1) self.fields = QLabel(self.properties) self.fields.setObjectName(u"fields") self.fields.setText(u"interl: 2*fps") self.gridLayout.addWidget(self.fields, 3, 3, 1, 1) self.label_dar = QLabel(self.properties) self.label_dar.setObjectName(u"label_dar") self.label_dar.setAlignment(Qt.AlignRight|Qt.AlignTrailing|Qt.AlignVCenter) self.gridLayout.addWidget(self.label_dar, 5, 0, 1, 1) self.label_3 = QLabel(self.properties) self.label_3.setObjectName(u"label_3") self.label_3.setAlignment(Qt.AlignRight|Qt.AlignTrailing|Qt.AlignVCenter) self.gridLayout.addWidget(self.label_3, 2, 0, 1, 1) self.description = QLineEdit(self.properties) self.description.setObjectName(u"description") self.gridLayout.addWidget(self.description, 0, 1, 1, 3) self.colorspace = KComboBox(self.properties) self.colorspace.setObjectName(u"colorspace") self.gridLayout.addWidget(self.colorspace, 7, 1, 1, 3) self.label_8 = QLabel(self.properties) self.label_8.setObjectName(u"label_8") sizePolicy = QSizePolicy(QSizePolicy.Maximum, QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.label_8.sizePolicy().hasHeightForWidth()) self.label_8.setSizePolicy(sizePolicy) self.gridLayout.addWidget(self.label_8, 5, 2, 1, 1) self.field_order = QComboBox(self.properties) self.field_order.addItem("") self.field_order.addItem("") self.field_order.setObjectName(u"field_order") self.gridLayout.addWidget(self.field_order, 9, 1, 1, 3) self.display_num = QSpinBox(self.properties) self.display_num.setObjectName(u"display_num") self.display_num.setMinimum(1) self.display_num.setMaximum(10000) self.gridLayout.addWidget(self.display_num, 5, 1, 1, 1) self.label_scanning = QLabel(self.properties) self.label_scanning.setObjectName(u"label_scanning") self.label_scanning.setAlignment(Qt.AlignRight|Qt.AlignTrailing|Qt.AlignVCenter) self.gridLayout.addWidget(self.label_scanning, 8, 0, 1, 1) self.label_4 = QLabel(self.properties) self.label_4.setObjectName(u"label_4") sizePolicy.setHeightForWidth(self.label_4.sizePolicy().hasHeightForWidth()) self.label_4.setSizePolicy(sizePolicy) self.gridLayout.addWidget(self.label_4, 2, 2, 1, 1) self.aspect_num = QSpinBox(self.properties) self.aspect_num.setObjectName(u"aspect_num") self.aspect_num.setMinimum(1) self.aspect_num.setMaximum(10000) self.gridLayout.addWidget(self.aspect_num, 4, 1, 1, 1) self.label_6 = QLabel(self.properties) self.label_6.setObjectName(u"label_6") sizePolicy.setHeightForWidth(self.label_6.sizePolicy().hasHeightForWidth()) self.label_6.setSizePolicy(sizePolicy) self.gridLayout.addWidget(self.label_6, 1, 2, 1, 1) self.label_2 = QLabel(self.properties) self.label_2.setObjectName(u"label_2") self.label_2.setAlignment(Qt.AlignRight|Qt.AlignTrailing|Qt.AlignVCenter) self.gridLayout.addWidget(self.label_2, 0, 0, 1, 1) self.scanning = QComboBox(self.properties) self.scanning.addItem("") self.scanning.addItem("") self.scanning.setObjectName(u"scanning") self.gridLayout.addWidget(self.scanning, 8, 1, 1, 3) self.frame_num = QSpinBox(self.properties) self.frame_num.setObjectName(u"frame_num") self.frame_num.setMinimum(1) self.frame_num.setMaximum(500000) self.gridLayout.addWidget(self.frame_num, 2, 1, 1, 1) self.display_den = QSpinBox(self.properties) self.display_den.setObjectName(u"display_den") self.display_den.setMinimum(1) self.display_den.setMaximum(10000) self.gridLayout.addWidget(self.display_den, 5, 3, 1, 1) self.verticalSpacer = QSpacerItem(105, 17, QSizePolicy.Minimum, QSizePolicy.Expanding) self.gridLayout.addItem(self.verticalSpacer, 11, 0, 1, 2) self.label_9 = QLabel(self.properties) self.label_9.setObjectName(u"label_9") self.label_9.setAlignment(Qt.AlignRight|Qt.AlignTrailing|Qt.AlignVCenter) self.gridLayout.addWidget(self.label_9, 4, 0, 1, 1) self.label_12 = QLabel(self.properties) self.label_12.setObjectName(u"label_12") self.label_12.setAlignment(Qt.AlignRight|Qt.AlignTrailing|Qt.AlignVCenter) self.gridLayout.addWidget(self.label_12, 7, 0, 1, 1) self.label_5 = QLabel(self.properties) self.label_5.setObjectName(u"label_5") self.label_5.setAlignment(Qt.AlignRight|Qt.AlignTrailing|Qt.AlignVCenter) self.gridLayout.addWidget(self.label_5, 1, 0, 1, 1) self.label_field_order = QLabel(self.properties) self.label_field_order.setObjectName(u"label_field_order") self.label_field_order.setAlignment(Qt.AlignRight|Qt.AlignTrailing|Qt.AlignVCenter) self.gridLayout.addWidget(self.label_field_order, 9, 0, 1, 1) self.label_7 = QLabel(self.properties) self.label_7.setObjectName(u"label_7") sizePolicy.setHeightForWidth(self.label_7.sizePolicy().hasHeightForWidth()) self.label_7.setSizePolicy(sizePolicy) self.gridLayout.addWidget(self.label_7, 4, 2, 1, 1) self.frame_den = QSpinBox(self.properties) self.frame_den.setObjectName(u"frame_den") self.frame_den.setMinimum(1) self.frame_den.setMaximum(10000) self.gridLayout.addWidget(self.frame_den, 2, 3, 1, 1) self.label_11 = QLabel(self.properties) self.label_11.setObjectName(u"label_11") self.label_11.setAlignment(Qt.AlignRight|Qt.AlignTrailing|Qt.AlignVCenter) self.gridLayout.addWidget(self.label_11, 3, 0, 1, 1) self.effect_warning = KMessageWidget(self.properties) self.effect_warning.setObjectName(u"effect_warning") self.effect_warning.setWordWrap(True) self.effect_warning.setCloseButtonVisible(False) self.effect_warning.setMessageType(KMessageWidget.Warning) self.gridLayout.addWidget(self.effect_warning, 10, 1, 1, 3) self.gridLayout_2.addWidget(self.properties, 1, 0, 1, 8) self.horizontalSpacer = QSpacerItem(40, 20, QSizePolicy.Expanding, QSizePolicy.Minimum) self.gridLayout_2.addItem(self.horizontalSpacer, 0, 3, 1, 1) self.button_save = QToolButton(ProfilesDialog_UI) self.button_save.setObjectName(u"button_save") self.button_save.setEnabled(False) icon2 = QIcon() iconThemeName = u"document-save" if QIcon.hasThemeIcon(iconThemeName): icon2 = QIcon.fromTheme(iconThemeName) else: icon2.addFile(u".", QSize(), QIcon.Normal, QIcon.Off) self.button_save.setIcon(icon2) self.gridLayout_2.addWidget(self.button_save, 0, 5, 1, 1) self.horizontalSpacer_2 = QSpacerItem(40, 20, QSizePolicy.Expanding, QSizePolicy.Minimum) self.gridLayout_2.addItem(self.horizontalSpacer_2, 3, 3, 1, 2) self.buttonBox = QDialogButtonBox(ProfilesDialog_UI) self.buttonBox.setObjectName(u"buttonBox") self.buttonBox.setOrientation(Qt.Horizontal) self.buttonBox.setStandardButtons(QDialogButtonBox.Close) self.gridLayout_2.addWidget(self.buttonBox, 3, 5, 1, 3) self.profiles_list = QComboBox(ProfilesDialog_UI) self.profiles_list.setObjectName(u"profiles_list") self.gridLayout_2.addWidget(self.profiles_list, 0, 1, 1, 1) self.button_default = QPushButton(ProfilesDialog_UI) self.button_default.setObjectName(u"button_default") self.gridLayout_2.addWidget(self.button_default, 3, 0, 1, 3) self.info_message = KMessageWidget(ProfilesDialog_UI) self.info_message.setObjectName(u"info_message") self.info_message.setWordWrap(True) self.gridLayout_2.addWidget(self.info_message, 2, 0, 1, 8) self.retranslateUi(ProfilesDialog_UI) self.buttonBox.accepted.connect(ProfilesDialog_UI.accept) self.buttonBox.rejected.connect(ProfilesDialog_UI.reject) QMetaObject.connectSlotsByName(ProfilesDialog_UI)
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 setupUi(self, demoView): if not demoView.objectName(): demoView.setObjectName(u"demoView") demoView.resize(570, 550) self.verticalLayout_2 = QVBoxLayout(demoView) self.verticalLayout_2.setObjectName(u"verticalLayout_2") self.demoViewGroupBox = QGroupBox(demoView) self.demoViewGroupBox.setObjectName(u"demoViewGroupBox") self.demoViewGroupBox.setFlat(True) self.verticalLayout_6 = QVBoxLayout(self.demoViewGroupBox) self.verticalLayout_6.setObjectName(u"verticalLayout_6") self.verticalLayout_6.setContentsMargins(4, 4, 4, 4) self.demoTreeView = QTreeWidget(self.demoViewGroupBox) __qtreewidgetitem = QTreeWidgetItem() __qtreewidgetitem.setText(0, u"Step") self.demoTreeView.setHeaderItem(__qtreewidgetitem) self.demoTreeView.setObjectName(u"demoTreeView") self.verticalLayout_6.addWidget(self.demoTreeView) self.horizontalLayout_5 = QHBoxLayout() self.horizontalLayout_5.setObjectName(u"horizontalLayout_5") self.demoDuplicateBtn = QPushButton(self.demoViewGroupBox) self.demoDuplicateBtn.setObjectName(u"demoDuplicateBtn") self.horizontalLayout_5.addWidget(self.demoDuplicateBtn) self.demoInsertSectionBtn = QPushButton(self.demoViewGroupBox) self.demoInsertSectionBtn.setObjectName(u"demoInsertSectionBtn") self.horizontalLayout_5.addWidget(self.demoInsertSectionBtn) self.demoDeleteBtn = QPushButton(self.demoViewGroupBox) self.demoDeleteBtn.setObjectName(u"demoDeleteBtn") self.horizontalLayout_5.addWidget(self.demoDeleteBtn) self.demoAddStepBtn = QPushButton(self.demoViewGroupBox) self.demoAddStepBtn.setObjectName(u"demoAddStepBtn") self.horizontalLayout_5.addWidget(self.demoAddStepBtn) self.demoOverflowBtn = QToolButton(self.demoViewGroupBox) self.demoOverflowBtn.setObjectName(u"demoOverflowBtn") self.horizontalLayout_5.addWidget(self.demoOverflowBtn) self.verticalLayout_6.addLayout(self.horizontalLayout_5) self.verticalLayout_2.addWidget(self.demoViewGroupBox) self.metadataGroupBox = QGroupBox(demoView) self.metadataGroupBox.setObjectName(u"metadataGroupBox") self.metadataGroupBox.setMaximumSize(QSize(16777215, 300)) self.metadataGroupBox.setFlat(True) self.metadataGroupBox.setCheckable(False) self.verticalLayout_8 = QVBoxLayout(self.metadataGroupBox) self.verticalLayout_8.setObjectName(u"verticalLayout_8") self.verticalLayout_8.setContentsMargins(4, 4, 4, 4) self.dataStack = QStackedWidget(self.metadataGroupBox) self.dataStack.setObjectName(u"dataStack") self.stepDataL = QWidget() self.stepDataL.setObjectName(u"stepDataL") self.verticalLayout_14 = QVBoxLayout(self.stepDataL) self.verticalLayout_14.setObjectName(u"verticalLayout_14") self.metadataTreeWidget = QTreeWidget(self.stepDataL) self.metadataTreeWidget.setObjectName(u"metadataTreeWidget") self.verticalLayout_14.addWidget(self.metadataTreeWidget) self.stepDataBtnL = QHBoxLayout() self.stepDataBtnL.setObjectName(u"stepDataBtnL") self.pushButton_2 = QPushButton(self.stepDataL) self.pushButton_2.setObjectName(u"pushButton_2") self.stepDataBtnL.addWidget(self.pushButton_2) self.pushButton = QPushButton(self.stepDataL) self.pushButton.setObjectName(u"pushButton") self.stepDataBtnL.addWidget(self.pushButton) self.toolButton = QToolButton(self.stepDataL) self.toolButton.setObjectName(u"toolButton") self.stepDataBtnL.addWidget(self.toolButton) self.verticalLayout_14.addLayout(self.stepDataBtnL) self.dataStack.addWidget(self.stepDataL) self.sectDataL = QWidget() self.sectDataL.setObjectName(u"sectDataL") self.verticalLayout_16 = QVBoxLayout(self.sectDataL) self.verticalLayout_16.setObjectName(u"verticalLayout_16") self.sectionDataTreeW = QTreeWidget(self.sectDataL) self.sectionDataTreeW.setObjectName(u"sectionDataTreeW") self.verticalLayout_16.addWidget(self.sectionDataTreeW) self.sectionDataBtnL = QHBoxLayout() self.sectionDataBtnL.setObjectName(u"sectionDataBtnL") self.pushButton_4 = QPushButton(self.sectDataL) self.pushButton_4.setObjectName(u"pushButton_4") self.sectionDataBtnL.addWidget(self.pushButton_4) self.pushButton_3 = QPushButton(self.sectDataL) self.pushButton_3.setObjectName(u"pushButton_3") self.sectionDataBtnL.addWidget(self.pushButton_3) self.pushButton_5 = QPushButton(self.sectDataL) self.pushButton_5.setObjectName(u"pushButton_5") self.sectionDataBtnL.addWidget(self.pushButton_5) self.toolButton_2 = QToolButton(self.sectDataL) self.toolButton_2.setObjectName(u"toolButton_2") self.sectionDataBtnL.addWidget(self.toolButton_2) self.verticalLayout_16.addLayout(self.sectionDataBtnL) self.dataStack.addWidget(self.sectDataL) self.verticalLayout_8.addWidget(self.dataStack) self.verticalLayout_2.addWidget(self.metadataGroupBox) self.retranslateUi(demoView) self.dataStack.setCurrentIndex(1) QMetaObject.connectSlotsByName(demoView)
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 setupUi(self, MainWindow): if not MainWindow.objectName(): MainWindow.setObjectName(u"MainWindow") MainWindow.resize(671, 496) self.help = QAction(MainWindow) self.help.setObjectName(u"help") self.centralwidget = QWidget(MainWindow) self.centralwidget.setObjectName(u"centralwidget") self.log_text = QTextEdit(self.centralwidget) self.log_text.setObjectName(u"log_text") self.log_text.setGeometry(QRect(0, 190, 671, 291)) self.labe = QLabel(self.centralwidget) self.labe.setObjectName(u"labe") self.labe.setGeometry(QRect(30, 20, 54, 12)) self.ssid = QLineEdit(self.centralwidget) self.ssid.setObjectName(u"ssid") self.ssid.setGeometry(QRect(70, 20, 131, 20)) self.time = QLineEdit(self.centralwidget) self.time.setObjectName(u"time") self.time.setGeometry(QRect(540, 20, 91, 20)) self.label_2 = QLabel(self.centralwidget) self.label_2.setObjectName(u"label_2") self.label_2.setGeometry(QRect(470, 20, 54, 12)) self.password = QLineEdit(self.centralwidget) self.password.setObjectName(u"password") self.password.setGeometry(QRect(310, 20, 131, 20)) self.label_3 = QLabel(self.centralwidget) self.label_3.setObjectName(u"label_3") self.label_3.setGeometry(QRect(240, 20, 54, 12)) self.connect = QPushButton(self.centralwidget) self.connect.setObjectName(u"connect") self.connect.setGeometry(QRect(140, 60, 75, 23)) self.disconnect = QPushButton(self.centralwidget) self.disconnect.setObjectName(u"disconnect") self.disconnect.setGeometry(QRect(250, 60, 75, 23)) self.labe_2 = QLabel(self.centralwidget) self.labe_2.setObjectName(u"labe_2") self.labe_2.setGeometry(QRect(30, 120, 91, 16)) self.cur_ssid = QTextEdit(self.centralwidget) self.cur_ssid.setObjectName(u"cur_ssid") self.cur_ssid.setGeometry(QRect(140, 110, 241, 31)) self.label = QLabel(self.centralwidget) self.label.setObjectName(u"label") self.label.setGeometry(QRect(30, 160, 101, 16)) self.interface_name = QTextEdit(self.centralwidget) self.interface_name.setObjectName(u"interface_name") self.interface_name.setGeometry(QRect(140, 150, 241, 31)) self.label_4 = QLabel(self.centralwidget) self.label_4.setObjectName(u"label_4") self.label_4.setGeometry(QRect(450, 70, 54, 12)) self.frequency = QLineEdit(self.centralwidget) self.frequency.setObjectName(u"frequency") self.frequency.setGeometry(QRect(540, 70, 91, 20)) self.test = QPushButton(self.centralwidget) self.test.setObjectName(u"test") self.test.setGeometry(QRect(550, 110, 75, 23)) self.label_5 = QLabel(self.centralwidget) self.label_5.setObjectName(u"label_5") self.label_5.setGeometry(QRect(470, 70, 61, 16)) MainWindow.setCentralWidget(self.centralwidget) self.menubar = QMenuBar(MainWindow) self.menubar.setObjectName(u"menubar") self.menubar.setGeometry(QRect(0, 0, 671, 22)) self.menuFile = QMenu(self.menubar) self.menuFile.setObjectName(u"menuFile") MainWindow.setMenuBar(self.menubar) self.statusbar = QStatusBar(MainWindow) self.statusbar.setObjectName(u"statusbar") MainWindow.setStatusBar(self.statusbar) self.menubar.addAction(self.menuFile.menuAction()) self.menuFile.addAction(self.help) self.menuFile.addSeparator() self.retranslateUi(MainWindow) QMetaObject.connectSlotsByName(MainWindow)
def setupUi(self, MainWindow): if not MainWindow.objectName(): MainWindow.setObjectName(u"MainWindow") MainWindow.resize(400, 300) MainWindow.setWindowTitle(u"\u0421\u0442\u0435\u0433\u0430\u043d\u043e\u0433\u0440\u0430\u0444\u0438\u044f") MainWindow.setStyleSheet(u "QMainWindow {\n" "background-color: #f8f9fa;\n" "}\n" "QPushButton:hover {\n" "color: rgb(70, 126, 163);\n" "font: bold 11pt;\n" "}\n" "QPushButton {\n" "color: white;\n" "border:1px solid rgb(82, 108, 125);\n" "border-radius: 6px;\n" "background-color: rgb(82, 108, 125)\n"; "}") self.centralwidget = QWidget(MainWindow) self.centralwidget.setObjectName(u"centralwidget") self.verticalLayout = QVBoxLayout(self.centralwidget) self.verticalLayout.setObjectName(u"verticalLayout") self.horizontalLayout = QHBoxLayout() self.horizontalLayout.setObjectName(u"horizontalLayout") self.load_button = QPushButton(self.centralwidget) self.load_button.setObjectName(u"load_button") font = QFont() font.setPointSize(9) self.load_button.setFont(font) self.load_button.setStyleSheet(u"") self.load_button.setText(u"\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435") self.horizontalLayout.addWidget(self.load_button) self.save_button = QPushButton(self.centralwidget) self.save_button.setObjectName(u"save_button") self.save_button.setFont(font) self.save_button.setStyleSheet(u"") self.save_button.setText(u"\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435") self.horizontalLayout.addWidget(self.save_button) self.verticalLayout.addLayout(self.horizontalLayout) self.message_frame = QTextEdit(self.centralwidget) self.message_frame.setObjectName(u"message_frame") sizePolicy = QSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(1) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.message_frame.sizePolicy().hasHeightForWidth()) self.message_frame.setSizePolicy(sizePolicy) font.setPointSize(10) self.message_frame.setFont(font) font.setPointSize(9) self.message_frame.setStyleSheet(u"") self.message_frame.setFrameShape(QFrame.StyledPanel) self.message_frame.setMarkdown(u"") self.message_frame.setHtml(u"") self.message_frame.setPlaceholderText(u"\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435") self.verticalLayout.addWidget(self.message_frame) self.output_label = QLabel(self.centralwidget) self.output_label.setObjectName(u"output_label") sizePolicy1 = QSizePolicy(QSizePolicy.Preferred, QSizePolicy.Preferred) sizePolicy1.setHorizontalStretch(1) sizePolicy1.setVerticalStretch(0) sizePolicy1.setHeightForWidth(self.output_label.sizePolicy().hasHeightForWidth()) self.output_label.setSizePolicy(sizePolicy1) font1 = QFont() self.output_label.setFont(font1) self.output_label.setText(u"") self.output_label.setScaledContents(False) self.output_label.setAlignment(Qt.AlignLeading|Qt.AlignLeft|Qt.AlignTop) self.output_label.setWordWrap(True) self.verticalLayout.addWidget(self.output_label) self.horizontalLayout_2 = QHBoxLayout() self.horizontalLayout_2.setObjectName(u"horizontalLayout_2") self.decode_button = QPushButton(self.centralwidget) self.decode_button.setObjectName(u"decode_button") palette = QPalette() brush = QBrush(QColor(255, 255, 255, 255)) brush.setStyle(Qt.SolidPattern) palette.setBrush(QPalette.Active, QPalette.WindowText, brush) brush1 = QBrush(QColor(13, 110, 253, 255)) brush1.setStyle(Qt.SolidPattern) palette.setBrush(QPalette.Active, QPalette.Button, brush1) palette.setBrush(QPalette.Active, QPalette.Text, brush) palette.setBrush(QPalette.Active, QPalette.ButtonText, brush) palette.setBrush(QPalette.Active, QPalette.Base, brush1) palette.setBrush(QPalette.Active, QPalette.Window, brush1) palette.setBrush(QPalette.Active, QPalette.PlaceholderText, brush) palette.setBrush(QPalette.Inactive, QPalette.WindowText, brush) palette.setBrush(QPalette.Inactive, QPalette.Button, brush1) palette.setBrush(QPalette.Inactive, QPalette.Text, brush) palette.setBrush(QPalette.Inactive, QPalette.ButtonText, brush) palette.setBrush(QPalette.Inactive, QPalette.Base, brush1) palette.setBrush(QPalette.Inactive, QPalette.Window, brush1) palette.setBrush(QPalette.Inactive, QPalette.PlaceholderText, brush) palette.setBrush(QPalette.Disabled, QPalette.WindowText, brush) palette.setBrush(QPalette.Disabled, QPalette.Button, brush1) palette.setBrush(QPalette.Disabled, QPalette.Text, brush) palette.setBrush(QPalette.Disabled, QPalette.ButtonText, brush) palette.setBrush(QPalette.Disabled, QPalette.Base, brush1) palette.setBrush(QPalette.Disabled, QPalette.Window, brush1) palette.setBrush(QPalette.Disabled, QPalette.PlaceholderText, brush) self.decode_button.setPalette(palette) self.decode_button.setFont(font) self.decode_button.setStyleSheet(u"") self.decode_button.setText(u"\u0414\u0435\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u0435\u043a\u0441\u0442") self.horizontalLayout_2.addWidget(self.decode_button) self.encode_button = QPushButton(self.centralwidget) self.encode_button.setObjectName(u"encode_button") self.encode_button.setFont(font) self.encode_button.setStyleSheet(u"") self.encode_button.setText(u"\u0417\u0430\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u0435\u043a\u0441\u0442") self.horizontalLayout_2.addWidget(self.encode_button) self.verticalLayout.addLayout(self.horizontalLayout_2) MainWindow.setCentralWidget(self.centralwidget) QWidget.setTabOrder(self.load_button, self.save_button) QWidget.setTabOrder(self.save_button, self.encode_button) QWidget.setTabOrder(self.encode_button, self.decode_button) self.retranslateUi(MainWindow) QMetaObject.connectSlotsByName(MainWindow)