Sat, 26 Oct 2024 16:37:50 +0200
- changed header to new style
- included compiled form files
- ensure proper parent relationship of modal dialogs
--- a/.hgignore Sat Dec 23 19:30:14 2023 +0100 +++ b/.hgignore Sat Oct 26 16:37:50 2024 +0200 @@ -1,5 +1,4 @@ glob:.eric7project -glob:.eric6project glob:.ropeproject glob:.jedi glob:.directory @@ -13,4 +12,3 @@ glob:tmp glob:__pycache__ glob:**.DS_Store -glob:**Ui_*.py
--- a/ChangeLog Sat Dec 23 19:30:14 2023 +0100 +++ b/ChangeLog Sat Oct 26 16:37:50 2024 +0200 @@ -1,5 +1,10 @@ ChangeLog --------- +Version 10.2.1 +- changed header to new style +- included compiled form files +- ensure proper parent relationship of modal dialogs + Version 10.2.0 - adapted some import statements to eric 23.1 and newer
--- a/PKGLIST Sat Dec 23 19:30:14 2023 +0100 +++ b/PKGLIST Sat Oct 26 16:37:50 2024 +0200 @@ -1,5 +1,6 @@ PluginWizardDataUriEncoder.py WizardDataUriEncoder/DataUriEncoderWizardDialog.py +WizardDataUriEncoder/Ui_DataUriEncoderWizardDialog.py WizardDataUriEncoder/DataUriEncoderWizardDialog.ui WizardDataUriEncoder/Documentation/LICENSE.GPL3 WizardDataUriEncoder/__init__.py
--- a/PluginWizardDataUriEncoder.epj Sat Dec 23 19:30:14 2023 +0100 +++ b/PluginWizardDataUriEncoder.epj Sat Oct 26 16:37:50 2024 +0200 @@ -1,7 +1,7 @@ { "header": { "comment": "eric project file for project PluginWizardDataUriEncoder", - "copyright": "Copyright (C) 2023 Detlev Offenbach, detlev@die-offenbachs.de" + "copyright": "Copyright (C) 2024 Detlev Offenbach, detlev@die-offenbachs.de" }, "project": { "AUTHOR": "Detlev Offenbach", @@ -27,6 +27,7 @@ "OverloadDecorators": [ "overload" ], + "RespectTypeIgnore": false, "SuppressDummyArgs": false, "SuppressNoneReturning": true }, @@ -68,7 +69,7 @@ "DocstringType": "eric_black", "EnabledCheckerCategories": "C, D, E, I, L, M, NO, N, S, Y, U, W", "ExcludeFiles": "*/Ui_*.py, */*_rc.py", - "ExcludeMessages": "C101,E265,E266,E305,E402,M201,M301,M302,M303,M304,M305,M306,M307,M308,M311,M312,M313,M314,M315,M321,M701,M702,M811,M834,M852,N802,N803,N807,N808,N821,W293,W504,Y119,Y401,Y402", + "ExcludeMessages": "C101,E265,E266,E305,E402,M251,M301,M302,M303,M304,M305,M306,M307,M308,M311,M312,M313,M314,M315,M321,M701,M702,M811,M834,M852,N802,N803,N807,N808,N821,W293,W504,Y119,Y401,Y402", "FixCodes": "", "FixIssues": false, "FutureChecker": "", @@ -188,7 +189,6 @@ "Makefile": "OTHERS", "README": "OTHERS", "README.*": "OTHERS", - "Ui_*.py": "__IGNORE__", "makefile": "OTHERS" }, "FORMS": [ @@ -226,13 +226,14 @@ "OTHERTOOLSPARMS": { "Black": { "exclude": "/(\\.direnv|\\.eggs|\\.git|\\.hg|\\.ipynb_checkpoints|\\.mypy_cache|\\.nox|\\.pytest_cache|\\.ruff_cache|\\.tox|\\.svn|\\.venv|\\.vscode|__pypackages__|_build|buck-out|build|dist|venv)/", - "extend-exclude": "", + "extend-exclude": "Ui_.*\\.py", "force-exclude": "", "line-length": 88, "skip-magic-trailing-comma": false, "skip-string-normalization": false, "source": "project", "target-version": [ + "py313", "py312", "py311", "py310", @@ -274,6 +275,7 @@ "SOURCES": [ "PluginWizardDataUriEncoder.py", "WizardDataUriEncoder/DataUriEncoderWizardDialog.py", + "WizardDataUriEncoder/Ui_DataUriEncoderWizardDialog.py", "WizardDataUriEncoder/__init__.py", "__init__.py" ], @@ -343,4 +345,4 @@ "VCSOTHERDATA": {}, "VERSION": "" } -} \ No newline at end of file +}
--- a/PluginWizardDataUriEncoder.py Sat Dec 23 19:30:14 2023 +0100 +++ b/PluginWizardDataUriEncoder.py Sat Oct 26 16:37:50 2024 +0200 @@ -17,20 +17,23 @@ from eric7.EricWidgets.EricApplication import ericApp # Start-of-Header -name = "Base64 Data URI Encoder Wizard Plug-in" -author = "Detlev Offenbach <detlev@die-offenbachs.de>" -autoactivate = True -deactivateable = True -version = "10.2.0" -className = "WizardDataUriEncoderPlugin" -packageName = "WizardDataUriEncoder" -shortDescription = "Wizard for the creation of code for a base64 data URI." -longDescription = ( - """This plug-in implements a wizard to generate code for""" - """ base64 encoded data URIs.""" -) -needsRestart = False -pyqtApi = 2 +__header__ = { + "name": "Base64 Data URI Encoder Wizard Plug-in", + "author": "Detlev Offenbach <detlev@die-offenbachs.de>", + "autoactivate": True, + "deactivateable": True, + "version": "10.2.1", + "className": "WizardDataUriEncoderPlugin", + "packageName": "WizardDataUriEncoder", + "shortDescription": "Wizard for the creation of code for a base64 data URI.", + "longDescription": ( + """This plug-in implements a wizard to generate code for""" + """ base64 encoded data URIs.""" + ), + "needsRestart": False, + "hasCompiledForms": True, + "pyqtApi": 2, +} # End-of-Header error = "" @@ -149,7 +152,7 @@ self.tr("Please open or create a file first."), ) else: - dlg = DataUriEncoderWizardDialog(None) + dlg = DataUriEncoderWizardDialog(parent=self.__ui) if dlg.exec() == QDialog.DialogCode.Accepted: code = dlg.getCode() if code:
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/WizardDataUriEncoder/Ui_DataUriEncoderWizardDialog.py Sat Oct 26 16:37:50 2024 +0200 @@ -0,0 +1,130 @@ +# Form implementation generated from reading ui file '/home/detlev/Development/Python/Eric/eric7_plugins/Plugin_Wizard_DataUriEncoder/WizardDataUriEncoder/DataUriEncoderWizardDialog.ui' +# +# Created by: PyQt6 UI code generator 6.4.0 +# +# WARNING: Any manual changes made to this file will be lost when pyuic6 is +# run again. Do not edit this file unless you know what you are doing. + + +from PyQt6 import QtCore, QtGui, QtWidgets + + +class Ui_DataUriEncoderWizardDialog(object): + def setupUi(self, DataUriEncoderWizardDialog): + DataUriEncoderWizardDialog.setObjectName("DataUriEncoderWizardDialog") + DataUriEncoderWizardDialog.resize(700, 400) + DataUriEncoderWizardDialog.setSizeGripEnabled(True) + self.gridLayout = QtWidgets.QGridLayout(DataUriEncoderWizardDialog) + self.gridLayout.setObjectName("gridLayout") + self.label = QtWidgets.QLabel(DataUriEncoderWizardDialog) + self.label.setObjectName("label") + self.gridLayout.addWidget(self.label, 0, 0, 1, 2) + self.label_2 = QtWidgets.QLabel(DataUriEncoderWizardDialog) + self.label_2.setObjectName("label_2") + self.gridLayout.addWidget(self.label_2, 1, 0, 1, 1) + self.filePicker = EricPathPicker(DataUriEncoderWizardDialog) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.filePicker.sizePolicy().hasHeightForWidth()) + self.filePicker.setSizePolicy(sizePolicy) + self.filePicker.setFocusPolicy(QtCore.Qt.FocusPolicy.StrongFocus) + self.filePicker.setObjectName("filePicker") + self.gridLayout.addWidget(self.filePicker, 1, 1, 1, 1) + self.horizontalLayout = QtWidgets.QHBoxLayout() + self.horizontalLayout.setObjectName("horizontalLayout") + self.dataCheckBox = QtWidgets.QCheckBox(DataUriEncoderWizardDialog) + self.dataCheckBox.setChecked(True) + self.dataCheckBox.setObjectName("dataCheckBox") + self.horizontalLayout.addWidget(self.dataCheckBox) + self.encryptCheckBox = QtWidgets.QCheckBox(DataUriEncoderWizardDialog) + self.encryptCheckBox.setObjectName("encryptCheckBox") + self.horizontalLayout.addWidget(self.encryptCheckBox) + self.gridLayout.addLayout(self.horizontalLayout, 2, 0, 1, 2) + self.label_3 = QtWidgets.QLabel(DataUriEncoderWizardDialog) + self.label_3.setObjectName("label_3") + self.gridLayout.addWidget(self.label_3, 3, 0, 1, 1) + self.embeddingComboBox = QtWidgets.QComboBox(DataUriEncoderWizardDialog) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.embeddingComboBox.sizePolicy().hasHeightForWidth()) + self.embeddingComboBox.setSizePolicy(sizePolicy) + self.embeddingComboBox.setObjectName("embeddingComboBox") + self.gridLayout.addWidget(self.embeddingComboBox, 3, 1, 1, 1) + self.horizontalLayout_2 = QtWidgets.QHBoxLayout() + self.horizontalLayout_2.setObjectName("horizontalLayout_2") + spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum) + self.horizontalLayout_2.addItem(spacerItem) + self.encodeButton = QtWidgets.QPushButton(DataUriEncoderWizardDialog) + self.encodeButton.setEnabled(False) + self.encodeButton.setObjectName("encodeButton") + self.horizontalLayout_2.addWidget(self.encodeButton) + spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum) + self.horizontalLayout_2.addItem(spacerItem1) + self.gridLayout.addLayout(self.horizontalLayout_2, 4, 0, 1, 2) + self.line = QtWidgets.QFrame(DataUriEncoderWizardDialog) + self.line.setLineWidth(2) + self.line.setFrameShape(QtWidgets.QFrame.Shape.HLine) + self.line.setFrameShadow(QtWidgets.QFrame.Shadow.Sunken) + self.line.setObjectName("line") + self.gridLayout.addWidget(self.line, 5, 0, 1, 2) + self.label_4 = QtWidgets.QLabel(DataUriEncoderWizardDialog) + self.label_4.setObjectName("label_4") + self.gridLayout.addWidget(self.label_4, 6, 0, 1, 2) + self.outputTextEdit = QtWidgets.QPlainTextEdit(DataUriEncoderWizardDialog) + self.outputTextEdit.setReadOnly(True) + self.outputTextEdit.setObjectName("outputTextEdit") + self.gridLayout.addWidget(self.outputTextEdit, 7, 0, 1, 2) + self.horizontalLayout_3 = QtWidgets.QHBoxLayout() + self.horizontalLayout_3.setObjectName("horizontalLayout_3") + self.copyButton = QtWidgets.QPushButton(DataUriEncoderWizardDialog) + self.copyButton.setEnabled(False) + self.copyButton.setObjectName("copyButton") + self.horizontalLayout_3.addWidget(self.copyButton) + spacerItem2 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum) + self.horizontalLayout_3.addItem(spacerItem2) + self.gridLayout.addLayout(self.horizontalLayout_3, 8, 0, 1, 2) + self.buttonBox = QtWidgets.QDialogButtonBox(DataUriEncoderWizardDialog) + self.buttonBox.setOrientation(QtCore.Qt.Orientation.Horizontal) + self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.StandardButton.Cancel|QtWidgets.QDialogButtonBox.StandardButton.Ok) + self.buttonBox.setObjectName("buttonBox") + self.gridLayout.addWidget(self.buttonBox, 9, 0, 1, 2) + + self.retranslateUi(DataUriEncoderWizardDialog) + self.buttonBox.accepted.connect(DataUriEncoderWizardDialog.accept) # type: ignore + self.buttonBox.rejected.connect(DataUriEncoderWizardDialog.reject) # type: ignore + QtCore.QMetaObject.connectSlotsByName(DataUriEncoderWizardDialog) + DataUriEncoderWizardDialog.setTabOrder(self.filePicker, self.dataCheckBox) + DataUriEncoderWizardDialog.setTabOrder(self.dataCheckBox, self.encryptCheckBox) + DataUriEncoderWizardDialog.setTabOrder(self.encryptCheckBox, self.embeddingComboBox) + DataUriEncoderWizardDialog.setTabOrder(self.embeddingComboBox, self.encodeButton) + DataUriEncoderWizardDialog.setTabOrder(self.encodeButton, self.outputTextEdit) + DataUriEncoderWizardDialog.setTabOrder(self.outputTextEdit, self.copyButton) + + def retranslateUi(self, DataUriEncoderWizardDialog): + _translate = QtCore.QCoreApplication.translate + DataUriEncoderWizardDialog.setWindowTitle(_translate("DataUriEncoderWizardDialog", "Data URI Encoder")) + self.label.setText(_translate("DataUriEncoderWizardDialog", "<b>Encode file as plain text string</b>")) + self.label_2.setText(_translate("DataUriEncoderWizardDialog", "File to Encode:")) + self.filePicker.setToolTip(_translate("DataUriEncoderWizardDialog", "Enter the file to be encoded")) + self.dataCheckBox.setText(_translate("DataUriEncoderWizardDialog", "Use \"data:type/subtype;base64,...\"")) + self.encryptCheckBox.setToolTip(_translate("DataUriEncoderWizardDialog", "Select to encrypt the output with \'rot_13\' (use \"string\".decode(rot_13) to decrypt it)")) + self.encryptCheckBox.setText(_translate("DataUriEncoderWizardDialog", "Use basic Caesar Cipher (rot_13)")) + self.label_3.setText(_translate("DataUriEncoderWizardDialog", "Embedding Template Code:")) + self.embeddingComboBox.setToolTip(_translate("DataUriEncoderWizardDialog", "Select the embedding method")) + self.encodeButton.setText(_translate("DataUriEncoderWizardDialog", "Encode BASE64")) + self.label_4.setText(_translate("DataUriEncoderWizardDialog", "Base64 String Output:")) + self.copyButton.setToolTip(_translate("DataUriEncoderWizardDialog", "Press to copy the encoded output to the system clipboard")) + self.copyButton.setText(_translate("DataUriEncoderWizardDialog", "Copy encoded output to Clipboard")) +from eric7.EricWidgets.EricPathPicker import EricPathPicker + + +if __name__ == "__main__": + import sys + app = QtWidgets.QApplication(sys.argv) + DataUriEncoderWizardDialog = QtWidgets.QDialog() + ui = Ui_DataUriEncoderWizardDialog() + ui.setupUi(DataUriEncoderWizardDialog) + DataUriEncoderWizardDialog.show() + sys.exit(app.exec())