本文整理汇总了Python中DataManager.DataManager.pop_point方法的典型用法代码示例。如果您正苦于以下问题:Python DataManager.pop_point方法的具体用法?Python DataManager.pop_point怎么用?Python DataManager.pop_point使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DataManager.DataManager
的用法示例。
在下文中一共展示了DataManager.pop_point方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: MainWindow
# 需要导入模块: from DataManager import DataManager [as 别名]
# 或者: from DataManager.DataManager import pop_point [as 别名]
#.........这里部分代码省略.........
cite_data = self.DIG.readPDIData()
if cite_data == None:
return
self.data.push_point(cite_data)
step = self.data.step
index = self.data.number_points[step]
#-update the mayaview
if step == 0:
self.ui_main.pushButton_back.setEnabled(True)
self.ui_main.MayaviQwidget.visualization.obtain_turn = index+1
self.ui_main.MayaviQwidget.visualization.show_obtain_points()
if index < 26 :
return
elif index == 26:
self.interface_before_S3R()
return
if step == 1:
#-updata the mayaview
target_turn = self.data.number_points[1]
print "target turn"+str(target_turn)
target_point = self.data.navigation_target[target_turn]
distance = np.linalg.norm(target_point-self.data.navigation_process)
self.ui_main.MayaviQwidget.visualization.target_distance = distance
self.ui_main.MayaviQwidget.visualization.navigation_current_mesh = self.data.navigation_process_mesh
self.ui_main.MayaviQwidget.visualization.navigation_current = self.data.navigation_process
self.ui_main.MayaviQwidget.visualization.navigation_flash()
@Slot()
def delete_last_point(self):
self.data.pop_point()
step = self.data.step
index = self.data.number_points[step]
if step == 0:
self.ui_main.MayaviQwidget.visualization.obtain_turn = index+1
self.ui_main.MayaviQwidget.visualization.show_obtain_points()
if index == 0 :
self.ui_main.pushButton_back.setEnabled(False)
if index < 26:
self.ui_main.pushButton_finish.setEnabled(False)
elif step == 1:
self.ui_main.MayaviQwidget.visualization.target_turn -= 1
index = self.data.number_points[1]
self.ui_main.MayaviQwidget.visualization.show_target()
self.ui_main.pushButton_finish.setEnabled(True)
self.ui_main.pushButton_save.setEnabled(False)
if index == 0 :
self.ui_main.pushButton_back.setEnabled(False)
if self.timer_main.isActive() == False:
self.timer_main.start(100)
@Slot()
def finish(self):
step = self.data.step
index = self.data.number_points[step]
if step == 0 :