Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
SNLO helper
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
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
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
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
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
NLOQO
SNLO helper
Commits
8957a81b
Commit
8957a81b
authored
11 months ago
by
Benedikt Burger
Browse files
Options
Downloads
Patches
Plain Diff
Add open functions to main window.
parent
df56d846
No related branches found
Branches containing commit
Tags
0.3.1
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
snlohelper/main_window.py
+19
-1
19 additions, 1 deletion
snlohelper/main_window.py
with
19 additions
and
1 deletion
snlohelper/main_window.py
+
19
−
1
View file @
8957a81b
...
...
@@ -2,7 +2,7 @@
The SNLO main window
"""
from
typing
import
Optional
from
typing
import
Optional
,
TypeVar
from
.utils
import
gui
,
scale
,
get_screenfactors
,
set_screenfactors
,
Point
from
.functions
import
Functions
,
open_function
...
...
@@ -20,6 +20,7 @@ function_classes = {
Functions
.
FOCUS
:
Focus
,
}
FunctionClass
=
TypeVar
(
"
FunctionClass
"
)
class
MainWindow
:
_close_pos
=
(
95
,
14
)
...
...
@@ -37,3 +38,20 @@ class MainWindow:
open_function
(
key
)
if
key
in
function_classes
:
return
function_classes
[
key
]()
def
_open_function
(
self
,
function_class
:
type
[
FunctionClass
])
->
FunctionClass
:
function
=
function_class
()
function
.
open
()
# type: ignore
return
function
def
open_refractive_index
(
self
)
->
RefractiveIndex
:
return
self
.
_open_function
(
RefractiveIndex
)
def
open_two_d_mix_lp
(
self
)
->
TwoDMixLP
:
return
self
.
_open_function
(
TwoDMixLP
)
def
open_two_d_mix_sp
(
self
)
->
TwoDMixSP
:
return
self
.
_open_function
(
TwoDMixSP
)
def
open_focus
(
self
)
->
Focus
:
return
self
.
_open_function
(
Focus
)
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