def __create_widgets(self): """""" ##### #Box self.title_box = gtk.HBox() self.box = HIGVBox() self.timeline = TLHoder(self.dashboard, self.connector) self.timeline.show_all() ####### #Title self.title = gtk.Label( "<span size='15000' weight='heavy'>\t\t\t\t Timeline Graph Area(%s) </span>" % (PEER_ATTRIBUTE)) self.title.set_use_markup(True) self.title.set_selectable(False) ######### #Type Pic if "desktop" in PEER_ATTRIBUTE.lower(): peer_img_str = "normalpeer.png" else: peer_img_str = "superpeer.png" self.peer_img = gtk.Image() self.peer_img.set_from_file(os.path.join(IMAGES_DIR, peer_img_str))
class TimeLineGraphViewer(gtk.VBox): def __init__(self,dashboard = None,connector = None): """ Load timeline for every tab in dashboard window """ gtk.VBox.__init__(self) self.dashboard = dashboard self.connector = connector self.__create_widgets() self.__packed_widgets() self.__connected_widgets() def __create_widgets(self): """""" ##### #Box self.title_box = gtk.HBox() self.box = HIGVBox() self.timeline = TLHoder(self.dashboard,self.connector) self.timeline.show_all() ####### #Title self.title = gtk.Label( "<span size='15000' weight='heavy'>\t\t\t\t Timeline Graph Area(%s) </span>"%(PEER_ATTRIBUTE)) self.title.set_use_markup(True) self.title.set_selectable(False) ######### #Type Pic if "desktop" in PEER_ATTRIBUTE.lower(): peer_img_str = "normalpeer.png" else: peer_img_str = "superpeer.png" self.peer_img = gtk.Image() self.peer_img.set_from_file(os.path.join(IMAGES_DIR,peer_img_str)) def __packed_widgets(self): """""" self.box._pack_noexpand_nofill(self.title_box) self.box._pack_expand_fill(self.timeline) self.title_box.pack_end(self.peer_img) self.title_box.pack_end(self.title) self.add(self.box) self.show_all() def __connected_widgets(self): """""" pass
class TimeLineGraphViewer(gtk.VBox): def __init__(self, dashboard=None, connector=None): """ Load timeline for every tab in dashboard window """ gtk.VBox.__init__(self) self.dashboard = dashboard self.connector = connector self.__create_widgets() self.__packed_widgets() self.__connected_widgets() def __create_widgets(self): """""" ##### #Box self.title_box = gtk.HBox() self.box = HIGVBox() self.timeline = TLHoder(self.dashboard, self.connector) self.timeline.show_all() ####### #Title self.title = gtk.Label( "<span size='15000' weight='heavy'>\t\t\t\t Timeline Graph Area(%s) </span>" % (PEER_ATTRIBUTE)) self.title.set_use_markup(True) self.title.set_selectable(False) ######### #Type Pic if "desktop" in PEER_ATTRIBUTE.lower(): peer_img_str = "normalpeer.png" else: peer_img_str = "superpeer.png" self.peer_img = gtk.Image() self.peer_img.set_from_file(os.path.join(IMAGES_DIR, peer_img_str)) def __packed_widgets(self): """""" self.box._pack_noexpand_nofill(self.title_box) self.box._pack_expand_fill(self.timeline) self.title_box.pack_end(self.peer_img) self.title_box.pack_end(self.title) self.add(self.box) self.show_all() def __connected_widgets(self): """""" pass
def __create_widgets(self): """""" ##### #Box self.title_box = gtk.HBox() self.box = HIGVBox() self.timeline = TLHoder(self.dashboard,self.connector) self.timeline.show_all() ####### #Title self.title = gtk.Label( "<span size='15000' weight='heavy'>\t\t\t\t Timeline Graph Area(%s) </span>"%(PEER_ATTRIBUTE)) self.title.set_use_markup(True) self.title.set_selectable(False) ######### #Type Pic if "desktop" in PEER_ATTRIBUTE.lower(): peer_img_str = "normalpeer.png" else: peer_img_str = "superpeer.png" self.peer_img = gtk.Image() self.peer_img.set_from_file(os.path.join(IMAGES_DIR,peer_img_str))