From 51f1d6d831758077d06db22544be959ce4b8d516 Mon Sep 17 00:00:00 2001 From: BarsTiger Date: Sat, 27 Aug 2022 15:45:03 +0300 Subject: [PATCH] Added code --- .gitignore | 6 + ConsistentLibraryOfBabel.py | 16 + README.md | 16 + modules/__init__.py | 0 modules/config/__init__.py | 1 + modules/config/config.py | 11 + modules/generator/__init__.py | 1 + modules/generator/pages.py | 42 ++ requirements.txt | 3 + ui/__init__.py | 0 ui/gui.py | 361 +++++++++++++++++ ui/gui.ui | 411 ++++++++++++++++++++ ui/images.qrc | 6 + ui/images_rc.py | 120 ++++++ ui/img/back.png | Bin 0 -> 394 bytes ui/img/next.png | Bin 0 -> 432 bytes ui/modules/__init__.py | 0 ui/modules/blur.py | 133 +++++++ ui/modules/handlers/__init__.py | 0 ui/modules/handlers/buttons.py | 28 ++ ui/modules/initialize/__init__.py | 0 ui/modules/initialize/handlers.py | 19 + ui/modules/initialize/setup_ui.py | 16 + ui/modules/styles.py | 582 ++++++++++++++++++++++++++++ ui/modules/updaters/__init__.py | 0 ui/modules/updaters/page_index.py | 13 + ui/modules/updaters/page_text.py | 6 + ui/modules/validators/__init__.py | 2 + ui/modules/validators/page_index.py | 14 + ui/modules/validators/page_text.py | 15 + 30 files changed, 1822 insertions(+) create mode 100644 .gitignore create mode 100644 ConsistentLibraryOfBabel.py create mode 100644 README.md create mode 100644 modules/__init__.py create mode 100644 modules/config/__init__.py create mode 100644 modules/config/config.py create mode 100644 modules/generator/__init__.py create mode 100644 modules/generator/pages.py create mode 100644 requirements.txt create mode 100644 ui/__init__.py create mode 100644 ui/gui.py create mode 100644 ui/gui.ui create mode 100644 ui/images.qrc create mode 100644 ui/images_rc.py create mode 100644 ui/img/back.png create mode 100644 ui/img/next.png create mode 100644 ui/modules/__init__.py create mode 100644 ui/modules/blur.py create mode 100644 ui/modules/handlers/__init__.py create mode 100644 ui/modules/handlers/buttons.py create mode 100644 ui/modules/initialize/__init__.py create mode 100644 ui/modules/initialize/handlers.py create mode 100644 ui/modules/initialize/setup_ui.py create mode 100644 ui/modules/styles.py create mode 100644 ui/modules/updaters/__init__.py create mode 100644 ui/modules/updaters/page_index.py create mode 100644 ui/modules/updaters/page_text.py create mode 100644 ui/modules/validators/__init__.py create mode 100644 ui/modules/validators/page_index.py create mode 100644 ui/modules/validators/page_text.py diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3d88e25 --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +/.idea/ +/venv/ +/build/ +/tests/ +*.spec +*/config.json \ No newline at end of file diff --git a/ConsistentLibraryOfBabel.py b/ConsistentLibraryOfBabel.py new file mode 100644 index 0000000..9df00f7 --- /dev/null +++ b/ConsistentLibraryOfBabel.py @@ -0,0 +1,16 @@ +from ui.gui import Ui_MainWindow +from PyQt5 import QtWidgets +from ui.modules.initialize import setup_ui +import sys + +sys.setrecursionlimit(2_147_483_647) + +app = QtWidgets.QApplication(sys.argv) +MainWindow = QtWidgets.QMainWindow() +ui = Ui_MainWindow() +ui.setupUi(MainWindow) +setup_ui.on_load(ui, MainWindow) + +MainWindow.show() + +sys.exit(app.exec_()) diff --git a/README.md b/README.md new file mode 100644 index 0000000..5b6e1f8 --- /dev/null +++ b/README.md @@ -0,0 +1,16 @@ +# Consistent Library of Babel + +## Everything was written already + +It is consistent version of **Library of Everything** + +Some example charsets for `config.json` (space will be added automatically) + +English lowercase - `"abcdefghijklmnopqrstuvwxyz"` + +English full - `"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"` + +English full with symbols - `"!?(),.:;ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"` + +Russian + Ukrainian + English + Symbols - `"!?(),.:;ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzЁІЇАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюяёіїҐґ"` + diff --git a/modules/__init__.py b/modules/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/modules/config/__init__.py b/modules/config/__init__.py new file mode 100644 index 0000000..eeb0a97 --- /dev/null +++ b/modules/config/__init__.py @@ -0,0 +1 @@ +from .config import charset diff --git a/modules/config/config.py b/modules/config/config.py new file mode 100644 index 0000000..331574d --- /dev/null +++ b/modules/config/config.py @@ -0,0 +1,11 @@ +import json + +try: + config = json.load(open('config.json', encoding='utf-8')) +except: + config = { + "charset": "abcdefghijklmnopqrstuvwxyz" + } + json.dump(config, open('config.json', 'w', encoding='utf-8'), indent=4) + +charset = ''.join(sorted(list(set(' ' + config['charset'])))) diff --git a/modules/generator/__init__.py b/modules/generator/__init__.py new file mode 100644 index 0000000..fde88ff --- /dev/null +++ b/modules/generator/__init__.py @@ -0,0 +1 @@ +from .pages import Page, Index diff --git a/modules/generator/pages.py b/modules/generator/pages.py new file mode 100644 index 0000000..fece184 --- /dev/null +++ b/modules/generator/pages.py @@ -0,0 +1,42 @@ +from modules.config import charset +from ezzthread import threaded + + +def encode(n): + try: + return charset[n] + except IndexError: + raise Exception(f"Cannot encode {n}") + + +def decode(s): + try: + return charset.index(s) + except ValueError: + raise Exception(f"Cannot decode {s}") + + +def dec_to_base(dec=0, base=16): + if dec < base: + return encode(dec) + else: + return dec_to_base(dec // base, base) + encode(dec % base) + + +def base_to_dec(s, base=16, rec_pow=0): + if s == str(): + return 0 + else: + return decode(s[-1]) * (base ** rec_pow) + base_to_dec(s[0:-1], base, rec_pow + 1) + + +class Page: + @staticmethod + def from_index(index: int) -> str: + return dec_to_base(index, len(charset)) + + +class Index: + @staticmethod + def from_page(page: str) -> int: + return base_to_dec(page, len(charset)) diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..3d7ef7b --- /dev/null +++ b/requirements.txt @@ -0,0 +1,3 @@ +wheel +PyQt5 +pyinstaller \ No newline at end of file diff --git a/ui/__init__.py b/ui/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/ui/gui.py b/ui/gui.py new file mode 100644 index 0000000..82631ef --- /dev/null +++ b/ui/gui.py @@ -0,0 +1,361 @@ +# -*- coding: utf-8 -*- + +# Form implementation generated from reading ui file 'gui.ui' +# +# Created by: PyQt5 UI code generator 5.15.7 +# +# WARNING: Any manual changes made to this file will be lost when pyuic5 is +# run again. Do not edit this file unless you know what you are doing. + + +from PyQt5 import QtCore, QtGui, QtWidgets + + +class Ui_MainWindow(object): + def setupUi(self, MainWindow): + MainWindow.setObjectName("MainWindow") + MainWindow.resize(800, 400) + MainWindow.setStyleSheet("QWidget {\n" +" background-color: rgba(30, 30, 30, 0.1);\n" +" color: white;\n" +" font: 10pt \"Segoe UI\";\n" +"}\n" +"\n" +"\n" +"QScrollBar:vertical,\n" +"QScrollBar:horizontal {\n" +" border: none;\n" +" background: rgba(30, 30, 30, 0);\n" +" width: 10px;\n" +" margin: 15px 0 15px 0;\n" +" border-radius: 0px;\n" +"}\n" +"\n" +"QScrollBar::handle:vertical,\n" +"QScrollBar::handle:horizontal { \n" +" background-color: rgba(139, 139, 139, 0);\n" +" min-height: 30px;\n" +" border-radius: 5px;\n" +"}\n" +"\n" +"QScrollBar::handle:vertical:hover,\n" +"QScrollBar::handle:vertical:pressed,\n" +"QScrollBar::handle:horizontal:hover,\n" +"QScrollBar::handle:horizontal:pressed { \n" +" background-color: rgba(149, 149, 149, 0);\n" +"}\n" +"\n" +"QScrollBar::sub-line:vertical,\n" +"QScrollBar::add-line:vertical,\n" +"QScrollBar::up-arrow:vertical,\n" +"QScrollBar::down-arrow:vertical {\n" +" height: 0px;\n" +"}\n" +"\n" +"QScrollBar::up-arrow:vertical, QScrollBar::down-arrow:vertical,\n" +"QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical, \n" +"QScrollBar::up-arrow:horizontal, QScrollBar::down-arrow:horizontal,\n" +"QScrollBar::add-page:horizontal, QScrollBar::sub-page:horizontal {\n" +" background: none;\n" +"}\n" +"\n" +"\n" +"QPushButton {\n" +" color: white;\n" +" border-width: 1px;\n" +" border-radius:6px;\n" +" border-style: solid;\n" +" border-color: rgba(48, 48, 48, 0.5);\n" +" background-color: rgba(44, 45, 46, 0.3);\n" +"}\n" +"QPushButton:hover {\n" +" border-width: 2px;\n" +" background-color: rgba(50, 50, 50, 0.7);\n" +"}\n" +"QPushButton:pressed {\n" +" background-color: rgba(38, 39, 40, 0.7);\n" +"}\n" +"QPushButton:disabled {\n" +" background-color: rgba(67, 67, 67, 0.7);\n" +" border-color: rgba(0, 0, 0, 0.7);\n" +"}\n" +"\n" +"\n" +"QLineEdit, QTextBrowser, QPlainTextEdit, QTextEdit {\n" +" border-width: 1px;\n" +" border-radius: 5px;\n" +" border-style: solid;\n" +" border-color: rgba(48, 48, 48);\n" +" background-color: rgba(36, 36, 36, 0);\n" +" font: 10pt \"Segoe UI\";\n" +"}\n" +"\n" +"\n" +"QListWidget {\n" +" border-width: 1px;\n" +" border-radius: 15px;\n" +" border-style: solid;\n" +" border-color: rgba(48, 48, 48);\n" +" padding: 10px;\n" +" background-color: rgba(100, 100, 100, 0);\n" +" font: 10pt \"Segoe UI\";\n" +"}\n" +"QListWidget:item {\n" +" background-color: rgba(36, 36, 36, 0);\n" +" selection-color: white;\n" +"}\n" +"QListWidget:item:hover {\n" +" background-color: rgba(50, 50, 50, 0);\n" +"}\n" +"QListWidget:item:selected {\n" +" background-color: rgba(119, 119, 119, 1);\n" +"}\n" +"\n" +"\n" +"QComboBox\n" +"{\n" +" border-width: 1px;\n" +" border-radius:6px;\n" +" border-style: solid;\n" +" border-color: rgba(48, 48, 48);\n" +" background-color: rgba(44, 45, 46, 0);\n" +" color: white;\n" +"}\n" +"\n" +"QComboBox::disabled\n" +"{\n" +" background-color: rgba(67, 67, 67, 0);\n" +" color: #656565;\n" +" border-color: rgba(67, 67, 67);\n" +"}\n" +"\n" +"QComboBox:hover\n" +"{\n" +" background-color: rgba(50, 50, 50, 0);\n" +"}\n" +"\n" +"QComboBox:on\n" +"{\n" +" background-color: rgba(67, 67, 67, 0);\n" +"}\n" +"\n" +"QComboBox QAbstractItemView\n" +"{\n" +" background-color: rgba(67, 67, 67, 0);\n" +" color: #ffffff;\n" +" selection-background-color: rgba(119, 119, 119, 0);\n" +" selection-color: white;\n" +" outline: 0;\n" +"}\n" +"\n" +"QComboBox::drop-down\n" +"{\n" +" subcontrol-origin: padding;\n" +" subcontrol-position: top right;\n" +" border-radius: 6px; \n" +"}\n" +"\n" +"\n" +"QTabBar::tab\n" +"{\n" +" background-color: rgba(44, 45, 46, 0);\n" +" color: #ffffff;\n" +" border-style: solid;\n" +" border-width: 1px;\n" +" border-top-left-radius: 3px;\n" +" border-top-right-radius: 3px;\n" +" border-color: rgba(48, 48, 48);\n" +" padding: 5px;\n" +"}\n" +"\n" +"QTabBar::tab:disabled\n" +"{\n" +" background-color: rgba(101, 101, 101, 0);\n" +" color: #656565;\n" +"}\n" +"\n" +"QTabWidget::pane \n" +"{\n" +" background-color: rgba(160, 160, 160, 0);\n" +" color: #ffffff;\n" +" border: 3px solid;\n" +" border-radius: 15px;\n" +" border-color: rgba(28, 28, 28);\n" +"}\n" +"\n" +"QTabBar::tab:selected\n" +"{\n" +" background-color: rgba(38, 39, 40, 0);\n" +" color: #ffffff;\n" +" border-style: solid;\n" +" border-width: 1px;\n" +" border-top-left-radius: 3px;\n" +" border-top-right-radius: 3px;\n" +" border-color: rgba(48, 48, 48);\n" +" padding: 5px;\n" +"}\n" +"\n" +"QTabBar::tab:selected:disabled\n" +"{\n" +" background-color: rgba(64, 64, 64, 0);\n" +" color: #656565;\n" +"}\n" +"\n" +"QTabBar::tab:!selected \n" +"{\n" +" background-color: rgba(38, 38, 38, 0);\n" +"}\n" +"\n" +"QTabBar::tab:!selected:hover \n" +"{\n" +" background-color: rgba(50, 50, 50, 0);\n" +"}\n" +"\n" +"QTabBar::tab:top:!selected \n" +"{\n" +" margin-top: 3px;\n" +"}\n" +"\n" +"QTabBar::tab:bottom:!selected \n" +"{\n" +" margin-bottom: 3px;\n" +"}\n" +"\n" +"QTabBar::tab:top, QTabBar::tab:bottom \n" +"{\n" +" min-width: 8ex;\n" +" margin-right: -1px;\n" +" padding: 5px 10px 5px 10px;\n" +"}\n" +"\n" +"QTabBar::tab:top:selected \n" +"{\n" +" border-bottom-color: none;\n" +"}\n" +"\n" +"QTabBar::tab:bottom:selected \n" +"{\n" +" border-top-color: none;\n" +"}\n" +"\n" +"QTabBar::tab:top:last, QTabBar::tab:bottom:last,\n" +"QTabBar::tab:top:only-one, QTabBar::tab:bottom:only-one \n" +"{\n" +" margin-right: 0;\n" +"}\n" +"\n" +"QTabBar::tab:left:!selected \n" +"{\n" +" margin-right: 3px;\n" +"}\n" +"\n" +"QTabBar::tab:right:!selected\n" +"{\n" +" margin-left: 3px;\n" +"}\n" +"\n" +"QTabBar::tab:left, QTabBar::tab:right \n" +"{\n" +" min-height: 8ex;\n" +" margin-bottom: -1px;\n" +" padding: 10px 5px 10px 5px;\n" +"}\n" +"\n" +"QTabBar::tab:left:selected \n" +"{\n" +" border-left-color: none;\n" +"}\n" +"\n" +"QTabBar::tab:right:selected \n" +"{\n" +" border-right-color: none;\n" +"}\n" +"\n" +"QTabBar::tab:left:last, QTabBar::tab:right:last,\n" +"QTabBar::tab:left:only-one, QTabBar::tab:right:only-one \n" +"{\n" +" margin-bottom: 0;\n" +"}\n" +"\n" +"QSpinBox {\n" +" border-width: 1px;\n" +" border-radius: 5px;\n" +" border-style: solid;\n" +" border-color: rgba(48, 48, 48);\n" +" background-color: rgba(36, 36, 36, 0);\n" +" font: 10pt \"Segoe UI\";\n" +"}\n" +"QSpinBox::up-button {\n" +" border: none;\n" +" background: none;\n" +"}\n" +"QSpinBox::down-button {\n" +" border: none;\n" +" background: none;\n" +"}\n" +"\n" +"QToolBox::tab {\n" +" border-style: solid;\n" +" border-width: 1px;\n" +" border-radius: 5px;\n" +" border-color: rgba(48, 48, 48, 0);\n" +"}") + MainWindow.setToolButtonStyle(QtCore.Qt.ToolButtonIconOnly) + self.centralwidget = QtWidgets.QWidget(MainWindow) + self.centralwidget.setObjectName("centralwidget") + self.verticalLayout = QtWidgets.QVBoxLayout(self.centralwidget) + self.verticalLayout.setObjectName("verticalLayout") + self.page_text = QtWidgets.QPlainTextEdit(self.centralwidget) + self.page_text.setStyleSheet("font: 14pt \"Segoe UI\";") + self.page_text.setObjectName("page_text") + self.verticalLayout.addWidget(self.page_text) + self.index_widget = QtWidgets.QWidget(self.centralwidget) + self.index_widget.setObjectName("index_widget") + self.horizontalLayout = QtWidgets.QHBoxLayout(self.index_widget) + self.horizontalLayout.setContentsMargins(0, 0, 0, 0) + self.horizontalLayout.setObjectName("horizontalLayout") + self.back_button = QtWidgets.QPushButton(self.index_widget) + self.back_button.setMinimumSize(QtCore.QSize(64, 64)) + self.back_button.setMaximumSize(QtCore.QSize(64, 64)) + self.back_button.setText("") + icon = QtGui.QIcon() + icon.addPixmap(QtGui.QPixmap(":/img/img/back.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) + self.back_button.setIcon(icon) + self.back_button.setIconSize(QtCore.QSize(40, 40)) + self.back_button.setObjectName("back_button") + self.horizontalLayout.addWidget(self.back_button) + self.page_index = QtWidgets.QLineEdit(self.index_widget) + self.page_index.setMinimumSize(QtCore.QSize(0, 64)) + self.page_index.setMaxLength(2932) + self.page_index.setObjectName("page_index") + self.horizontalLayout.addWidget(self.page_index) + self.next_button = QtWidgets.QPushButton(self.index_widget) + self.next_button.setMinimumSize(QtCore.QSize(64, 64)) + self.next_button.setMaximumSize(QtCore.QSize(64, 64)) + self.next_button.setText("") + icon1 = QtGui.QIcon() + icon1.addPixmap(QtGui.QPixmap(":/img/img/next.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) + self.next_button.setIcon(icon1) + self.next_button.setIconSize(QtCore.QSize(40, 40)) + self.next_button.setObjectName("next_button") + self.horizontalLayout.addWidget(self.next_button) + self.verticalLayout.addWidget(self.index_widget) + MainWindow.setCentralWidget(self.centralwidget) + + self.retranslateUi(MainWindow) + QtCore.QMetaObject.connectSlotsByName(MainWindow) + + def retranslateUi(self, MainWindow): + _translate = QtCore.QCoreApplication.translate + MainWindow.setWindowTitle(_translate("MainWindow", "ConsistentLibraryOfBabel")) +import ui.images_rc + + +if __name__ == "__main__": + import sys + app = QtWidgets.QApplication(sys.argv) + MainWindow = QtWidgets.QMainWindow() + ui = Ui_MainWindow() + ui.setupUi(MainWindow) + MainWindow.show() + sys.exit(app.exec_()) diff --git a/ui/gui.ui b/ui/gui.ui new file mode 100644 index 0000000..3e4b3ac --- /dev/null +++ b/ui/gui.ui @@ -0,0 +1,411 @@ + + + MainWindow + + + + 0 + 0 + 800 + 400 + + + + ConsistentLibraryOfBabel + + + QWidget { + background-color: rgba(30, 30, 30, 0.1); + color: white; + font: 10pt "Segoe UI"; +} + + +QScrollBar:vertical, +QScrollBar:horizontal { + border: none; + background: rgba(30, 30, 30, 0); + width: 10px; + margin: 15px 0 15px 0; + border-radius: 0px; +} + +QScrollBar::handle:vertical, +QScrollBar::handle:horizontal { + background-color: rgba(139, 139, 139, 0); + min-height: 30px; + border-radius: 5px; +} + +QScrollBar::handle:vertical:hover, +QScrollBar::handle:vertical:pressed, +QScrollBar::handle:horizontal:hover, +QScrollBar::handle:horizontal:pressed { + background-color: rgba(149, 149, 149, 0); +} + +QScrollBar::sub-line:vertical, +QScrollBar::add-line:vertical, +QScrollBar::up-arrow:vertical, +QScrollBar::down-arrow:vertical { + height: 0px; +} + +QScrollBar::up-arrow:vertical, QScrollBar::down-arrow:vertical, +QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical, +QScrollBar::up-arrow:horizontal, QScrollBar::down-arrow:horizontal, +QScrollBar::add-page:horizontal, QScrollBar::sub-page:horizontal { + background: none; +} + + +QPushButton { + color: white; + border-width: 1px; + border-radius:6px; + border-style: solid; + border-color: rgba(48, 48, 48, 0.5); + background-color: rgba(44, 45, 46, 0.3); +} +QPushButton:hover { + border-width: 2px; + background-color: rgba(50, 50, 50, 0.7); +} +QPushButton:pressed { + background-color: rgba(38, 39, 40, 0.7); +} +QPushButton:disabled { + background-color: rgba(67, 67, 67, 0.7); + border-color: rgba(0, 0, 0, 0.7); +} + + +QLineEdit, QTextBrowser, QPlainTextEdit, QTextEdit { + border-width: 1px; + border-radius: 5px; + border-style: solid; + border-color: rgba(48, 48, 48); + background-color: rgba(36, 36, 36, 0); + font: 10pt "Segoe UI"; +} + + +QListWidget { + border-width: 1px; + border-radius: 15px; + border-style: solid; + border-color: rgba(48, 48, 48); + padding: 10px; + background-color: rgba(100, 100, 100, 0); + font: 10pt "Segoe UI"; +} +QListWidget:item { + background-color: rgba(36, 36, 36, 0); + selection-color: white; +} +QListWidget:item:hover { + background-color: rgba(50, 50, 50, 0); +} +QListWidget:item:selected { + background-color: rgba(119, 119, 119, 1); +} + + +QComboBox +{ + border-width: 1px; + border-radius:6px; + border-style: solid; + border-color: rgba(48, 48, 48); + background-color: rgba(44, 45, 46, 0); + color: white; +} + +QComboBox::disabled +{ + background-color: rgba(67, 67, 67, 0); + color: #656565; + border-color: rgba(67, 67, 67); +} + +QComboBox:hover +{ + background-color: rgba(50, 50, 50, 0); +} + +QComboBox:on +{ + background-color: rgba(67, 67, 67, 0); +} + +QComboBox QAbstractItemView +{ + background-color: rgba(67, 67, 67, 0); + color: #ffffff; + selection-background-color: rgba(119, 119, 119, 0); + selection-color: white; + outline: 0; +} + +QComboBox::drop-down +{ + subcontrol-origin: padding; + subcontrol-position: top right; + border-radius: 6px; +} + + +QTabBar::tab +{ + background-color: rgba(44, 45, 46, 0); + color: #ffffff; + border-style: solid; + border-width: 1px; + border-top-left-radius: 3px; + border-top-right-radius: 3px; + border-color: rgba(48, 48, 48); + padding: 5px; +} + +QTabBar::tab:disabled +{ + background-color: rgba(101, 101, 101, 0); + color: #656565; +} + +QTabWidget::pane +{ + background-color: rgba(160, 160, 160, 0); + color: #ffffff; + border: 3px solid; + border-radius: 15px; + border-color: rgba(28, 28, 28); +} + +QTabBar::tab:selected +{ + background-color: rgba(38, 39, 40, 0); + color: #ffffff; + border-style: solid; + border-width: 1px; + border-top-left-radius: 3px; + border-top-right-radius: 3px; + border-color: rgba(48, 48, 48); + padding: 5px; +} + +QTabBar::tab:selected:disabled +{ + background-color: rgba(64, 64, 64, 0); + color: #656565; +} + +QTabBar::tab:!selected +{ + background-color: rgba(38, 38, 38, 0); +} + +QTabBar::tab:!selected:hover +{ + background-color: rgba(50, 50, 50, 0); +} + +QTabBar::tab:top:!selected +{ + margin-top: 3px; +} + +QTabBar::tab:bottom:!selected +{ + margin-bottom: 3px; +} + +QTabBar::tab:top, QTabBar::tab:bottom +{ + min-width: 8ex; + margin-right: -1px; + padding: 5px 10px 5px 10px; +} + +QTabBar::tab:top:selected +{ + border-bottom-color: none; +} + +QTabBar::tab:bottom:selected +{ + border-top-color: none; +} + +QTabBar::tab:top:last, QTabBar::tab:bottom:last, +QTabBar::tab:top:only-one, QTabBar::tab:bottom:only-one +{ + margin-right: 0; +} + +QTabBar::tab:left:!selected +{ + margin-right: 3px; +} + +QTabBar::tab:right:!selected +{ + margin-left: 3px; +} + +QTabBar::tab:left, QTabBar::tab:right +{ + min-height: 8ex; + margin-bottom: -1px; + padding: 10px 5px 10px 5px; +} + +QTabBar::tab:left:selected +{ + border-left-color: none; +} + +QTabBar::tab:right:selected +{ + border-right-color: none; +} + +QTabBar::tab:left:last, QTabBar::tab:right:last, +QTabBar::tab:left:only-one, QTabBar::tab:right:only-one +{ + margin-bottom: 0; +} + +QSpinBox { + border-width: 1px; + border-radius: 5px; + border-style: solid; + border-color: rgba(48, 48, 48); + background-color: rgba(36, 36, 36, 0); + font: 10pt "Segoe UI"; +} +QSpinBox::up-button { + border: none; + background: none; +} +QSpinBox::down-button { + border: none; + background: none; +} + +QToolBox::tab { + border-style: solid; + border-width: 1px; + border-radius: 5px; + border-color: rgba(48, 48, 48, 0); +} + + + Qt::ToolButtonIconOnly + + + + + + + font: 14pt "Segoe UI"; + + + + + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + 64 + 64 + + + + + 64 + 64 + + + + + + + + :/img/img/back.png:/img/img/back.png + + + + 40 + 40 + + + + + + + + + 0 + 64 + + + + 2932 + + + + + + + + 64 + 64 + + + + + 64 + 64 + + + + + + + + :/img/img/next.png:/img/img/next.png + + + + 40 + 40 + + + + + + + + + + + + + + + diff --git a/ui/images.qrc b/ui/images.qrc new file mode 100644 index 0000000..d2fb7e0 --- /dev/null +++ b/ui/images.qrc @@ -0,0 +1,6 @@ + + + img/back.png + img/next.png + + diff --git a/ui/images_rc.py b/ui/images_rc.py new file mode 100644 index 0000000..1468fa4 --- /dev/null +++ b/ui/images_rc.py @@ -0,0 +1,120 @@ +# -*- coding: utf-8 -*- + +# Resource object code +# +# Created by: The Resource Compiler for PyQt5 (Qt v5.15.2) +# +# WARNING! All changes made in this file will be lost! + +from PyQt5 import QtCore + +qt_resource_data = b"\ +\x00\x00\x01\xb0\ +\x89\ +\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\ +\x00\x00\x40\x00\x00\x00\x40\x08\x06\x00\x00\x00\xaa\x69\x71\xde\ +\x00\x00\x00\x01\x73\x52\x47\x42\x00\xae\xce\x1c\xe9\x00\x00\x00\ +\x04\x67\x41\x4d\x41\x00\x00\xb1\x8f\x0b\xfc\x61\x05\x00\x00\x00\ +\x09\x70\x48\x59\x73\x00\x00\x0e\xc3\x00\x00\x0e\xc3\x01\xc7\x6f\ +\xa8\x64\x00\x00\x01\x45\x49\x44\x41\x54\x78\x5e\xed\xdb\x3d\x4a\ +\xc4\x50\x18\x46\xe1\x20\xee\x40\xd4\x46\xb4\xb3\xb6\x72\x05\x2e\ +\x41\x45\xd4\xb5\xd8\xc4\x85\x45\x88\x45\xec\xf2\xe3\x52\x12\x49\ +\x32\xa3\x9e\xc0\x17\xe1\x12\x62\x21\x16\x7a\xbf\xf7\x69\x86\xcc\ +\xa4\x39\x2f\x33\x03\x13\x26\x89\x88\xfc\x8a\x3d\x1c\xc3\x0e\x7d\ +\x79\x40\xdf\xf7\xc3\x07\xb2\x2c\x7b\x3a\x84\xbd\x14\xbf\x33\x6c\ +\xb7\xdb\xf7\x29\x7e\xd6\x34\xcd\xab\x9b\x11\x6e\x60\xdd\x01\x37\ +\x23\x1c\xa1\x6d\xdb\xce\xba\x03\x6e\x46\xb8\xc4\x30\x0c\xa3\x75\ +\x07\xea\xba\x6e\x5c\x8c\x70\x8b\x71\x1c\x37\xd6\x1d\xa8\xaa\xaa\ +\x3e\x80\x9d\x1a\x2f\x8d\x00\x8d\x00\x8d\x00\x8d\x00\x8d\x00\x8d\ +\x00\x8d\x00\x8d\x00\x8d\x00\x8d\x00\x8d\x00\x8d\x00\x8d\x00\x8d\ +\x00\x8d\x00\x8d\x00\x8d\x00\x8d\x00\x8d\x00\x8d\x80\x6b\xac\x5d\ +\x6d\x2e\x8a\xe2\x65\x17\x76\x6a\xbc\xbe\x7b\x27\x5c\xc0\x4e\xfb\ +\xb1\x1d\x7b\xfc\xb3\x36\x98\x62\xed\x30\xb0\xf6\x7c\x34\x5c\x7f\ +\x04\xee\xb0\xf6\xd6\x2f\xcb\xb2\xda\x87\x9d\x1a\x1f\xc5\x2b\x7e\ +\x49\xf1\x8a\x8f\x94\xe2\x15\xbf\xa4\x78\xc5\x47\x4a\xf1\x2b\xf1\ +\xd3\x05\x0e\xd7\xf1\x51\x5f\xdd\x51\xbc\xe2\x97\x14\xaf\xf8\x48\ +\x29\xde\x6b\xfc\x15\xdc\xfe\x5d\xfe\x04\x5d\xd7\xbd\x59\x6f\xc0\ +\xc5\x0d\x13\xf7\xb0\xde\x80\x9b\xbb\x45\xce\x61\xcd\x5f\x5c\xdd\ +\x34\x35\x49\xd3\xf4\x71\xfe\x02\xcc\xf3\xfc\xd9\x55\xfc\x6c\xfa\ +\x35\x77\x0a\x3b\x14\x91\xff\x20\x49\x3e\x01\xba\x26\x04\xe0\xd9\ +\xf1\x5c\x00\x00\x00\x00\x00\x49\x45\x4e\x44\xae\x42\x60\x82\ +\x00\x00\x01\x8a\ +\x89\ +\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\ +\x00\x00\x40\x00\x00\x00\x40\x08\x06\x00\x00\x00\xaa\x69\x71\xde\ +\x00\x00\x00\x06\x62\x4b\x47\x44\x00\xff\x00\xff\x00\xff\xa0\xbd\ +\xa7\x93\x00\x00\x01\x3f\x49\x44\x41\x54\x78\x9c\xed\x9b\x31\x2e\ +\x04\x61\x00\x46\x1f\x71\x03\x59\xdb\x08\x9d\x88\x4a\xe5\x04\x8e\ +\x80\x02\x67\x51\x39\x97\x44\xa1\x51\xb2\xae\x42\x62\x37\x9e\xc2\ +\x12\x24\x33\x5b\xd8\x7f\x7e\x3b\xf3\xbd\x72\x36\x99\x7c\xef\x4d\ +\x66\x8a\xd9\x5d\x08\x21\xac\x12\xea\x8e\xba\x59\x7b\x47\xe7\xa8\ +\x63\xf5\xd6\x0f\x5e\xd5\xab\xda\x9b\x3a\x63\x2e\xff\xe4\x4f\xde\ +\xd4\xc3\xbf\x9e\x7b\x7d\x19\x03\x4b\xa2\x8e\x81\x1b\xe0\xe0\xd7\ +\x47\x6b\xc0\x7e\xf7\x8b\x3a\xa4\xe1\xca\x7f\xf2\xac\x6e\xd7\xde\ +\x58\x8c\xb9\xfc\xa4\x41\x7e\xaa\x9e\xd4\xde\x58\x0c\x75\x4b\x7d\ +\x6c\x90\x9f\xa9\xe7\xb5\x37\x16\x23\xf2\x91\x8f\x7c\xe4\x23\x1f\ +\xf9\xc8\x47\xbe\x97\x44\x3e\xf2\x91\x8f\x7c\xe4\x23\x1f\xf9\xc8\ +\xf7\x92\xc8\x0f\x58\x7e\x43\xbd\x6f\x90\x9f\xaa\x67\xb5\x37\x16\ +\x45\x3d\x5e\xe5\x2b\xbf\x8c\x6f\x86\x6c\x39\x3e\x5b\xc2\xf9\xff\ +\x37\x83\xbf\x05\x00\xd4\x91\xfa\xd0\x72\x2b\x5c\xd4\xde\x58\x9c\ +\x44\x20\x11\x80\x44\x00\x12\x01\x48\x04\x20\x11\x80\x44\x00\x12\ +\x01\x48\x04\x20\x11\x80\x44\x00\xbe\x22\xb4\xbd\x40\x19\x44\x84\ +\x45\x6f\x91\x12\x21\x11\x12\x21\x11\x12\x21\x11\x12\x61\xb8\x11\ +\x16\xfd\x5c\xfe\xb4\xf6\xc6\xe2\xd8\xfe\x87\x89\x17\x75\xb7\xf6\ +\xc6\xe2\x2c\x88\x70\x59\x7b\x5f\x27\xb4\x44\x38\xaa\xbd\xad\x33\ +\xe6\x11\xee\xbe\x3d\x08\xaf\x6b\x6f\xaa\x82\xba\xa7\x8e\x6a\xef\ +\x08\xa1\x27\xbc\x03\x85\x53\x0e\x31\xd2\xc1\xa0\x73\x00\x00\x00\ +\x00\x49\x45\x4e\x44\xae\x42\x60\x82\ +" + +qt_resource_name = b"\ +\x00\x03\ +\x00\x00\x70\x37\ +\x00\x69\ +\x00\x6d\x00\x67\ +\x00\x08\ +\x0c\xf7\x59\xc7\ +\x00\x6e\ +\x00\x65\x00\x78\x00\x74\x00\x2e\x00\x70\x00\x6e\x00\x67\ +\x00\x08\ +\x07\x9e\x5a\x47\ +\x00\x62\ +\x00\x61\x00\x63\x00\x6b\x00\x2e\x00\x70\x00\x6e\x00\x67\ +" + +qt_resource_struct_v1 = b"\ +\x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x01\ +\x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x02\ +\x00\x00\x00\x00\x00\x02\x00\x00\x00\x02\x00\x00\x00\x03\ +\x00\x00\x00\x22\x00\x00\x00\x00\x00\x01\x00\x00\x01\xb4\ +\x00\x00\x00\x0c\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\ +" + +qt_resource_struct_v2 = b"\ +\x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x01\ +\x00\x00\x00\x00\x00\x00\x00\x00\ +\x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x02\ +\x00\x00\x00\x00\x00\x00\x00\x00\ +\x00\x00\x00\x00\x00\x02\x00\x00\x00\x02\x00\x00\x00\x03\ +\x00\x00\x00\x00\x00\x00\x00\x00\ +\x00\x00\x00\x22\x00\x00\x00\x00\x00\x01\x00\x00\x01\xb4\ +\x00\x00\x01\x82\x5f\x53\x50\xd3\ +\x00\x00\x00\x0c\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\ +\x00\x00\x01\x82\x5f\x5d\x42\x4b\ +" + +qt_version = [int(v) for v in QtCore.qVersion().split('.')] +if qt_version < [5, 8, 0]: + rcc_version = 1 + qt_resource_struct = qt_resource_struct_v1 +else: + rcc_version = 2 + qt_resource_struct = qt_resource_struct_v2 + +def qInitResources(): + QtCore.qRegisterResourceData(rcc_version, qt_resource_struct, qt_resource_name, qt_resource_data) + +def qCleanupResources(): + QtCore.qUnregisterResourceData(rcc_version, qt_resource_struct, qt_resource_name, qt_resource_data) + +qInitResources() diff --git a/ui/img/back.png b/ui/img/back.png new file mode 100644 index 0000000000000000000000000000000000000000..ea24fddcda582a8feee142a8486f87c8bfe34d65 GIT binary patch literal 394 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7TyC=Y)RhkE)4%caKYZ?lNlHo?LA!_ zLn`LHoo%SclE~mDU&tJJn`3T=*Hf0h2B!2t%jqr)12?U6N;02!NJzyv`bK@7_2<1s zW;1Kv`=)i>jO9>VBlN0oS7f#O^A*WoukpuSU43h|RkGgyC;s=Y9Ns^#x>l0edr@Db z^n(Z2-LntWeebqf^6*ssr!{%k??v?N{IkTdZq>Xi_ab;oy=!wO%wPF@tGSr+r-}VF zPn6|h`#$Lee?*=0-uwykSEU2hx!T4()!yHe-QE#?_q8Y<}a6vIJ Pa2Y&Z{an^LB{Ts5FJGyG literal 0 HcmV?d00001 diff --git a/ui/img/next.png b/ui/img/next.png new file mode 100644 index 0000000000000000000000000000000000000000..4c5b0a8a558513f8938a0e6fc858983f4d9e482e GIT binary patch literal 432 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7TyC=jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85sBugD~Uq{1quc4X&Opjv*CsZ*SXr9SM+dd#Lcv;fmXq&D)At z^&DNVY`t-$)wRR*&8NpfLY_v8=N%A#D3qiqR<-|oX4{!1miorb!fKrzf4XdC4)fJk zI^6$$n0=E@wN=Yrk^ROw+i!o@th;7%cJ*w*yo9@q=E^b)b8ny9#hmB1xZ=}ouV=Ss;R)vojW*wsJfk?8&<6-V8@K5Bow%*uEDV_^K< zz&($qi>&|Qp?NR+kLaC$vHw_NukVe_KX8;+`1^)?4YPN rKL5EH`X}d?X*rj*$i)8&o_378)L0(e{1^iaWCjLLS3j3^P6