[update] make PYQTGRAPH mandatory for PyLoT (stop maintaining unused stuff)!
This commit is contained in:
parent
64885db214
commit
fbc01290d5
4
PyLoT.py
4
PyLoT.py
@ -48,11 +48,7 @@ from obspy.core.util import AttribDict
|
|||||||
|
|
||||||
from pylot.core.util.obspyDMT_interface import check_obspydmt_structure
|
from pylot.core.util.obspyDMT_interface import check_obspydmt_structure
|
||||||
|
|
||||||
try:
|
|
||||||
import pyqtgraph as pg
|
import pyqtgraph as pg
|
||||||
except Exception as e:
|
|
||||||
print('PyLoT: Could not import pyqtgraph. {}'.format(e))
|
|
||||||
pg = None
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from matplotlib.backends.backend_qt4agg import FigureCanvas
|
from matplotlib.backends.backend_qt4agg import FigureCanvas
|
||||||
|
@ -22,12 +22,7 @@ from pylot.styles import style_settings
|
|||||||
from scipy.interpolate import splrep, splev
|
from scipy.interpolate import splrep, splev
|
||||||
from PySide import QtCore, QtGui
|
from PySide import QtCore, QtGui
|
||||||
|
|
||||||
try:
|
|
||||||
import pyqtgraph as pg
|
import pyqtgraph as pg
|
||||||
except Exception as e:
|
|
||||||
print('PyLoT: Could not import pyqtgraph. {}'.format(e))
|
|
||||||
pg = None
|
|
||||||
|
|
||||||
|
|
||||||
def _pickle_method(m):
|
def _pickle_method(m):
|
||||||
if m.im_self is None:
|
if m.im_self is None:
|
||||||
|
@ -4404,7 +4404,7 @@ class GraphicsTab(PropTab):
|
|||||||
super(GraphicsTab, self).__init__(parent)
|
super(GraphicsTab, self).__init__(parent)
|
||||||
self.pylot_mainwindow = parent._pylot_mainwindow
|
self.pylot_mainwindow = parent._pylot_mainwindow
|
||||||
self.init_layout()
|
self.init_layout()
|
||||||
self.add_pg_cb()
|
#self.add_pg_cb()
|
||||||
self.add_nth_sample()
|
self.add_nth_sample()
|
||||||
self.add_style_settings()
|
self.add_style_settings()
|
||||||
self.setLayout(self.main_layout)
|
self.setLayout(self.main_layout)
|
||||||
@ -4441,12 +4441,7 @@ class GraphicsTab(PropTab):
|
|||||||
self.main_layout.addWidget(self.spinbox_nth_sample, 1, 1)
|
self.main_layout.addWidget(self.spinbox_nth_sample, 1, 1)
|
||||||
|
|
||||||
def add_pg_cb(self):
|
def add_pg_cb(self):
|
||||||
try:
|
|
||||||
import pyqtgraph as pg
|
|
||||||
pg = True
|
pg = True
|
||||||
except:
|
|
||||||
pg = False
|
|
||||||
|
|
||||||
text = {True: 'Use pyqtgraphic library for plotting',
|
text = {True: 'Use pyqtgraphic library for plotting',
|
||||||
False: 'Cannot use library: pyqtgraphic not found on system'}
|
False: 'Cannot use library: pyqtgraphic not found on system'}
|
||||||
label = QLabel('PyQt graphic')
|
label = QLabel('PyQt graphic')
|
||||||
|
Loading…
Reference in New Issue
Block a user