127 def __awayIcon(self, icon): |
127 def __awayIcon(self, icon): |
128 """ |
128 """ |
129 Private method to convert an icon to an away icon. |
129 Private method to convert an icon to an away icon. |
130 |
130 |
131 @param icon icon to be converted (QIcon) |
131 @param icon icon to be converted (QIcon) |
132 @param away icon (QIcon) |
132 @return away icon (QIcon) |
133 """ |
133 """ |
134 pix1 = icon.pixmap(16, 16) |
134 pix1 = icon.pixmap(16, 16) |
135 pix2 = UI.PixmapCache.getPixmap("ircAway.png") |
135 pix2 = UI.PixmapCache.getPixmap("ircAway.png") |
136 painter = QPainter(pix1) |
136 painter = QPainter(pix1) |
137 painter.drawPixmap(0, 0, pix2) |
137 painter.drawPixmap(0, 0, pix2) |
934 |
934 |
935 def __handleCtcp(self, match): |
935 def __handleCtcp(self, match): |
936 """ |
936 """ |
937 Private method to handle a CTCP channel command. |
937 Private method to handle a CTCP channel command. |
938 |
938 |
939 @param reference to the match object |
939 @param match reference to the match object |
940 @return flag indicating, if the message was handled (boolean) |
940 @return flag indicating, if the message was handled (boolean) |
941 """ |
941 """ |
942 # group(1) sender user name |
942 # group(1) sender user name |
943 # group(2) sender user@host |
943 # group(2) sender user@host |
944 # group(3) target nick |
944 # group(3) target nick |
1003 def __extractPrivilege(self, name): |
1003 def __extractPrivilege(self, name): |
1004 """ |
1004 """ |
1005 Private method to extract the user privileges out of the name. |
1005 Private method to extract the user privileges out of the name. |
1006 |
1006 |
1007 @param name user name and prefixes (string) |
1007 @param name user name and prefixes (string) |
1008 return list of privileges and user name (list of string, string) |
1008 @return list of privileges and user name (list of string, string) |
1009 """ |
1009 """ |
1010 privileges = [] |
1010 privileges = [] |
1011 while name[0] in self.__prefixToPrivilege: |
1011 while name[0] in self.__prefixToPrivilege: |
1012 prefix = name[0] |
1012 prefix = name[0] |
1013 privileges.append(self.__prefixToPrivilege[prefix]) |
1013 privileges.append(self.__prefixToPrivilege[prefix]) |
1021 """ |
1021 """ |
1022 Private method to add a channel management message to the list. |
1022 Private method to add a channel management message to the list. |
1023 |
1023 |
1024 @param indicator indicator to be shown (string) |
1024 @param indicator indicator to be shown (string) |
1025 @param message message to be shown (string) |
1025 @param message message to be shown (string) |
1026 @keyparam isLocal flag indicating a message related to the local user (boolean) |
|
1027 """ |
1026 """ |
1028 if indicator == self.JoinIndicator: |
1027 if indicator == self.JoinIndicator: |
1029 color = Preferences.getIrc("JoinChannelColour") |
1028 color = Preferences.getIrc("JoinChannelColour") |
1030 elif indicator == self.LeaveIndicator: |
1029 elif indicator == self.LeaveIndicator: |
1031 color = Preferences.getIrc("LeaveChannelColour") |
1030 color = Preferences.getIrc("LeaveChannelColour") |
1036 color, ircTimestamp(), indicator, message)) |
1035 color, ircTimestamp(), indicator, message)) |
1037 |
1036 |
1038 def __appendMessage(self, message): |
1037 def __appendMessage(self, message): |
1039 """ |
1038 """ |
1040 Private slot to append a message. |
1039 Private slot to append a message. |
|
1040 |
|
1041 @param message message to be appended (string) |
1041 """ |
1042 """ |
1042 if self.__hidden and \ |
1043 if self.__hidden and \ |
1043 self.__markerLine == "" and \ |
1044 self.__markerLine == "" and \ |
1044 Preferences.getIrc("MarkPositionWhenHidden"): |
1045 Preferences.getIrc("MarkPositionWhenHidden"): |
1045 self.setMarkerLine() |
1046 self.setMarkerLine() |