Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Jan Zelenka
prasopes
Commits
5f47af4b
Commit
5f47af4b
authored
Mar 30, 2019
by
Yan
Browse files
File browser dock show/hide in tools menu
parent
e7b6a263
Changes
2
Hide whitespace changes
Inline
Side-by-side
prasopes/__main__.py
View file @
5f47af4b
...
...
@@ -86,7 +86,7 @@ def about(parent):
QtWidgets
.
QMessageBox
.
information
(
parent
,
"About Prasopes"
,
"Prasopes Finnigan raw file viewer
\n\n
"
"Version: 0.0.
7
(alpha)"
)
"Version: 0.0.
8
(alpha)"
)
def
main
():
...
...
@@ -176,11 +176,14 @@ def main():
aboutact
=
QtWidgets
.
QAction
(
"&About Prasopes"
,
None
)
aboutact
.
triggered
.
connect
(
lambda
:
about
(
main_window
))
autozoomy
=
QtWidgets
.
QAction
(
QtGui
.
QIcon
.
fromTheme
(
"zoom-original"
),
"Auto Zoom Y"
,
None
)
autozoomy
.
setCheckable
(
True
)
autozoomy
.
setChecked
(
True
)
"zoom-original"
),
"Auto Zoom Y"
,
None
,
checkable
=
True
,
checked
=
True
)
autozoomy
.
triggered
.
connect
(
lambda
:
gt
.
autozoomy
(
autozoomy
.
isChecked
(),
spectrum
,
ms
))
filebrowseract
=
QtWidgets
.
QAction
(
"&File browser"
,
None
,
checkable
=
True
,
checked
=
True
)
filebrowseract
.
triggered
.
connect
(
lambda
:
treedock
.
show
()
if
filebrowseract
.
isChecked
()
==
True
else
treedock
.
hide
())
file_menu
=
QtWidgets
.
QMenu
(
'&File'
,
main_window
)
main_window
.
menuBar
().
addMenu
(
file_menu
)
...
...
@@ -194,6 +197,8 @@ def main():
main_window
.
menuBar
().
addMenu
(
tools_menu
)
tools_menu
.
addAction
(
zceact
)
tools_menu
.
addAction
(
drlact
)
tools_menu
.
addSeparator
()
tools_menu
.
addAction
(
filebrowseract
)
help_menu
=
QtWidgets
.
QMenu
(
'&Help'
,
main_window
)
main_window
.
menuBar
().
addMenu
(
help_menu
)
help_menu
.
addAction
(
aboutact
)
...
...
@@ -216,11 +221,10 @@ def main():
toolBar
.
addAction
(
autozoomy
)
fileModel
=
QtWidgets
.
QFileSystemModel
()
fileModel
.
setRootPath
(
QtCore
.
QDir
.
homePath
()
)
fileModel
.
setRootPath
(
QtCore
.
QDir
.
currentPath
(
))
fileModel
.
setRootPath
(
''
)
activeDir
=
fileModel
.
index
(
config
.
value
(
"open_folder"
))
treeview
=
QtWidgets
.
QTreeView
()
treeview
.
setModel
(
fileModel
)
activeDir
=
fileModel
.
index
(
config
.
value
(
"open_folder"
))
treeview
.
setCurrentIndex
(
activeDir
)
treeview
.
expand
(
activeDir
)
treedock
=
QtWidgets
.
QDockWidget
()
...
...
@@ -230,6 +234,12 @@ def main():
treeview
.
doubleClicked
.
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
()
event
.
ignore
()
treedock
.
closeEvent
=
lambda
event
:
closeOverride
(
event
,
treedock
,
filebrowseract
)
main_window
.
addDockWidget
(
QtCore
.
Qt
.
LeftDockWidgetArea
,
treedock
)
layout
=
QtWidgets
.
QVBoxLayout
(
main_widget
)
...
...
setup.py
View file @
5f47af4b
...
...
@@ -5,7 +5,7 @@ with open("README.md", "r") as fh:
setup
(
name
=
"prasopes"
,
version
=
"0.0.
7
"
,
version
=
"0.0.
8
"
,
author
=
"Jan Zelenka"
,
author_email
=
"3yanyanyan@gmail.com"
,
description
=
"Thermo/Finnigan .raw file viewer based on rawprasslib"
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment