From b0d8d575628bdbaab96aa03101af2eec1dfe8d13 Mon Sep 17 00:00:00 2001 From: janic Date: Wed, 29 Dec 2021 13:59:57 +0100 Subject: [PATCH] initial commit --- AreYouAlive.pyproject | 3 + AreYouAlive.pyproject.user | 145 +++++++++++++++++++++++++++++++++++++ LICENSE | 2 +- form.ui | 87 ++++++++++++++++++++++ main.py | 9 +++ widget.py | 29 ++++++++ 6 files changed, 274 insertions(+), 1 deletion(-) create mode 100644 AreYouAlive.pyproject create mode 100644 AreYouAlive.pyproject.user create mode 100644 form.ui create mode 100644 main.py create mode 100644 widget.py diff --git a/AreYouAlive.pyproject b/AreYouAlive.pyproject new file mode 100644 index 0000000..49edc78 --- /dev/null +++ b/AreYouAlive.pyproject @@ -0,0 +1,3 @@ +{ + "files": ["widget.py", "form.ui"] +} diff --git a/AreYouAlive.pyproject.user b/AreYouAlive.pyproject.user new file mode 100644 index 0000000..b25d9f3 --- /dev/null +++ b/AreYouAlive.pyproject.user @@ -0,0 +1,145 @@ + + + + + + EnvironmentId + {9767e0d2-2a91-4dfd-9d0a-084b867744fb} + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + false + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + 80 + true + true + 1 + false + true + false + 0 + true + true + 0 + 8 + true + false + 1 + true + true + true + *.md, *.MD, Makefile + false + true + + + + ProjectExplorer.Project.PluginSettings + + + true + false + true + true + true + true + + + 0 + true + + true + Builtin.BuildSystem + + true + true + Builtin.DefaultTidyAndClazy + 12 + + + + true + + + + + ProjectExplorer.Project.Target.0 + + Desktop + Desktop + Desktop + {79bf9fb1-1b39-4922-88e4-535f92d61f88} + -1 + 0 + 0 + 0 + + + 0 + Deployment + Deployment + ProjectExplorer.BuildSteps.Deploy + + 1 + + false + ProjectExplorer.DefaultDeployConfiguration + + 1 + + true + true + true + + 2 + + /home/janic/workspace/AreYouAlive/widget.py + PythonEditor.RunConfiguration./home/janic/workspace/AreYouAlive/widget.py + /home/janic/workspace/AreYouAlive/widget.py + {218392f0-3309-487b-b97a-d9823dea2a8c} + /home/janic/workspace/AreYouAlive/widget.py + false + true + false + true + /home/janic/workspace/AreYouAlive + + 1 + + + + ProjectExplorer.Project.TargetCount + 1 + + + ProjectExplorer.Project.Updater.FileVersion + 22 + + + Version + 22 + + diff --git a/LICENSE b/LICENSE index 137069b..ac2238b 100644 --- a/LICENSE +++ b/LICENSE @@ -58,7 +58,7 @@ APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. -Copyright [yyyy] [name of copyright owner] +Copyright 2021 Janic Voser Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/form.ui b/form.ui new file mode 100644 index 0000000..defc5d8 --- /dev/null +++ b/form.ui @@ -0,0 +1,87 @@ + + + AreYouAlive + + + + 0 + 0 + 800 + 600 + + + + Widget + + + + + 20 + 20 + 761 + 151 + + + + + 0 + + + 2 + + + 2 + + + 2 + + + 2 + + + + + + 0 + 0 + + + + Enter Your IP + + + + + + + + + + 0 + 0 + + + + Add new IP + + + + + + + + + + + 20 + 190 + 761 + 391 + + + + + + + + diff --git a/main.py b/main.py new file mode 100644 index 0000000..21920e5 --- /dev/null +++ b/main.py @@ -0,0 +1,9 @@ +# This Python file uses the following encoding: utf-8 +import sys +from PySide6.QtWidgets import QApplication, QWidget, QLineEdit + + +if __name__ == "__main__": + app = QApplication([]) + # ... + sys.exit(app.exec_()) diff --git a/widget.py b/widget.py new file mode 100644 index 0000000..ded9814 --- /dev/null +++ b/widget.py @@ -0,0 +1,29 @@ +# This Python file uses the following encoding: utf-8 +import os +from pathlib import Path +import sys + +from PySide6.QtWidgets import QApplication, QWidget +from PySide6.QtCore import QFile +from PySide6.QtUiTools import QUiLoader + + +class Widget(QWidget): + def __init__(self): + super(Widget, self).__init__() + self.load_ui() + + def load_ui(self): + loader = QUiLoader() + path = os.fspath(Path(__file__).resolve().parent / "form.ui") + ui_file = QFile(path) + ui_file.open(QFile.ReadOnly) + loader.load(ui_file, self) + ui_file.close() + + +if __name__ == "__main__": + app = QApplication([]) + widget = Widget() + widget.show() + sys.exit(app.exec_())