class Chat: def __init__(self): # Main Window self.window = ChatWindow(self) # Socket Controll self.sock_control = SocketControl() def show(self): self.window.show()
def openchatwindow(self, connect): flag = True for x in self.chatwindows: if x.friend_id == connect: flag = False break if flag: chatwindow = ChatWindow(connect, self.uid) chatwindow.clssig.connect(self.closechat) self.chatwindows.append(chatwindow) chatwindow.show()
def open_chat_window(self, username, real_name): cw = ChatWindow(self, real_name, username, 'images/avatar.png')
def open_chat_window(self, id, first_message=False): id = str(id) self.chats[id] = ChatWindow(self.parent, id, self, first_message) self.chats[id].show()
def __init__(self): # Main Window self.window = ChatWindow(self) # Socket Controll self.sock_control = SocketControl()
def open_chat_window(self): cw = ChatWindow(self, 'Jaden Corebyn', 'images/avatar.png')