mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
Merge branch 'master' into scenarios.
This commit is contained in:
commit
40d90424a3
44 files changed
+1445
-562
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="ExistingFile",
|
||||
callback=lambda x: None,
|
||||
directory=None,
|
||||
default_suffix=None,
|
||||
@@ -107,16 +107,18 @@ class WindowToolKit(object):
|
||||
|
||||
dialog = QFileDialog(self, options=options)
|
||||
|
||||
if select_file:
|
||||
if select_file == "Existing_file":
|
||||
mode = QFileDialog.FileMode.ExistingFile
|
||||
else:
|
||||
elif select_file == "Directory":
|
||||
mode = QFileDialog.FileMode.Directory
|
||||
else:
|
||||
mode = QFileDialog.FileMode.AnyFile
|
||||
|
||||
dialog.setFileMode(mode)
|
||||
if directory is not None:
|
||||
dialog.setDirectory(directory)
|
||||
|
||||
if select_file:
|
||||
if select_file != "Directory":
|
||||
if default_suffix is not None:
|
||||
dialog.setDefaultSuffix(default_suffix)
|
||||
|
||||
@@ -147,6 +149,9 @@ class WindowToolKit(object):
|
||||
msg.setInformativeText(informative_text)
|
||||
msg.setWindowTitle(window_title)
|
||||
|
||||
msg.findChild(QLabel, "qt_msgbox_label")\
|
||||
.setFixedWidth(384)
|
||||
|
||||
msg.exec_()
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user