Commit 59ba6394 authored by Yan's avatar Yan

Implemented PaintFig into reactivitytools

parent fdc3a84e
......@@ -19,14 +19,20 @@ def settings():
("print/zcespec_xinch", 5),
("print/zcespec_yinch", 2),
("print/zcespec_dpi", 300),
("print/reactspecspec_xinch", 3.5),
("print/reactspecspec_yinch", 2),
("print/reactspecspec_dpi", 300),
("imggen/msspec_xinch", 10),
("imggen/msspec_yinch", 4),
("imggen/msspec_dpi", 300),
("imggen/msspec_xtics", 5),
("imggen/msspec_onlymanann", False),
("imggen/zcespec_xinch", 5),
("imggen/zcespec_yinch", 2),
("imggen/zcespec_dpi", 300),
("imggen/msspec_onlymanann", False),
("imggen/reactspecspec_xinch", 3.5),
("imggen/reactspecspec_yinch", 2),
("imggen/reactspecspec_dpi", 300),
("reactivity/index", 0),
("recents", "")}
......@@ -13,6 +13,7 @@ import prasopes.graphtools as gt
import prasopes.filetools as ft
import prasopes.config as cf
import prasopes.drltools as drl
import prasopes.imagetools as imgt
import os.path
import logging
......@@ -65,7 +66,10 @@ class reactivityParam(QtWidgets.QHBoxLayout):
def key_pressed(event, augCanvas, drls, grph, labels, parselect):
if event.key() == QtCore.Qt.Key_C:
if event.modifiers().__int__() == QtCore.Qt.ControlModifier:
clip_spect_img(augCanvas, drls, grph, labels, parselect)
imggen = imgt.ImagePainter("zcespec")
imggen.popfig = lambda: paint_override(
imggen, augCanvas, drls, grph, labels, parselect)
def export_dial(augCanvas, drls, grph, labels, parselect):
......@@ -102,25 +106,10 @@ def update_parselect(augCanvas, parselect):
def paint_image(augCanvas, drls, grph, labels, parselect):
paintfig = Figure(figsize=(3.5, 2), dpi=300, constrained_layout=True)
printplot = paintfig.add_subplot(111)
pop_dial(augCanvas, drls, printplot, labels, parselect)
cache_file = BytesIO()
image = QtGui.QImage.fromData(
return image
def clip_spect_img(augCanvas, drls, grph, labels, parselect):
image = paint_image(augCanvas, drls, grph, labels, parselect)
[QtWidgets.QApplication.clipboard().setImage(image, i) for i in range(2)]
def paint_override(self, augCanvas, drls, grph, labels, parselect):
pop_dial(augCanvas, drls, self.plot, labels, parselect)
def pop_dial(augCanvas, drls, graph, labels, parselect):
......@@ -6,11 +6,11 @@ from PyQt5 import QtGui
from PyQt5 import QtWidgets
from PyQt5 import QtPrintSupport
from prasopes.zcetools_help import helpstr
from prasopes import imagetools as imgt
from io import BytesIO
import numpy as np
import prasopes.graphtools as gt
import prasopes.filetools as ft
import prasopes.imagetools as imgt
import os.path
import logging
Markdown is supported
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