Commit 07036f52 authored by 3Yan's avatar 3Yan
Browse files

Added dirview to treeview, narrower lines

* lines less thick to improve visibility
* added dirview under treeview for quick sweeps
parent 283d1a7e
......@@ -249,13 +249,26 @@ def main():
treeview.setModel(fileModel)
treeview.setCurrentIndex(activeDir)
treeview.expand(activeDir)
dirview = QtWidgets.QListView()
dirview.setModel(fileModel)
treedock = QtWidgets.QDockWidget()
treedock.setWidget(treeview)
treedock.setWidget(QtWidgets.QWidget())
treedock_layout = QtWidgets.QVBoxLayout(treedock.widget())
treedock_layout.addWidget(treeview)
treedock_layout.addWidget(dirview)
update.signal.connect(
lambda: treeview.setCurrentIndex(fileModel.index(filename[0])))
update.signal.connect(
lambda: dirview.setRootIndex(fileModel.index(os.path.dirname(filename[0]))))
treeview.doubleClicked.connect(lambda index: load_file(
main_window, chromatogram, spectrum, ds, ms, filename, chrom,
update, config, filename=fileModel.filePath(index)))
dirview.doubleClicked.connect(lambda index: load_file(
main_window, chromatogram, spectrum, ds, ms, filename, chrom,
update, config, filename=fileModel.filePath(index)))
dirview.clicked.connect(lambda index: load_file(
main_window, chromatogram, spectrum, ds, ms, filename, chrom,
update, config, filename=fileModel.filePath(index)))
def closeOverride(event, dock, action):
action.setChecked(False)
dock.hide()
......
......@@ -217,7 +217,7 @@ def ann_spec(ms_spec, msdata, ann_limit=0.01):
def pop_plot(plot, plot_data):
"""Define and populate plot"""
plot_data['line'] = plot.plot(plot_data['x'], plot_data['y'])
plot_data['line'] = plot.plot(plot_data['x'], plot_data['y'], linewidth=1)
plot.set_title(plot_data['name'], loc="right")
plot.set_xlabel(plot_data['xlabel'])
plot.set_ylabel(plot_data['ylabel'])
......@@ -254,7 +254,7 @@ def populate(mpl_chromatogram, mpl_spectrum, data_set,
pmasses, pints = [], []
[pmasses.extend([np.nan,i,i]) for i in crudemasses]
[pints.extend([np.nan,0,i]) for i in crudeints]
mpl_spectrum.plot(pmasses,pints)
mpl_spectrum.plot(pmasses,pints, linewidth=1)
mpl_spectrum.figure.canvas.draw()
chrom_spect['x'] = data_set['chrom_dat'][0, :]
......
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