mirror of
https://github.com/shizand/statapp.git
synced 2024-12-23 12:12:59 +03:00
fix: обновлено окно "О программе" (#21)
This commit is contained in:
parent
c0fbc0fbd9
commit
37ea556ad2
@ -1,11 +1,14 @@
|
||||
# -*- mode: python ; coding: utf-8 -*-
|
||||
from PyInstaller.utils.hooks import copy_metadata
|
||||
|
||||
datas = [('statapp/images/sticker.gif', 'images')]
|
||||
datas += copy_metadata('statapp')
|
||||
|
||||
a = Analysis(
|
||||
['statapp/__main__.py'],
|
||||
pathex=[],
|
||||
binaries=[],
|
||||
datas=[],
|
||||
datas=datas,
|
||||
hiddenimports=[],
|
||||
hookspath=[],
|
||||
hooksconfig={},
|
||||
|
@ -1,11 +1,15 @@
|
||||
# -*- mode: python ; coding: utf-8 -*-
|
||||
from PyInstaller.utils.hooks import copy_metadata
|
||||
|
||||
datas = [('statapp/images/sticker.gif', 'images')]
|
||||
datas += copy_metadata('statapp')
|
||||
|
||||
|
||||
a = Analysis(
|
||||
['statapp/__main__.py'],
|
||||
pathex=[],
|
||||
binaries=[],
|
||||
datas=[('statapp/images/sticker.gif', 'images')],
|
||||
datas=datas,
|
||||
hiddenimports=[],
|
||||
hookspath=[],
|
||||
hooksconfig={},
|
||||
@ -25,7 +29,7 @@ exe = EXE(
|
||||
bootloader_ignore_signals=False,
|
||||
strip=False,
|
||||
upx=True,
|
||||
console=True,
|
||||
console=False,
|
||||
disable_windowed_traceback=False,
|
||||
argv_emulation=False,
|
||||
target_arch=None,
|
||||
|
@ -1,12 +1,18 @@
|
||||
import sys
|
||||
from PySide2.QtGui import QMovie
|
||||
from PySide2.QtWidgets import QMainWindow
|
||||
|
||||
from statapp.ui.ui_about_window import Ui_AboutWindow
|
||||
from statapp.utils import resource_path
|
||||
|
||||
if sys.version_info < (3, 8):
|
||||
import importlib_metadata
|
||||
else:
|
||||
import importlib.metadata as importlib_metadata
|
||||
|
||||
|
||||
class AboutWindow(QMainWindow):
|
||||
pixmap = None
|
||||
movie = None
|
||||
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
@ -14,10 +20,11 @@ class AboutWindow(QMainWindow):
|
||||
self.ui.setupUi(self)
|
||||
|
||||
image_path = resource_path('images/sticker.gif')
|
||||
|
||||
movie = QMovie(image_path)
|
||||
self.ui.labelgif.setMovie(movie)
|
||||
movie.start()
|
||||
|
||||
self.pixmap = movie
|
||||
self.movie = movie
|
||||
self.setFixedSize(self.size())
|
||||
|
||||
version = importlib_metadata.version(__package__ or __name__)
|
||||
self.ui.versionLabel.setText(f"Версия: {version}")
|
||||
|
@ -9,7 +9,7 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>476</width>
|
||||
<width>483</width>
|
||||
<height>543</height>
|
||||
</rect>
|
||||
</property>
|
||||
@ -23,70 +23,7 @@
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="0" column="0">
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="4" column="1">
|
||||
<widget class="QLabel" name="labelowner">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>14</pointsize>
|
||||
<italic>false</italic>
|
||||
<bold>false</bold>
|
||||
<underline>false</underline>
|
||||
<strikeout>false</strikeout>
|
||||
<stylestrategy>PreferDefault</stylestrategy>
|
||||
<kerning>true</kerning>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Донецкий Национальный Технический Университет</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLabel" name="labeldevelopers">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>14</pointsize>
|
||||
<italic>false</italic>
|
||||
<bold>false</bold>
|
||||
<underline>false</underline>
|
||||
<strikeout>false</strikeout>
|
||||
<stylestrategy>PreferDefault</stylestrategy>
|
||||
<kerning>true</kerning>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Разработчики: Слипенко М., Лазуренко Е.</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLabel" name="labelbasegigamen">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>14</pointsize>
|
||||
<italic>false</italic>
|
||||
<bold>false</bold>
|
||||
<underline>false</underline>
|
||||
<strikeout>false</strikeout>
|
||||
<stylestrategy>PreferDefault</stylestrategy>
|
||||
<kerning>true</kerning>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Теоретический фундамент: Дмитрюк Т. Г.</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<item row="5" column="1">
|
||||
<widget class="QLabel" name="labelgif">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
@ -103,6 +40,7 @@
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>14</pointsize>
|
||||
<weight>50</weight>
|
||||
<italic>false</italic>
|
||||
<bold>false</bold>
|
||||
<underline>false</underline>
|
||||
@ -122,6 +60,102 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="1">
|
||||
<widget class="QLabel" name="labelowner">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>12</pointsize>
|
||||
<weight>50</weight>
|
||||
<italic>false</italic>
|
||||
<bold>false</bold>
|
||||
<underline>false</underline>
|
||||
<strikeout>false</strikeout>
|
||||
<stylestrategy>PreferDefault</stylestrategy>
|
||||
<kerning>true</kerning>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Донецкий Национальный Технический Университет</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QLabel" name="labeldevelopers">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>14</pointsize>
|
||||
<weight>50</weight>
|
||||
<italic>false</italic>
|
||||
<bold>false</bold>
|
||||
<underline>false</underline>
|
||||
<strikeout>false</strikeout>
|
||||
<stylestrategy>PreferDefault</stylestrategy>
|
||||
<kerning>true</kerning>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Разработчики: Слипенко М., Лазуренко Е.</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLabel" name="versionLabel">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Версия:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QLabel" name="labelbasegigamen">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>14</pointsize>
|
||||
<weight>50</weight>
|
||||
<italic>false</italic>
|
||||
<bold>false</bold>
|
||||
<underline>false</underline>
|
||||
<strikeout>false</strikeout>
|
||||
<stylestrategy>PreferDefault</stylestrategy>
|
||||
<kerning>true</kerning>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Теоретический фундамент: Дмитрюк Т. Г.</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLabel" name="mainLabel">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>20</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Statapp</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
|
62
statapp/ui/ui_about_window.py
generated
62
statapp/ui/ui_about_window.py
generated
@ -18,7 +18,7 @@ class Ui_AboutWindow(object):
|
||||
if not AboutWindow.objectName():
|
||||
AboutWindow.setObjectName(u"AboutWindow")
|
||||
AboutWindow.setEnabled(True)
|
||||
AboutWindow.resize(476, 543)
|
||||
AboutWindow.resize(483, 543)
|
||||
AboutWindow.setAutoFillBackground(False)
|
||||
self.centralwidget = QWidget(AboutWindow)
|
||||
self.centralwidget.setObjectName(u"centralwidget")
|
||||
@ -26,44 +26,72 @@ class Ui_AboutWindow(object):
|
||||
self.gridLayout_2.setObjectName(u"gridLayout_2")
|
||||
self.gridLayout = QGridLayout()
|
||||
self.gridLayout.setObjectName(u"gridLayout")
|
||||
self.labelowner = QLabel(self.centralwidget)
|
||||
self.labelowner.setObjectName(u"labelowner")
|
||||
self.labelgif = QLabel(self.centralwidget)
|
||||
self.labelgif.setObjectName(u"labelgif")
|
||||
self.labelgif.setMinimumSize(QSize(50, 50))
|
||||
self.labelgif.setMaximumSize(QSize(500, 600))
|
||||
font = QFont()
|
||||
font.setPointSize(14)
|
||||
font.setBold(False)
|
||||
font.setItalic(False)
|
||||
font.setUnderline(False)
|
||||
font.setWeight(50)
|
||||
font.setStrikeOut(False)
|
||||
font.setKerning(True)
|
||||
font.setStyleStrategy(QFont.PreferDefault)
|
||||
self.labelowner.setFont(font)
|
||||
self.labelgif.setFont(font)
|
||||
self.labelgif.setFrameShape(QFrame.NoFrame)
|
||||
self.labelgif.setAlignment(Qt.AlignCenter)
|
||||
|
||||
self.gridLayout.addWidget(self.labelgif, 5, 1, 1, 1)
|
||||
|
||||
self.labelowner = QLabel(self.centralwidget)
|
||||
self.labelowner.setObjectName(u"labelowner")
|
||||
font1 = QFont()
|
||||
font1.setPointSize(12)
|
||||
font1.setBold(False)
|
||||
font1.setItalic(False)
|
||||
font1.setUnderline(False)
|
||||
font1.setWeight(50)
|
||||
font1.setStrikeOut(False)
|
||||
font1.setKerning(True)
|
||||
font1.setStyleStrategy(QFont.PreferDefault)
|
||||
self.labelowner.setFont(font1)
|
||||
self.labelowner.setAlignment(Qt.AlignCenter)
|
||||
|
||||
self.gridLayout.addWidget(self.labelowner, 4, 1, 1, 1)
|
||||
self.gridLayout.addWidget(self.labelowner, 6, 1, 1, 1)
|
||||
|
||||
self.labeldevelopers = QLabel(self.centralwidget)
|
||||
self.labeldevelopers.setObjectName(u"labeldevelopers")
|
||||
self.labeldevelopers.setFont(font)
|
||||
self.labeldevelopers.setAlignment(Qt.AlignCenter)
|
||||
|
||||
self.gridLayout.addWidget(self.labeldevelopers, 0, 1, 1, 1)
|
||||
self.gridLayout.addWidget(self.labeldevelopers, 2, 1, 1, 1)
|
||||
|
||||
self.versionLabel = QLabel(self.centralwidget)
|
||||
self.versionLabel.setObjectName(u"versionLabel")
|
||||
font2 = QFont()
|
||||
font2.setPointSize(12)
|
||||
self.versionLabel.setFont(font2)
|
||||
self.versionLabel.setAlignment(Qt.AlignCenter)
|
||||
|
||||
self.gridLayout.addWidget(self.versionLabel, 1, 1, 1, 1)
|
||||
|
||||
self.labelbasegigamen = QLabel(self.centralwidget)
|
||||
self.labelbasegigamen.setObjectName(u"labelbasegigamen")
|
||||
self.labelbasegigamen.setFont(font)
|
||||
self.labelbasegigamen.setAlignment(Qt.AlignCenter)
|
||||
|
||||
self.gridLayout.addWidget(self.labelbasegigamen, 1, 1, 1, 1)
|
||||
self.gridLayout.addWidget(self.labelbasegigamen, 3, 1, 1, 1)
|
||||
|
||||
self.labelgif = QLabel(self.centralwidget)
|
||||
self.labelgif.setObjectName(u"labelgif")
|
||||
self.labelgif.setMinimumSize(QSize(50, 50))
|
||||
self.labelgif.setMaximumSize(QSize(500, 600))
|
||||
self.labelgif.setFont(font)
|
||||
self.labelgif.setFrameShape(QFrame.NoFrame)
|
||||
self.labelgif.setAlignment(Qt.AlignCenter)
|
||||
self.mainLabel = QLabel(self.centralwidget)
|
||||
self.mainLabel.setObjectName(u"mainLabel")
|
||||
font3 = QFont()
|
||||
font3.setPointSize(20)
|
||||
self.mainLabel.setFont(font3)
|
||||
self.mainLabel.setAlignment(Qt.AlignCenter)
|
||||
|
||||
self.gridLayout.addWidget(self.labelgif, 2, 1, 1, 1)
|
||||
self.gridLayout.addWidget(self.mainLabel, 0, 1, 1, 1)
|
||||
|
||||
|
||||
self.gridLayout_2.addLayout(self.gridLayout, 0, 0, 1, 1)
|
||||
@ -77,8 +105,10 @@ class Ui_AboutWindow(object):
|
||||
|
||||
def retranslateUi(self, AboutWindow):
|
||||
AboutWindow.setWindowTitle(QCoreApplication.translate("AboutWindow", u"\u041e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u0435", None))
|
||||
self.labelgif.setText("")
|
||||
self.labelowner.setText(QCoreApplication.translate("AboutWindow", u"\u0414\u043e\u043d\u0435\u0446\u043a\u0438\u0439 \u041d\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u0422\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0423\u043d\u0438\u0432\u0435\u0440\u0441\u0438\u0442\u0435\u0442", None))
|
||||
self.labeldevelopers.setText(QCoreApplication.translate("AboutWindow", u"\u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438: \u0421\u043b\u0438\u043f\u0435\u043d\u043a\u043e \u041c., \u041b\u0430\u0437\u0443\u0440\u0435\u043d\u043a\u043e \u0415.", None))
|
||||
self.versionLabel.setText(QCoreApplication.translate("AboutWindow", u"\u0412\u0435\u0440\u0441\u0438\u044f:", None))
|
||||
self.labelbasegigamen.setText(QCoreApplication.translate("AboutWindow", u"\u0422\u0435\u043e\u0440\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0444\u0443\u043d\u0434\u0430\u043c\u0435\u043d\u0442: \u0414\u043c\u0438\u0442\u0440\u044e\u043a \u0422. \u0413.", None))
|
||||
self.labelgif.setText("")
|
||||
self.mainLabel.setText(QCoreApplication.translate("AboutWindow", u"Statapp", None))
|
||||
# retranslateUi
|
||||
|
Loading…
Reference in New Issue
Block a user