Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
MDANSE
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
Container registry
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Scientific Software
MDANSE
Commits
17f93b46
Commit
17f93b46
authored
9 years ago
by
eric pellegrini
Browse files
Options
Downloads
Patches
Plain Diff
Added a method to retrieve the dataplugin associated to a given plugin
parent
a0c9420f
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
MDANSE/App/GUI/Framework/Plugins/ComponentPlugin.py
+4
-0
4 additions, 0 deletions
MDANSE/App/GUI/Framework/Plugins/ComponentPlugin.py
MDANSE/App/GUI/Framework/Plugins/DataPlugin.py
+18
-2
18 additions, 2 deletions
MDANSE/App/GUI/Framework/Plugins/DataPlugin.py
with
22 additions
and
2 deletions
MDANSE/App/GUI/Framework/Plugins/ComponentPlugin.py
+
4
−
0
View file @
17f93b46
...
...
@@ -43,4 +43,8 @@ class ComponentPlugin(IPlugin):
@property
def
dataproxy
(
self
):
return
self
.
parent
.
dataproxy
@property
def
dataplugin
(
self
):
return
self
.
parent
.
dataplugin
This diff is collapsed.
Click to expand it.
MDANSE/App/GUI/Framework/Plugins/DataPlugin.py
+
18
−
2
View file @
17f93b46
...
...
@@ -38,6 +38,18 @@ from MDANSE.Externals.pubsub import pub
from
MDANSE.App.GUI
import
DATA_CONTROLLER
from
MDANSE.App.GUI.Framework.Plugins.IPlugin
import
IPlugin
,
plugin_parent
def
get_data_plugin
(
window
):
if
isinstance
(
window
,
DataPlugin
):
return
window
else
:
try
:
return
get_data_plugin
(
window
.
Parent
)
except
AttributeError
:
return
None
class
DataPlugin
(
IPlugin
):
...
...
@@ -80,6 +92,10 @@ class DataPlugin(IPlugin):
return
self
.
_dataProxy
@property
def
dataplugin
(
self
):
return
self
def
drop
(
self
,
pluginName
):
# If no plugin match the name of the dropped plugin, do nothing.
...
...
@@ -101,9 +117,9 @@ class DataPlugin(IPlugin):
plugin
.
SetFocus
()
def
on_changing_pane
(
self
,
event
):
window
=
plugin_parent
(
event
.
GetWindow
())
if
window
is
None
:
return
...
...
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