Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pykat
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sebastian Steinlechner
pykat
Commits
1e342a36
Commit
1e342a36
authored
11 years ago
by
Daniel Brown
Browse files
Options
Downloads
Patches
Plain Diff
fixing gui problems
parent
14d52205
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
pykat/components.py
+6
-7
6 additions, 7 deletions
pykat/components.py
pykat/finesse.py
+13
-3
13 additions, 3 deletions
pykat/finesse.py
pykat/gui/gui.py
+0
-7
0 additions, 7 deletions
pykat/gui/gui.py
with
19 additions
and
17 deletions
pykat/components.py
+
6
−
7
View file @
1e342a36
...
...
@@ -5,13 +5,12 @@ Created on Mon Jan 28 11:10:01 2013
@author: Daniel
"""
import
exceptions
import
pykat.gui.resources
import
pykat
import
pykat.gui.graphics
#from pykat.gui.graphics import *
from
pykat.node_network
import
*
#from PyQt4.QtGui import *
#from PyQt4.Qt import *
import
pykat.gui.resources
import
pykat.gui.graphics
from
pykat.gui.graphics
import
*
class
Component
(
object
)
:
def
__init__
(
self
,
name
):
...
...
@@ -172,8 +171,8 @@ class mirror(Component):
def
getQGraphicsItem
(
self
):
if
self
.
_svgItem
==
None
:
nodes
=
self
.
getNodes
()
self
.
_svgItem
=
pykat
.
gui
.
graphics
.
ComponentQGraphicsItem
(
"
:/resources/mirror_flat.svg
"
,
self
,[(
-
4
,
15
,
nodes
[
0
]),(
14
,
15
,
nodes
[
1
])])
self
.
_svgItem
=
pykat
.
gui
.
graphics
.
ComponentQGraphicsItem
(
"
:/resources/mirror_flat.svg
"
,
self
,[(
-
4
,
15
,
nodes
[
0
]),
(
14
,
15
,
nodes
[
1
])])
return
self
.
_svgItem
...
...
This diff is collapsed.
Click to expand it.
pykat/finesse.py
+
13
−
3
View file @
1e342a36
...
...
@@ -37,7 +37,9 @@ from pykat.node_network import NodeNetwork
from
pykat.detectors
import
Detector
from
pykat.components
import
Component
from
pykat.commands
import
Command
,
xaxis
from
pykat.gui.gui
import
openGUI
from
pykat.gui.gui
import
pyKatGUI
NO_GUI
=
False
class
MissingFinesseEnvVar
(
Exception
)
:
def
__str__
(
self
)
:
...
...
@@ -93,7 +95,7 @@ class kat(object):
self
.
__gui
=
None
self
.
nodes
=
NodeNetwork
(
self
)
self
.
__katexe
=
katexe
self
.
pykatgui
=
None
# Various
self
.
__phase
=
None
self
.
__maxtem
=
None
...
...
@@ -405,7 +407,15 @@ class kat(object):
return
out
def
openGUI
(
self
):
self
.
__gui
=
openGUI
(
self
)
if
NO_GUI
:
print
"
No PyQt4 module was installed so cannot open a GUI
"
else
:
if
self
.
pykatgui
==
None
:
#self.app = QtGui.QApplication([""])
self
.
pykatgui
=
pyKatGUI
(
self
)
self
.
pykatgui
.
main
()
else
:
self
.
pykatgui
.
show
()
def
getComponents
(
self
):
return
self
.
__components
.
values
()
...
...
This diff is collapsed.
Click to expand it.
pykat/gui/gui.py
+
0
−
7
View file @
1e342a36
...
...
@@ -15,13 +15,6 @@ from pykat.gui.graphics import *
import
qt_gui
import
functools
def
openGUI
(
kat
):
app
=
QtGui
.
QApplication
([
""
])
pykatgui
=
pyKatGUI
(
kat
)
pykatgui
.
main
()
app
.
exec_
()
class
pyKatGUI
(
QtGui
.
QMainWindow
,
qt_gui
.
Ui_MainWindow
):
def
__init__
(
self
,
kat
,
parent
=
None
):
super
(
pyKatGUI
,
self
).
__init__
(
parent
)
...
...
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