当前位置: 首页>>代码示例>>Python>>正文


Python QMessageBox.information方法代码示例

本文整理汇总了Python中python_qt_binding.QtGui.QMessageBox.information方法的典型用法代码示例。如果您正苦于以下问题:Python QMessageBox.information方法的具体用法?Python QMessageBox.information怎么用?Python QMessageBox.information使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在python_qt_binding.QtGui.QMessageBox的用法示例。


在下文中一共展示了QMessageBox.information方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: click_btn_apply

# 需要导入模块: from python_qt_binding.QtGui import QMessageBox [as 别名]
# 或者: from python_qt_binding.QtGui.QMessageBox import information [as 别名]
 def click_btn_apply(self):
     
     if self.validate_checked():
         quit_msg = "Are you sure you want to Apply this configuration?"
         reply = QMessageBox.question(self, 'Message', quit_msg, QMessageBox.Yes, QMessageBox.No)
         self.get_selected_robot_checked()
         if reply == QMessageBox.Yes:
             xml_info = XmlInfo()
             env_os = EnvOs()
             dialog_xml = DialogXml()
             deleted_general_items = xml_info.get_deleted_general_variable()  #get deleted general items (deleted status = 1 in xml)
             variable_general_items = xml_info.get_general_variables()
             dialog_xml.get_deleted_variable_robot()
             deleted_robots_items=dialog_xml.get_deleted_variable_robot()
             variable_robot_items,active_robot=dialog_xml.get_general_variable_robot()
             deleted_robot=dialog_xml.get_deleted_robot()
             asociative_variable_robot = dialog_xml.get_asociative_robot_variable()
             env_os.unset_to_htbash(deleted_robots_items+deleted_robots_items)
             env_os.export_to_general_htbash(variable_general_items)
             env_os.export_to_robot_htbash(variable_robot_items,active_robot)
             dialog_xml.remove_asociative_robot_variable(asociative_variable_robot)
             for item in deleted_robot:
                 dialog_xml.remove_robot_list_variable(item)
             for item in deleted_general_items:   
                 xml_info.remove_general_variable(item)   
             env_os.include_htbash()
             self.lblmsg.setText("write file .htbash successfully")
         else:
              pass
     else:
         QMessageBox.information(self, 'Checked validate',"You only must select one active robot")
开发者ID:hsarmiento,项目名称:rqt_env,代码行数:33,代码来源:env_widget.py

示例2: click_btnSaveRos

# 需要导入模块: from python_qt_binding.QtGui import QMessageBox [as 别名]
# 或者: from python_qt_binding.QtGui.QMessageBox import information [as 别名]
 def click_btnSaveRos(self):
     if self.txtVariableRos.isEnabled():
         if self.txtVariableRos.text().strip() != "" and self.txtValueRos.text().strip() != "" :
             if not self.validate_item(self.txtVariableRos.text()):
                 xml_info = XmlInfo()
                 xml_info.add_variable_general(self.txtVariableRos.text(),self.txtValueRos.text())
                 message_instance = None
                 self._recursive_create_widget_items(self.env_ros_tree_widget, self.txtVariableRos.text(), self.txtValueRos.text(), message_instance)
             else:
                  QMessageBox.information(self, 'Variable exists',self.txtVariableRos.text()+" exists in list")
     else:
         message_instance = None
         xml_info = XmlInfo()
         xml_info.modify_variable_general(self.txtVariableRos.text(),self.txtValueRos.text())
         self.env_ros_tree_widget.clear()
         self.refresh_env()
     self.btnSaveRos.setEnabled(False)
     self.btnRemoveRos.setEnabled(True)
     self.txtVariableRos.setText("")
     self.txtValueRos.setText("")
     self.txtVariableRos.setEnabled(False)
     self.txtValueRos.setEnabled(False)
     self.btnRemoveRos.setEnabled(False)
     self.btnNewRos.setEnabled(True)
开发者ID:hsarmiento,项目名称:rqt_env,代码行数:26,代码来源:env_widget.py

示例3: click_btnSaveRobot

# 需要导入模块: from python_qt_binding.QtGui import QMessageBox [as 别名]
# 或者: from python_qt_binding.QtGui.QMessageBox import information [as 别名]
	def click_btnSaveRobot(self):
		if self.txtVariableRobot.text() == 'ROS_MASTER_URI':
			parse = urlparse(self.txtValueRobot.text())
			if not self.validate_ip(parse.netloc.split(':')[0]):
				QMessageBox.information(self, 'ROS_MASTER_URI format',"ROS_MASTER_URI must have http://")
				return False
		if self.txtVariableRobot.text()=='ROS_HOSTNAME':
			if not self.validate_hostname_value(self.txtValueRobot.text().split(":")[0]):
				QMessageBox.information(self, 'ROS_HOSTNAME format',"ROS_HOSTNAME must have localhost or IP")
				return False
			else:
				if self.txtValueRobot.text().split(":")[0].lower()=="localhost":
					self.txtValueRobot.setText(self.txtValueRobot.text().lower())
		if self.txtVariableRobot.isEnabled():
			if self.txtAlias.text().strip() != "":
				if self.txtVariableRobot.text().strip() != "" and self.txtValueRobot.text().strip() != "" :
				    if not self.exist_item(self.txtVariableRobot.text()):
				    	dialog_xml = DialogXml()					    	
				     	dialog_xml.add_variable_robot(self.txtAlias.text().strip(),self.txtVariableRobot.text(),self.txtValueRobot.text())
				    	message_instance = None
				    	variable_item = self._recursive_create_widget_items(self.treeWidgetRobot, self.txtVariableRobot.text(), self.txtValueRobot.text(), message_instance)
				    else:
				         QMessageBox.information(self, 'Variable exists',self.txtVariableRobot.text()+" exists in list")
			else:
				QMessageBox.information(self, 'Alias is empty',"Please, insert a value for alias")
				self.txtAlias.setFocus()
		else: 
			xml_dialog = DialogXml()
			xml_dialog.modify_variable_robot(self.txtVariableRobot.text(),self.txtValueRobot.text(),self.txtAlias.text().strip())
			self.treeWidgetRobot.clear()
  			self.refresh_variables()

		self.btnSaveRobot.setEnabled(False)
		self.btnRemoveRobot.setEnabled(True)
		self.txtVariableRobot.setText("")
		self.txtValueRobot.setText("")
		self.txtVariableRobot.setEnabled(False)
		self.txtValueRobot.setEnabled(False)
		self.btnRemoveRobot.setEnabled(False)
		self.btnAddRobot.setEnabled(True)
		self.btnAddRobot.setFocus()
开发者ID:NuenoB,项目名称:rqt_env,代码行数:43,代码来源:env_dialog_robot.py


注:本文中的python_qt_binding.QtGui.QMessageBox.information方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。