mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
add custom plot export to CSV
This commit is contained in:
1 parent
f755b7ce74
commit
9d01ab0e16
5 files changed
+222
-77
No files matched your search
@@ -85,7 +85,7 @@ class WindowToolKit(object):
|
||||
|
||||
return header, values
|
||||
|
||||
def file_dialog(self, select_file=True,
|
||||
def file_dialog(self, select_file=None,
|
||||
callback=lambda x: None,
|
||||
directory=None,
|
||||
default_suffix=None,
|
||||
@@ -107,16 +107,19 @@ class WindowToolKit(object):
|
||||
|
||||
dialog = QFileDialog(self, options=options)
|
||||
|
||||
if select_file:
|
||||
mode = QFileDialog.FileMode.ExistingFile
|
||||
if select_file is not None:
|
||||
if select_file:
|
||||
mode = QFileDialog.FileMode.ExistingFile
|
||||
else:
|
||||
mode = QFileDialog.FileMode.Directory
|
||||
else:
|
||||
mode = QFileDialog.FileMode.Directory
|
||||
mode = QFileDialog.FileMode.AnyFile
|
||||
|
||||
dialog.setFileMode(mode)
|
||||
if directory is not None:
|
||||
dialog.setDirectory(directory)
|
||||
|
||||
if select_file:
|
||||
if select_file is not False:
|
||||
if default_suffix is not None:
|
||||
dialog.setDefaultSuffix(default_suffix)
|
||||
|
||||
|
||||
Reference in new issue
Block a user