def __init__(self, ymin, ymax, yinc, parent = None, width=5, height=4, dpi=100): params = SubplotParams(left=.02, right=.98, top=.99, bottom=.01) self.fig = Figure(figsize=(width,height), dpi=dpi, subplotpars=params) self.axes = self.fig.add_subplot(111) self.axes.hold(False) self.axes.set_xticks([]) self.axes.set_yticks([]) self.plots = [] self.increment = 0 self.animation_engaged = False self.ymax = ymax self.ymin = ymin self.yinc = yinc FigureCanvas.__init__(self, self.fig) self.setParent(parent) minimum_size_policy(self)
def __init__(self, plot, available_curves, info_panel): QWidget.__init__(self, info_panel) self.plot = plot self.info_panel = info_panel minimum_size_policy(self) self.curve_box = QComboBox(self) self.curve_names = available_curves index = self.curve_names.index(plot.name()) self.curve_box.addItems(self.curve_names) self.curve_box.setCurrentIndex(index) self.xmax_label = QLabel(str(plot.xmax()), self) self.xmin_label = QLabel(str(plot.xmin()), self) self.layout = QHBoxLayout(self) self.layout.addWidget(self.xmin_label) self.layout.addWidget(self.curve_box) self.layout.addWidget(self.xmax_label)
def __init__(self, track, parent): QWidget.__init__(self, parent) minimum_size_policy(self) self.track = track self.layout = QVBoxLayout(self) self.layout.setSizeConstraint(QLayout.SetMinimumSize)