mirror of
https://github.com/283375/arcaea-offline-ocr-model.git
synced 2025-04-11 09:10:17 +00:00
wip: ui
This commit is contained in:
parent
ed1dfd11ea
commit
08e97ab03e
@ -11,23 +11,12 @@ class ProjectEntry(Ui_ProjectEntry, QWidget):
|
||||
self.setupUi(self)
|
||||
self.project = None
|
||||
|
||||
self.tabManage.reloadProject.connect(self.reloadProject)
|
||||
|
||||
def setProject(self, project: Project):
|
||||
self.project = project
|
||||
self.updateLabels()
|
||||
self.tabManage.setProject(project)
|
||||
|
||||
def updateLabels(self):
|
||||
if not self.project:
|
||||
self.projectNameLabel.setText("-")
|
||||
self.projectDescriptionLabel.setText("-")
|
||||
return
|
||||
|
||||
self.projectNameLabel.setText(self.project.name)
|
||||
self.projectDescriptionLabel.setText(
|
||||
"<br>".join(
|
||||
[
|
||||
str(self.project.path.resolve()),
|
||||
f"{len(self.project.sources)} sources",
|
||||
f"{len(self.project.samples)} samples ({len(self.project.samplesUnclassified)} unclassified)",
|
||||
]
|
||||
)
|
||||
)
|
||||
def reloadProject(self):
|
||||
self.project.reload()
|
||||
self.setProject(self.project)
|
||||
|
@ -19,59 +19,10 @@
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="tabManage">
|
||||
<widget class="ProjectEntry_Manage" name="tabManage">
|
||||
<attribute name="title">
|
||||
<string>Manage</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="2" column="0">
|
||||
<widget class="QPushButton" name="pushButton">
|
||||
<property name="text">
|
||||
<string>Extract</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0" colspan="2">
|
||||
<widget class="QLabel" name="projectNameLabel">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>14</pointsize>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>-</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QPushButton" name="pushButton_2">
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" colspan="2">
|
||||
<widget class="QLabel" name="projectDescriptionLabel">
|
||||
<property name="text">
|
||||
<string>-</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0" colspan="2">
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tabClassify">
|
||||
<attribute name="title">
|
||||
@ -110,6 +61,12 @@
|
||||
<extends>QListWidget</extends>
|
||||
<header>ui.components.samplesListWidget</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>ProjectEntry_Manage</class>
|
||||
<extends>QWidget</extends>
|
||||
<header>ui.components.projectEntry_Manage</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<connections/>
|
||||
|
108
ui/components/projectEntry_Manage.py
Normal file
108
ui/components/projectEntry_Manage.py
Normal file
@ -0,0 +1,108 @@
|
||||
from PySide6.QtCore import Qt, Signal, Slot
|
||||
from PySide6.QtWidgets import QApplication, QWidget
|
||||
|
||||
from project import Project
|
||||
|
||||
from .projectEntry_Manage_ui import Ui_ProjectEntry_Manage
|
||||
from .yieldProgress import YieldProgress
|
||||
|
||||
|
||||
class ProjectEntry_Manage(Ui_ProjectEntry_Manage, QWidget):
|
||||
reloadProject = Signal()
|
||||
|
||||
def __init__(self, parent=None):
|
||||
super().__init__(parent)
|
||||
self.setupUi(self)
|
||||
self.project = None
|
||||
self.abort = False
|
||||
|
||||
def setProject(self, project: Project):
|
||||
self.project = project
|
||||
self.updateLabels()
|
||||
|
||||
def updateLabels(self):
|
||||
if not self.project:
|
||||
self.projectNameLabel.setText("-")
|
||||
self.projectDescriptionLabel.setText("-")
|
||||
return
|
||||
|
||||
self.projectNameLabel.setText(self.project.name)
|
||||
self.projectDescriptionLabel.setText(
|
||||
"<br>".join(
|
||||
[
|
||||
str(self.project.path.resolve()),
|
||||
f"{len(self.project.sources)} sources",
|
||||
f"{len(self.project.samples)} samples ({len(self.project.samplesUnclassified)} unclassified)",
|
||||
]
|
||||
)
|
||||
)
|
||||
|
||||
def setAbort(self, b: bool):
|
||||
self.abort = b
|
||||
|
||||
@Slot()
|
||||
def on_extractButton_clicked(self):
|
||||
if not self.project:
|
||||
return
|
||||
|
||||
progressDialog = YieldProgress(self)
|
||||
progressDialog.setWindowModality(Qt.WindowModality.ApplicationModal)
|
||||
|
||||
self.abort = False
|
||||
progressDialog.abortButton.clicked.connect(lambda: self.setAbort(True))
|
||||
|
||||
progressDialog.show()
|
||||
|
||||
iterator = iter(self.project.extractSamplesYield())
|
||||
progressDialog.progressBar.setMinimum(0)
|
||||
while not self.abort:
|
||||
try:
|
||||
path, i, total = next(iterator)
|
||||
progressDialog.label.setText(path.name)
|
||||
progressDialog.progressBar.setValue(i)
|
||||
if i <= 2:
|
||||
progressDialog.progressBar.setMaximum(total)
|
||||
|
||||
if total > 10 and i % 10 == 0 or total <= 10:
|
||||
progressDialog.update()
|
||||
QApplication.processEvents()
|
||||
except StopIteration:
|
||||
break
|
||||
|
||||
self.abort = False
|
||||
self.reloadProject.emit()
|
||||
progressDialog.close()
|
||||
progressDialog.deleteLater()
|
||||
|
||||
@Slot()
|
||||
def on_redactSourcesButton_clicked(self):
|
||||
if not self.project:
|
||||
return
|
||||
|
||||
progressDialog = YieldProgress(self)
|
||||
progressDialog.setWindowModality(Qt.WindowModality.ApplicationModal)
|
||||
|
||||
self.abort = False
|
||||
progressDialog.abortButton.clicked.connect(lambda: self.setAbort(True))
|
||||
|
||||
progressDialog.show()
|
||||
|
||||
iterator = iter(self.project.redactSourcesYield())
|
||||
progressDialog.progressBar.setMinimum(0)
|
||||
while not self.abort:
|
||||
try:
|
||||
path, i, total = next(iterator)
|
||||
progressDialog.label.setText(path.name)
|
||||
progressDialog.progressBar.setValue(i)
|
||||
if i <= 2:
|
||||
progressDialog.progressBar.setMaximum(total)
|
||||
|
||||
if total > 10 and i % 10 == 0 or total <= 10:
|
||||
progressDialog.update()
|
||||
QApplication.processEvents()
|
||||
except StopIteration:
|
||||
break
|
||||
|
||||
self.abort = False
|
||||
progressDialog.close()
|
||||
progressDialog.deleteLater()
|
68
ui/components/projectEntry_Manage.ui
Normal file
68
ui/components/projectEntry_Manage.ui
Normal file
@ -0,0 +1,68 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>ProjectEntry_Manage</class>
|
||||
<widget class="QWidget" name="ProjectEntry_Manage">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>500</width>
|
||||
<height>400</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string notr="true">ProjectEntry_Manage</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="2" column="1">
|
||||
<widget class="QPushButton" name="redactSourcesButton">
|
||||
<property name="text">
|
||||
<string>Redact sources</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" colspan="2">
|
||||
<widget class="QLabel" name="projectDescriptionLabel">
|
||||
<property name="text">
|
||||
<string>-</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0" colspan="2">
|
||||
<widget class="QLabel" name="projectNameLabel">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>14</pointsize>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>-</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QPushButton" name="extractButton">
|
||||
<property name="text">
|
||||
<string>Extract</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0" colspan="2">
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
70
ui/components/projectEntry_Manage_ui.py
Normal file
70
ui/components/projectEntry_Manage_ui.py
Normal file
@ -0,0 +1,70 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
################################################################################
|
||||
## Form generated from reading UI file 'projectEntry_Manage.ui'
|
||||
##
|
||||
## Created by: Qt User Interface Compiler version 6.5.2
|
||||
##
|
||||
## WARNING! All changes made in this file will be lost when recompiling UI file!
|
||||
################################################################################
|
||||
|
||||
from PySide6.QtCore import (QCoreApplication, QDate, QDateTime, QLocale,
|
||||
QMetaObject, QObject, QPoint, QRect,
|
||||
QSize, QTime, QUrl, Qt)
|
||||
from PySide6.QtGui import (QBrush, QColor, QConicalGradient, QCursor,
|
||||
QFont, QFontDatabase, QGradient, QIcon,
|
||||
QImage, QKeySequence, QLinearGradient, QPainter,
|
||||
QPalette, QPixmap, QRadialGradient, QTransform)
|
||||
from PySide6.QtWidgets import (QApplication, QGridLayout, QLabel, QPushButton,
|
||||
QSizePolicy, QSpacerItem, QWidget)
|
||||
|
||||
class Ui_ProjectEntry_Manage(object):
|
||||
def setupUi(self, ProjectEntry_Manage):
|
||||
if not ProjectEntry_Manage.objectName():
|
||||
ProjectEntry_Manage.setObjectName(u"ProjectEntry_Manage")
|
||||
ProjectEntry_Manage.resize(500, 400)
|
||||
ProjectEntry_Manage.setWindowTitle(u"ProjectEntry_Manage")
|
||||
self.gridLayout = QGridLayout(ProjectEntry_Manage)
|
||||
self.gridLayout.setObjectName(u"gridLayout")
|
||||
self.redactSourcesButton = QPushButton(ProjectEntry_Manage)
|
||||
self.redactSourcesButton.setObjectName(u"redactSourcesButton")
|
||||
|
||||
self.gridLayout.addWidget(self.redactSourcesButton, 2, 1, 1, 1)
|
||||
|
||||
self.projectDescriptionLabel = QLabel(ProjectEntry_Manage)
|
||||
self.projectDescriptionLabel.setObjectName(u"projectDescriptionLabel")
|
||||
|
||||
self.gridLayout.addWidget(self.projectDescriptionLabel, 1, 0, 1, 2)
|
||||
|
||||
self.projectNameLabel = QLabel(ProjectEntry_Manage)
|
||||
self.projectNameLabel.setObjectName(u"projectNameLabel")
|
||||
font = QFont()
|
||||
font.setPointSize(14)
|
||||
font.setBold(True)
|
||||
self.projectNameLabel.setFont(font)
|
||||
|
||||
self.gridLayout.addWidget(self.projectNameLabel, 0, 0, 1, 2)
|
||||
|
||||
self.extractButton = QPushButton(ProjectEntry_Manage)
|
||||
self.extractButton.setObjectName(u"extractButton")
|
||||
|
||||
self.gridLayout.addWidget(self.extractButton, 2, 0, 1, 1)
|
||||
|
||||
self.verticalSpacer = QSpacerItem(20, 40, QSizePolicy.Minimum, QSizePolicy.Expanding)
|
||||
|
||||
self.gridLayout.addItem(self.verticalSpacer, 3, 0, 1, 2)
|
||||
|
||||
|
||||
self.retranslateUi(ProjectEntry_Manage)
|
||||
|
||||
QMetaObject.connectSlotsByName(ProjectEntry_Manage)
|
||||
# setupUi
|
||||
|
||||
def retranslateUi(self, ProjectEntry_Manage):
|
||||
self.redactSourcesButton.setText(QCoreApplication.translate("ProjectEntry_Manage", u"Redact sources", None))
|
||||
self.projectDescriptionLabel.setText(QCoreApplication.translate("ProjectEntry_Manage", u"-", None))
|
||||
self.projectNameLabel.setText(QCoreApplication.translate("ProjectEntry_Manage", u"-", None))
|
||||
self.extractButton.setText(QCoreApplication.translate("ProjectEntry_Manage", u"Extract", None))
|
||||
pass
|
||||
# retranslateUi
|
||||
|
@ -15,10 +15,10 @@ from PySide6.QtGui import (QBrush, QColor, QConicalGradient, QCursor,
|
||||
QFont, QFontDatabase, QGradient, QIcon,
|
||||
QImage, QKeySequence, QLinearGradient, QPainter,
|
||||
QPalette, QPixmap, QRadialGradient, QTransform)
|
||||
from PySide6.QtWidgets import (QApplication, QGridLayout, QHBoxLayout, QLabel,
|
||||
QListWidget, QListWidgetItem, QPushButton, QSizePolicy,
|
||||
QSpacerItem, QTabWidget, QVBoxLayout, QWidget)
|
||||
from PySide6.QtWidgets import (QApplication, QHBoxLayout, QListWidget, QListWidgetItem,
|
||||
QSizePolicy, QTabWidget, QVBoxLayout, QWidget)
|
||||
|
||||
from ui.components.projectEntry_Manage import ProjectEntry_Manage
|
||||
from ui.components.samplesListWidget import SamplesListWidget
|
||||
|
||||
class Ui_ProjectEntry(object):
|
||||
@ -30,38 +30,8 @@ class Ui_ProjectEntry(object):
|
||||
self.verticalLayout.setObjectName(u"verticalLayout")
|
||||
self.tabWidget = QTabWidget(ProjectEntry)
|
||||
self.tabWidget.setObjectName(u"tabWidget")
|
||||
self.tabManage = QWidget()
|
||||
self.tabManage = ProjectEntry_Manage()
|
||||
self.tabManage.setObjectName(u"tabManage")
|
||||
self.gridLayout = QGridLayout(self.tabManage)
|
||||
self.gridLayout.setObjectName(u"gridLayout")
|
||||
self.pushButton = QPushButton(self.tabManage)
|
||||
self.pushButton.setObjectName(u"pushButton")
|
||||
|
||||
self.gridLayout.addWidget(self.pushButton, 2, 0, 1, 1)
|
||||
|
||||
self.projectNameLabel = QLabel(self.tabManage)
|
||||
self.projectNameLabel.setObjectName(u"projectNameLabel")
|
||||
font = QFont()
|
||||
font.setPointSize(14)
|
||||
font.setBold(True)
|
||||
self.projectNameLabel.setFont(font)
|
||||
|
||||
self.gridLayout.addWidget(self.projectNameLabel, 0, 0, 1, 2)
|
||||
|
||||
self.pushButton_2 = QPushButton(self.tabManage)
|
||||
self.pushButton_2.setObjectName(u"pushButton_2")
|
||||
|
||||
self.gridLayout.addWidget(self.pushButton_2, 2, 1, 1, 1)
|
||||
|
||||
self.projectDescriptionLabel = QLabel(self.tabManage)
|
||||
self.projectDescriptionLabel.setObjectName(u"projectDescriptionLabel")
|
||||
|
||||
self.gridLayout.addWidget(self.projectDescriptionLabel, 1, 0, 1, 2)
|
||||
|
||||
self.verticalSpacer = QSpacerItem(20, 40, QSizePolicy.Minimum, QSizePolicy.Expanding)
|
||||
|
||||
self.gridLayout.addItem(self.verticalSpacer, 3, 0, 1, 2)
|
||||
|
||||
self.tabWidget.addTab(self.tabManage, "")
|
||||
self.tabClassify = QWidget()
|
||||
self.tabClassify.setObjectName(u"tabClassify")
|
||||
@ -107,10 +77,6 @@ class Ui_ProjectEntry(object):
|
||||
|
||||
def retranslateUi(self, ProjectEntry):
|
||||
ProjectEntry.setWindowTitle(QCoreApplication.translate("ProjectEntry", u"projectEntry", None))
|
||||
self.pushButton.setText(QCoreApplication.translate("ProjectEntry", u"Extract", None))
|
||||
self.projectNameLabel.setText(QCoreApplication.translate("ProjectEntry", u"-", None))
|
||||
self.pushButton_2.setText(QCoreApplication.translate("ProjectEntry", u"...", None))
|
||||
self.projectDescriptionLabel.setText(QCoreApplication.translate("ProjectEntry", u"-", None))
|
||||
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tabManage), QCoreApplication.translate("ProjectEntry", u"Manage", None))
|
||||
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tabClassify), QCoreApplication.translate("ProjectEntry", u"Classify", None))
|
||||
# retranslateUi
|
||||
|
9
ui/components/yieldProgress.py
Normal file
9
ui/components/yieldProgress.py
Normal file
@ -0,0 +1,9 @@
|
||||
from PySide6.QtWidgets import QDialog
|
||||
|
||||
from .yieldProgress_ui import Ui_YieldProgress
|
||||
|
||||
|
||||
class YieldProgress(Ui_YieldProgress, QDialog):
|
||||
def __init__(self, parent=None):
|
||||
super().__init__(parent)
|
||||
self.setupUi(self)
|
87
ui/components/yieldProgress.ui
Normal file
87
ui/components/yieldProgress.ui
Normal file
@ -0,0 +1,87 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>YieldProgress</class>
|
||||
<widget class="QDialog" name="YieldProgress">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>450</width>
|
||||
<height>200</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string notr="true">YieldProgress</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QProgressBar" name="progressBar">
|
||||
<property name="maximum">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
<property name="format">
|
||||
<string notr="true">%v/%m %p%</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="abortButton">
|
||||
<property name="text">
|
||||
<string>Abort</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
78
ui/components/yieldProgress_ui.py
Normal file
78
ui/components/yieldProgress_ui.py
Normal file
@ -0,0 +1,78 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
################################################################################
|
||||
## Form generated from reading UI file 'yieldProgress.ui'
|
||||
##
|
||||
## Created by: Qt User Interface Compiler version 6.5.2
|
||||
##
|
||||
## WARNING! All changes made in this file will be lost when recompiling UI file!
|
||||
################################################################################
|
||||
|
||||
from PySide6.QtCore import (QCoreApplication, QDate, QDateTime, QLocale,
|
||||
QMetaObject, QObject, QPoint, QRect,
|
||||
QSize, QTime, QUrl, Qt)
|
||||
from PySide6.QtGui import (QBrush, QColor, QConicalGradient, QCursor,
|
||||
QFont, QFontDatabase, QGradient, QIcon,
|
||||
QImage, QKeySequence, QLinearGradient, QPainter,
|
||||
QPalette, QPixmap, QRadialGradient, QTransform)
|
||||
from PySide6.QtWidgets import (QApplication, QDialog, QHBoxLayout, QLabel,
|
||||
QProgressBar, QPushButton, QSizePolicy, QSpacerItem,
|
||||
QVBoxLayout, QWidget)
|
||||
|
||||
class Ui_YieldProgress(object):
|
||||
def setupUi(self, YieldProgress):
|
||||
if not YieldProgress.objectName():
|
||||
YieldProgress.setObjectName(u"YieldProgress")
|
||||
YieldProgress.resize(450, 200)
|
||||
YieldProgress.setWindowTitle(u"YieldProgress")
|
||||
self.verticalLayout = QVBoxLayout(YieldProgress)
|
||||
self.verticalLayout.setObjectName(u"verticalLayout")
|
||||
self.label = QLabel(YieldProgress)
|
||||
self.label.setObjectName(u"label")
|
||||
sizePolicy = QSizePolicy(QSizePolicy.Preferred, QSizePolicy.Expanding)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.label.sizePolicy().hasHeightForWidth())
|
||||
self.label.setSizePolicy(sizePolicy)
|
||||
self.label.setAlignment(Qt.AlignCenter)
|
||||
|
||||
self.verticalLayout.addWidget(self.label)
|
||||
|
||||
self.progressBar = QProgressBar(YieldProgress)
|
||||
self.progressBar.setObjectName(u"progressBar")
|
||||
self.progressBar.setMaximum(0)
|
||||
self.progressBar.setAlignment(Qt.AlignCenter)
|
||||
self.progressBar.setFormat(u"%v/%m %p%")
|
||||
|
||||
self.verticalLayout.addWidget(self.progressBar)
|
||||
|
||||
self.horizontalLayout = QHBoxLayout()
|
||||
self.horizontalLayout.setObjectName(u"horizontalLayout")
|
||||
self.horizontalSpacer = QSpacerItem(40, 20, QSizePolicy.Expanding, QSizePolicy.Minimum)
|
||||
|
||||
self.horizontalLayout.addItem(self.horizontalSpacer)
|
||||
|
||||
self.abortButton = QPushButton(YieldProgress)
|
||||
self.abortButton.setObjectName(u"abortButton")
|
||||
|
||||
self.horizontalLayout.addWidget(self.abortButton)
|
||||
|
||||
self.horizontalSpacer_2 = QSpacerItem(40, 20, QSizePolicy.Expanding, QSizePolicy.Minimum)
|
||||
|
||||
self.horizontalLayout.addItem(self.horizontalSpacer_2)
|
||||
|
||||
|
||||
self.verticalLayout.addLayout(self.horizontalLayout)
|
||||
|
||||
|
||||
self.retranslateUi(YieldProgress)
|
||||
|
||||
QMetaObject.connectSlotsByName(YieldProgress)
|
||||
# setupUi
|
||||
|
||||
def retranslateUi(self, YieldProgress):
|
||||
self.label.setText(QCoreApplication.translate("YieldProgress", u"...", None))
|
||||
self.abortButton.setText(QCoreApplication.translate("YieldProgress", u"Abort", None))
|
||||
pass
|
||||
# retranslateUi
|
||||
|
Loading…
x
Reference in New Issue
Block a user