Commit 86db23e4 authored by Yan's avatar Yan
Browse files

Fixed issues with printer DPI settings

parent f2cf4c35
......@@ -62,19 +62,18 @@ def load_file(parent, chrom_plot, spc, d_set, ms_s, fn, chrom_s,
def print_graph(data_set, mass_spec, chrom_spec, spect, fn):
def printimage(printdevice, img):
#!TODO: copy the printer settings from TSQ
printer.setResolution(600)
painter = QtGui.QPainter(printdevice)
painter.drawImage(QtCore.QPoint(0,0), img)
painter.drawImage(0,0,img)
painter.end()
#TODO: substitute the QPrintPreviewDialog with QPrintPreviewWidget
printPreview = QtPrintSupport.QPrintPreviewDialog()
printer = printPreview.printer()
printer.setResolution(600)
printer.setPageSize(printer.A5)
printer.setDuplex(printer.DuplexNone)
image = imgt.paint_image(mass_spec, spect, printer)
printPreview.paintRequested.connect(lambda:
printimage(printer, image))
printimage(printer, image))
printPreview.exec()
......@@ -129,7 +128,7 @@ def about(parent):
QtWidgets.QMessageBox.information(
parent, "About Prasopes",
"Prasopes Finnigan raw file viewer\n\n"
"Version: 0.0.10 (alpha)")
"Version: 0.0.11 (alpha)")
def main():
......
......@@ -39,7 +39,7 @@ def pathlineconf(label, value, config):
browse_button.clicked.connect(lambda: pathsearch(
textfield, value, config))
layout = QtWidgets.QHBoxLayout()
layout.addWidget(QtWidgets.QLabel("{}:".format(label)))
layout.addWidget(QtWidgets.QLabel(str(label)))
layout.addWidget(textfield)
layout.addWidget(browse_button)
return layout
......@@ -110,6 +110,7 @@ def dial(parent):
butt_layout.addStretch(1)
layout = QtWidgets.QVBoxLayout(dialog)
layout.addWidget(QtWidgets.QLabel("Changes are saved automatically"))
layout.addWidget(tabs)
layout.addStretch(1)
layout.addLayout(butt_layout)
......
......@@ -5,7 +5,7 @@ with open("README.md", "r") as fh:
setup(
name="prasopes",
version="0.0.10",
version="0.0.11",
author="Jan Zelenka",
author_email="3yanyanyan@gmail.com",
description="Thermo/Finnigan .raw file viewer based on rawprasslib",
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment