def __init__(self): super(CurveImage, self).__init__() log.debug("CurveImage creation") from linegrab.ui.linegrab_layout import Ui_MainWindow self.ui = Ui_MainWindow() self.ui.setupUi(self) self.setGeometry(450, 350, 1080, 600) # Make sure the system wide style sheet is applied before the # curve and image widgets style sheets overwrite self.qss_string = utils.load_style_sheet("qdarkstyle.css") self.setStyleSheet(self.qss_string) self.replace_widgets() # Align the image with the curve above it self.main_image_dialog.setContentsMargins(17, 0, 0, 0) self.add_manager_and_tools() # Timer to auto-close the application self.close_timer = QtCore.QTimer() self.close_timer.timeout.connect(self.closeEvent) self.set_app_defaults() self.show()
def __init__(self): super(CleanCurveDialog, self).__init__(edit=True) log.debug("new graph") # Don't show the grid by deleting it. Apparently you can't get # it back after deleting it grid_item = self.get_plot().get_items()[0] self.get_plot().del_item(grid_item) # Initial chart parameters for this graph self.chart_param = styles.CurveParam() self.chart_param.label = "Data" self.chart_param.line.color = "#00cc00" # Create a default line profile self.create_curve() # Load an apply this widget's style sheets. Make sure the # application wide stylesheet is loaded first self.chart_style = utils.load_style_sheet("linegrab_custom.css") self.setStyleSheet(self.chart_style)
def __init__(self): super(CleanImageDialog, self).__init__(toolbar=False, edit=True) # If you delete the grid item this way, apparently you can't get # it back even though the imagedialog makes it available grid_item = self.get_plot().get_items()[0] self.get_plot().del_item(grid_item) self.create_image() # Don't show the right side colormap axis local_plot = self.get_plot() local_plot.enableAxis(local_plot.colormap_axis, False) # Note that this disagrees with the documentation local_plot.set_axis_direction("left", False) # Load an apply this widget's style sheets. Make sure the # application wide stylesheet is loaded first self.chart_style = utils.load_style_sheet("linegrab_custom.css") self.setStyleSheet(self.chart_style)