eric7/Network/IRC/IrcMessageEdit.py

branch
eric7
changeset 8350
74a3b2a6a944
parent 8318
962bce857696
child 8881
54e42bc2437a
equal deleted inserted replaced
8348:f4775ae8f441 8350:74a3b2a6a944
6 """ 6 """
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 PyQt6.QtCore import Qt 10 from PyQt6.QtCore import Qt
11 11 from PyQt6.QtWidgets import QLineEdit
12 from E5Gui.E5LineEdit import E5LineEditSide, E5ClearableLineEdit
13 12
14 13
15 class IrcMessageEdit(E5ClearableLineEdit): 14 class IrcMessageEdit(QLineEdit):
16 """ 15 """
17 Class implementing a specialized line edit for entering IRC messages. 16 Class implementing a specialized line edit for entering IRC messages.
18 """ 17 """
19 MaxHistory = 100 18 MaxHistory = 100
20 19
21 def __init__(self, parent=None, inactiveText="", 20 def __init__(self, parent=None):
22 side=E5LineEditSide.RIGHT):
23 """ 21 """
24 Constructor 22 Constructor
25 23
26 @param parent reference to the parent widget 24 @param parent reference to the parent widget
27 @type QWidget 25 @type QWidget
28 @param inactiveText text to be shown on inactivity
29 @type str
30 @param side side the clear button should be shown at
31 @type E5LineEditSide
32 """ 26 """
33 super().__init__(parent, inactiveText, side) 27 super().__init__(parent)
34 28
35 self.__historyList = [""] # initialize with one empty line 29 self.__historyList = [""] # initialize with one empty line
36 self.__historyLine = 0 30 self.__historyLine = 0
37 31
38 def setText(self, text): 32 def setText(self, text):

eric ide

mercurial