Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openstructure
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
Contributor 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
schwede
openstructure
Commits
2a5b8521
Commit
2a5b8521
authored
5 years ago
by
Studer Gabriel
Browse files
Options
Downloads
Patches
Plain Diff
"Add Secondary Structure" in scene menu
parent
e12c868d
No related branches found
No related tags found
Loading
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/gui/pymod/init_context_menu.py
+18
-0
18 additions, 0 deletions
modules/gui/pymod/init_context_menu.py
with
18 additions
and
0 deletions
modules/gui/pymod/init_context_menu.py
+
18
−
0
View file @
2a5b8521
...
...
@@ -232,6 +232,23 @@ class SurfaceContextMenu(QtCore.QObject):
except
UserWarning
:
LogError
(
"
WARNING: Entry with the same name already present in scene
"
)
return
class
SecStructContextMenu
(
QtCore
.
QObject
):
def
__init__
(
self
,
context_menu
):
QtCore
.
QObject
.
__init__
(
self
,
context_menu
.
qobject
)
self
.
action
=
QtWidgets
.
QAction
(
"
Assign Secondary Structure
"
,
self
)
self
.
action
.
triggered
.
connect
(
self
.
AssignSecondaryStructure
)
context_menu
.
AddAction
(
self
.
action
,
gui
.
ContextActionType
.
ENTITY
)
def
AssignSecondaryStructure
(
self
):
scene_selection
=
gui
.
SceneSelection
.
Instance
()
ent_list
=
list
()
for
i
in
range
(
0
,
scene_selection
.
GetActiveNodeCount
()):
node
=
scene_selection
.
GetActiveNode
(
i
)
mol
.
alg
.
AssignSecStruct
(
node
.
view
)
node
.
UpdateView
()
class
AlignmentContextMenu
(
QtCore
.
QObject
):
...
...
@@ -365,5 +382,6 @@ class SelectMenuPoints(QtCore.QObject):
def
_InitContextMenu
(
app
):
_InitContextMenu
.
cm
=
app
.
scene_win
.
GetContextMenu
()
_InitContextMenu
.
am
=
AlignmentContextMenu
(
_InitContextMenu
.
cm
)
_InitContextMenu
.
sec
=
SecStructContextMenu
(
_InitContextMenu
.
cm
)
_InitContextMenu
.
sc
=
SurfaceContextMenu
(
_InitContextMenu
.
cm
)
_InitContextMenu
.
sm
=
SelectMenuPoints
(
_InitContextMenu
.
cm
)
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