7 Module implementing a specialized line edit for entering IRC messages. |
7 Module implementing a specialized line edit for entering IRC messages. |
8 """ |
8 """ |
9 |
9 |
10 from PyQt5.QtCore import Qt |
10 from PyQt5.QtCore import Qt |
11 |
11 |
12 from E5Gui.E5LineEdit import E5LineEdit, E5ClearableLineEdit |
12 from E5Gui.E5LineEdit import E5LineEditSide, E5ClearableLineEdit |
13 |
13 |
14 |
14 |
15 class IrcMessageEdit(E5ClearableLineEdit): |
15 class IrcMessageEdit(E5ClearableLineEdit): |
16 """ |
16 """ |
17 Class implementing a specialized line edit for entering IRC messages. |
17 Class implementing a specialized line edit for entering IRC messages. |
18 """ |
18 """ |
19 MaxHistory = 100 |
19 MaxHistory = 100 |
20 |
20 |
21 def __init__(self, parent=None, inactiveText="", |
21 def __init__(self, parent=None, inactiveText="", |
22 side=E5LineEdit.RightSide): |
22 side=E5LineEditSide.RIGHT): |
23 """ |
23 """ |
24 Constructor |
24 Constructor |
25 |
25 |
26 @param parent reference to the parent widget (QWidget) |
26 @param parent reference to the parent widget |
27 @param inactiveText text to be shown on inactivity (string) |
27 @type QWidget |
|
28 @param inactiveText text to be shown on inactivity |
|
29 @type str |
28 @param side side the clear button should be shown at |
30 @param side side the clear button should be shown at |
29 (E5LineEdit.RightSide, E5LineEdit.LeftSide) |
31 @type E5LineEditSide |
30 """ |
32 """ |
31 super().__init__(parent, inactiveText, side) |
33 super().__init__(parent, inactiveText, side) |
32 |
34 |
33 self.__historyList = [""] # initialize with one empty line |
35 self.__historyList = [""] # initialize with one empty line |
34 self.__historyLine = 0 |
36 self.__historyLine = 0 |