mirror of
https://github.com/KenanZhu/AutoLibrary.git
synced 2026-08-02 06:09:36 +08:00
style(ReserveFlow): 提取容器类的UI设置到setupUi方法
This commit is contained in:
@@ -104,6 +104,7 @@ class _DateInputContainer(QWidget):
|
|||||||
):
|
):
|
||||||
|
|
||||||
super().__init__(parent)
|
super().__init__(parent)
|
||||||
|
|
||||||
self.setupUi()
|
self.setupUi()
|
||||||
|
|
||||||
def setupUi(
|
def setupUi(
|
||||||
@@ -153,10 +154,16 @@ class _TimeInputContainer(QWidget):
|
|||||||
):
|
):
|
||||||
|
|
||||||
super().__init__(parent)
|
super().__init__(parent)
|
||||||
|
|
||||||
|
self.setupUi()
|
||||||
|
|
||||||
|
def setupUi(
|
||||||
|
self
|
||||||
|
):
|
||||||
|
|
||||||
self.TimeEdit = QTimeEdit(self)
|
self.TimeEdit = QTimeEdit(self)
|
||||||
self.TimeEdit.setDisplayFormat("HH:mm")
|
self.TimeEdit.setDisplayFormat("HH:mm")
|
||||||
self.TimeEdit.setFixedHeight(25)
|
self.TimeEdit.setFixedHeight(25)
|
||||||
|
|
||||||
Layout = QHBoxLayout(self)
|
Layout = QHBoxLayout(self)
|
||||||
Layout.setContentsMargins(0, 0, 0, 0)
|
Layout.setContentsMargins(0, 0, 0, 0)
|
||||||
Layout.addWidget(self.TimeEdit)
|
Layout.addWidget(self.TimeEdit)
|
||||||
@@ -176,6 +183,13 @@ class _DateOffsetContainer(QWidget):
|
|||||||
):
|
):
|
||||||
|
|
||||||
super().__init__(parent)
|
super().__init__(parent)
|
||||||
|
|
||||||
|
self.setupUi()
|
||||||
|
|
||||||
|
def setupUi(
|
||||||
|
self
|
||||||
|
):
|
||||||
|
|
||||||
self.SpinBox = QSpinBox(self)
|
self.SpinBox = QSpinBox(self)
|
||||||
self.SpinBox.setRange(0, 99999)
|
self.SpinBox.setRange(0, 99999)
|
||||||
self.SpinBox.setFixedHeight(25)
|
self.SpinBox.setFixedHeight(25)
|
||||||
@@ -183,7 +197,6 @@ class _DateOffsetContainer(QWidget):
|
|||||||
for display, data in DATE_OFFSET_OPTIONS:
|
for display, data in DATE_OFFSET_OPTIONS:
|
||||||
self.UnitCombo.addItem(display, data)
|
self.UnitCombo.addItem(display, data)
|
||||||
self.UnitCombo.setFixedHeight(25)
|
self.UnitCombo.setFixedHeight(25)
|
||||||
|
|
||||||
Layout = QHBoxLayout(self)
|
Layout = QHBoxLayout(self)
|
||||||
Layout.setContentsMargins(0, 0, 0, 0)
|
Layout.setContentsMargins(0, 0, 0, 0)
|
||||||
Layout.setSpacing(4)
|
Layout.setSpacing(4)
|
||||||
@@ -220,11 +233,17 @@ class _TimeOffsetContainer(QWidget):
|
|||||||
):
|
):
|
||||||
|
|
||||||
super().__init__(parent)
|
super().__init__(parent)
|
||||||
|
|
||||||
|
self.setupUi()
|
||||||
|
|
||||||
|
def setupUi(
|
||||||
|
self
|
||||||
|
):
|
||||||
|
|
||||||
self.SpinBox = QSpinBox(self)
|
self.SpinBox = QSpinBox(self)
|
||||||
self.SpinBox.setRange(0, 99999)
|
self.SpinBox.setRange(0, 99999)
|
||||||
self.SpinBox.setSuffix(" 小时")
|
self.SpinBox.setSuffix(" 小时")
|
||||||
self.SpinBox.setFixedHeight(25)
|
self.SpinBox.setFixedHeight(25)
|
||||||
|
|
||||||
Layout = QHBoxLayout(self)
|
Layout = QHBoxLayout(self)
|
||||||
Layout.setContentsMargins(0, 0, 0, 0)
|
Layout.setContentsMargins(0, 0, 0, 0)
|
||||||
Layout.addWidget(self.SpinBox)
|
Layout.addWidget(self.SpinBox)
|
||||||
|
|||||||
Reference in New Issue
Block a user