Skip to content

Commit 6f410cd

Browse files
authored
Merge pull request ChinaIceF#66 from ChinaIceF/reconst
调整项目结构,将组件打包,并将widgets合入components
2 parents 4bfcc3a + 3820f2e commit 6f410cd

30 files changed

+43
-43
lines changed

examples/Gallery/components/ExperimentField.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import SiliconUI.SiGlobal as SiGlobal
22
from SiliconUI.SiFont import *
33
from siui.components import SiOptionCardLinear, SiOptionCardPlane, SiSliderH, SiProgressBar
4-
from siui.widgets import (
4+
from siui.components.widgets import (
55
SiCheckBox,
66
SiDenseHContainer,
77
SiDenseVContainer,

examples/Gallery/components/Layouts.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from SiliconUI import *
33
from SiliconUI.SiGlobal import *
44

5-
from siui.widgets import SiPushButton
5+
from siui.components.widgets import SiPushButton
66

77
from .web_url import GithubUrl, browse
88

siui/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import siui.core as core
55
import siui.core.globals
66
import siui.gui as gui
7-
import siui.widgets as widgets
7+
import siui.components.widgets as widgets
88
import siui.templates as templates
99

1010
import siui

siui/components/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
from siui.components.option_card import *
22
from siui.components.slider import *
33
from siui.components.progress_bar import *
4-
from siui.components import abstracts
4+
from siui.components.widgets import *

siui/components/abstracts/__init__.py

-1
This file was deleted.
+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
from siui.components.option_card.option_card import *
2+
import siui.components.option_card.abstracts as abstracts
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from siui.components.option_card.abstracts.option_card import *

siui/components/abstracts/option_card.py siui/components/option_card/abstracts/option_card.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from siui.core.globals import SiGlobal
2-
from siui.widgets import SiDenseHContainer, SiDenseVContainer, SiLabel
2+
from siui.components.widgets import SiDenseHContainer, SiDenseVContainer, SiLabel
33

44

55
class ABCSiOptionCardPlane(SiLabel):

siui/components/option_card.py siui/components/option_card/option_card.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
from PyQt5.QtCore import Qt
22

3-
from siui.components.abstracts import ABCSiOptionCardPlane
3+
from siui.components.option_card.abstracts import ABCSiOptionCardPlane
44
from siui.core.globals import SiGlobal
5-
from siui.widgets.container import SiDenseHContainer, SiDenseVContainer
6-
from siui.widgets.label import SiLabel, SiSvgLabel
5+
from siui.components.widgets.container import SiDenseHContainer
6+
from siui.components.widgets.label import SiLabel, SiSvgLabel
77

88

99
class SiOptionCardLinear(SiLabel):
+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from siui.components.progress_bar.progress_bar import *

siui/components/progress_bar.py siui/components/progress_bar/progress_bar.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from siui.core.color import Color
44
from siui.core.globals import SiGlobal
5-
from siui.widgets import SiLabel
5+
from siui.components.widgets import SiLabel
66

77

88
class SiProgressBar(SiLabel):

siui/components/slider/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from siui.components.slider.slider import *

siui/components/slider.py siui/components/slider/slider.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from siui.core.color import Color
44
from siui.core.globals import SiGlobal
5-
from siui.widgets import SiDraggableLabel, SiLabel
5+
from siui.components.widgets import SiDraggableLabel, SiLabel
66

77

88
class SiSliderH(QAbstractSlider):

siui/components/widgets/__init__.py

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import siui.components.widgets.abstracts as abstarcts
2+
from siui.components.widgets.button import *
3+
from siui.components.widgets.container import *
4+
from siui.components.widgets.label import *
5+
from siui.components.widgets.line_edit import *
6+
from siui.components.widgets.scrollarea import *
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
from siui.components.widgets.abstracts.button import *
3+
from siui.components.widgets.abstracts.label import *
4+
from siui.components.widgets.abstracts.line_edit import *
5+
from siui.components.widgets.abstracts.navigation_bar import *
6+
from siui.components.widgets.abstracts.widget import *

siui/widgets/abstracts/button.py siui/components/widgets/abstracts/button.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66

77
from siui.core.animation import SiExpAnimation
88
from siui.core.globals import SiGlobal
9-
from siui.widgets.abstracts import ABCAnimatedWidget
10-
from siui.widgets.label import SiLabel, SiLabel
9+
from siui.components.widgets.abstracts.widget import ABCAnimatedWidget
10+
from siui.components.widgets.label import SiLabel
1111

1212

1313
class ABCButton(QPushButton):
File renamed without changes.

siui/widgets/abstracts/navigation_bar.py siui/components/widgets/abstracts/navigation_bar.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from PyQt5.QtCore import pyqtSignal
22

3-
from siui.widgets.label import SiLabel
3+
from siui.components.widgets.label import SiLabel
44

55

66
class ABCSiNavigationBar(SiLabel):
File renamed without changes.

siui/widgets/button.py siui/components/widgets/button.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
from siui.core.color import Color
66
from siui.core.globals import SiGlobal
77
from siui.gui import GlobalFont, SiFont
8-
from siui.widgets.abstracts import ABCButton, ABCPushButton, ABCToggleButton, LongPressThread
9-
from siui.widgets.label import SiIconLabel, SiLabel, SiSvgLabel
8+
from siui.components.widgets.abstracts import ABCButton, ABCPushButton, ABCToggleButton, LongPressThread
9+
from siui.components.widgets.label import SiIconLabel, SiLabel, SiSvgLabel
1010

1111

1212
class SiPushButton(ABCPushButton):

siui/widgets/container.py siui/components/widgets/container.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from siui.widgets import SiLabel
1+
from siui.components.widgets import SiLabel
22

33

44
class SiDenseHContainer(SiLabel):

siui/widgets/label.py siui/components/widgets/label.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
22
from PyQt5.QtGui import QPainter, QPainterPath, QPixmap
33
from PyQt5.QtSvg import QSvgWidget
44

5-
from siui.core.animation import SiExpAnimation
6-
from siui.core.color import Color
7-
from siui.widgets.abstracts import ABCAnimatedLabel
5+
from siui.components.widgets.abstracts.label import ABCAnimatedLabel
86
from siui.gui import SiFont, GlobalFont
97

108

siui/widgets/line_edit.py siui/components/widgets/line_edit.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
from PyQt5.QtCore import Qt
22

33
from siui.core.globals import SiGlobal
4-
from siui.widgets import SiLabel
5-
from siui.widgets.abstracts import ABCSiLineEdit
4+
from siui.components.widgets import SiLabel
5+
from siui.components.widgets.abstracts import ABCSiLineEdit
66

77

88
class SiLineEdit(SiLabel):

siui/widgets/scrollarea.py siui/components/widgets/scrollarea.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from siui.core.animation import SiExpAnimation
22
from siui.core.globals import SiGlobal
3-
from siui.widgets.label import SiDraggableLabel, SiLabel
3+
from siui.components.widgets.label import SiDraggableLabel, SiLabel
44

55

66
class SiScrollArea(SiLabel):

siui/gui/tooltip.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import siui
1010
from siui.core.globals import SiGlobal
1111
from siui.gui.font import GlobalFont, SiFont
12-
from siui.widgets.abstracts import ABCAnimatedWidget
12+
from siui.components.widgets.abstracts.widget import ABCAnimatedWidget
1313

1414

1515
class ToolTipWindow(ABCAnimatedWidget):

siui/templates/application/application.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
from PyQt5.QtCore import Qt
2-
from PyQt5.QtWidgets import QDesktopWidget, QGraphicsDropShadowEffect, QMainWindow, QFrame
2+
from PyQt5.QtWidgets import QDesktopWidget, QMainWindow
33

44
from siui.core.globals import SiGlobal
55
from siui.gui import ToolTipWindow
6-
from siui.widgets import SiDenseHContainer, SiDenseVContainer, SiLabel, SiPixLabel, SiSimpleButton
6+
from siui.components.widgets import SiDenseHContainer, SiDenseVContainer, SiLabel, SiPixLabel, SiSimpleButton
77
from .page_view import PageView
88

99

siui/templates/application/page_view.py

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
from PyQt5.QtCore import pyqtSignal
22

33
from siui.core.globals import SiGlobal
4-
from siui.core.color import Color
5-
from siui.widgets import SiLabel, SiSimpleButton, SiToggleButton
6-
from siui.widgets.abstracts import ABCSiNavigationBar
7-
from siui.widgets.container import SiDenseHContainer, SiDenseVContainer, SiStackedContainer
4+
from siui.components.widgets import SiLabel, SiToggleButton
5+
from siui.components.widgets.abstracts import ABCSiNavigationBar
6+
from siui.components.widgets import SiDenseHContainer, SiDenseVContainer, SiStackedContainer
87

98

109
class PageButton(SiToggleButton):

siui/widgets/__init__.py

-7
This file was deleted.

siui/widgets/abstracts/__init__.py

-6
This file was deleted.

0 commit comments

Comments
 (0)