Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
simuDAtor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Computer Engineering
simuDAtor
Commits
e55e5f1c
Commit
e55e5f1c
authored
9 months ago
by
Martin Högstedt
Browse files
Options
Downloads
Patches
Plain Diff
fixed comments
parent
68d216ca
No related branches found
No related tags found
1 merge request
!30
Commented the difference
Pipeline
#132172
failed
9 months ago
Stage: test
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/simudator/gui/gui.py
+8
-4
8 additions, 4 deletions
src/simudator/gui/gui.py
with
8 additions
and
4 deletions
src/simudator/gui/gui.py
+
8
−
4
View file @
e55e5f1c
...
@@ -599,27 +599,31 @@ class GUI(QMainWindow):
...
@@ -599,27 +599,31 @@ class GUI(QMainWindow):
def
folderSaveDialog
(
self
)
->
str
:
def
folderSaveDialog
(
self
)
->
str
:
"""
"""
Open
s
a file explorer in a new window. Return
s
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()`` c
an return existing aswell as non-existing files.
C
an return existing as
well as non-existing files.
If the selected files does not exist it will be created.
If the selected files does not exist it will be created.
"""
"""
dialog
=
QFileDialog
()
dialog
=
QFileDialog
()
dialog
.
setFileMode
(
QFileDialog
.
AnyFile
)
dialog
.
setFileMode
(
QFileDialog
.
AnyFile
)
dialog
.
setAcceptMode
(
QFileDialog
.
AcceptOpen
)
dialog
.
setAcceptMode
(
QFileDialog
.
AcceptOpen
)
dialog
.
setDirectory
(
"
~/simudator
"
)
# TODO: does this work when exported?
dialog
.
setDirectory
(
"
~/simudator
"
)
# TODO: does this work when exported?
# getSaveFileName() can returncan return existing file but also create new ones
return
dialog
.
getSaveFileName
()[
0
]
return
dialog
.
getSaveFileName
()[
0
]
def
folderLoadDialog
(
self
)
->
str
:
def
folderLoadDialog
(
self
)
->
str
:
"""
"""
Open
s
a file explorer in a new window. Return
s
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()`` c
an only return existing files.
C
an only return existing files.
"""
"""
dialog
=
QFileDialog
()
dialog
=
QFileDialog
()
dialog
.
setFileMode
(
QFileDialog
.
AnyFile
)
dialog
.
setFileMode
(
QFileDialog
.
AnyFile
)
dialog
.
setAcceptMode
(
QFileDialog
.
AcceptOpen
)
dialog
.
setAcceptMode
(
QFileDialog
.
AcceptOpen
)
dialog
.
setDirectory
(
"
~/simudator
"
)
# TODO: does this work when exported?
dialog
.
setDirectory
(
"
~/simudator
"
)
# TODO: does this work when exported?
# getOpenFileName() will only return already existing files
return
dialog
.
getOpenFileName
()[
0
]
return
dialog
.
getOpenFileName
()[
0
]
def
loadToolBarButtonClick
(
self
)
->
None
:
def
loadToolBarButtonClick
(
self
)
->
None
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment