eric6/E5Gui/E5SimpleHelpDialog.py

Sat, 27 Feb 2021 12:08:23 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sat, 27 Feb 2021 12:08:23 +0100
changeset 8138
169e65a6787c
parent 7923
91e843545d9a
child 8143
2c730d5fd177
permissions
-rw-r--r--

Shell: added functionality to show a prompt when the main client process has exited (e.g. a script ended).

5769
944c04cec861 Added the capability to send these emails via Google Mail using OAuth2 authentication.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1 # -*- coding: utf-8 -*-
944c04cec861 Added the capability to send these emails via Google Mail using OAuth2 authentication.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2
7923
91e843545d9a Updated copyright for 2021.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7780
diff changeset
3 # Copyright (c) 2015 - 2021 Detlev Offenbach <detlev@die-offenbachs.de>
5769
944c04cec861 Added the capability to send these emails via Google Mail using OAuth2 authentication.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4 #
944c04cec861 Added the capability to send these emails via Google Mail using OAuth2 authentication.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5
944c04cec861 Added the capability to send these emails via Google Mail using OAuth2 authentication.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6 """
944c04cec861 Added the capability to send these emails via Google Mail using OAuth2 authentication.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
7 Module implementing a dialog to show some help text.
944c04cec861 Added the capability to send these emails via Google Mail using OAuth2 authentication.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
8 """
944c04cec861 Added the capability to send these emails via Google Mail using OAuth2 authentication.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
9
944c04cec861 Added the capability to send these emails via Google Mail using OAuth2 authentication.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
10 from PyQt5.QtCore import Qt
944c04cec861 Added the capability to send these emails via Google Mail using OAuth2 authentication.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
11 from PyQt5.QtWidgets import QDialog
944c04cec861 Added the capability to send these emails via Google Mail using OAuth2 authentication.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
12
944c04cec861 Added the capability to send these emails via Google Mail using OAuth2 authentication.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
13 from .Ui_E5SimpleHelpDialog import Ui_E5SimpleHelpDialog
944c04cec861 Added the capability to send these emails via Google Mail using OAuth2 authentication.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
14
944c04cec861 Added the capability to send these emails via Google Mail using OAuth2 authentication.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
15
944c04cec861 Added the capability to send these emails via Google Mail using OAuth2 authentication.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
16 class E5SimpleHelpDialog(QDialog, Ui_E5SimpleHelpDialog):
944c04cec861 Added the capability to send these emails via Google Mail using OAuth2 authentication.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
17 """
944c04cec861 Added the capability to send these emails via Google Mail using OAuth2 authentication.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
18 Class implementing a dialog to show some help text.
944c04cec861 Added the capability to send these emails via Google Mail using OAuth2 authentication.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
19 """
5786
6a1b25cff5fb Fixed some code style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5769
diff changeset
20 def __init__(self, title="", label="", helpStr="", parent=None):
5769
944c04cec861 Added the capability to send these emails via Google Mail using OAuth2 authentication.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
21 """
944c04cec861 Added the capability to send these emails via Google Mail using OAuth2 authentication.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
22 Constructor
944c04cec861 Added the capability to send these emails via Google Mail using OAuth2 authentication.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
23
944c04cec861 Added the capability to send these emails via Google Mail using OAuth2 authentication.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
24 @param title title of the window
944c04cec861 Added the capability to send these emails via Google Mail using OAuth2 authentication.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
25 @type str
944c04cec861 Added the capability to send these emails via Google Mail using OAuth2 authentication.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
26 @param label label for the help
944c04cec861 Added the capability to send these emails via Google Mail using OAuth2 authentication.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
27 @type str
5786
6a1b25cff5fb Fixed some code style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5769
diff changeset
28 @param helpStr HTML help text
5769
944c04cec861 Added the capability to send these emails via Google Mail using OAuth2 authentication.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
29 @type str
944c04cec861 Added the capability to send these emails via Google Mail using OAuth2 authentication.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
30 @param parent reference to the parent widget
944c04cec861 Added the capability to send these emails via Google Mail using OAuth2 authentication.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
31 @type QWidget
944c04cec861 Added the capability to send these emails via Google Mail using OAuth2 authentication.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
32 """
944c04cec861 Added the capability to send these emails via Google Mail using OAuth2 authentication.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
33 super(E5SimpleHelpDialog, self).__init__(parent)
944c04cec861 Added the capability to send these emails via Google Mail using OAuth2 authentication.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
34 self.setupUi(self)
944c04cec861 Added the capability to send these emails via Google Mail using OAuth2 authentication.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
35 self.setWindowFlags(Qt.Window)
944c04cec861 Added the capability to send these emails via Google Mail using OAuth2 authentication.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
36
944c04cec861 Added the capability to send these emails via Google Mail using OAuth2 authentication.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
37 self.setWindowTitle(title)
944c04cec861 Added the capability to send these emails via Google Mail using OAuth2 authentication.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
38 if label:
944c04cec861 Added the capability to send these emails via Google Mail using OAuth2 authentication.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
39 self.helpLabel.setText(label)
944c04cec861 Added the capability to send these emails via Google Mail using OAuth2 authentication.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
40 else:
944c04cec861 Added the capability to send these emails via Google Mail using OAuth2 authentication.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
41 self.helpLabel.hide()
5786
6a1b25cff5fb Fixed some code style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5769
diff changeset
42 self.helpEdit.setHtml(helpStr)

eric ide

mercurial