Skip to content

Commit

Permalink
Merge pull request #77 from jpgill86/epoch-encoder-save-shortcut
Browse files Browse the repository at this point in the history
Add EpochEncoder shortcut for saving
  • Loading branch information
jpgill86 authored Aug 30, 2019
2 parents dba2489 + bdf97b3 commit accfbe9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions doc/interface.rst
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,5 @@ The epoch encoder has many modes of interaction as well:
* Merge overlapping and adjacent epochs of the same type with the "Merge
neighbors" button.
* Fill gaps between epochs using the "Fill blank" button.
* Click "Save" (shortcut: ``Ctrl+s``, or ``Cmd+s`` on Mac) to write the epochs
to a file.
5 changes: 5 additions & 0 deletions ephyviewer/epochencoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,11 @@ def set_layout(self):
g.addWidget(but, 5, 0)
but.clicked.connect(self.on_save)

save_shortcut = QT.QShortcut(self)
save_shortcut.setKey('Ctrl+s') # automatically converted to Cmd+s on Mac
save_shortcut.activated.connect(but.click)
but.setToolTip('Shortcut: Ctrl/Cmd+s')


#~ v.addStretch()
#~ v.addWidget(QT.QFrame(frameShape=QT.QFrame.HLine, frameShadow=QT.QFrame.Sunken))
Expand Down

0 comments on commit accfbe9

Please sign in to comment.