ColorString/ColorSelectionDialog.py

branch
eric7
changeset 48
e35a2acef5b8
parent 44
0d8ab93654bd
child 55
43b616631f94
equal deleted inserted replaced
47:ea50152ee631 48:e35a2acef5b8
5 5
6 """ 6 """
7 Module implementing a dialog to select a color by name. 7 Module implementing a dialog to select a color by name.
8 """ 8 """
9 9
10 from PyQt5.QtGui import QColor, QPixmap, QIcon 10 from PyQt6.QtGui import QColor, QPixmap, QIcon
11 from PyQt5.QtWidgets import QDialog 11 from PyQt6.QtWidgets import QDialog
12 12
13 from .Ui_ColorSelectionDialog import Ui_ColorSelectionDialog 13 from .Ui_ColorSelectionDialog import Ui_ColorSelectionDialog
14 14
15 15
16 class ColorSelectionDialog(QDialog, Ui_ColorSelectionDialog): 16 class ColorSelectionDialog(QDialog, Ui_ColorSelectionDialog):
20 def __init__(self, selectedName="", parent=None): 20 def __init__(self, selectedName="", parent=None):
21 """ 21 """
22 Constructor 22 Constructor
23 23
24 @param selectedName name of the color to be selected initially 24 @param selectedName name of the color to be selected initially
25 (string) 25 @type str
26 @param parent reference to the parent widget (QWidget) 26 @param parent reference to the parent widget
27 @type QWidget
27 """ 28 """
28 super().__init__(parent) 29 super().__init__(parent)
29 self.setupUi(self) 30 self.setupUi(self)
30 31
31 for colorName in QColor.colorNames(): 32 for colorName in QColor.colorNames():

eric ide

mercurial