src/eric7/CodeTemplates/impl_pyqt5.py.tmpl

Wed, 19 Oct 2022 17:47:50 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Wed, 19 Oct 2022 17:47:50 +0200
branch
eric7
changeset 9423
f30b9e9819cc
parent 9209
b99e7fd55fd3
permissions
-rw-r--r--

Changed the 'Create Dialog Code Dialog' to adhere to the formatting rules of the 'Black' tool.

2741
d0d7836d0c01 Added PyQt5 support to the project resources and translations viewers and the code creation dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1 # -*- coding: utf-8 -*-
d0d7836d0c01 Added PyQt5 support to the project resources and translations viewers and the code creation dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2
d0d7836d0c01 Added PyQt5 support to the project resources and translations viewers and the code creation dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3 """
d0d7836d0c01 Added PyQt5 support to the project resources and translations viewers and the code creation dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4 Module implementing $CLASSNAME$.
d0d7836d0c01 Added PyQt5 support to the project resources and translations viewers and the code creation dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5 """
d0d7836d0c01 Added PyQt5 support to the project resources and translations viewers and the code creation dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6
d0d7836d0c01 Added PyQt5 support to the project resources and translations viewers and the code creation dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
7 from PyQt5.QtCore import pyqtSlot
d0d7836d0c01 Added PyQt5 support to the project resources and translations viewers and the code creation dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
8 from PyQt5.QtWidgets import $SUPERCLASS$
d0d7836d0c01 Added PyQt5 support to the project resources and translations viewers and the code creation dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
9
d0d7836d0c01 Added PyQt5 support to the project resources and translations viewers and the code creation dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
10 from .Ui_$FORMFILE$ import Ui_$FORMCLASS$
d0d7836d0c01 Added PyQt5 support to the project resources and translations viewers and the code creation dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
11
d0d7836d0c01 Added PyQt5 support to the project resources and translations viewers and the code creation dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
12
d0d7836d0c01 Added PyQt5 support to the project resources and translations viewers and the code creation dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
13 class $CLASSNAME$($SUPERCLASS$, Ui_$FORMCLASS$):
d0d7836d0c01 Added PyQt5 support to the project resources and translations viewers and the code creation dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
14 """
d0d7836d0c01 Added PyQt5 support to the project resources and translations viewers and the code creation dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
15 Class documentation goes here.
d0d7836d0c01 Added PyQt5 support to the project resources and translations viewers and the code creation dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
16 """
9423
f30b9e9819cc Changed the 'Create Dialog Code Dialog' to adhere to the formatting rules of the 'Black' tool.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
17
2741
d0d7836d0c01 Added PyQt5 support to the project resources and translations viewers and the code creation dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
18 def __init__(self, parent=None):
d0d7836d0c01 Added PyQt5 support to the project resources and translations viewers and the code creation dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
19 """
d0d7836d0c01 Added PyQt5 support to the project resources and translations viewers and the code creation dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
20 Constructor
9423
f30b9e9819cc Changed the 'Create Dialog Code Dialog' to adhere to the formatting rules of the 'Black' tool.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
21
8033
21fd39d6a6ee Modified the code templates with respect to the constructor docstrings.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6942
diff changeset
22 @param parent reference to the parent widget (defaults to None)
21fd39d6a6ee Modified the code templates with respect to the constructor docstrings.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6942
diff changeset
23 @type QWidget (optional)
2741
d0d7836d0c01 Added PyQt5 support to the project resources and translations viewers and the code creation dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
24 """
8411
da70caa2246d Updated the dialog code templates to user 'super()'.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8312
diff changeset
25 super().__init__(parent)
2741
d0d7836d0c01 Added PyQt5 support to the project resources and translations viewers and the code creation dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
26 self.setupUi(self)

eric ide

mercurial