Skip to content
This repository has been archived by the owner on Apr 24, 2024. It is now read-only.

Commit

Permalink
完成初始界面
Browse files Browse the repository at this point in the history
  • Loading branch information
HenryZeng committed Apr 30, 2020
1 parent d1bc332 commit 43cd603
Show file tree
Hide file tree
Showing 22 changed files with 3,503 additions and 1,606 deletions.
1 change: 0 additions & 1 deletion .idea/ArkDesktop.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

773 changes: 0 additions & 773 deletions AboutWindow_rc.py

This file was deleted.

28 changes: 1 addition & 27 deletions Cardinal.py
Original file line number Diff line number Diff line change
@@ -1,28 +1,2 @@
from PyQt5 import QtCore, QtGui, QtWidgets
from UI.MainWindow import Ui_MainWindow as Main_window
from UI.About import Ui_MainWindow as About_window
import Process.Mix

import sys

class window_main(QtWidgets.QMainWindow, Main_window):
def __init__(self):
super().__init__()
self.setupUi(self)

def About_Window(self):
about.show()


class window_about(QtWidgets.QMainWindow, About_window):
def __init__(self):
super().__init__()
self.setupUi(self)


if __name__ == "__main__":
app = QtWidgets.QApplication(sys.argv)
main = window_main()
main.show()

about = window_about()
sys.exit(app.exec_())
773 changes: 0 additions & 773 deletions MainWindow_rc.py

This file was deleted.

31 changes: 31 additions & 0 deletions Process/Mix.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
from .imports import *
from .window_about import window_about
from .window_loading import window_loading
from .window_main import window_main


class window_loading_(window_loading):
def run(self):
main.show()
self.close()
# 开启动画后加载主界面


class window_about_(window_about):
pass


class window_main_(window_main):
def About_Window(self):
about.show()


app = QtWidgets.QApplication(sys.argv)

main = window_main_()
about = window_about_()

loading = window_loading_()
loading.show()

sys.exit(app.exec_())
4 changes: 4 additions & 0 deletions Process/imports.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
from PyQt5 import QtCore, QtGui, QtWidgets
from PyQt5.QtCore import pyqtSignal
import sys,time
import os
6 changes: 6 additions & 0 deletions Process/window_about.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from .imports import *
from UI.About import Ui_MainWindow as About_window
class window_about(QtWidgets.QMainWindow, About_window):
def __init__(self):
super().__init__()
self.setupUi(self)
24 changes: 24 additions & 0 deletions Process/window_loading.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
from .imports import *
from UI.Loading import Ui_Form as Loading_window

class wait(QtCore.QThread):
# 创建了一个子线程,用来防止等待带来的界面卡死
comm = pyqtSignal()
def __init__(self):
super().__init__()
def run(self):
time.sleep(5)
# 等待5秒
self.comm.emit()

class window_loading(QtWidgets.QMainWindow,Loading_window):
def __init__(self):
super().__init__()
self.setWindowFlags(QtCore.Qt.FramelessWindowHint)
self.setupUi(self)
self.waits = wait()
self.waits.comm.connect(self.run)
self.waits.start()
# 执行QThread子线程,进行等待,等待结束后回调run(self)函数
def run(self):
pass
9 changes: 9 additions & 0 deletions Process/window_main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
from .imports import *
from UI.MainWindow import Ui_MainWindow as Main_window
class window_main(QtWidgets.QMainWindow, Main_window):
def __init__(self):
super().__init__()
self.setupUi(self)

def About_Window(self):
pass
3,313 changes: 3,313 additions & 0 deletions Share_rc.py

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions UI/About.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-

# Form implementation generated from reading ui file 'E:\Codes\独立项目\ArkDesktop\UI\About.ui'
# Form implementation generated from reading ui file 'E:\Codes\独立项目\Cardinal\UI\About.ui'
#
# Created by: PyQt5 UI code generator 5.14.2
#
Expand All @@ -17,13 +17,13 @@ def setupUi(self, MainWindow):
MainWindow.setMinimumSize(QtCore.QSize(800, 450))
MainWindow.setMaximumSize(QtCore.QSize(800, 450))
icon = QtGui.QIcon()
icon.addPixmap(QtGui.QPixmap(":/logo/Share/logo.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
icon.addPixmap(QtGui.QPixmap(":/Logo/Share/Logo.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
MainWindow.setWindowIcon(icon)
self.centralwidget = QtWidgets.QWidget(MainWindow)
self.centralwidget.setObjectName("centralwidget")
self.label = QtWidgets.QLabel(self.centralwidget)
self.label.setGeometry(QtCore.QRect(40, 80, 241, 251))
self.label.setStyleSheet("image: url(:/logo/Share/logo.png);")
self.label.setStyleSheet("image: url(:/Logo/Share/Logo.png);")
self.label.setText("")
self.label.setObjectName("label")
self.label_2 = QtWidgets.QLabel(self.centralwidget)
Expand All @@ -37,5 +37,5 @@ def setupUi(self, MainWindow):
def retranslateUi(self, MainWindow):
_translate = QtCore.QCoreApplication.translate
MainWindow.setWindowTitle(_translate("MainWindow", "About"))
self.label_2.setText(_translate("MainWindow", "<html><head/><body><p align=\"center\"><span style=\" font-size:36pt; font-weight:600;\">ArkDesktop</span></p><p align=\"center\"><br/><a href=\" http://www.github.com\"><span style=\" text-decoration: underline; color:#0000ff;\">http://www.github.com</span></a></p><p align=\"center\"><br/></p><p align=\"center\"><br/></p><p align=\"center\"><br/></p><p align=\"center\"><br/></p><p align=\"center\"><br/></p></body></html>"))
import AboutWindow_rc
self.label_2.setText(_translate("MainWindow", "<html><head/><body><p align=\"center\"><span style=\" font-size:36pt; font-weight:600;\">Cardinal</span></p><p align=\"center\"><br/><a href=\" http://www.github.com\"><span style=\" text-decoration: underline; color:#0000ff;\">http://www.github.com</span></a></p><p align=\"center\"><br/></p><p align=\"center\"><br/></p><p align=\"center\"><br/></p><p align=\"center\"><br/></p><p align=\"center\"><br/></p></body></html>"))
import Share_rc
10 changes: 5 additions & 5 deletions UI/About.ui
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
<string>About</string>
</property>
<property name="windowIcon">
<iconset resource="img/AboutWindow.qrc">
<normaloff>:/logo/Share/logo.png</normaloff>:/logo/Share/logo.png</iconset>
<iconset resource="img/Share.qrc">
<normaloff>:/Logo/Share/Logo.png</normaloff>:/Logo/Share/Logo.png</iconset>
</property>
<widget class="QWidget" name="centralwidget">
<widget class="QLabel" name="label">
Expand All @@ -40,7 +40,7 @@
</rect>
</property>
<property name="styleSheet">
<string notr="true">image: url(:/logo/Share/logo.png);</string>
<string notr="true">image: url(:/Logo/Share/Logo.png);</string>
</property>
<property name="text">
<string/>
Expand All @@ -56,13 +56,13 @@
</rect>
</property>
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p align=&quot;center&quot;&gt;&lt;span style=&quot; font-size:36pt; font-weight:600;&quot;&gt;ArkDesktop&lt;/span&gt;&lt;/p&gt;&lt;p align=&quot;center&quot;&gt;&lt;br/&gt;&lt;a href=&quot; http://www.github.com&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;http://www.github.com&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;p align=&quot;center&quot;&gt;&lt;br/&gt;&lt;/p&gt;&lt;p align=&quot;center&quot;&gt;&lt;br/&gt;&lt;/p&gt;&lt;p align=&quot;center&quot;&gt;&lt;br/&gt;&lt;/p&gt;&lt;p align=&quot;center&quot;&gt;&lt;br/&gt;&lt;/p&gt;&lt;p align=&quot;center&quot;&gt;&lt;br/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p align=&quot;center&quot;&gt;&lt;span style=&quot; font-size:36pt; font-weight:600;&quot;&gt;Cardinal&lt;/span&gt;&lt;/p&gt;&lt;p align=&quot;center&quot;&gt;&lt;br/&gt;&lt;a href=&quot; http://www.github.com&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;http://www.github.com&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;p align=&quot;center&quot;&gt;&lt;br/&gt;&lt;/p&gt;&lt;p align=&quot;center&quot;&gt;&lt;br/&gt;&lt;/p&gt;&lt;p align=&quot;center&quot;&gt;&lt;br/&gt;&lt;/p&gt;&lt;p align=&quot;center&quot;&gt;&lt;br/&gt;&lt;/p&gt;&lt;p align=&quot;center&quot;&gt;&lt;br/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</widget>
</widget>
<resources>
<include location="img/AboutWindow.qrc"/>
<include location="img/Share.qrc"/>
</resources>
<connections/>
</ui>
33 changes: 33 additions & 0 deletions UI/Loading.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# -*- coding: utf-8 -*-

# Form implementation generated from reading ui file 'E:\Codes\独立项目\Cardinal\UI\Loading.ui'
#
# Created by: PyQt5 UI code generator 5.14.2
#
# WARNING! All changes made in this file will be lost!


from PyQt5 import QtCore, QtGui, QtWidgets


class Ui_Form(object):
def setupUi(self, Form):
Form.setObjectName("Form")
Form.setWindowModality(QtCore.Qt.NonModal)
Form.resize(300, 300)
Form.setMinimumSize(QtCore.QSize(300, 300))
Form.setMaximumSize(QtCore.QSize(300, 300))
self.label = QtWidgets.QLabel(Form)
self.label.setGeometry(QtCore.QRect(0, 0, 300, 300))
self.label.setStyleSheet("image: url(:/Logo/Share/Cardinal.png);\n"
"background-color: rgb(0, 0, 0);")
self.label.setText("")
self.label.setObjectName("label")

self.retranslateUi(Form)
QtCore.QMetaObject.connectSlotsByName(Form)

def retranslateUi(self, Form):
_translate = QtCore.QCoreApplication.translate
Form.setWindowTitle(_translate("Form", "Loading"))
import Share_rc
42 changes: 38 additions & 4 deletions UI/Loading.ui
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,52 @@
<ui version="4.0">
<class>Form</class>
<widget class="QWidget" name="Form">
<property name="windowModality">
<enum>Qt::NonModal</enum>
</property>
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>705</width>
<height>256</height>
<width>300</width>
<height>300</height>
</rect>
</property>
<property name="minimumSize">
<size>
<width>300</width>
<height>300</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>300</width>
<height>300</height>
</size>
</property>
<property name="windowTitle">
<string>Form</string>
<string>Loading</string>
</property>
<widget class="QLabel" name="label">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>300</width>
<height>300</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">image: url(:/Logo/Share/Cardinal.png);
background-color: rgb(0, 0, 0);</string>
</property>
<property name="text">
<string/>
</property>
</widget>
</widget>
<resources/>
<resources>
<include location="img/Share.qrc"/>
</resources>
<connections/>
</ui>
8 changes: 4 additions & 4 deletions UI/MainWindow.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-

# Form implementation generated from reading ui file 'E:\Codes\独立项目\ArkDesktop\UI\MainWindow.ui'
# Form implementation generated from reading ui file 'E:\Codes\独立项目\Cardinal\UI\MainWindow.ui'
#
# Created by: PyQt5 UI code generator 5.14.2
#
Expand All @@ -17,7 +17,7 @@ def setupUi(self, MainWindow):
MainWindow.setMinimumSize(QtCore.QSize(800, 450))
MainWindow.setMaximumSize(QtCore.QSize(800, 450))
icon = QtGui.QIcon()
icon.addPixmap(QtGui.QPixmap(":/logo/Share/logo.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
icon.addPixmap(QtGui.QPixmap(":/Logo/Share/Logo.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
MainWindow.setWindowIcon(icon)
self.centralwidget = QtWidgets.QWidget(MainWindow)
self.centralwidget.setObjectName("centralwidget")
Expand Down Expand Up @@ -47,7 +47,7 @@ def setupUi(self, MainWindow):

def retranslateUi(self, MainWindow):
_translate = QtCore.QCoreApplication.translate
MainWindow.setWindowTitle(_translate("MainWindow", "ArkDesktop"))
MainWindow.setWindowTitle(_translate("MainWindow", "Cardinal"))
self.menuMenu.setTitle(_translate("MainWindow", "属性"))
self.action_about.setText(_translate("MainWindow", "关于"))
import MainWindow_rc
import Share_rc
8 changes: 4 additions & 4 deletions UI/MainWindow.ui
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@
</size>
</property>
<property name="windowTitle">
<string>ArkDesktop</string>
<string>Cardinal</string>
</property>
<property name="windowIcon">
<iconset resource="img/MainWindow.qrc">
<normaloff>:/logo/Share/logo.png</normaloff>:/logo/Share/logo.png</iconset>
<iconset resource="img/Share.qrc">
<normaloff>:/Logo/Share/Logo.png</normaloff>:/Logo/Share/Logo.png</iconset>
</property>
<widget class="QWidget" name="centralwidget"/>
<widget class="QMenuBar" name="menubar">
Expand Down Expand Up @@ -70,7 +70,7 @@
</action>
</widget>
<resources>
<include location="img/MainWindow.qrc"/>
<include location="img/Share.qrc"/>
</resources>
<connections>
<connection>
Expand Down
5 changes: 0 additions & 5 deletions UI/img/AboutWindow.qrc

This file was deleted.

5 changes: 0 additions & 5 deletions UI/img/MainWindow.qrc

This file was deleted.

6 changes: 6 additions & 0 deletions UI/img/Share.qrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<RCC>
<qresource prefix="Logo">
<file>Share/Cardinal.png</file>
<file>Share/Logo.png</file>
</qresource>
</RCC>
Binary file added UI/img/Share/Cardinal.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified UI/img/Share/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions t.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
class a():
def run(self):
x.xx()




class b():

def run(self):
print(1)
xx = a()
xx.run()

def xx(self):
print(2)

if __name__ == "__main__":
x = b()
x.run()

0 comments on commit 43cd603

Please sign in to comment.