def save_connection(self): connection_dict = { "url": self.serverUrl.text(), "ws_url": self.socketsUrl.text(), "username": self.adminUsername.text(), "password": self.adminPassword.text() } if tmsettings.value("recentConnections"): history_list = tmsettings.value("recentConnections") if not connection_dict in history_list: history_list.append(connection_dict) tmsettings.setValue("recentConnections", history_list) else: tmsettings.setValue("recentConnections", [connection_dict])
def save_connection(self): connection_dict = { "url" : self.serverUrl.text(), "ws_url": self.socketsUrl.text(), "username": self.adminUsername.text(), "password": self.adminPassword.text() } if tmsettings.value("recentConnections"): history_list = tmsettings.value("recentConnections") if not connection_dict in history_list: history_list.append(connection_dict) tmsettings.setValue("recentConnections", history_list) else: tmsettings.setValue("recentConnections", [connection_dict])
def closeEvent(self, event): tmsettings.setValue("consoleSplitterSize", self.consoleSplitter.saveState()) tmsettings.setValue("treeViewSplitterSize", self.treeViewSplitter.saveState()) super(TelepatManager, self).closeEvent(event)