7 Module implementing a dialog to enter data for the creation of a tag. |
7 Module implementing a dialog to enter data for the creation of a tag. |
8 """ |
8 """ |
9 |
9 |
10 from __future__ import unicode_literals |
10 from __future__ import unicode_literals |
11 |
11 |
12 from PyQt4.QtCore import Qt |
12 from PyQt5.QtCore import Qt |
13 from PyQt4.QtGui import QDialog, QDialogButtonBox, QVBoxLayout, QLabel |
13 from PyQt5.QtWidgets import QDialog, QDialogButtonBox, QVBoxLayout, QLabel |
14 |
14 |
15 from E5Gui.E5LineEdit import E5ClearableLineEdit |
15 from E5Gui.E5LineEdit import E5ClearableLineEdit |
16 |
16 |
17 |
17 |
18 class DjangoTagInputDialog(QDialog): |
18 class DjangoTagInputDialog(QDialog): |
67 return tuple(data) |
67 return tuple(data) |
68 |
68 |
69 @staticmethod |
69 @staticmethod |
70 def getText(parent, title, labels, defaults=[]): |
70 def getText(parent, title, labels, defaults=[]): |
71 """ |
71 """ |
72 Static method to create the dialog and return the entered data. |
72 Public static method to create the dialog and return the entered data. |
73 |
73 |
74 @param parent reference to the parent widget (QWidget) |
74 @param parent reference to the parent widget (QWidget) |
75 @param title title of the dialog (string) |
75 @param title title of the dialog (string) |
76 @param labels list of labels for the entry fields (list of string) |
76 @param labels list of labels for the entry fields (list of string) |
77 @param defaults list of default values for the entry fields (list |
77 @param defaults list of default values for the entry fields (list |