From c5145386efb8d8c7433d80b36da5887b08749fb8 Mon Sep 17 00:00:00 2001 From: Isaac Shoebottom Date: Sat, 3 Jun 2023 18:03:35 -0300 Subject: [PATCH] Add basic layout --- .idea/.gitignore | 8 ++ .idea/codeStyles/codeStyleConfig.xml | 5 ++ .idea/discord.xml | 7 ++ .../inspectionProfiles/profiles_settings.xml | 6 ++ .idea/misc.xml | 4 + .idea/modules.xml | 8 ++ .idea/qrtool-ui.iml | 8 ++ .idea/vcs.xml | 6 ++ poetry.lock | 89 +++++++++++++++++++ pyproject.toml | 18 ++++ qrtool-ui/ui.py | 59 ++++++++++++ 11 files changed, 218 insertions(+) create mode 100644 .idea/.gitignore create mode 100644 .idea/codeStyles/codeStyleConfig.xml create mode 100644 .idea/discord.xml create mode 100644 .idea/inspectionProfiles/profiles_settings.xml create mode 100644 .idea/misc.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/qrtool-ui.iml create mode 100644 .idea/vcs.xml create mode 100644 poetry.lock create mode 100644 pyproject.toml create mode 100644 qrtool-ui/ui.py diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..1c2fda5 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml new file mode 100644 index 0000000..df5f35d --- /dev/null +++ b/.idea/codeStyles/codeStyleConfig.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/.idea/discord.xml b/.idea/discord.xml new file mode 100644 index 0000000..d8e9561 --- /dev/null +++ b/.idea/discord.xml @@ -0,0 +1,7 @@ + + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml new file mode 100644 index 0000000..105ce2d --- /dev/null +++ b/.idea/inspectionProfiles/profiles_settings.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..92fb75f --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..2e00e45 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/qrtool-ui.iml b/.idea/qrtool-ui.iml new file mode 100644 index 0000000..db452e2 --- /dev/null +++ b/.idea/qrtool-ui.iml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..9661ac7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/poetry.lock b/poetry.lock new file mode 100644 index 0000000..47713fe --- /dev/null +++ b/poetry.lock @@ -0,0 +1,89 @@ +# This file is automatically @generated by Poetry 1.5.1 and should not be changed by hand. + +[[package]] +name = "pyside6" +version = "6.5.1" +description = "Python bindings for the Qt cross-platform application and UI framework" +optional = false +python-versions = "<3.12,>=3.7" +files = [ + {file = "PySide6-6.5.1-cp37-abi3-macosx_10_9_universal2.whl", hash = "sha256:00069045509a0d7274ad9cf79bd935a126b2d73ef9f9ae81bb5d62ca8b79ea00"}, + {file = "PySide6-6.5.1-cp37-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:0236f3cc2d293fe755be9d1c85a3d955738d3e8667d55a7e76889366b0a31122"}, + {file = "PySide6-6.5.1-cp37-abi3-win_amd64.whl", hash = "sha256:e1f46b654048f83a14705447564536024cbb9eccd8a60116f557a5d10725c85e"}, + {file = "PySide6-6.5.1-pp39-pypy39_pp73-macosx_10_9_universal2.whl", hash = "sha256:365022e61bbcbcec9dde6a0afa5375948054edb5e38e06ddf4f902ac3dd6f50c"}, + {file = "PySide6-6.5.1-pp39-pypy39_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:e45a60044ddf663920506cac6f92b6eff08b436465a752a444fed4dd35aed6eb"}, + {file = "PySide6-6.5.1-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:e85dc1b14f9dbaa322099c56ab75c09dbe40429c6918b8a3e8901333d8f73722"}, +] + +[package.dependencies] +PySide6-Addons = "6.5.1" +PySide6-Essentials = "6.5.1" +shiboken6 = "6.5.1" + +[[package]] +name = "pyside6-addons" +version = "6.5.1" +description = "Python bindings for the Qt cross-platform application and UI framework (Addons)" +optional = false +python-versions = "<3.12,>=3.7" +files = [ + {file = "PySide6_Addons-6.5.1-cp37-abi3-macosx_10_9_universal2.whl", hash = "sha256:fb76a18708f4f1eb6be52255e27f33ea9d4a303efd9c2ce204c6d578692de699"}, + {file = "PySide6_Addons-6.5.1-cp37-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:dd8cb8ac79685f48e442a2683206fe75d7cb8cbeeda9e9c2504fca86932d532a"}, + {file = "PySide6_Addons-6.5.1-cp37-abi3-win_amd64.whl", hash = "sha256:d208d1558845c9cb1185d720f7ae0dbe584bedda9cfd163af693952d6922f70a"}, + {file = "PySide6_Addons-6.5.1-pp39-pypy39_pp73-macosx_10_9_universal2.whl", hash = "sha256:48792783d43408e905c483f64cfea684f79bac1245cfb14c9d42ad2ab3a38f8f"}, + {file = "PySide6_Addons-6.5.1-pp39-pypy39_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:72a7ef1d38cc09541c8d277851c17c3b34c5fe9f766e71224122d0e382d1ac26"}, + {file = "PySide6_Addons-6.5.1-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:68f72db78f2f0daa73382a079788cd1ce7d4f1a10ea58a69dcbf1eaa3c2699d7"}, +] + +[package.dependencies] +PySide6-Essentials = "6.5.1" +shiboken6 = "6.5.1" + +[[package]] +name = "pyside6-essentials" +version = "6.5.1" +description = "Python bindings for the Qt cross-platform application and UI framework (Essentials)" +optional = false +python-versions = "<3.12,>=3.7" +files = [ + {file = "PySide6_Essentials-6.5.1-cp37-abi3-macosx_10_9_universal2.whl", hash = "sha256:09884ace7574b64d33a0fe53b6185d1ffcd8cc5fa3451169b12b9ac1ea7e9951"}, + {file = "PySide6_Essentials-6.5.1-cp37-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:b893e901724376c556abc6e4e7a88ec2b60483752c4af62692f71ae01d8c6824"}, + {file = "PySide6_Essentials-6.5.1-cp37-abi3-win_amd64.whl", hash = "sha256:6169239731646b81a7b325562f4e99dee4160db757370914c77030538de4dd47"}, + {file = "PySide6_Essentials-6.5.1-pp39-pypy39_pp73-macosx_10_9_universal2.whl", hash = "sha256:dd2d5fe5af688090849e59ca4afa11330b9236913bf18f84825b0d074f553e16"}, + {file = "PySide6_Essentials-6.5.1-pp39-pypy39_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:475d32118242aea4236ce5a77f9eeb027a34cf05684763d24a8abe112f24029c"}, + {file = "PySide6_Essentials-6.5.1-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:a7d2ec3ec43ca76c21bcc4a807e0e5d64a3376ba0c9fe1e90fb7cda923b6784c"}, +] + +[package.dependencies] +shiboken6 = "6.5.1" + +[[package]] +name = "segno" +version = "1.5.2" +description = "QR Code and Micro QR Code generator for Python 2 and Python 3" +optional = false +python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7" +files = [ + {file = "segno-1.5.2-py2.py3-none-any.whl", hash = "sha256:b17ace8171aad3987e01bb4aeadf7e0450c40674024c4c57b4da54028e55f1e9"}, + {file = "segno-1.5.2.tar.gz", hash = "sha256:983424b296e62189d70fc73460cd946cf56dcbe82b9bda18c066fc1b24371cdc"}, +] + +[[package]] +name = "shiboken6" +version = "6.5.1" +description = "Python/C++ bindings helper module" +optional = false +python-versions = "<3.12,>=3.7" +files = [ + {file = "shiboken6-6.5.1-cp37-abi3-macosx_10_9_universal2.whl", hash = "sha256:3a832110f752228e3e0c30a86a6c3fc2770148c2999c15c8fc259c03cce1e065"}, + {file = "shiboken6-6.5.1-cp37-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:d9b3724772d5e98868ea6718a8d866ab3591ee3300febc74b00b32aaa0e4d295"}, + {file = "shiboken6-6.5.1-cp37-abi3-win_amd64.whl", hash = "sha256:40313ea1c940e7c6fd26651b166b5ddb3db850374d29c74342a74dbba92ba61b"}, + {file = "shiboken6-6.5.1-pp39-pypy39_pp73-macosx_10_9_universal2.whl", hash = "sha256:0f8744f06a8518476626230c85b1246a95f650cf739c06ee2b6f8a9124f1e8c0"}, + {file = "shiboken6-6.5.1-pp39-pypy39_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:8a0828ed237d16124376a97888a62ffe8243f3c623c87d204483d1d5b4511968"}, + {file = "shiboken6-6.5.1-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:5619e6318228e85194cbb7966e3e05bf815305e85edf0f02af19156ba8506d5d"}, +] + +[metadata] +lock-version = "2.0" +python-versions = ">=3.11,<3.12" +content-hash = "a3b8fa83ec3cf9dff4098a1df846ed2b7003ea40c1eadaa83b639778672b211d" diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..1bd3507 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,18 @@ +[tool.poetry] +name = "qrtool-ui" +version = "0.1.0" +description = "" +authors = ["Isaac Shoebottom "] +license = "MIT" +readme = "README.md" +packages = [{include = "qrtool_ui"}] + +[tool.poetry.dependencies] +python = ">=3.11,<3.12" +segno = "^1.5.2" +pyside6 = "^6.5.1" + + +[build-system] +requires = ["poetry-core"] +build-backend = "poetry.core.masonry.api" diff --git a/qrtool-ui/ui.py b/qrtool-ui/ui.py new file mode 100644 index 0000000..2759390 --- /dev/null +++ b/qrtool-ui/ui.py @@ -0,0 +1,59 @@ +import sys +from PySide6.QtWidgets import QApplication, QLabel, QTabWidget, QWidget, QVBoxLayout, QMainWindow, QHBoxLayout + + +# TODO: Layout Example +# /---------------------------------------------------------\ +# | [Generic Tab] [Wi-Fi Helper Tab] | +# | /----------------\ | +# | | | | +# | [Text Example] | | | +# | [Option Example] | | | +# | | | | +# | [Generate QR Code] \----------------/ | +# | [Save Image] [Copy to Clipboard] | +# \---------------------------------------------------------/ + +app = QApplication(sys.argv) + +# Create a QMainWindow instance +window = QMainWindow() +window.setWindowTitle("QR Tool") + +root = QWidget() +root.setLayout(QHBoxLayout()) + +# Create a QTabWidget instance +tab_widget = QTabWidget() +qr_image = QLabel("QR Image") + +# Add layouts to root +root.layout().addWidget(tab_widget) +root.layout().addWidget(qr_image) + +# Set central widget of QMainWindow instance +window.setCentralWidget(root) + +# Add QWidget for each tab +tab_1 = QWidget() +tab_2 = QWidget() + +# Set layout for each tab +tab_1.setLayout(QVBoxLayout()) +tab_2.setLayout(QVBoxLayout()) + +# Create labels for each tab + +label_1 = QLabel("This is Tab 1") +label_2 = QLabel("This is Tab 2") + +# Add labels to layouts +tab_1.layout().addWidget(label_1) +tab_2.layout().addWidget(label_2) + +tab_widget.addTab(tab_1, "Tab 1") +tab_widget.addTab(tab_2, "Tab 2") + + +window.show() +app.exec()