Skip to content
Snippets Groups Projects
Commit e55e5f1c authored by Martin Högstedt's avatar Martin Högstedt
Browse files

fixed comments

parent 68d216ca
No related branches found
No related tags found
1 merge request!30Commented the difference
Pipeline #132172 failed
......@@ -599,27 +599,31 @@ class GUI(QMainWindow):
def folderSaveDialog(self) -> str:
"""
Opens a file explorer in a new window. Returns the absolute path to the selected file.
Open a file explorer in a new window. Return the absolute path to the selected file.
``dialog.getSaveFileName()`` can return existing aswell as non-existing files.
Can return existing as well as non-existing files.
If the selected files does not exist it will be created.
"""
dialog = QFileDialog()
dialog.setFileMode(QFileDialog.AnyFile)
dialog.setAcceptMode(QFileDialog.AcceptOpen)
dialog.setDirectory("~/simudator") # TODO: does this work when exported?
# getSaveFileName() can returncan return existing file but also create new ones
return dialog.getSaveFileName()[0]
def folderLoadDialog(self) -> str:
"""
Opens a file explorer in a new window. Returns the absolute path to the selected file.
Open a file explorer in a new window. Return the absolute path to the selected file.
``dialog.getOpenFileName()`` can only return existing files.
Can only return existing files.
"""
dialog = QFileDialog()
dialog.setFileMode(QFileDialog.AnyFile)
dialog.setAcceptMode(QFileDialog.AcceptOpen)
dialog.setDirectory("~/simudator") # TODO: does this work when exported?
# getOpenFileName() will only return already existing files
return dialog.getOpenFileName()[0]
def loadToolBarButtonClick(self) -> None:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment