當前位置: 首頁>>代碼示例>>Python>>正文


Python Timeline.show方法代碼示例

本文整理匯總了Python中timeline.Timeline.show方法的典型用法代碼示例。如果您正苦於以下問題:Python Timeline.show方法的具體用法?Python Timeline.show怎麽用?Python Timeline.show使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在timeline.Timeline的用法示例。


在下文中一共展示了Timeline.show方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: window_destroy

# 需要導入模塊: from timeline import Timeline [as 別名]
# 或者: from timeline.Timeline import show [as 別名]

#.........這裏部分代碼省略.........
            tokenquery = "meta LIKE '%%%s%%'"
            for token in tokens[:len(tokens)-1]:
                query += tokenquery % token + " AND "
            query += tokenquery % tokens[-1]
        else:
            query = ""
        
        self.video_tree_manager.redraw(query) 

    def _change_frame(self, frame):
        #Sets the videobox and logplayer frame
        self.video_box.set_frame(frame)
        self.logplayer.set_frame(frame)

    def __init__(self):
        self.init = False
        self.gladefile = os.path.join(__location__, "gui/cave.glade")
        self.builder = Gtk.Builder()
        self.builder.add_from_file(self.gladefile)

        # Automatically connect signals to functions defined above
        self.builder.connect_signals(self)

        #Set up the video tree 
        self.video_tree = self.builder.get_object("videoTreeView")
        self.video_tree_manager = VideoTreeManager(self.video_tree, self)

        #Set up the filter box
        self.filter_box = self.builder.get_object("filterEntry")

        #Create & link video display widget
        self.video_box_container = self.builder.get_object("videoBox")
        self.video_box = VideoBox(self)
        self.video_box.show()
        self.video_box_container.pack_start(self.video_box, True, True, 0)
        
        #Create & Link timeline widget
        self.timeline_box = self.builder.get_object("timelineBox")
        self.timeline = Timeline(self)
        self.timeline.show()
        self.timeline_box.pack_start(self.timeline, True, True, 0)

        self.timeline.cursor_change = self._change_frame #Register listener

        self.video_box.length_listener = self.timeline.set_length #Register listener

        #Initialize shared memory blocks for all cameras
        CameraLink.preinit()

        #Log playback
        filter_file = os.path.expanduser(args.filter) if args.filter else ''
        self.logplayer = LogPlayer(filter=filter_file)

        # Get the main window
        self.window = self.builder.get_object("caveWindow")
        self.window.show()

        #Initialize gtk's thread engine; add any threads after these lines
        Gdk.threads_init()
        GLib.threads_init()

        #Start video player thread
        self.video_player = VideoPlayer(self)
        self.play_button = self.builder.get_object("playButton")

        self.enable_button = self.builder.get_object("enableButton")
開發者ID:athityakumar,項目名稱:software,代碼行數:70,代碼來源:main.py


注:本文中的timeline.Timeline.show方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。