def get_band_item_attributes(self, band_altitude): """ Overloads the BaseAdapters stock implementation of this method """ band = self._topology.bands[band_altitude] attrs = BandItemAttributes() attrs.bgcolor = self._colormapper.get_unique_color(band.edge.name) attrs.border_color = "red" attrs.tooltip_text = "Topic:\t%s\nBw:\t%s/sec\nHz:\t%.1f" % ( band.edge.name, sizeof_fmt(band.edge.bw), band.edge.hz) #attrs.label = band.edge.name #attrs.label_color = "white" #attrs.width = 15 attrs.label = "%s, Bw: %s/sec, Hz: %.1f" % ( band.edge.name, sizeof_fmt(band.edge.bw), band.edge.hz) #attrs.width = 15 if band.edge.bw > 1073741824: attrs.width = 130 elif band.edge.bw > 1048576 * 100: attrs.width = 110 elif band.edge.bw > 1048576 * 10: attrs.width = 90 elif band.edge.bw > 1048576: attrs.width = 70 elif band.edge.bw > 1024 * 100: attrs.width = 50 elif band.edge.bw > 1024 * 10: attrs.width = 30 else: attrs.width = 15 return attrs
def get_band_item_attributes(self, band_altitude): """ Overloads the BaseAdapters stock implementation of this method """ band = self._topology.bands[band_altitude] attrs = BandItemAttributes() attrs.bgcolor = self._colormapper.get_unique_color(band.edge.name) attrs.border_color = "red" attrs.tooltip_text = "Topic:\t%s\nBw:\t%s/sec\nHz:\t%.1f" % (band.edge.name, sizeof_fmt(band.edge.bw), band.edge.hz) attrs.label = band.edge.name attrs.label_color = "white" attrs.width = 15 return attrs
def get_band_item_attributes(self, band_altitude): """ Overloads the BaseAdapters stock implementation of this method """ band = self._topology.bands[band_altitude] attrs = BandItemAttributes() attrs.bgcolor = self._colormapper.get_unique_color(band.edge.name) attrs.border_color = "red" attrs.tooltip_text = "Topic:\t%s\nBw:\t%s/sec\nHz:\t%.1f" % ( band.edge.name, sizeof_fmt(band.edge.bw), band.edge.hz) attrs.label = band.edge.name attrs.label_color = "white" attrs.width = 15 return attrs