diff --git a/.gitignore b/.gitignore index a6b6c2d..dfaa739 100644 --- a/.gitignore +++ b/.gitignore @@ -1,163 +1,231 @@ -# ---> Python -# Byte-compiled / optimized / DLL files -__pycache__/ -*.py[cod] -*$py.class - -# C extensions -*.so - -# Distribution / packaging -.Python -build/ -develop-eggs/ -dist/ -downloads/ -eggs/ -.eggs/ -lib/ -lib64/ -parts/ -sdist/ -var/ -wheels/ -share/python-wheels/ -*.egg-info/ -.installed.cfg -*.egg -MANIFEST - -# PyInstaller -# Usually these files are written by a python script from a template -# before PyInstaller builds the exe, so as to inject date/other infos into it. -*.manifest -*.spec - -# Installer logs -pip-log.txt -pip-delete-this-directory.txt - -# Unit test / coverage reports -htmlcov/ -.tox/ -.nox/ -.coverage -.coverage.* -.cache -nosetests.xml -coverage.xml -*.cover -*.py,cover -.hypothesis/ -.pytest_cache/ -cover/ - -# Translations -*.mo -*.pot - -# Django stuff: -*.log -local_settings.py -db.sqlite3 -db.sqlite3-journal - -# Flask stuff: -instance/ -.webassets-cache - -# Scrapy stuff: -.scrapy - -# Sphinx documentation -docs/_build/ - -# PyBuilder -.pybuilder/ -target/ - -# Jupyter Notebook -.ipynb_checkpoints - -# IPython -profile_default/ -ipython_config.py - -# pyenv -# For a library or package, you might want to ignore these files since the code is -# intended to run in multiple environments; otherwise, check them in: -# .python-version - -# pipenv -# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. -# However, in case of collaboration, if having platform-specific dependencies or dependencies -# having no cross-platform support, pipenv may install dependencies that don't work, or not -# install all needed dependencies. -#Pipfile.lock - -# poetry -# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control. -# This is especially recommended for binary packages to ensure reproducibility, and is more -# commonly ignored for libraries. -# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control -#poetry.lock - -# pdm -# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control. -#pdm.lock -# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it -# in version control. -# https://pdm.fming.dev/#use-with-ide -.pdm.toml - -# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm -__pypackages__/ - -# Celery stuff -celerybeat-schedule -celerybeat.pid - -# SageMath parsed files -*.sage.py - -# Environments -.env -.venv -env/ -venv/ -ENV/ -env.bak/ -venv.bak/ - -# Spyder project settings -.spyderproject -.spyproject - -# Rope project settings -.ropeproject - -# mkdocs documentation -/site - -# mypy -.mypy_cache/ -.dmypy.json -dmypy.json - -# Pyre type checker -.pyre/ - -# pytype static type analyzer -.pytype/ - -# Cython debug symbols -cython_debug/ - -# PyCharm -# JetBrains specific template is maintained in a separate JetBrains.gitignore that can -# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore -# and can be added to the global gitignore or merged into this file. For a more nuclear -# option (not recommended) you can uncomment the following to ignore the entire idea folder. -#.idea/ - -Python_Win.code-workspace +# ---> Python +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +share/python-wheels/ +*.egg-info/ +.installed.cfg +*.egg +MANIFEST + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.nox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*.cover +*.py,cover +.hypothesis/ +.pytest_cache/ +cover/ + +# Translations +*.mo +*.pot + +# Django stuff: +*.log +local_settings.py +db.sqlite3 +db.sqlite3-journal + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ + +# PyBuilder +.pybuilder/ +target/ + +# Jupyter Notebook +.ipynb_checkpoints + +# IPython +profile_default/ +ipython_config.py + +# pyenv +# For a library or package, you might want to ignore these files since the code is +# intended to run in multiple environments; otherwise, check them in: +# .python-version + +# pipenv +# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. +# However, in case of collaboration, if having platform-specific dependencies or dependencies +# having no cross-platform support, pipenv may install dependencies that don't work, or not +# install all needed dependencies. +#Pipfile.lock + +# poetry +# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control. +# This is especially recommended for binary packages to ensure reproducibility, and is more +# commonly ignored for libraries. +# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control +#poetry.lock + +# pdm +# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control. +#pdm.lock +# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it +# in version control. +# https://pdm.fming.dev/#use-with-ide +.pdm.toml + +# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm +__pypackages__/ + +# Celery stuff +celerybeat-schedule +celerybeat.pid + +# SageMath parsed files +*.sage.py + +# Environments +.env +.venv +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ + +# Spyder project settings +.spyderproject +.spyproject + +# Rope project settings +.ropeproject + +# mkdocs documentation +/site + +# mypy +.mypy_cache/ +.dmypy.json +dmypy.json + +# Pyre type checker +.pyre/ + +# pytype static type analyzer +.pytype/ + +# Cython debug symbols +cython_debug/ + +# PyCharm +# JetBrains specific template is maintained in a separate JetBrains.gitignore that can +# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore +# and can be added to the global gitignore or merged into this file. For a more nuclear +# option (not recommended) you can uncomment the following to ignore the entire idea folder. +#.idea/ + +Python_Win.code-workspace +hello_world.py +hello_worlda.py +pyqt5_gui.py +pyqt5.py +pyqt5.ui +Teil_60_Qt_1.py +LICENSE +pyqt5_gui.py +pyqt5.py +pyqt5.ui +Python.code-workspace +qhexedit_rc.py +README.md +Teil_60_Qt_1.py +foss-env/lib64 +foss-env/pyvenv.cfg +foss-env/bin/activate +foss-env/bin/activate.csh +foss-env/bin/activate.fish +foss-env/bin/Activate.ps1 +foss-env/bin/f2py +foss-env/bin/numpy-config +foss-env/bin/pip +foss-env/bin/pip3 +foss-env/bin/pip3.12 +foss-env/bin/psghelp +foss-env/bin/psghome +foss-env/bin/psgmain +foss-env/bin/psgupgrade +foss-env/bin/psgver +foss-env/bin/psgwatermarkoff +foss-env/bin/psgwatermarkon +foss-env/bin/pylupdate6 +foss-env/bin/pyproject-build +foss-env/bin/pyrsa-decrypt +foss-env/bin/pyrsa-encrypt +foss-env/bin/pyrsa-keygen +foss-env/bin/pyrsa-priv2pub +foss-env/bin/pyrsa-sign +foss-env/bin/pyrsa-verify +foss-env/bin/pyside6-android-deploy +foss-env/bin/pyside6-assistant +foss-env/bin/pyside6-balsam +foss-env/bin/pyside6-balsamui +foss-env/bin/pyside6-deploy +foss-env/bin/pyside6-designer +foss-env/bin/pyside6-genpyi +foss-env/bin/pyside6-linguist +foss-env/bin/pyside6-lrelease +foss-env/bin/pyside6-lupdate +foss-env/bin/pyside6-metaobjectdump +foss-env/bin/pyside6-project +foss-env/bin/pyside6-qml +foss-env/bin/pyside6-qmlcachegen +foss-env/bin/pyside6-qmlformat +foss-env/bin/pyside6-qmlimportscanner +foss-env/bin/pyside6-qmllint +foss-env/bin/pyside6-qmlls +foss-env/bin/pyside6-qmltyperegistrar +foss-env/bin/pyside6-qsb +foss-env/bin/pyside6-qtpy2cpp +foss-env/bin/pyside6-rcc +foss-env/bin/pyside6-svgtoqml +foss-env/bin/pyside6-uic +foss-env/bin/python +foss-env/bin/python3 +foss-env/bin/python3.12 +foss-env/bin/pyuic6 diff --git a/Byteswap.py b/Byteswap.py new file mode 100644 index 0000000..2bd7a4d --- /dev/null +++ b/Byteswap.py @@ -0,0 +1,221 @@ +import sys, os + +from PyQt6 import QtWidgets, QtCore, QtGui +from QHexEdit import QHexEdit +import qhexedit_rc + +class MainWindow(QtWidgets.QMainWindow): + + def __init__(self, fileName=None): + super(MainWindow, self).__init__() + self.init() + self.setCurrentFile('') + + def about(self): + QtWidgets.QMessageBox.about(self, "About ByteSwap", + "ByteSwap is a simple GUI for byteswaping an Amiga Kickstart Rom"); + + def closeEvent(self, event): + self.writeSettings() + self.close() + + def createActions(self): + self.openAct = QtGui.QAction(QtGui.QIcon(':/images/open.png'), + "&Open...", self, shortcut=QtGui.QKeySequence.StandardKey.Open, + statusTip="Open an existing file", triggered=self.open) + + self.saveAct = QtGui.QAction(QtGui.QIcon(':/images/save.png'), + "&Save", self, shortcut=QtGui.QKeySequence.StandardKey.Save, + statusTip="Save the document to disk", triggered=self.save) + + self.saveAsAct = QtGui.QAction("Save &As...", self, + shortcut=QtGui.QKeySequence.StandardKey.SaveAs, + statusTip="Save the document under a new name", triggered=self.saveAs) + + self.saveReadable = QtGui.QAction("Save as &Readable...", self, + statusTip="Save in a readable format", triggered=self.saveToReadableFile) + + self.exitAct = QtGui.QAction("E&xit", self, shortcut="Ctrl+Q", + statusTip="Exit the application", triggered=self.close) + + self.undoAct = QtGui.QAction(QtGui.QIcon(':/images/undo.png'), + "&Undo", self, shortcut=QtGui.QKeySequence.StandardKey.Undo, triggered=self.hexEdit.undo) + + self.redoAct = QtGui.QAction(QtGui.QIcon(':/images/redo.png'), + "&Redo", self, shortcut=QtGui.QKeySequence.StandardKey.Redo, triggered=self.hexEdit.redo) + + self.saveSelectionReadable = QtGui.QAction("Save Selection Readable...", self, + statusTip="Save selection in a readable format", + triggered=self.saveSelectionToReadableFile) + + self.aboutAct = QtGui.QAction("&About", self, + statusTip="Show the application's About box", triggered=self.about) + + def createMenus(self): + self.fileMenu = self.menuBar().addMenu("&File") + self.fileMenu.addAction(self.openAct) + self.fileMenu.addAction(self.saveAct) + self.fileMenu.addAction(self.saveAsAct) + self.fileMenu.addAction(self.saveReadable) + self.fileMenu.addSeparator() + self.fileMenu.addAction(self.exitAct) + + self.editMenu = self.menuBar().addMenu("&Edit") + self.editMenu.addAction(self.undoAct) + self.editMenu.addAction(self.redoAct) + self.editMenu.addAction(self.saveSelectionReadable) + + self.helpMenu = self.menuBar().addMenu("&Help") + self.helpMenu.addAction(self.aboutAct) + + def createStatusBar(self): + # Address Label + self.lbAddressName = QtWidgets.QLabel() + self.lbAddressName.setText("Address:") + self.statusBar().addPermanentWidget(self.lbAddressName) + self.lbAddress = QtWidgets.QLabel() + self.lbAddress.setFrameShape(QtWidgets.QFrame.Shape.Panel) + self.lbAddress.setFrameShadow(QtWidgets.QFrame.Shadow.Sunken) + self.lbAddress.setMinimumWidth(70) + self.statusBar().addPermanentWidget(self.lbAddress) + self.hexEdit.currentAddressChanged.connect(self.setAddress) + + # Address Size + self.lbSizeName = QtWidgets.QLabel() + self.lbSizeName.setText("Size:") + self.statusBar().addPermanentWidget(self.lbSizeName) + self.lbSize = QtWidgets.QLabel() + self.lbSize.setFrameShape(QtWidgets.QFrame.Shape.Panel) + self.lbSize.setFrameShadow(QtWidgets.QFrame.Shadow.Sunken) + self.lbSize.setMinimumWidth(70) + self.statusBar().addPermanentWidget(self.lbSize) + self.hexEdit.currentSizeChanged.connect(self.setSize) + + # Overwrite Mode label + self.lbOverwriteModeName = QtWidgets.QLabel() + self.lbOverwriteModeName.setText("Mode:") + self.statusBar().addPermanentWidget(self.lbOverwriteModeName) + self.lbOverwriteMode = QtWidgets.QLabel() + self.lbOverwriteMode.setFrameShape(QtWidgets.QFrame.Shape.Panel) + self.lbOverwriteMode.setFrameShadow(QtWidgets.QFrame.Shadow.Sunken) + self.lbOverwriteMode.setMinimumWidth(70) + self.statusBar().addPermanentWidget(self.lbOverwriteMode) + self.setOverwriteMode(self.hexEdit.overwriteMode()) + + self.statusBar().showMessage("Ready") + + def createToolBars(self): + self.fileToolBar = self.addToolBar("File") + self.fileToolBar.addAction(self.openAct) + self.fileToolBar.addAction(self.saveAct) + self.fileToolBar.addAction(self.undoAct) + self.fileToolBar.addAction(self.redoAct) + + def init(self): + self.setAttribute(QtCore.Qt.WidgetAttribute.WA_DeleteOnClose) + self.isUntitled = True + + self.hexEdit = QHexEdit() + self.setCentralWidget(self.hexEdit) + self.hexEdit.overwriteModeChanged.connect(self.setOverwriteMode) + + self.createActions() + self.createMenus() + self.createToolBars() + self.createStatusBar() + + self.readSettings() + + def loadFile(self, fileName): + QtWidgets.QApplication.setOverrideCursor(QtCore.Qt.CursorShape.WaitCursor) + with open(fileName, 'rb') as f: + self.hexEdit.setData(f.read()) + QtWidgets.QApplication.restoreOverrideCursor() + + self.setCurrentFile(fileName) + self.statusBar().showMessage("File loaded", 2000) + + def open(self): + fileName, _filter = QtWidgets.QFileDialog.getOpenFileName(self) + if fileName: + self.loadFile(fileName) + + def readSettings(self): + settings = QtCore.QSettings() + + pos = settings.value('pos', QtCore.QPoint(200, 200)) + size = settings.value('size', QtCore.QSize(610, 460)) + self.move(pos) + self.resize(size) + + def save(self): + if self.isUntitled: + self.saveAs() + else: + self.saveFile(self.curFile) + + def saveAs(self): + fileName, _filter = QtWidgets.QFileDialog.getSaveFileName(self, "Save As", self.curFile) + if fileName != "": + self.saveFile(fileName) + + def setAddress(self, address): + self.lbAddress.setText('%x' % address) + + def setOverwriteMode(self, mode): + settings = QtCore.QSettings() + settings.setValue("OverwriteMode", mode) + if mode: + self.lbOverwriteMode.setText("Overwrite") + else: + self.lbOverwriteMode.setText("Insert") + + def setSize(self, size): + self.lbSize.setText('%d' % size) + + def saveFile(self, fileName): + QtWidgets.QApplication.setOverrideCursor(QtCore.Qt.CursorShape.WaitCursor) + with open(fileName, 'wb') as f: + f.write(self.hexEdit.data()) + QtWidgets.QApplication.restoreOverrideCursor() + + self.setCurrentFile(fileName) + self.statusBar().showMessage("File saved", 2000) + + def saveToReadableFile(self): + fileName, _filter = QtWidgets.QFileDialog.getSaveFileName(self, "Save To Readable File") + if fileName != "": + QtWidgets.QApplication.setOverrideCursor(QtCore.Qt.CursorShape.WaitCursor) + with open(fileName, "w") as f: + f.write(self.hexEdit.toReadableString()) + QtWidgets.QApplication.restoreOverrideCursor() + self.statusBar().showMessage("File saved", 2000); + + def saveSelectionToReadableFile(self): + fileName, _filter = QtWidgets.QFileDialog.getSaveFileName(self, "Save To Readable File") + if fileName != "": + QtWidgets.QApplication.setOverrideCursor(QtCore.Qt.CursorShape.WaitCursor) + with open(fileName, 'w') as f: + f.write(self.hexEdit.selectionToReadableString()) + QtWidgets.QApplication.restoreOverrideCursor() + self.statusBar().showMessage("File saved", 2000); + + def setCurrentFile(self, fileName): + self.curFile = fileName + self.isUntitled = (fileName == "") + self.setWindowModified(False) + basename = os.path.basename(self.curFile) + self.setWindowTitle("%s[*] - ByteSwap" % basename) + + def writeSettings(self): + settings = QtCore.QSettings() + settings.setValue('pos', self.pos()) + settings.setValue('size', self.size()) + +if __name__ == '__main__': + app = QtWidgets.QApplication(sys.argv) + app.setApplicationName("ByteSwap"); + app.setOrganizationName("ByteSwap"); + mainWin = MainWindow() + mainWin.show() + sys.exit(app.exec()) \ No newline at end of file diff --git a/LICENSE b/LICENSE index 8e19f1e..d3ec171 100644 --- a/LICENSE +++ b/LICENSE @@ -1,9 +1,9 @@ -MIT License - -Copyright (c) 2023 torsten - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +MIT License + +Copyright (c) 2023 torsten + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Python.code-workspace b/Python.code-workspace index 876a149..9017da0 100644 --- a/Python.code-workspace +++ b/Python.code-workspace @@ -1,8 +1,8 @@ -{ - "folders": [ - { - "path": "." - } - ], - "settings": {} +{ + "folders": [ + { + "path": "." + } + ], + "settings": {} } \ No newline at end of file diff --git a/README.md b/README.md index ae98cf8..25974e5 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,2 @@ -## Mein Python Repository +## Mein Python Repository In diesem Repository erscheinen alle meine Versuche mit Python. Es gibt kein bestimmtes Projekt, nur eventuelle Unterordner wo es mehr als nur eine Datei gibt. \ No newline at end of file diff --git a/Teil_60_Qt_1.py b/Teil_60_Qt_1.py index a50bea6..865bced 100644 --- a/Teil_60_Qt_1.py +++ b/Teil_60_Qt_1.py @@ -1,14 +1,14 @@ -from PySide6.QtWidgets import QApplication, QMainWindow -from pyqt5_gui import Ui_MainWindow - -class Frm_main(QMainWindow, Ui_MainWindow): - def __init__(self): - super().__init__() - self.setupUi(self) - -app = QApplication() -frm_main = Frm_main() -frm_main.lbl_eins.setText("Ein Label") -#self.lbl_eins.setText(QCoreApplication.translate("MainWindow", u"Das Label", None)) -frm_main.show() -app.exec() +from PySide6.QtWidgets import QApplication, QMainWindow +from pyqt5_gui import Ui_MainWindow + +class Frm_main(QMainWindow, Ui_MainWindow): + def __init__(self): + super().__init__() + self.setupUi(self) + +app = QApplication() +frm_main = Frm_main() +frm_main.lbl_eins.setText("Ein Label") +#self.lbl_eins.setText(QCoreApplication.translate("MainWindow", u"Das Label", None)) +frm_main.show() +app.exec() diff --git a/pyqt5.py b/pyqt5.py index f43e70b..d1dab33 100644 --- a/pyqt5.py +++ b/pyqt5.py @@ -1,10 +1,10 @@ -from PyQt5.QtWidgets import * - -class main(QWidget): - def __init__(self): - super().__init__() - -app = QApplication([]) -window = main() -window.show() +from PyQt5.QtWidgets import * + +class main(QWidget): + def __init__(self): + super().__init__() + +app = QApplication([]) +window = main() +window.show() app.exec() \ No newline at end of file diff --git a/pyqt5.ui b/pyqt5.ui index 9127345..573cec8 100644 --- a/pyqt5.ui +++ b/pyqt5.ui @@ -1,101 +1,101 @@ - - - MainWindow - - - - 0 - 0 - 489 - 299 - - - - TestApp - - - - - - 0 - 0 - 361 - 181 - - - - - 0 - - - - - - - Das Label - - - Qt::AlignCenter - - - - - - - Laden - - - - - - - Schließen - - - - - - - - - Okay - - - - - - - Abbrechen - - - - - - - - - - 0 - 0 - 489 - 22 - - - - - Datei - - - - - - - - - &öffnen - - - - - - + + + MainWindow + + + + 0 + 0 + 489 + 299 + + + + TestApp + + + + + + 0 + 0 + 361 + 181 + + + + + 0 + + + + + + + Das Label + + + Qt::AlignCenter + + + + + + + Laden + + + + + + + Schließen + + + + + + + + + Okay + + + + + + + Abbrechen + + + + + + + + + + 0 + 0 + 489 + 22 + + + + + Datei + + + + + + + + + &öffnen + + + + + + diff --git a/pyqt5_gui.py b/pyqt5_gui.py index cd9f9ed..a834e4f 100644 --- a/pyqt5_gui.py +++ b/pyqt5_gui.py @@ -1,98 +1,98 @@ -# -*- coding: utf-8 -*- - -################################################################################ -## Form generated from reading UI file 'pyqt5.ui' -## -## Created by: Qt User Interface Compiler version 6.6.0 -## -## 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 (QAction, QBrush, QColor, QConicalGradient, - QCursor, QFont, QFontDatabase, QGradient, - QIcon, QImage, QKeySequence, QLinearGradient, - QPainter, QPalette, QPixmap, QRadialGradient, - QTransform) -from PySide6.QtWidgets import (QApplication, QHBoxLayout, QLabel, QMainWindow, - QMenu, QMenuBar, QPushButton, QSizePolicy, - QStatusBar, QVBoxLayout, QWidget) - -class Ui_MainWindow(object): - def setupUi(self, MainWindow): - if not MainWindow.objectName(): - MainWindow.setObjectName(u"MainWindow") - MainWindow.resize(489, 299) - self.action_oeffnen = QAction(MainWindow) - self.action_oeffnen.setObjectName(u"action_oeffnen") - self.centralwidget = QWidget(MainWindow) - self.centralwidget.setObjectName(u"centralwidget") - self.layoutWidget = QWidget(self.centralwidget) - self.layoutWidget.setObjectName(u"layoutWidget") - self.layoutWidget.setGeometry(QRect(0, 0, 361, 181)) - self.horizontalLayout = QHBoxLayout(self.layoutWidget) - self.horizontalLayout.setObjectName(u"horizontalLayout") - self.horizontalLayout.setContentsMargins(0, 0, 0, 0) - self.verticalLayout = QVBoxLayout() - self.verticalLayout.setObjectName(u"verticalLayout") - self.lbl_eins = QLabel(self.layoutWidget) - self.lbl_eins.setObjectName(u"lbl_eins") - self.lbl_eins.setAlignment(Qt.AlignCenter) - - self.verticalLayout.addWidget(self.lbl_eins) - - self.pBtn_laden = QPushButton(self.layoutWidget) - self.pBtn_laden.setObjectName(u"pBtn_laden") - - self.verticalLayout.addWidget(self.pBtn_laden) - - self.pBtn_schliessen = QPushButton(self.layoutWidget) - self.pBtn_schliessen.setObjectName(u"pBtn_schliessen") - - self.verticalLayout.addWidget(self.pBtn_schliessen) - - - self.horizontalLayout.addLayout(self.verticalLayout) - - self.pBtn_ok = QPushButton(self.layoutWidget) - self.pBtn_ok.setObjectName(u"pBtn_ok") - - self.horizontalLayout.addWidget(self.pBtn_ok) - - self.pBtn_abbrechen = QPushButton(self.layoutWidget) - self.pBtn_abbrechen.setObjectName(u"pBtn_abbrechen") - - self.horizontalLayout.addWidget(self.pBtn_abbrechen) - - MainWindow.setCentralWidget(self.centralwidget) - self.menubar = QMenuBar(MainWindow) - self.menubar.setObjectName(u"menubar") - self.menubar.setGeometry(QRect(0, 0, 489, 22)) - self.menuDatei = QMenu(self.menubar) - self.menuDatei.setObjectName(u"menuDatei") - MainWindow.setMenuBar(self.menubar) - self.statusbar = QStatusBar(MainWindow) - self.statusbar.setObjectName(u"statusbar") - MainWindow.setStatusBar(self.statusbar) - - self.menubar.addAction(self.menuDatei.menuAction()) - self.menuDatei.addAction(self.action_oeffnen) - - self.retranslateUi(MainWindow) - - QMetaObject.connectSlotsByName(MainWindow) - # setupUi - - def retranslateUi(self, MainWindow): - MainWindow.setWindowTitle(QCoreApplication.translate("MainWindow", u"TestApp", None)) - self.action_oeffnen.setText(QCoreApplication.translate("MainWindow", u"&\u00f6ffnen", None)) - self.lbl_eins.setText(QCoreApplication.translate("MainWindow", u"Das Label", None)) - self.pBtn_laden.setText(QCoreApplication.translate("MainWindow", u"Laden", None)) - self.pBtn_schliessen.setText(QCoreApplication.translate("MainWindow", u"Schlie\u00dfen", None)) - self.pBtn_ok.setText(QCoreApplication.translate("MainWindow", u"Okay", None)) - self.pBtn_abbrechen.setText(QCoreApplication.translate("MainWindow", u"Abbrechen", None)) - self.menuDatei.setTitle(QCoreApplication.translate("MainWindow", u"Datei", None)) - # retranslateUi - +# -*- coding: utf-8 -*- + +################################################################################ +## Form generated from reading UI file 'pyqt5.ui' +## +## Created by: Qt User Interface Compiler version 6.6.0 +## +## 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 (QAction, QBrush, QColor, QConicalGradient, + QCursor, QFont, QFontDatabase, QGradient, + QIcon, QImage, QKeySequence, QLinearGradient, + QPainter, QPalette, QPixmap, QRadialGradient, + QTransform) +from PySide6.QtWidgets import (QApplication, QHBoxLayout, QLabel, QMainWindow, + QMenu, QMenuBar, QPushButton, QSizePolicy, + QStatusBar, QVBoxLayout, QWidget) + +class Ui_MainWindow(object): + def setupUi(self, MainWindow): + if not MainWindow.objectName(): + MainWindow.setObjectName(u"MainWindow") + MainWindow.resize(489, 299) + self.action_oeffnen = QAction(MainWindow) + self.action_oeffnen.setObjectName(u"action_oeffnen") + self.centralwidget = QWidget(MainWindow) + self.centralwidget.setObjectName(u"centralwidget") + self.layoutWidget = QWidget(self.centralwidget) + self.layoutWidget.setObjectName(u"layoutWidget") + self.layoutWidget.setGeometry(QRect(0, 0, 361, 181)) + self.horizontalLayout = QHBoxLayout(self.layoutWidget) + self.horizontalLayout.setObjectName(u"horizontalLayout") + self.horizontalLayout.setContentsMargins(0, 0, 0, 0) + self.verticalLayout = QVBoxLayout() + self.verticalLayout.setObjectName(u"verticalLayout") + self.lbl_eins = QLabel(self.layoutWidget) + self.lbl_eins.setObjectName(u"lbl_eins") + self.lbl_eins.setAlignment(Qt.AlignCenter) + + self.verticalLayout.addWidget(self.lbl_eins) + + self.pBtn_laden = QPushButton(self.layoutWidget) + self.pBtn_laden.setObjectName(u"pBtn_laden") + + self.verticalLayout.addWidget(self.pBtn_laden) + + self.pBtn_schliessen = QPushButton(self.layoutWidget) + self.pBtn_schliessen.setObjectName(u"pBtn_schliessen") + + self.verticalLayout.addWidget(self.pBtn_schliessen) + + + self.horizontalLayout.addLayout(self.verticalLayout) + + self.pBtn_ok = QPushButton(self.layoutWidget) + self.pBtn_ok.setObjectName(u"pBtn_ok") + + self.horizontalLayout.addWidget(self.pBtn_ok) + + self.pBtn_abbrechen = QPushButton(self.layoutWidget) + self.pBtn_abbrechen.setObjectName(u"pBtn_abbrechen") + + self.horizontalLayout.addWidget(self.pBtn_abbrechen) + + MainWindow.setCentralWidget(self.centralwidget) + self.menubar = QMenuBar(MainWindow) + self.menubar.setObjectName(u"menubar") + self.menubar.setGeometry(QRect(0, 0, 489, 22)) + self.menuDatei = QMenu(self.menubar) + self.menuDatei.setObjectName(u"menuDatei") + MainWindow.setMenuBar(self.menubar) + self.statusbar = QStatusBar(MainWindow) + self.statusbar.setObjectName(u"statusbar") + MainWindow.setStatusBar(self.statusbar) + + self.menubar.addAction(self.menuDatei.menuAction()) + self.menuDatei.addAction(self.action_oeffnen) + + self.retranslateUi(MainWindow) + + QMetaObject.connectSlotsByName(MainWindow) + # setupUi + + def retranslateUi(self, MainWindow): + MainWindow.setWindowTitle(QCoreApplication.translate("MainWindow", u"TestApp", None)) + self.action_oeffnen.setText(QCoreApplication.translate("MainWindow", u"&\u00f6ffnen", None)) + self.lbl_eins.setText(QCoreApplication.translate("MainWindow", u"Das Label", None)) + self.pBtn_laden.setText(QCoreApplication.translate("MainWindow", u"Laden", None)) + self.pBtn_schliessen.setText(QCoreApplication.translate("MainWindow", u"Schlie\u00dfen", None)) + self.pBtn_ok.setText(QCoreApplication.translate("MainWindow", u"Okay", None)) + self.pBtn_abbrechen.setText(QCoreApplication.translate("MainWindow", u"Abbrechen", None)) + self.menuDatei.setTitle(QCoreApplication.translate("MainWindow", u"Datei", None)) + # retranslateUi +