-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
059fbc3
commit 90d80ff
Showing
3 changed files
with
49 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
_*.png | ||
figshare_PAAm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
"""Screenshots for quick guide import ts (not working automatically)""" | ||
import pathlib | ||
import sys | ||
|
||
from PyQt5 import QtCore | ||
from PyQt5.QtWidgets import QApplication | ||
from pyjibe.head.main import PyJibe | ||
|
||
app = QApplication(sys.argv) | ||
|
||
QtCore.QLocale.setDefault(QtCore.QLocale(QtCore.QLocale.C)) | ||
|
||
mw = PyJibe() | ||
|
||
|
||
jpkfile = pathlib.Path("figshare_PAAm/PAAm_Compliant_ROI1_force-save-" | ||
+ "2019.10.25-10.42.02.660.jpk-force") | ||
|
||
|
||
def cleanup_autosave(jpkfile): | ||
"""Remove autosave files""" | ||
path = jpkfile.parent | ||
files = path.glob("*.tsv") | ||
files = [f for f in files if f.name.startswith("pyjibe_")] | ||
[f.unlink() for f in files] | ||
|
||
|
||
cleanup_autosave(jpkfile=jpkfile) | ||
|
||
# build up a session | ||
mw.load_data([jpkfile]) | ||
|
||
war = mw.subwindows[0].widget() | ||
# unfortunately, this does not grab the popped-up combobox | ||
war.cb_rating_scheme.showPopup() | ||
war.update() | ||
war.repaint() | ||
QApplication.processEvents() | ||
QApplication.processEvents() | ||
war.grab().save("_qg_import_ts.png") | ||
|
||
print("Screenshot must be taken manually") | ||
import IPython # noqa: E402 | ||
IPython.embed() | ||
|
||
mw.close() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters