本文整理汇总了Python中pp_medialist.MediaList.move_down方法的典型用法代码示例。如果您正苦于以下问题:Python MediaList.move_down方法的具体用法?Python MediaList.move_down怎么用?Python MediaList.move_down使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pp_medialist.MediaList
的用法示例。
在下文中一共展示了MediaList.move_down方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from pp_medialist import MediaList [as 别名]
# 或者: from pp_medialist.MediaList import move_down [as 别名]
#.........这里部分代码省略.........
track_ref_string=" ["+self.current_medialist.track(index)['track-ref']+"]"
else:
track_ref_string=""
self.tracks_display.insert(END, self.current_medialist.track(index)['title']+track_ref_string)
if self.current_medialist.track_is_selected():
self.tracks_display.itemconfig(self.current_medialist.selected_track_index(),fg='red')
self.tracks_display.see(self.current_medialist.selected_track_index())
def e_select_track(self,event):
if self.current_medialist<>None and self.current_medialist.length()>0:
mouse_item_index=int(event.widget.curselection()[0])
self.current_medialist.select(mouse_item_index)
self.refresh_tracks_display()
def m_edit_track(self):
self.edit_track(PPdefinitions.track_types,PPdefinitions.track_field_specs)
def edit_track(self,track_types,field_specs):
if self.current_medialist<>None and self.current_medialist.track_is_selected():
d=EditItem(self.root,"Edit Track",self.current_medialist.selected_track(),track_types,field_specs,self.show_refs(),
self.initial_media_dir,self.pp_home_dir,'track')
if d.result == True:
self.save_medialist()
self.refresh_tracks_display()
def move_track_up(self):
if self.current_medialist<>None and self.current_medialist.track_is_selected():
self.current_medialist.move_up()
self.refresh_tracks_display()
self.save_medialist()
def move_track_down(self):
if self.current_medialist<>None and self.current_medialist.track_is_selected():
self.current_medialist.move_down()
self.refresh_tracks_display()
self.save_medialist()
def new_track(self,fields,values):
if self.current_medialist<>None:
#print '\nfields ', fields
#print '\nvalues ', values
new_track=copy.deepcopy(fields)
#print ',\new track ',new_track
self.current_medialist.append(new_track)
#print '\nbefore values ',self.current_medialist.print_list()
if values<>None:
self.current_medialist.update(self.current_medialist.length()-1,values)
self.current_medialist.select(self.current_medialist.length()-1)
self.refresh_tracks_display()
self.save_medialist()
def new_message_track(self):
self.new_track(PPdefinitions.new_tracks['message'],None)
def new_video_track(self):
self.new_track(PPdefinitions.new_tracks['video'],None)
def new_audio_track(self):
self.new_track(PPdefinitions.new_tracks['audio'],None)
def new_web_track(self):
self.new_track(PPdefinitions.new_tracks['web'],None)
def new_image_track(self):
self.new_track(PPdefinitions.new_tracks['image'],None)
示例2: PPWebEditor
# 需要导入模块: from pp_medialist import MediaList [as 别名]
# 或者: from pp_medialist.MediaList import move_down [as 别名]
#.........这里部分代码省略.........
if self.current_medialist.track_is_selected():
self.tracks_display.select_by_key(self.current_medialist.selected_track_index())
def track_selected(self,key):
# print 'track sel', type(self.tracks_display.get_key())
if self.current_medialist is not None and self.current_medialist.length()>0:
mouse_item_index=self.tracks_display.get_key()
self.current_medialist.select(mouse_item_index)
self.refresh_tracks_display()
def m_edit_track(self):
self.edit_track(PPdefinitions.track_types,PPdefinitions.track_field_specs)
def edit_track(self,track_types,field_specs):
if self.current_medialist is not None and self.current_medialist.track_is_selected():
self.edit_track_dialog=WebEditItem("Edit Track",self.current_medialist.selected_track(),track_types,field_specs,
self.show_refs(),self.initial_media_dir,self.pp_home_dir,'track',self.finished_edit_track)
self.edit_track_dialog.show(self)
self.edit_track_dialog.show_tab('track')
def finished_edit_track(self):
self.refresh_tracks_display()
self.save_medialist()
def move_track_up(self):
if self.current_medialist is not None and self.current_medialist.track_is_selected():
self.current_medialist.move_up()
self.refresh_tracks_display()
self.save_medialist()
def move_track_down(self):
if self.current_medialist is not None and self.current_medialist.track_is_selected():
self.current_medialist.move_down()
self.refresh_tracks_display()
self.save_medialist()
def new_track(self,fields,values):
if self.current_medialist is not None:
# print '\nfields ', fields
# print '\nvalues ', values
new_track=copy.deepcopy(fields)
# print ',\new track ',new_track
self.current_medialist.append(new_track)
# print '\nbefore values ',self.current_medialist.print_list()
if values is not None:
self.current_medialist.update(self.current_medialist.length()-1,values)
self.current_medialist.select(self.current_medialist.length()-1)
self.refresh_tracks_display()
self.save_medialist()
def new_message_track(self):
self.new_track(PPdefinitions.new_tracks['message'],None)
def new_video_track(self):
self.new_track(PPdefinitions.new_tracks['video'],None)
def new_audio_track(self):
self.new_track(PPdefinitions.new_tracks['audio'],None)
def new_web_track(self):
self.new_track(PPdefinitions.new_tracks['web'],None)
def new_image_track(self):
self.new_track(PPdefinitions.new_tracks['image'],None)