diff --git a/Add_printer.ui b/Add_printer.ui new file mode 100644 index 0000000..4841760 --- /dev/null +++ b/Add_printer.ui @@ -0,0 +1,55 @@ + + + Dialog + + + + 0 + 0 + 376 + 169 + + + + Создать пресет + + + + img/logo-1.pngimg/logo-1.png + + + + + 22 + 130 + 331 + 27 + + + + + + + background-color: rgb(0, 80, 0); + + + Сохранить + + + + + + + background-color: rgb(0, 80, 0); + + + Закрыть + + + + + + + + + diff --git a/Calc3D.py b/Calc3D.py index e1e3340..64cc273 100644 --- a/Calc3D.py +++ b/Calc3D.py @@ -1,122 +1,17 @@ -import datetime -import json -import os -import PySimpleGUI as Sgi -import gettext -import requests - -from calculating import calculating, amortization, cost_prise -from setts import window_setts, language, currency_setts -from texts import calc, about, new_marge, ver, not_connect -from update import upd_check - -now = datetime.datetime.now() +import sys +from PySide6.QtWidgets import QApplication, QMainWindow +from calc3dui import Ui_Calc3DbyRisen -lang = gettext.translation('locale', localedir='locale', languages=[language()]) -lang.install() -_ = lang.gettext +class App(QMainWindow): + def __init__(self): + super(App, self).__init__() + self.ui = Ui_Calc3DbyRisen() + self.ui.setupUi(self) -def create_window(): - with open(os.path.expanduser('setts.json')) as f: - theme = json.load(f)['settings']['theme'] - Sgi.theme(theme) - menu_def = [ - [_('Файл'), [_('Настройки')], [_('Выход')]], - [_('Помощь'), [_('Как рассчитывается стоимость'), _('Обо мне'), _('Проверить обновления')]], - ] - - layout = [ - [Sgi.Menu(menu_def)], - [Sgi.Txt('_' * 46)], - [Sgi.Text('0', size=(7, 1), font=('Consolas', 32), - text_color='white', key='result', auto_size_text=True, justification='right', expand_x=True), - Sgi.Text(currency_setts(), font=('Consolas', 32), text_color='white', key='result')], - [Sgi.Text(_('Себестоимость:'), font=12, text_color='white'), - Sgi.Text('0', size=(7, 1), font=12, text_color='white', key='cost', auto_size_text=True, - justification='right', expand_x=True), - Sgi.Text(currency_setts(), font=('Consolas', 12), text_color='white', key='cost')], - [Sgi.Txt('_' * 46, pad=(10, 5))], - [Sgi.Text(_('Время печати')), Sgi.Push(), Sgi.InputText('0', size=(5, 20)), Sgi.Text(_('ч.')), - Sgi.InputText('0', size=(5, 0)), Sgi.Text(_('мин. '))], - [Sgi.Text(_('Масса детали')), Sgi.Push(), Sgi.InputText('0', size=(10, 20), justification='right', ), - Sgi.Text(_('г. '))], - [Sgi.Text(_('Количество экземпляров')), Sgi.Push(), Sgi.InputText('1', size=(10, 20), justification='right', ), - Sgi.Text(_('шт. '))], - [Sgi.Txt('_' * 46)], - [Sgi.Text(_('Моделирование')), Sgi.Push(), Sgi.InputText('0', size=(10, 20), justification='right', ), - Sgi.Text(f'{currency_setts()} ')], - [Sgi.Text(_('Постобработка')), Sgi.Push(), Sgi.InputText('0', size=(10, 20), justification='right', ), - Sgi.Text(f'{currency_setts()} ')], - [Sgi.Txt('_' * 46)], - [Sgi.Txt(' ' * 15), Sgi.ReadFormButton(_('Рассчитать'), size=(10, 2)), Sgi.Cancel(_('Выход'), size=(10, 2))] - - ] - return Sgi.Window(f'Calc3D by Risen ver.{ver}', layout, icon='logo.ico') - - -def main(): - window = create_window() - - while True: - event, values = window.read() - - if event == _("Настройки"): - window_setts() - window.close() - window = create_window() - - elif event == _("Как рассчитывается стоимость"): - Sgi.popup_ok(calc) - - elif event == _("Обо мне"): - Sgi.popup(about) - - elif event == "Проверить обновления": - try: - upd_check() - except requests.exceptions.ConnectionError: - Sgi.popup_ok(not_connect) - - elif event == _('Рассчитать'): - with open(os.path.expanduser('setts.json')) as f: - params = json.load(f)["settings"] - try: - hours = float(values[1]) - except ValueError: - hours = 0 - try: - minutes = float(values[2]) - except ValueError: - minutes = 0 - - if minutes > 60: - hours = hours + minutes // 60 - minutes = minutes % 60 - t = hours * 60 + minutes - - try: - md = values[3] - except ValueError: - md = 0 - - am = amortization(params['a'], t, params['spi'], now.year) # a, t, spi, year - - cost = cost_prise(params['p'], t, params['h'], md, params['d'], params['st'], params['mk'], am, - values[6], values[4]) # p, t, h, md, d, st, mk, am, post, x - - try: - result = calculating(abs(cost), values[5], params['marge']) # cost, mod, marg - except KeyError: - Sgi.popup_ok(new_marge) - result = 0 - window.find_element('result').Update(result) - window.find_element('cost').Update(cost) - - elif event in (Sgi.WIN_CLOSED, _('Выход')): - break - - -if __name__ == "__main__": - main() +if __name__ == '__main__': + app = QApplication(sys.argv) + window = App() + window.show() + sys.exit(app.exec()) diff --git a/Calc3D.spec b/Calc3D.spec deleted file mode 100644 index 629cf79..0000000 --- a/Calc3D.spec +++ /dev/null @@ -1,38 +0,0 @@ -# -*- mode: python ; coding: utf-8 -*- - - -a = Analysis( - ['Calc3D.py'], - pathex=[], - binaries=[], - datas=[], - hiddenimports=[], - hookspath=[], - hooksconfig={}, - runtime_hooks=[], - excludes=[], - noarchive=False, -) -pyz = PYZ(a.pure) - -exe = EXE( - pyz, - a.scripts, - a.binaries, - a.datas, - [], - name='Calc3D', - debug=False, - bootloader_ignore_signals=False, - strip=False, - upx=True, - upx_exclude=[], - runtime_tmpdir=None, - console=False, - disable_windowed_traceback=False, - argv_emulation=False, - target_arch=None, - codesign_identity=None, - entitlements_file=None, - icon=['test.ico'], -) diff --git a/Calc3d.ui b/Calc3d.ui new file mode 100644 index 0000000..c233c29 --- /dev/null +++ b/Calc3d.ui @@ -0,0 +1,957 @@ + + + Calc3DbyRisen + + + + 0 + 0 + 373 + 471 + + + + + true + + + + false + + + Calc3D by Risen v.1.0.0 + + + + img/logo-1.pngimg/logo-1.png + + + true + + + + + + QMainWindow::AllowTabbedDocks|QMainWindow::AnimatedDocks + + + + + + 20 + 270 + 171 + 17 + + + + + 10 + true + + + + color: rgb(255, 255, 255); + + + Количество экземпляров + + + + + + 20 + 240 + 101 + 17 + + + + + 10 + true + + + + color: rgb(255, 255, 255); + + + Масса детали + + + + + + 20 + 210 + 101 + 17 + + + + + 10 + true + + + + color: rgb(255, 255, 255); + + + Время печати + + + + + + 21 + 171 + 81 + 17 + + + + + 10 + true + + + + color: rgb(255, 255, 255); + + + Принтер + + + + + + 181 + 170 + 171 + 25 + + + + true + + + alternate-background-color: rgb(77, 77, 77); + + + + + + -1 + + + QComboBox::NoInsert + + + Выбо принтера + + + + Ender3/Ender3pro + + + + + FlyBeer + + + + + + + 20 + 10 + 301 + 71 + + + + + 10 + true + + + + false + + + background-color: rgb(36, 36, 36); + + + QFrame::StyledPanel + + + QFrame::Raised + + + 10 + + + QLCDNumber::Flat + + + + + + 180 + 90 + 141 + 41 + + + + background-color: rgb(36, 36, 36); + + + 10 + + + QLCDNumber::Flat + + + + + + 20 + 110 + 141 + 17 + + + + + 12 + true + + + + color: rgb(255, 255, 255); + + + Себестоимость + + + + + + 180 + 210 + 51 + 20 + + + + + 0 + 0 + + + + + 10 + true + PreferAntialias + + + + false + + + 0 + + + + + + false + + + background-color: rgb(77, 77, 77); + + + Qt::ImhDigitsOnly + + + 0 + + + Qt::ScrollBarAlwaysOff + + + Qt::ScrollBarAsNeeded + + + false + + + QPlainTextEdit::NoWrap + + + + + + 80.000000000000000 + + + 3 + + + false + + + 0 + + + + + + 240 + 210 + 21 + 17 + + + + + 10 + true + + + + color: rgb(255, 255, 255); + + + ч. + + + + + + 260 + 210 + 51 + 21 + + + + false + + + background-color: rgb(77, 77, 77); + + + Qt::ImhDigitsOnly + + + 3 + + + true + + + 0 + + + + + + 320 + 210 + 31 + 17 + + + + + 10 + true + + + + color: rgb(255, 255, 255); + + + мин. + + + + + + 230 + 240 + 81 + 20 + + + + + 0 + 0 + + + + + 10 + true + PreferAntialias + + + + false + + + 0 + + + false + + + background-color: rgb(77, 77, 77); + + + Qt::ImhFormattedNumbersOnly + + + 0 + + + Qt::ScrollBarAlwaysOff + + + Qt::ScrollBarAsNeeded + + + + + + true + + + 0 + + + + + + 230 + 270 + 81 + 20 + + + + + 0 + 0 + + + + + 10 + true + PreferAntialias + + + + false + + + 0 + + + false + + + background-color: rgb(77, 77, 77); + + + Qt::ImhDigitsOnly + + + 0 + + + Qt::ScrollBarAlwaysOff + + + Qt::ScrollBarAsNeeded + + + + + + true + + + 0 + + + + + + 230 + 330 + 81 + 20 + + + + + 0 + 0 + + + + + 10 + true + PreferAntialias + + + + false + + + 0 + + + false + + + background-color: rgb(77, 77, 77); + + + Qt::ImhDigitsOnly + + + 0 + + + Qt::ScrollBarAlwaysOff + + + Qt::ScrollBarAsNeeded + + + + + + true + + + 0 + + + + + + 230 + 360 + 81 + 20 + + + + + 0 + 0 + + + + + 10 + true + PreferAntialias + + + + false + + + 0 + + + false + + + background-color: rgb(77, 77, 77); + + + Qt::ImhDigitsOnly + + + 0 + + + Qt::ScrollBarAlwaysOff + + + Qt::ScrollBarAsNeeded + + + + + + true + + + 0 + + + + + + 320 + 240 + 31 + 17 + + + + + 10 + true + + + + color: rgb(255, 255, 255); + + + г. + + + + + + 320 + 270 + 31 + 17 + + + + + 10 + true + + + + color: rgb(255, 255, 255); + + + шт. + + + + + + 320 + 330 + 31 + 17 + + + + + 10 + true + + + + color: rgb(255, 255, 255); + + + руб. + + + + + + 320 + 360 + 31 + 17 + + + + + 10 + true + + + + color: rgb(255, 255, 255); + + + руб. + + + + + + 330 + 50 + 31 + 31 + + + + + + + img/rubl.png + + + true + + + + + + 20 + 130 + 331 + 31 + + + + QFrame::HLine + + + QFrame::Raised + + + 2 + + + + + + 20 + 300 + 331 + 31 + + + + QFrame::HLine + + + QFrame::Raised + + + 2 + + + + + + 20 + 400 + 331 + 41 + + + + + + + + 10 + false + true + PreferAntialias + true + + + + true + + + background-color: rgb(0, 80, 0); + + + Расчитать + + + + img/calc.pngimg/calc.png + + + + 20 + 20 + + + + + + + + + 10 + true + + + + background-color: rgb(0, 80, 0); + + + Выход + + + + img/exit.pngimg/exit.png + + + + 20 + 20 + + + + + + + + + + 20 + 330 + 141 + 17 + + + + + 10 + true + + + + color: rgb(255, 255, 255); + + + Моделирование + + + + + false + + + + 20 + 360 + 121 + 17 + + + + + 10 + true + + + + color: rgb(255, 255, 255); + + + Постобработка + + + + + + + 0 + 0 + 373 + 22 + + + + + Файл + + + + Пресеты принтера + + + + + + + + + + + Qt::DefaultContextMenu + + + false + + + false + + + Помощь + + + false + + + + + + + + + + + false + + + Проверить обновления + + + + + Как расчитывается стоимость + + + + + О програме + + + + + Настройки + + + + + Добавить принтер + + + + + Редактировать принтер + + + + + Удалить принтер + + + + + + diff --git a/Del_preset.ui b/Del_preset.ui new file mode 100644 index 0000000..2aff6fb --- /dev/null +++ b/Del_preset.ui @@ -0,0 +1,68 @@ + + + Dialog + + + + 0 + 0 + 369 + 347 + + + + Удалить пресет + + + + img/logo-1.pngimg/logo-1.png + + + + + 20 + 20 + 321 + 271 + + + + background-color: rgb(36, 36, 36); + + + + + + 12 + 310 + 331 + 27 + + + + + + + background-color: rgb(0, 80, 0); + + + Удалить + + + + + + + background-color: rgb(0, 80, 0); + + + Закрыть + + + + + + + + + diff --git a/Edit_presset.ui b/Edit_presset.ui new file mode 100644 index 0000000..cb71bcb --- /dev/null +++ b/Edit_presset.ui @@ -0,0 +1,55 @@ + + + Dialog + + + + 0 + 0 + 369 + 169 + + + + Изменить пресет + + + + img/logo-1.pngimg/logo-1.png + + + + + 22 + 130 + 321 + 27 + + + + + + + background-color: rgb(0, 80, 0); + + + Сохранить + + + + + + + background-color: rgb(0, 80, 0); + + + Закрыть + + + + + + + + + diff --git a/README.md b/README.md index 458f5c9..91e41ca 100644 --- a/README.md +++ b/README.md @@ -18,27 +18,16 @@ S = ((p/1000*t/60*h)+(md*d*st/mk)+(a+post))*x+mod где ``` S - стоимость печати, руб. - p - мощность принтера, Вт - t - время печати, мин. - h - тариф на электроэнергию, кВт/ч - md - вес детали, гр. - d - множитель отбраковки. - st - стоимость катушки пластика, руб. - mk - вес пластика в катушке, гр. - a - амортизация принтера, руб. - post - стоимость постобработки, руб. - х - количество печатаемых дубликатов, шт. - mod - стоимость моделирования, руб ``` diff --git a/Settings.ui b/Settings.ui new file mode 100644 index 0000000..8547af1 --- /dev/null +++ b/Settings.ui @@ -0,0 +1,39 @@ + + + Dialog + + + + 0 + 0 + 369 + 375 + + + + Настройки + + + + img/logo-1.pngimg/logo-1.png + + + + + 100 + 340 + 161 + 25 + + + + background-color: rgb(0, 80, 0); + + + Закрыть + + + + + + diff --git a/Updates.ui b/Updates.ui new file mode 100644 index 0000000..cae78e5 --- /dev/null +++ b/Updates.ui @@ -0,0 +1,129 @@ + + + Dialog + + + + 0 + 0 + 368 + 99 + + + + Updates + + + + img/logo-1.pngimg/logo-1.png + + + + + 73 + 0 + 191 + 31 + + + + + 10 + + + + Ваша версия: + + + + + + 70 + 20 + 191 + 31 + + + + + 10 + + + + Версия на сайте: + + + + + + 250 + 10 + 54 + 17 + + + + + 10 + true + + + + 1.0.0 + + + + + + 250 + 30 + 54 + 17 + + + + + 10 + true + + + + 1.0.0 + + + + + + 20 + 60 + 331 + 27 + + + + + + + background-color: rgb(0, 80, 0); + + + Перейти на сайт + + + + + + + background-color: rgb(0, 80, 0); + + + Закрыть + + + + + + + + + diff --git a/__pycache__/calc3dui.cpython-311.pyc b/__pycache__/calc3dui.cpython-311.pyc new file mode 100644 index 0000000..d23a933 Binary files /dev/null and b/__pycache__/calc3dui.cpython-311.pyc differ diff --git a/__pycache__/calculating.cpython-311.pyc b/__pycache__/calculating.cpython-311.pyc new file mode 100644 index 0000000..76730a6 Binary files /dev/null and b/__pycache__/calculating.cpython-311.pyc differ diff --git a/about.ui b/about.ui new file mode 100644 index 0000000..f91c186 --- /dev/null +++ b/about.ui @@ -0,0 +1,54 @@ + + + About + + + + 0 + 0 + 365 + 97 + + + + О прграмме + + + + img/logo-1.pngimg/logo-1.png + + + + + 20 + 10 + 331 + 231 + + + + + 10 + + + + Калькулятор Calc3D by Risen предназначен для быстрой оценки стоимости печати на 3D принтере, +исходя из стоимости пластика, веса, тарифа электроэнергии и прочего... + + + Qt::AutoText + + + false + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + true + + + + + + diff --git a/calc3dui.py b/calc3dui.py new file mode 100644 index 0000000..4f5f21c --- /dev/null +++ b/calc3dui.py @@ -0,0 +1,371 @@ +from PySide6.QtCore import (QCoreApplication, QDate, QDateTime, QLocale, + QMetaObject, QObject, QPoint, QRect, + QSize, QTime, QUrl, Qt) +from PySide6.QtGui import (QAction, QBrush, QColor, QConicalGradient, + QCursor, QFont, QFontDatabase, QGradient, + QIcon, QImage, QKeySequence, QLinearGradient, + QPainter, QPalette, QPixmap, QRadialGradient, + QTransform) +from PySide6.QtWidgets import (QApplication, QComboBox, QFrame, QHBoxLayout, + QLCDNumber, QLabel, QMainWindow, QMenu, + QMenuBar, QPlainTextEdit, QPushButton, QSizePolicy, + QWidget) + +class Ui_Calc3DbyRisen(object): + def setupUi(self, Calc3DbyRisen): + if not Calc3DbyRisen.objectName(): + Calc3DbyRisen.setObjectName(u"Calc3DbyRisen") + Calc3DbyRisen.resize(373, 471) + font = QFont() + font.setBold(True) + Calc3DbyRisen.setFont(font) + Calc3DbyRisen.setAcceptDrops(False) + icon = QIcon() + icon.addFile(u"img/logo-1.png", QSize(), QIcon.Mode.Normal, QIcon.State.Off) + Calc3DbyRisen.setWindowIcon(icon) + Calc3DbyRisen.setAutoFillBackground(True) + Calc3DbyRisen.setStyleSheet(u"") + Calc3DbyRisen.setDockOptions(QMainWindow.AllowTabbedDocks|QMainWindow.AnimatedDocks) + self.check_update = QAction(Calc3DbyRisen) + self.check_update.setObjectName(u"check_update") + self.check_update.setCheckable(False) + self.formula = QAction(Calc3DbyRisen) + self.formula.setObjectName(u"formula") + self.about = QAction(Calc3DbyRisen) + self.about.setObjectName(u"about") + self.settings_2 = QAction(Calc3DbyRisen) + self.settings_2.setObjectName(u"settings_2") + self.add_printer = QAction(Calc3DbyRisen) + self.add_printer.setObjectName(u"add_printer") + self.edit_printer = QAction(Calc3DbyRisen) + self.edit_printer.setObjectName(u"edit_printer") + self.del_printer = QAction(Calc3DbyRisen) + self.del_printer.setObjectName(u"del_printer") + self.centralwidget = QWidget(Calc3DbyRisen) + self.centralwidget.setObjectName(u"centralwidget") + self.quantity = QLabel(self.centralwidget) + self.quantity.setObjectName(u"quantity") + self.quantity.setGeometry(QRect(20, 270, 171, 17)) + font1 = QFont() + font1.setPointSize(10) + font1.setBold(True) + self.quantity.setFont(font1) + self.quantity.setStyleSheet(u"color: rgb(255, 255, 255);") + self.weight = QLabel(self.centralwidget) + self.weight.setObjectName(u"weight") + self.weight.setGeometry(QRect(20, 240, 101, 17)) + self.weight.setFont(font1) + self.weight.setStyleSheet(u"color: rgb(255, 255, 255);") + self.time_print = QLabel(self.centralwidget) + self.time_print.setObjectName(u"time_print") + self.time_print.setGeometry(QRect(20, 210, 101, 17)) + self.time_print.setFont(font1) + self.time_print.setStyleSheet(u"color: rgb(255, 255, 255);") + self.printer = QLabel(self.centralwidget) + self.printer.setObjectName(u"printer") + self.printer.setGeometry(QRect(21, 171, 81, 17)) + self.printer.setFont(font1) + self.printer.setStyleSheet(u"color: rgb(255, 255, 255);") + self.printer_menu = QComboBox(self.centralwidget) + self.printer_menu.addItem("") + self.printer_menu.addItem("") + self.printer_menu.setObjectName(u"printer_menu") + self.printer_menu.setGeometry(QRect(181, 170, 171, 25)) + self.printer_menu.setAcceptDrops(True) + self.printer_menu.setStyleSheet(u"alternate-background-color: rgb(77, 77, 77);") + self.printer_menu.setInsertPolicy(QComboBox.NoInsert) + self.lcd_result = QLCDNumber(self.centralwidget) + self.lcd_result.setObjectName(u"lcd_result") + self.lcd_result.setGeometry(QRect(20, 10, 301, 71)) + self.lcd_result.setFont(font1) + self.lcd_result.setAutoFillBackground(False) + self.lcd_result.setStyleSheet(u"background-color: rgb(36, 36, 36);") + self.lcd_result.setFrameShape(QFrame.StyledPanel) + self.lcd_result.setFrameShadow(QFrame.Raised) + self.lcd_result.setDigitCount(10) + self.lcd_result.setSegmentStyle(QLCDNumber.Flat) + self.lcd_result_2 = QLCDNumber(self.centralwidget) + self.lcd_result_2.setObjectName(u"lcd_result_2") + self.lcd_result_2.setGeometry(QRect(180, 90, 141, 41)) + self.lcd_result_2.setStyleSheet(u"background-color: rgb(36, 36, 36);") + self.lcd_result_2.setDigitCount(10) + self.lcd_result_2.setSegmentStyle(QLCDNumber.Flat) + self.cost_price = QLabel(self.centralwidget) + self.cost_price.setObjectName(u"cost_price") + self.cost_price.setGeometry(QRect(20, 110, 141, 17)) + font2 = QFont() + font2.setPointSize(12) + font2.setBold(True) + self.cost_price.setFont(font2) + self.cost_price.setStyleSheet(u"color: rgb(255, 255, 255);") + self.input_hours = QPlainTextEdit(self.centralwidget) + self.input_hours.setObjectName(u"input_hours") + self.input_hours.setGeometry(QRect(180, 210, 51, 20)) + sizePolicy = QSizePolicy(QSizePolicy.Policy.Fixed, QSizePolicy.Policy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.input_hours.sizePolicy().hasHeightForWidth()) + self.input_hours.setSizePolicy(sizePolicy) + font3 = QFont() + font3.setPointSize(10) + font3.setBold(True) + font3.setStyleStrategy(QFont.PreferAntialias) + self.input_hours.setFont(font3) + self.input_hours.setAcceptDrops(False) + self.input_hours.setToolTipDuration(0) + self.input_hours.setAutoFillBackground(False) + self.input_hours.setStyleSheet(u"background-color: rgb(77, 77, 77);") + self.input_hours.setInputMethodHints(Qt.ImhDigitsOnly) + self.input_hours.setLineWidth(0) + self.input_hours.setVerticalScrollBarPolicy(Qt.ScrollBarAlwaysOff) + self.input_hours.setHorizontalScrollBarPolicy(Qt.ScrollBarAsNeeded) + self.input_hours.setUndoRedoEnabled(False) + self.input_hours.setLineWrapMode(QPlainTextEdit.NoWrap) + self.input_hours.setPlainText(u"") + self.input_hours.setTabStopDistance(80.000000000000000) + self.input_hours.setMaximumBlockCount(3) + self.input_hours.setCenterOnScroll(False) + self.input_hours.setPlaceholderText(u"0") + self.text_time_hours = QLabel(self.centralwidget) + self.text_time_hours.setObjectName(u"text_time_hours") + self.text_time_hours.setGeometry(QRect(240, 210, 21, 17)) + self.text_time_hours.setFont(font1) + self.text_time_hours.setStyleSheet(u"color: rgb(255, 255, 255);") + self.input_minutes = QPlainTextEdit(self.centralwidget) + self.input_minutes.setObjectName(u"input_minutes") + self.input_minutes.setGeometry(QRect(260, 210, 51, 21)) + self.input_minutes.setAcceptDrops(False) + self.input_minutes.setStyleSheet(u"background-color: rgb(77, 77, 77);") + self.input_minutes.setInputMethodHints(Qt.ImhDigitsOnly) + self.input_minutes.setMaximumBlockCount(3) + self.input_minutes.setCenterOnScroll(True) + self.text_time_minuts = QLabel(self.centralwidget) + self.text_time_minuts.setObjectName(u"text_time_minuts") + self.text_time_minuts.setGeometry(QRect(320, 210, 31, 17)) + self.text_time_minuts.setFont(font1) + self.text_time_minuts.setStyleSheet(u"color: rgb(255, 255, 255);") + self.input_gram = QPlainTextEdit(self.centralwidget) + self.input_gram.setObjectName(u"input_gram") + self.input_gram.setGeometry(QRect(230, 240, 81, 20)) + sizePolicy.setHeightForWidth(self.input_gram.sizePolicy().hasHeightForWidth()) + self.input_gram.setSizePolicy(sizePolicy) + self.input_gram.setFont(font3) + self.input_gram.setAcceptDrops(False) + self.input_gram.setToolTipDuration(0) + self.input_gram.setAutoFillBackground(False) + self.input_gram.setStyleSheet(u"background-color: rgb(77, 77, 77);") + self.input_gram.setInputMethodHints(Qt.ImhFormattedNumbersOnly) + self.input_gram.setLineWidth(0) + self.input_gram.setVerticalScrollBarPolicy(Qt.ScrollBarAlwaysOff) + self.input_gram.setHorizontalScrollBarPolicy(Qt.ScrollBarAsNeeded) + self.input_gram.setPlainText(u"") + self.input_gram.setCenterOnScroll(True) + self.input_things = QPlainTextEdit(self.centralwidget) + self.input_things.setObjectName(u"input_things") + self.input_things.setGeometry(QRect(230, 270, 81, 20)) + sizePolicy.setHeightForWidth(self.input_things.sizePolicy().hasHeightForWidth()) + self.input_things.setSizePolicy(sizePolicy) + self.input_things.setFont(font3) + self.input_things.setAcceptDrops(False) + self.input_things.setToolTipDuration(0) + self.input_things.setAutoFillBackground(False) + self.input_things.setStyleSheet(u"background-color: rgb(77, 77, 77);") + self.input_things.setInputMethodHints(Qt.ImhDigitsOnly) + self.input_things.setLineWidth(0) + self.input_things.setVerticalScrollBarPolicy(Qt.ScrollBarAlwaysOff) + self.input_things.setHorizontalScrollBarPolicy(Qt.ScrollBarAsNeeded) + self.input_things.setPlainText(u"") + self.input_things.setCenterOnScroll(True) + self.input_mod = QPlainTextEdit(self.centralwidget) + self.input_mod.setObjectName(u"input_mod") + self.input_mod.setGeometry(QRect(230, 330, 81, 20)) + sizePolicy.setHeightForWidth(self.input_mod.sizePolicy().hasHeightForWidth()) + self.input_mod.setSizePolicy(sizePolicy) + self.input_mod.setFont(font3) + self.input_mod.setAcceptDrops(False) + self.input_mod.setToolTipDuration(0) + self.input_mod.setAutoFillBackground(False) + self.input_mod.setStyleSheet(u"background-color: rgb(77, 77, 77);") + self.input_mod.setInputMethodHints(Qt.ImhDigitsOnly) + self.input_mod.setLineWidth(0) + self.input_mod.setVerticalScrollBarPolicy(Qt.ScrollBarAlwaysOff) + self.input_mod.setHorizontalScrollBarPolicy(Qt.ScrollBarAsNeeded) + self.input_mod.setPlainText(u"") + self.input_mod.setCenterOnScroll(True) + self.input_post = QPlainTextEdit(self.centralwidget) + self.input_post.setObjectName(u"input_post") + self.input_post.setGeometry(QRect(230, 360, 81, 20)) + sizePolicy.setHeightForWidth(self.input_post.sizePolicy().hasHeightForWidth()) + self.input_post.setSizePolicy(sizePolicy) + self.input_post.setFont(font3) + self.input_post.setAcceptDrops(False) + self.input_post.setToolTipDuration(0) + self.input_post.setAutoFillBackground(False) + self.input_post.setStyleSheet(u"background-color: rgb(77, 77, 77);") + self.input_post.setInputMethodHints(Qt.ImhDigitsOnly) + self.input_post.setLineWidth(0) + self.input_post.setVerticalScrollBarPolicy(Qt.ScrollBarAlwaysOff) + self.input_post.setHorizontalScrollBarPolicy(Qt.ScrollBarAsNeeded) + self.input_post.setPlainText(u"") + self.input_post.setCenterOnScroll(True) + self.text_gram = QLabel(self.centralwidget) + self.text_gram.setObjectName(u"text_gram") + self.text_gram.setGeometry(QRect(320, 240, 31, 17)) + self.text_gram.setFont(font1) + self.text_gram.setStyleSheet(u"color: rgb(255, 255, 255);") + self.text_things = QLabel(self.centralwidget) + self.text_things.setObjectName(u"text_things") + self.text_things.setGeometry(QRect(320, 270, 31, 17)) + self.text_things.setFont(font1) + self.text_things.setStyleSheet(u"color: rgb(255, 255, 255);") + self.text_rub_mod = QLabel(self.centralwidget) + self.text_rub_mod.setObjectName(u"text_rub_mod") + self.text_rub_mod.setGeometry(QRect(320, 330, 31, 17)) + self.text_rub_mod.setFont(font1) + self.text_rub_mod.setStyleSheet(u"color: rgb(255, 255, 255);") + self.text_rub_post = QLabel(self.centralwidget) + self.text_rub_post.setObjectName(u"text_rub_post") + self.text_rub_post.setGeometry(QRect(320, 360, 31, 17)) + self.text_rub_post.setFont(font1) + self.text_rub_post.setStyleSheet(u"color: rgb(255, 255, 255);") + self.ico_rub = QLabel(self.centralwidget) + self.ico_rub.setObjectName(u"ico_rub") + self.ico_rub.setGeometry(QRect(330, 50, 31, 31)) + self.ico_rub.setPixmap(QPixmap(u"img/rubl.png")) + self.ico_rub.setScaledContents(True) + self.frame = QFrame(self.centralwidget) + self.frame.setObjectName(u"frame") + self.frame.setGeometry(QRect(20, 130, 331, 31)) + self.frame.setFrameShape(QFrame.HLine) + self.frame.setFrameShadow(QFrame.Raised) + self.frame.setLineWidth(2) + self.frame_2 = QFrame(self.centralwidget) + self.frame_2.setObjectName(u"frame_2") + self.frame_2.setGeometry(QRect(20, 300, 331, 31)) + self.frame_2.setFrameShape(QFrame.HLine) + self.frame_2.setFrameShadow(QFrame.Raised) + self.frame_2.setLineWidth(2) + self.layoutWidget = QWidget(self.centralwidget) + self.layoutWidget.setObjectName(u"layoutWidget") + self.layoutWidget.setGeometry(QRect(20, 400, 331, 41)) + self.buttons = QHBoxLayout(self.layoutWidget) + self.buttons.setObjectName(u"buttons") + self.buttons.setContentsMargins(0, 0, 0, 0) + self.get_result_btn = QPushButton(self.layoutWidget) + self.get_result_btn.setObjectName(u"get_result_btn") + font4 = QFont() + font4.setPointSize(10) + font4.setBold(True) + font4.setItalic(False) + font4.setKerning(True) + font4.setStyleStrategy(QFont.PreferAntialias) + self.get_result_btn.setFont(font4) + self.get_result_btn.setAcceptDrops(True) + self.get_result_btn.setStyleSheet(u"background-color: rgb(0, 80, 0);") + icon1 = QIcon() + icon1.addFile(u"img/calc.png", QSize(), QIcon.Mode.Normal, QIcon.State.Off) + self.get_result_btn.setIcon(icon1) + self.get_result_btn.setIconSize(QSize(20, 20)) + + self.buttons.addWidget(self.get_result_btn) + + self.exit_btn = QPushButton(self.layoutWidget) + self.exit_btn.setObjectName(u"exit_btn") + self.exit_btn.setFont(font1) + self.exit_btn.setStyleSheet(u"background-color: rgb(0, 80, 0);") + icon2 = QIcon() + icon2.addFile(u"img/exit.png", QSize(), QIcon.Mode.Normal, QIcon.State.Off) + self.exit_btn.setIcon(icon2) + self.exit_btn.setIconSize(QSize(20, 20)) + + self.buttons.addWidget(self.exit_btn) + + self.modeling = QLabel(self.centralwidget) + self.modeling.setObjectName(u"modeling") + self.modeling.setGeometry(QRect(20, 330, 141, 17)) + self.modeling.setFont(font1) + self.modeling.setStyleSheet(u"color: rgb(255, 255, 255);") + self.post_print = QLabel(self.centralwidget) + self.post_print.setObjectName(u"post_print") + self.post_print.setEnabled(False) + self.post_print.setGeometry(QRect(20, 360, 121, 17)) + self.post_print.setFont(font1) + self.post_print.setStyleSheet(u"color: rgb(255, 255, 255);") + Calc3DbyRisen.setCentralWidget(self.centralwidget) + self.menubar = QMenuBar(Calc3DbyRisen) + self.menubar.setObjectName(u"menubar") + self.menubar.setGeometry(QRect(0, 0, 373, 22)) + self.settings = QMenu(self.menubar) + self.settings.setObjectName(u"settings") + self.pressets = QMenu(self.settings) + self.pressets.setObjectName(u"pressets") + self.help = QMenu(self.menubar) + self.help.setObjectName(u"help") + self.help.setContextMenuPolicy(Qt.DefaultContextMenu) + self.help.setAutoFillBackground(False) + self.help.setTearOffEnabled(False) + self.help.setSeparatorsCollapsible(False) + Calc3DbyRisen.setMenuBar(self.menubar) + + self.menubar.addAction(self.settings.menuAction()) + self.menubar.addAction(self.help.menuAction()) + self.settings.addAction(self.settings_2) + self.settings.addAction(self.pressets.menuAction()) + self.pressets.addAction(self.add_printer) + self.pressets.addAction(self.edit_printer) + self.pressets.addAction(self.del_printer) + self.help.addAction(self.check_update) + self.help.addAction(self.formula) + self.help.addAction(self.about) + + self.retranslateUi(Calc3DbyRisen) + + self.printer_menu.setCurrentIndex(-1) + + + QMetaObject.connectSlotsByName(Calc3DbyRisen) + # setupUi + + def retranslateUi(self, Calc3DbyRisen): + Calc3DbyRisen.setWindowTitle(QCoreApplication.translate("Calc3DbyRisen", u"Calc3D by Risen v.1.0.0", None)) + self.check_update.setText(QCoreApplication.translate("Calc3DbyRisen", u"\u041f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f", None)) + self.formula.setText(QCoreApplication.translate("Calc3DbyRisen", u"\u041a\u0430\u043a \u0440\u0430\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c", None)) + self.about.setText(QCoreApplication.translate("Calc3DbyRisen", u"\u041e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u0435", None)) + self.settings_2.setText(QCoreApplication.translate("Calc3DbyRisen", u"\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438", None)) + self.add_printer.setText(QCoreApplication.translate("Calc3DbyRisen", u"\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u0440\u0438\u043d\u0442\u0435\u0440", None)) + self.edit_printer.setText(QCoreApplication.translate("Calc3DbyRisen", u"\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0438\u043d\u0442\u0435\u0440", None)) + self.del_printer.setText(QCoreApplication.translate("Calc3DbyRisen", u"\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u043f\u0440\u0438\u043d\u0442\u0435\u0440", None)) + self.quantity.setText(QCoreApplication.translate("Calc3DbyRisen", u"\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u043e\u0432", None)) + self.weight.setText(QCoreApplication.translate("Calc3DbyRisen", u"\u041c\u0430\u0441\u0441\u0430 \u0434\u0435\u0442\u0430\u043b\u0438", None)) + self.time_print.setText(QCoreApplication.translate("Calc3DbyRisen", u"\u0412\u0440\u0435\u043c\u044f \u043f\u0435\u0447\u0430\u0442\u0438", None)) + self.printer.setText(QCoreApplication.translate("Calc3DbyRisen", u"\u041f\u0440\u0438\u043d\u0442\u0435\u0440", None)) + self.printer_menu.setItemText(0, QCoreApplication.translate("Calc3DbyRisen", u"Ender3/Ender3pro", None)) + self.printer_menu.setItemText(1, QCoreApplication.translate("Calc3DbyRisen", u"FlyBeer", None)) + + self.printer_menu.setCurrentText("") + self.printer_menu.setPlaceholderText(QCoreApplication.translate("Calc3DbyRisen", u"\u0412\u044b\u0431\u043e \u043f\u0440\u0438\u043d\u0442\u0435\u0440\u0430", None)) + self.cost_price.setText(QCoreApplication.translate("Calc3DbyRisen", u"\u0421\u0435\u0431\u0435\u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c", None)) +#if QT_CONFIG(whatsthis) + self.input_hours.setWhatsThis("") +#endif // QT_CONFIG(whatsthis) + self.text_time_hours.setText(QCoreApplication.translate("Calc3DbyRisen", u"\u0447.", None)) + self.input_minutes.setPlaceholderText(QCoreApplication.translate("Calc3DbyRisen", u"0", None)) + self.text_time_minuts.setText(QCoreApplication.translate("Calc3DbyRisen", u"\u043c\u0438\u043d.", None)) + self.input_gram.setPlaceholderText(QCoreApplication.translate("Calc3DbyRisen", u"0", None)) + self.input_things.setPlaceholderText(QCoreApplication.translate("Calc3DbyRisen", u"0", None)) + self.input_mod.setPlaceholderText(QCoreApplication.translate("Calc3DbyRisen", u"0", None)) + self.input_post.setPlaceholderText(QCoreApplication.translate("Calc3DbyRisen", u"0", None)) + self.text_gram.setText(QCoreApplication.translate("Calc3DbyRisen", u"\u0433.", None)) + self.text_things.setText(QCoreApplication.translate("Calc3DbyRisen", u"\u0448\u0442.", None)) + self.text_rub_mod.setText(QCoreApplication.translate("Calc3DbyRisen", u"\u0440\u0443\u0431.", None)) + self.text_rub_post.setText(QCoreApplication.translate("Calc3DbyRisen", u"\u0440\u0443\u0431.", None)) + self.ico_rub.setText("") + self.get_result_btn.setText(QCoreApplication.translate("Calc3DbyRisen", u"\u0420\u0430\u0441\u0447\u0438\u0442\u0430\u0442\u044c", None)) + self.exit_btn.setText(QCoreApplication.translate("Calc3DbyRisen", u"\u0412\u044b\u0445\u043e\u0434", None)) + self.modeling.setText(QCoreApplication.translate("Calc3DbyRisen", u"\u041c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435", None)) + self.post_print.setText(QCoreApplication.translate("Calc3DbyRisen", u"\u041f\u043e\u0441\u0442\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430", None)) + self.settings.setTitle(QCoreApplication.translate("Calc3DbyRisen", u"\u0424\u0430\u0439\u043b", None)) + self.pressets.setTitle(QCoreApplication.translate("Calc3DbyRisen", u"\u041f\u0440\u0435\u0441\u0435\u0442\u044b \u043f\u0440\u0438\u043d\u0442\u0435\u0440\u0430", None)) + self.help.setTitle(QCoreApplication.translate("Calc3DbyRisen", u"\u041f\u043e\u043c\u043e\u0449\u044c", None)) + # retranslateUi + diff --git a/db.py b/db.py new file mode 100644 index 0000000..ec7608e --- /dev/null +++ b/db.py @@ -0,0 +1,78 @@ +import sqlite3 + + +def sqlite_connect(): + conn = sqlite3.connect("db/database.db", check_same_thread=False) + conn.execute("pragma journal_mode=wal;") + return conn + + +def init_sqlite(): + conn = sqlite_connect() + cursor = conn.cursor() + try: + # Начинаем транзакцию + cursor.execute('BEGIN') + # Выполняем операции + cursor.execute('''CREATE TABLE IF NOT EXISTS users ( + id INTEGER PRIMARY KEY AUTOINCREMENT, + tg_id INTEGER NOT NULL UNIQUE , + school_nik TEXT NOT NULL UNIQUE, + username TEXT UNIQUE, + number_quest INTEGER, + city TEXT)''') + + cursor.execute('''CREATE INDEX IF NOT EXISTS usrid ON users (number_quest)''') + + cursor.execute('''CREATE TABLE IF NOT EXISTS flags ( + id INTEGER PRIMARY KEY AUTOINCREMENT, + flags TEXT NOT NULL UNIQUE)''') + + cursor.execute('''CREATE TABLE IF NOT EXISTS token ( + id INTEGER PRIMARY KEY AUTOINCREMENT, + token TEXT NOT NULL UNIQUE)''') + cursor.execute('COMMIT') + except Exception as e: + print(e) + cursor.execute('ROLLBACK') + conn.close() + +def registration(user_id, school_nik, uname, number_quest, city, class_name, end_14): + conn = sqlite_connect() + cursor = conn.cursor() + try: + cursor.execute('BEGIN') + cursor.execute('INSERT INTO users (tg_id, school_nik, username, number_quest, city, class_name, end_14)' + ' VALUES (?, ?, ?, ?, ?, ?, ?)', + (user_id, school_nik, uname, number_quest, city, class_name, end_14)) + cursor.execute('COMMIT') + except Exception as e: + print(e) + cursor.execute('ROLLBACK') + conn.close() + + +def quest_1(tg_id, date_begin): + conn = sqlite_connect() + cursor = conn.cursor() + try: + cursor.execute('BEGIN') + cursor.execute(f'UPDATE users SET date_begin=(?) WHERE tg_id=(?)', (date_begin, tg_id,)) + cursor.execute('COMMIT') + except Exception as e: + print(e) + cursor.execute('ROLLBACK') + conn.close() + +def get_time(username): + conn = sqlite_connect() + cursor = conn.cursor() + try: + cursor.execute('BEGIN') + time = cursor.execute('SELECT date_begin, end_13 FROM users WHERE school_nik = (?)', (username,)).fetchone() + return time + except Exception as e: + print(e) + cursor.execute('ROLLBACK') + conn.close() + diff --git a/del-preset.py b/del-preset.py new file mode 100644 index 0000000..726acc1 --- /dev/null +++ b/del-preset.py @@ -0,0 +1,63 @@ +# -*- coding: utf-8 -*- + +################################################################################ +## Form generated from reading UI file 'Del_preset.ui' +## +## Created by: Qt User Interface Compiler version 6.8.1 +## +## 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, QHeaderView, + QPushButton, QSizePolicy, QTableWidget, QTableWidgetItem, + QWidget) + +class Ui_Dialog(object): + def setupUi(self, Dialog): + if not Dialog.objectName(): + Dialog.setObjectName(u"Dialog") + Dialog.resize(369, 347) + icon = QIcon() + icon.addFile(u"img/logo-1.png", QSize(), QIcon.Mode.Normal, QIcon.State.Off) + Dialog.setWindowIcon(icon) + self.tableWidget = QTableWidget(Dialog) + self.tableWidget.setObjectName(u"tableWidget") + self.tableWidget.setGeometry(QRect(20, 20, 321, 271)) + self.tableWidget.setStyleSheet(u"background-color: rgb(36, 36, 36);") + self.widget = QWidget(Dialog) + self.widget.setObjectName(u"widget") + self.widget.setGeometry(QRect(12, 310, 331, 27)) + self.horizontalLayout = QHBoxLayout(self.widget) + self.horizontalLayout.setObjectName(u"horizontalLayout") + self.horizontalLayout.setContentsMargins(0, 0, 0, 0) + self.pushButton = QPushButton(self.widget) + self.pushButton.setObjectName(u"pushButton") + self.pushButton.setStyleSheet(u"background-color: rgb(0, 80, 0);") + + self.horizontalLayout.addWidget(self.pushButton) + + self.pushButton_2 = QPushButton(self.widget) + self.pushButton_2.setObjectName(u"pushButton_2") + self.pushButton_2.setStyleSheet(u"background-color: rgb(0, 80, 0);") + + self.horizontalLayout.addWidget(self.pushButton_2) + + + self.retranslateUi(Dialog) + + QMetaObject.connectSlotsByName(Dialog) + # setupUi + + def retranslateUi(self, Dialog): + Dialog.setWindowTitle(QCoreApplication.translate("Dialog", u"\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u043f\u0440\u0435\u0441\u0435\u0442", None)) + self.pushButton.setText(QCoreApplication.translate("Dialog", u"\u0423\u0434\u0430\u043b\u0438\u0442\u044c", None)) + self.pushButton_2.setText(QCoreApplication.translate("Dialog", u"\u0417\u0430\u043a\u0440\u044b\u0442\u044c", None)) + # retranslateUi + diff --git a/edit-preset.py b/edit-preset.py new file mode 100644 index 0000000..6c3c907 --- /dev/null +++ b/edit-preset.py @@ -0,0 +1,58 @@ +# -*- coding: utf-8 -*- + +################################################################################ +## Form generated from reading UI file 'Edit_presset.ui' +## +## Created by: Qt User Interface Compiler version 6.8.1 +## +## 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, QPushButton, + QSizePolicy, QWidget) + +class Ui_Dialog(object): + def setupUi(self, Dialog): + if not Dialog.objectName(): + Dialog.setObjectName(u"Dialog") + Dialog.resize(369, 169) + icon = QIcon() + icon.addFile(u"img/logo-1.png", QSize(), QIcon.Mode.Normal, QIcon.State.Off) + Dialog.setWindowIcon(icon) + self.widget = QWidget(Dialog) + self.widget.setObjectName(u"widget") + self.widget.setGeometry(QRect(22, 130, 321, 27)) + self.horizontalLayout = QHBoxLayout(self.widget) + self.horizontalLayout.setObjectName(u"horizontalLayout") + self.horizontalLayout.setContentsMargins(0, 0, 0, 0) + self.pushButton = QPushButton(self.widget) + self.pushButton.setObjectName(u"pushButton") + self.pushButton.setStyleSheet(u"background-color: rgb(0, 80, 0);") + + self.horizontalLayout.addWidget(self.pushButton) + + self.pushButton_2 = QPushButton(self.widget) + self.pushButton_2.setObjectName(u"pushButton_2") + self.pushButton_2.setStyleSheet(u"background-color: rgb(0, 80, 0);") + + self.horizontalLayout.addWidget(self.pushButton_2) + + + self.retranslateUi(Dialog) + + QMetaObject.connectSlotsByName(Dialog) + # setupUi + + def retranslateUi(self, Dialog): + Dialog.setWindowTitle(QCoreApplication.translate("Dialog", u"\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u043f\u0440\u0435\u0441\u0435\u0442", None)) + self.pushButton.setText(QCoreApplication.translate("Dialog", u"\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c", None)) + self.pushButton_2.setText(QCoreApplication.translate("Dialog", u"\u0417\u0430\u043a\u0440\u044b\u0442\u044c", None)) + # retranslateUi + diff --git a/formula.py b/formula.py new file mode 100644 index 0000000..7ef5716 --- /dev/null +++ b/formula.py @@ -0,0 +1,93 @@ +# -*- coding: utf-8 -*- + +################################################################################ +## Form generated from reading UI file 'formula.ui' +## +## Created by: Qt User Interface Compiler version 6.8.1 +## +## 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, QLabel, QPushButton, + QSizePolicy, QWidget) + +class Ui_Dialog(object): + def setupUi(self, Dialog): + if not Dialog.objectName(): + Dialog.setObjectName(u"Dialog") + Dialog.resize(367, 377) + icon = QIcon() + icon.addFile(u"img/logo-1.png", QSize(), QIcon.Mode.Normal, QIcon.State.Off) + Dialog.setWindowIcon(icon) + self.label = QLabel(Dialog) + self.label.setObjectName(u"label") + self.label.setGeometry(QRect(100, 10, 171, 41)) + font = QFont() + font.setPointSize(9) + self.label.setFont(font) + self.label.setTextFormat(Qt.MarkdownText) + self.label.setAlignment(Qt.AlignLeading|Qt.AlignLeft|Qt.AlignTop) + self.label_2 = QLabel(Dialog) + self.label_2.setObjectName(u"label_2") + self.label_2.setGeometry(QRect(30, 50, 341, 21)) + font1 = QFont() + font1.setFamilies([u"Sans Serif"]) + font1.setPointSize(10) + font1.setBold(True) + font1.setKerning(False) + self.label_2.setFont(font1) + self.label_2.setAutoFillBackground(False) + self.label_2.setTextFormat(Qt.MarkdownText) + self.label_2.setScaledContents(True) + self.label_2.setAlignment(Qt.AlignLeading|Qt.AlignLeft|Qt.AlignTop) + self.label_2.setWordWrap(False) + self.label_3 = QLabel(Dialog) + self.label_3.setObjectName(u"label_3") + self.label_3.setGeometry(QRect(10, 80, 341, 281)) + font2 = QFont() + font2.setPointSize(10) + self.label_3.setFont(font2) + self.label_3.setTextFormat(Qt.MarkdownText) + self.label_3.setScaledContents(False) + self.label_3.setAlignment(Qt.AlignLeading|Qt.AlignLeft|Qt.AlignTop) + self.label_3.setWordWrap(True) + self.pushButton = QPushButton(Dialog) + self.pushButton.setObjectName(u"pushButton") + self.pushButton.setGeometry(QRect(100, 340, 161, 25)) + self.pushButton.setStyleSheet(u"background-color: rgb(0, 80, 0);") + + self.retranslateUi(Dialog) + + QMetaObject.connectSlotsByName(Dialog) + # setupUi + + def retranslateUi(self, Dialog): + Dialog.setWindowTitle(QCoreApplication.translate("Dialog", u"\u0424\u043e\u0440\u043c\u0443\u043b\u0430 \u0440\u0430\u0441\u0447\u0435\u0442\u0430", None)) + self.label.setText(QCoreApplication.translate("Dialog", u"## \u0424\u043e\u0440\u043c\u0443\u043b\u0430 \u0440\u0430\u0441\u0447\u0435\u0442\u0430", None)) + self.label_2.setText(QCoreApplication.translate("Dialog", u"S = ((p/1000*t/60*h)+(md*d*st/mk)+(a+post))*x+mod", None)) + self.label_3.setText(QCoreApplication.translate("Dialog", u"\u0433\u0434\u0435\n" +"```\n" +"S - \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u043f\u0435\u0447\u0430\u0442\u0438, \u0440\u0443\u0431.\n" +"p - \u043c\u043e\u0449\u043d\u043e\u0441\u0442\u044c \u043f\u0440\u0438\u043d\u0442\u0435\u0440\u0430, \u0412\u0442\n" +"t - \u0432\u0440\u0435\u043c\u044f \u043f\u0435\u0447\u0430\u0442\u0438, \u043c\u0438\u043d.\n" +"h - \u0442\u0430\u0440\u0438\u0444 \u043d\u0430 \u044d\u043b\u0435\u043a\u0442\u0440\u043e\u044d\u043d\u0435\u0440\u0433\u0438\u044e, \u043a\u0412\u0442/\u0447\n" +"md - \u0432\u0435\u0441 \u0434\u0435\u0442\u0430\u043b\u0438, \u0433\u0440.\n" +"d - \u043c\u043d\u043e\u0436\u0438\u0442\u0435\u043b\u044c \u043e\u0442\u0431\u0440\u0430\u043a\u043e\u0432\u043a\u0438.\n" +"st - \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u043a\u0430\u0442\u0443\u0448\u043a\u0438 \u043f\u043b\u0430\u0441\u0442\u0438\u043a\u0430, \u0440\u0443\u0431.\n" +"mk - \u0432\u0435\u0441 \u043f\u043b\u0430\u0441\u0442\u0438\u043a\u0430 \u0432 \u043a\u0430\u0442\u0443\u0448" + "\u043a\u0435, \u0433\u0440.\n" +"a - \u0430\u043c\u043e\u0440\u0442\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u0440\u0438\u043d\u0442\u0435\u0440\u0430, \u0440\u0443\u0431.\n" +"post - \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u043f\u043e\u0441\u0442\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438, \u0440\u0443\u0431.\n" +"\u0445 - \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0435\u0447\u0430\u0442\u0430\u0435\u043c\u044b\u0445 \u0434\u0443\u0431\u043b\u0438\u043a\u0430\u0442\u043e\u0432, \u0448\u0442.\n" +"mod - \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u0440\u0443\u0431\n" +"```", None)) + self.pushButton.setText(QCoreApplication.translate("Dialog", u"\u0417\u0430\u043a\u0440\u044b\u0442\u044c", None)) + # retranslateUi + diff --git a/formula.ui b/formula.ui new file mode 100644 index 0000000..5642c4d --- /dev/null +++ b/formula.ui @@ -0,0 +1,143 @@ + + + Dialog + + + + 0 + 0 + 367 + 377 + + + + Формула расчета + + + + img/logo-1.pngimg/logo-1.png + + + + + 100 + 10 + 171 + 41 + + + + + 9 + + + + ## Формула расчета + + + Qt::MarkdownText + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + + + + 30 + 50 + 341 + 21 + + + + + Sans Serif + 10 + true + false + + + + false + + + S = ((p/1000*t/60*h)+(md*d*st/mk)+(a+post))*x+mod + + + Qt::MarkdownText + + + true + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + false + + + + + + 10 + 80 + 341 + 281 + + + + + 10 + + + + где +``` +S - стоимость печати, руб. +p - мощность принтера, Вт +t - время печати, мин. +h - тариф на электроэнергию, кВт/ч +md - вес детали, гр. +d - множитель отбраковки. +st - стоимость катушки пластика, руб. +mk - вес пластика в катушке, гр. +a - амортизация принтера, руб. +post - стоимость постобработки, руб. +х - количество печатаемых дубликатов, шт. +mod - стоимость моделирования, руб +``` + + + Qt::MarkdownText + + + false + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + true + + + + + + 100 + 340 + 161 + 25 + + + + background-color: rgb(0, 80, 0); + + + Закрыть + + + + + + diff --git a/img/calc.png b/img/calc.png new file mode 100644 index 0000000..935f558 Binary files /dev/null and b/img/calc.png differ diff --git a/img/calc.svg b/img/calc.svg new file mode 100644 index 0000000..0c02817 --- /dev/null +++ b/img/calc.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/img/exit.png b/img/exit.png new file mode 100644 index 0000000..1c201df Binary files /dev/null and b/img/exit.png differ diff --git a/img/exit.svg b/img/exit.svg new file mode 100644 index 0000000..4f20565 --- /dev/null +++ b/img/exit.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/img/logo-1.png b/img/logo-1.png new file mode 100644 index 0000000..622869e Binary files /dev/null and b/img/logo-1.png differ diff --git a/img/logo-2.png b/img/logo-2.png new file mode 100644 index 0000000..3c2e330 Binary files /dev/null and b/img/logo-2.png differ diff --git a/img/logo-3.png b/img/logo-3.png new file mode 100644 index 0000000..ff1aa42 Binary files /dev/null and b/img/logo-3.png differ diff --git a/img/logo-4.png b/img/logo-4.png new file mode 100644 index 0000000..2aa5f5c Binary files /dev/null and b/img/logo-4.png differ diff --git a/img/logo-5.png b/img/logo-5.png new file mode 100644 index 0000000..5a6411a Binary files /dev/null and b/img/logo-5.png differ diff --git a/img/logo-6.png b/img/logo-6.png new file mode 100644 index 0000000..44b6976 Binary files /dev/null and b/img/logo-6.png differ diff --git a/img/logo-7.png b/img/logo-7.png new file mode 100644 index 0000000..6e3c0d6 Binary files /dev/null and b/img/logo-7.png differ diff --git a/img/logo-8.png b/img/logo-8.png new file mode 100644 index 0000000..0896d9c Binary files /dev/null and b/img/logo-8.png differ diff --git a/img/modeling.png b/img/modeling.png new file mode 100644 index 0000000..2c1650f Binary files /dev/null and b/img/modeling.png differ diff --git a/img/quantity.png b/img/quantity.png new file mode 100644 index 0000000..4e8e001 Binary files /dev/null and b/img/quantity.png differ diff --git a/img/rubl.png b/img/rubl.png new file mode 100644 index 0000000..81f2899 Binary files /dev/null and b/img/rubl.png differ diff --git a/img/time.png b/img/time.png new file mode 100644 index 0000000..4e46847 Binary files /dev/null and b/img/time.png differ diff --git a/img/weight.png b/img/weight.png new file mode 100644 index 0000000..31819b7 Binary files /dev/null and b/img/weight.png differ diff --git a/lists.py b/lists.py deleted file mode 100644 index 868fe5c..0000000 --- a/lists.py +++ /dev/null @@ -1,26 +0,0 @@ -themes_list = ['Black', 'BlueMono', 'BluePurple', 'BrightColors', 'BrownBlue', 'Dark', 'Dark2', 'DarkAmber', - 'DarkBlack', 'DarkBlack1', 'DarkBlue', 'DarkBlue1', 'DarkBlue10', 'DarkBlue11', 'DarkBlue12', - 'DarkBlue13', 'DarkBlue14', 'DarkBlue15', 'DarkBlue16', 'DarkBlue17', 'DarkBlue2', 'DarkBlue3', - 'DarkBlue4', 'DarkBlue5', 'DarkBlue6', 'DarkBlue7', 'DarkBlue8', 'DarkBlue9', 'DarkBrown', - 'DarkBrown1', 'DarkBrown2', 'DarkBrown3', 'DarkBrown4', 'DarkBrown5', 'DarkBrown6', 'DarkBrown7', - 'DarkGreen', 'DarkGreen1', 'DarkGreen2', 'DarkGreen3', 'DarkGreen4', 'DarkGreen5', 'DarkGreen6', - 'DarkGreen7', 'DarkGrey', 'DarkGrey1', 'DarkGrey10', 'DarkGrey11', 'DarkGrey12', 'DarkGrey13', - 'DarkGrey14', 'DarkGrey15', 'DarkGrey2', 'DarkGrey3', 'DarkGrey4', 'DarkGrey5', 'DarkGrey6', - 'DarkGrey7', 'DarkGrey8', 'DarkGrey9', 'DarkPurple', 'DarkPurple1', 'DarkPurple2', 'DarkPurple3', - 'DarkPurple4', 'DarkPurple5', 'DarkPurple6', 'DarkPurple7', 'DarkRed', 'DarkRed1', 'DarkRed2', - 'DarkTanBlue', 'DarkTeal', 'DarkTeal1', 'DarkTeal10', 'DarkTeal11', 'DarkTeal12', 'DarkTeal2', - 'DarkTeal3', 'DarkTeal4', 'DarkTeal5', 'DarkTeal6', 'DarkTeal7', 'DarkTeal8', 'DarkTeal9', 'Default', - 'Default1', 'DefaultNoMoreNagging', 'GrayGrayGray', 'Green', 'GreenMono', 'GreenTan', 'HotDogStand', - 'Kayak', 'LightBlue', 'LightBlue1', 'LightBlue2', 'LightBlue3', 'LightBlue4', 'LightBlue5', - 'LightBlue6', 'LightBlue7', 'LightBrown', 'LightBrown1', 'LightBrown10', 'LightBrown11', - 'LightBrown12', 'LightBrown13', 'LightBrown2', 'LightBrown3', 'LightBrown4', 'LightBrown5', - 'LightBrown6', 'LightBrown7', 'LightBrown8', 'LightBrown9', 'LightGray1', 'LightGreen', - 'LightGreen1', 'LightGreen10', 'LightGreen2', 'LightGreen3', 'LightGreen4', 'LightGreen5', - 'LightGreen6', 'LightGreen7', 'LightGreen8', 'LightGreen9', 'LightGrey', 'LightGrey1', 'LightGrey2', - 'LightGrey3', 'LightGrey4', 'LightGrey5', 'LightGrey6', 'LightPurple', 'LightTeal', 'LightYellow', - 'Material1', 'Material2', 'NeutralBlue', 'Purple', 'Python', 'PythonPlus', 'Reddit', 'Reds', - 'SandyBeach', 'SystemDefault', 'SystemDefault1', 'SystemDefaultForReal', 'Tan', 'TanBlue', - 'TealMono', 'Topanga'] -lang_list = ['Русский', 'English'] - -currency_list = ['руб.', '$', '€'] diff --git a/locale/en_US/LC_MESSAGES/locale.mo b/locale/en_US/LC_MESSAGES/locale.mo deleted file mode 100644 index 2e8bc0a..0000000 Binary files a/locale/en_US/LC_MESSAGES/locale.mo and /dev/null differ diff --git a/locale/ru_RU/LC_MESSAGES/locale.mo b/locale/ru_RU/LC_MESSAGES/locale.mo deleted file mode 100644 index 1715104..0000000 Binary files a/locale/ru_RU/LC_MESSAGES/locale.mo and /dev/null differ diff --git a/logo.ico b/logo.ico deleted file mode 100644 index 14c2dbf..0000000 Binary files a/logo.ico and /dev/null differ diff --git a/settings.py b/settings.py new file mode 100644 index 0000000..adadaa0 --- /dev/null +++ b/settings.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- + +################################################################################ +## Form generated from reading UI file 'Settings.ui' +## +## Created by: Qt User Interface Compiler version 6.8.1 +## +## 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, QPushButton, QSizePolicy, + QWidget) + +class Ui_Dialog(object): + def setupUi(self, Dialog): + if not Dialog.objectName(): + Dialog.setObjectName(u"Dialog") + Dialog.resize(369, 375) + icon = QIcon() + icon.addFile(u"img/logo-1.png", QSize(), QIcon.Mode.Normal, QIcon.State.Off) + Dialog.setWindowIcon(icon) + self.pushButton = QPushButton(Dialog) + self.pushButton.setObjectName(u"pushButton") + self.pushButton.setGeometry(QRect(100, 340, 161, 25)) + self.pushButton.setStyleSheet(u"background-color: rgb(0, 80, 0);") + + self.retranslateUi(Dialog) + + QMetaObject.connectSlotsByName(Dialog) + # setupUi + + def retranslateUi(self, Dialog): + Dialog.setWindowTitle(QCoreApplication.translate("Dialog", u"\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438", None)) + self.pushButton.setText(QCoreApplication.translate("Dialog", u"\u0417\u0430\u043a\u0440\u044b\u0442\u044c", None)) + # retranslateUi + diff --git a/update.py b/update.py index 6d21427..76f42eb 100644 --- a/update.py +++ b/update.py @@ -1,11 +1,8 @@ import requests import webbrowser import json -import PySimpleGUI as Sgi import gettext - from texts import ver -from setts import language lang = gettext.translation('locale', localedir='locale', languages=[language()]) @@ -21,70 +18,4 @@ def upd_check(): version_new = requests.get('https://risenhome.xyz/feed/Risen.json').json()["version"]["ver"] version_old = ver - if version_new > version_old: - Sgi.theme(set_theme) - layout = [ - [Sgi.Text(_("Обновление"))], - [Sgi.Text(_("Вышла новая версия программы\nНужно обновиться"))], - [Sgi.Button(_(' Скачать ')), Sgi.Push(), Sgi.Button(_(' Отмена '))] - ] - - window = Sgi.Window(_("Проверка обновления"), layout, modal=True) - - while True: - event, button = window.read() - if event == _(' Скачать '): - webbrowser.open('https://risenhome.xyz/calc.html', new=2, autoraise=True) - window.close() - elif event == _(' Отмена '): - window.close() - elif event == "Exit" or event == Sgi.WIN_CLOSED: - break - else: - Sgi.theme(set_theme) - layout = [ - [Sgi.Text(_('Последняя версия: ')+f'{version_new}'+_('\nВаша версия: ')+f'{version_old}'+_('\n\n' - 'Обновление не' - ' требуется'))], - [Sgi.Button(_(' Закрыть '))] - ] - - window = Sgi.Window(_("Проверка обновления"), layout, modal=True) - - while True: - event, button = window.read() - if event == _(' Закрыть '): - window.close() - elif event == "Exit" or event == Sgi.WIN_CLOSED: - break - - -# def upd_start(): -# with open('setts.json') as json_file: -# data = json.load(json_file) -# set_theme = data["settings"]["theme"] -# -# version_new = requests.get('https://risenhome.xyz/feed/Risen.json').json()["version"]["ver"] -# version_old = ver -# -# if version_new > version_old: -# -# Sgi.theme(set_theme) -# layout = [ -# [Sgi.Text(_("Обновление"))], -# [Sgi.Text(_("Вышла новая версия программы\nНужно обновиться"))], -# [Sgi.Button(_(' Скачать ')), Sgi.Push(), Sgi.Button(' Отмена ')] -# ] -# -# window = Sgi.Window(_("Вышла новая версия!"), layout, modal=True) -# -# while True: -# event, button = window.read() -# if event == _(' Скачать '): -# webbrowser.open('https://risenhome.xyz', new=2, autoraise=True) -# window.close() -# elif event == _(' Отмена '): -# window.close() -# elif event == "Exit" or event == Sgi.WIN_CLOSED: -# break diff --git a/updates.py b/updates.py new file mode 100644 index 0000000..1990915 --- /dev/null +++ b/updates.py @@ -0,0 +1,83 @@ +# -*- coding: utf-8 -*- + +################################################################################ +## Form generated from reading UI file 'Updates.ui' +## +## Created by: Qt User Interface Compiler version 6.8.1 +## +## 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, + QPushButton, QSizePolicy, QWidget) + +class Ui_Dialog(object): + def setupUi(self, Dialog): + if not Dialog.objectName(): + Dialog.setObjectName(u"Dialog") + Dialog.resize(368, 99) + icon = QIcon() + icon.addFile(u"img/logo-1.png", QSize(), QIcon.Mode.Normal, QIcon.State.Off) + Dialog.setWindowIcon(icon) + self.label = QLabel(Dialog) + self.label.setObjectName(u"label") + self.label.setGeometry(QRect(73, 0, 191, 31)) + font = QFont() + font.setPointSize(10) + self.label.setFont(font) + self.label_2 = QLabel(Dialog) + self.label_2.setObjectName(u"label_2") + self.label_2.setGeometry(QRect(70, 20, 191, 31)) + self.label_2.setFont(font) + self.label_3 = QLabel(Dialog) + self.label_3.setObjectName(u"label_3") + self.label_3.setGeometry(QRect(250, 10, 54, 17)) + font1 = QFont() + font1.setPointSize(10) + font1.setBold(True) + self.label_3.setFont(font1) + self.label_4 = QLabel(Dialog) + self.label_4.setObjectName(u"label_4") + self.label_4.setGeometry(QRect(250, 30, 54, 17)) + self.label_4.setFont(font1) + self.layoutWidget = QWidget(Dialog) + self.layoutWidget.setObjectName(u"layoutWidget") + self.layoutWidget.setGeometry(QRect(20, 60, 331, 27)) + self.horizontalLayout = QHBoxLayout(self.layoutWidget) + self.horizontalLayout.setObjectName(u"horizontalLayout") + self.horizontalLayout.setContentsMargins(0, 0, 0, 0) + self.pushButton = QPushButton(self.layoutWidget) + self.pushButton.setObjectName(u"pushButton") + self.pushButton.setStyleSheet(u"background-color: rgb(0, 80, 0);") + + self.horizontalLayout.addWidget(self.pushButton) + + self.pushButton_2 = QPushButton(self.layoutWidget) + self.pushButton_2.setObjectName(u"pushButton_2") + self.pushButton_2.setStyleSheet(u"background-color: rgb(0, 80, 0);") + + self.horizontalLayout.addWidget(self.pushButton_2) + + + self.retranslateUi(Dialog) + + QMetaObject.connectSlotsByName(Dialog) + # setupUi + + def retranslateUi(self, Dialog): + Dialog.setWindowTitle(QCoreApplication.translate("Dialog", u"Updates", None)) + self.label.setText(QCoreApplication.translate("Dialog", u"\u0412\u0430\u0448\u0430 \u0432\u0435\u0440\u0441\u0438\u044f:", None)) + self.label_2.setText(QCoreApplication.translate("Dialog", u"\u0412\u0435\u0440\u0441\u0438\u044f \u043d\u0430 \u0441\u0430\u0439\u0442\u0435:", None)) + self.label_3.setText(QCoreApplication.translate("Dialog", u"1.0.0", None)) + self.label_4.setText(QCoreApplication.translate("Dialog", u"1.0.0", None)) + self.pushButton.setText(QCoreApplication.translate("Dialog", u"\u041f\u0435\u0440\u0435\u0439\u0442\u0438 \u043d\u0430 \u0441\u0430\u0439\u0442", None)) + self.pushButton_2.setText(QCoreApplication.translate("Dialog", u"\u0417\u0430\u043a\u0440\u044b\u0442\u044c", None)) + # retranslateUi +