Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Scientific Software
MDANSE
Commits
0efc02a7
Commit
0efc02a7
authored
Sep 18, 2015
by
eric pellegrini
Browse files
Rename module and assocaited classes
parent
d2b02537
Changes
19
Hide whitespace changes
Inline
Side-by-side
MDANSE/Framework/Configurators/AtomSelectionConfigurator.py
View file @
0efc02a7
...
@@ -35,7 +35,7 @@ import operator
...
@@ -35,7 +35,7 @@ import operator
import
numpy
import
numpy
from
MDANSE.Framework.UserDefinition
s
Store
import
UD_STORE
from
MDANSE.Framework.UserDefinitionStore
import
UD_STORE
from
MDANSE.Framework.Configurators.IConfigurator
import
IConfigurator
from
MDANSE.Framework.Configurators.IConfigurator
import
IConfigurator
from
MDANSE.Framework.AtomSelectionParser
import
AtomSelectionParser
from
MDANSE.Framework.AtomSelectionParser
import
AtomSelectionParser
...
...
MDANSE/Framework/Configurators/AtomTransmutationConfigurator.py
View file @
0efc02a7
...
@@ -31,7 +31,7 @@ Created on Mar 30, 2015
...
@@ -31,7 +31,7 @@ Created on Mar 30, 2015
'''
'''
from
MDANSE
import
ELEMENTS
from
MDANSE
import
ELEMENTS
from
MDANSE.Framework.UserDefinition
s
Store
import
UD_STORE
from
MDANSE.Framework.UserDefinitionStore
import
UD_STORE
from
MDANSE.Framework.Configurators.IConfigurator
import
IConfigurator
,
ConfiguratorError
from
MDANSE.Framework.Configurators.IConfigurator
import
IConfigurator
,
ConfiguratorError
from
MDANSE.Framework.AtomSelectionParser
import
AtomSelectionParser
from
MDANSE.Framework.AtomSelectionParser
import
AtomSelectionParser
...
...
MDANSE/Framework/Configurators/AtomsListConfigurator.py
View file @
0efc02a7
...
@@ -30,7 +30,7 @@ Created on Mar 30, 2015
...
@@ -30,7 +30,7 @@ Created on Mar 30, 2015
:author: Eric C. Pellegrini
:author: Eric C. Pellegrini
'''
'''
from
MDANSE.Framework.UserDefinition
s
Store
import
UD_STORE
from
MDANSE.Framework.UserDefinitionStore
import
UD_STORE
from
MDANSE.Framework.Configurators.IConfigurator
import
IConfigurator
from
MDANSE.Framework.Configurators.IConfigurator
import
IConfigurator
from
MDANSE.MolecularDynamics.Trajectory
import
find_atoms_in_molecule
from
MDANSE.MolecularDynamics.Trajectory
import
find_atoms_in_molecule
...
...
MDANSE/Framework/Configurators/AxisSelectionConfigurator.py
View file @
0efc02a7
...
@@ -30,7 +30,7 @@ Created on Mar 30, 2015
...
@@ -30,7 +30,7 @@ Created on Mar 30, 2015
:author: Bachir Aoun and Eric C. Pellegrini
:author: Bachir Aoun and Eric C. Pellegrini
'''
'''
from
MDANSE.Framework.UserDefinition
s
Store
import
UD_STORE
from
MDANSE.Framework.UserDefinitionStore
import
UD_STORE
from
MDANSE.Framework.Configurators.IConfigurator
import
IConfigurator
from
MDANSE.Framework.Configurators.IConfigurator
import
IConfigurator
from
MDANSE.MolecularDynamics.Trajectory
import
find_atoms_in_molecule
from
MDANSE.MolecularDynamics.Trajectory
import
find_atoms_in_molecule
...
...
MDANSE/Framework/Configurators/BasisSelectionConfigurator.py
View file @
0efc02a7
...
@@ -30,7 +30,7 @@ Created on Mar 30, 2015
...
@@ -30,7 +30,7 @@ Created on Mar 30, 2015
:author: Bachir Aoun and Eric C. Pellegrini
:author: Bachir Aoun and Eric C. Pellegrini
'''
'''
from
MDANSE.Framework.UserDefinition
s
Store
import
UD_STORE
from
MDANSE.Framework.UserDefinitionStore
import
UD_STORE
from
MDANSE.Framework.Configurators.IConfigurator
import
IConfigurator
from
MDANSE.Framework.Configurators.IConfigurator
import
IConfigurator
from
MDANSE.MolecularDynamics.Trajectory
import
find_atoms_in_molecule
from
MDANSE.MolecularDynamics.Trajectory
import
find_atoms_in_molecule
...
...
MDANSE/Framework/Configurators/PartialChargeConfigurator.py
View file @
0efc02a7
...
@@ -33,7 +33,7 @@ Created on Jun 9, 2015
...
@@ -33,7 +33,7 @@ Created on Jun 9, 2015
import
os
import
os
from
MDANSE.Framework.Configurators.IConfigurator
import
IConfigurator
,
ConfiguratorError
from
MDANSE.Framework.Configurators.IConfigurator
import
IConfigurator
,
ConfiguratorError
from
MDANSE.Framework.UserDefinition
s
Store
import
UD_STORE
from
MDANSE.Framework.UserDefinitionStore
import
UD_STORE
class
PartialChargeConfigurator
(
IConfigurator
):
class
PartialChargeConfigurator
(
IConfigurator
):
"""
"""
...
...
MDANSE/Framework/Configurators/QVectorsConfigurator.py
View file @
0efc02a7
...
@@ -31,7 +31,7 @@ Created on May 22, 2015
...
@@ -31,7 +31,7 @@ Created on May 22, 2015
'''
'''
from
MDANSE
import
REGISTRY
from
MDANSE
import
REGISTRY
from
MDANSE.Framework.UserDefinition
s
Store
import
UD_STORE
from
MDANSE.Framework.UserDefinitionStore
import
UD_STORE
from
MDANSE.Framework.Configurators.IConfigurator
import
IConfigurator
,
ConfiguratorError
from
MDANSE.Framework.Configurators.IConfigurator
import
IConfigurator
,
ConfiguratorError
class
QVectorsConfigurator
(
IConfigurator
):
class
QVectorsConfigurator
(
IConfigurator
):
...
...
MDANSE/Framework/Plugins/AtomSelectionPlugin.py
View file @
0efc02a7
...
@@ -40,7 +40,7 @@ from MDANSE import LOGGER, REGISTRY
...
@@ -40,7 +40,7 @@ from MDANSE import LOGGER, REGISTRY
from
MDANSE.Externals.pubsub
import
pub
from
MDANSE.Externals.pubsub
import
pub
from
MDANSE.Framework.AtomSelectionParser
import
AtomSelectionParser
,
AtomSelectionParserError
from
MDANSE.Framework.AtomSelectionParser
import
AtomSelectionParser
,
AtomSelectionParserError
from
MDANSE.Framework.Plugins.DataPlugin
import
get_data_plugin
from
MDANSE.Framework.Plugins.DataPlugin
import
get_data_plugin
from
MDANSE.Framework.Widgets.UserDefinitionWidget
import
UserDefinition
s
Plugin
from
MDANSE.Framework.Widgets.UserDefinitionWidget
import
UserDefinitionPlugin
from
MDANSE.MolecularDynamics.Trajectory
import
sorted_atoms
from
MDANSE.MolecularDynamics.Trajectory
import
sorted_atoms
class
Query
(
object
):
class
Query
(
object
):
...
@@ -149,7 +149,7 @@ class Query(object):
...
@@ -149,7 +149,7 @@ class Query(object):
self
.
_parser
=
parser
self
.
_parser
=
parser
class
AtomSelectionPlugin
(
UserDefinition
s
Plugin
):
class
AtomSelectionPlugin
(
UserDefinitionPlugin
):
type
=
'atom_selection'
type
=
'atom_selection'
...
@@ -167,7 +167,7 @@ class AtomSelectionPlugin(UserDefinitionsPlugin):
...
@@ -167,7 +167,7 @@ class AtomSelectionPlugin(UserDefinitionsPlugin):
pub
.
subscribe
(
self
.
msg_select_atoms_from_viewer
,
'msg_select_atoms_from_viewer'
)
pub
.
subscribe
(
self
.
msg_select_atoms_from_viewer
,
'msg_select_atoms_from_viewer'
)
UserDefinition
s
Plugin
.
__init__
(
self
,
parent
,
size
=
(
800
,
500
))
UserDefinitionPlugin
.
__init__
(
self
,
parent
,
size
=
(
800
,
500
))
def
build_panel
(
self
):
def
build_panel
(
self
):
...
...
MDANSE/Framework/Plugins/AtomsListPlugin.py
View file @
0efc02a7
...
@@ -36,7 +36,7 @@ import wx
...
@@ -36,7 +36,7 @@ import wx
import
wx.aui
as
wxaui
import
wx.aui
as
wxaui
from
MDANSE
import
LOGGER
from
MDANSE
import
LOGGER
from
MDANSE.Framework.Widgets.UserDefinitionWidget
import
UserDefinition
s
Plugin
from
MDANSE.Framework.Widgets.UserDefinitionWidget
import
UserDefinitionPlugin
from
MDANSE.MolecularDynamics.Trajectory
import
find_atoms_in_molecule
,
get_chemical_objects_dict
from
MDANSE.MolecularDynamics.Trajectory
import
find_atoms_in_molecule
,
get_chemical_objects_dict
class
AtomNameDropTarget
(
wx
.
TextDropTarget
):
class
AtomNameDropTarget
(
wx
.
TextDropTarget
):
...
@@ -69,7 +69,7 @@ class AtomNameDropTarget(wx.TextDropTarget):
...
@@ -69,7 +69,7 @@ class AtomNameDropTarget(wx.TextDropTarget):
self
.
_atoms
.
Append
([
data
])
self
.
_atoms
.
Append
([
data
])
class
AtomsListPlugin
(
UserDefinition
s
Plugin
):
class
AtomsListPlugin
(
UserDefinitionPlugin
):
type
=
'atoms_list'
type
=
'atoms_list'
...
@@ -87,7 +87,7 @@ class AtomsListPlugin(UserDefinitionsPlugin):
...
@@ -87,7 +87,7 @@ class AtomsListPlugin(UserDefinitionsPlugin):
self
.
_selection
=
[]
self
.
_selection
=
[]
UserDefinition
s
Plugin
.
__init__
(
self
,
parent
,
size
=
(
800
,
500
))
UserDefinitionPlugin
.
__init__
(
self
,
parent
,
size
=
(
800
,
500
))
def
build_panel
(
self
):
def
build_panel
(
self
):
...
...
MDANSE/Framework/Plugins/PartialChargesPlugin.py
View file @
0efc02a7
...
@@ -38,9 +38,9 @@ import wx.aui as wxaui
...
@@ -38,9 +38,9 @@ import wx.aui as wxaui
import
wx.grid
as
wxgrid
import
wx.grid
as
wxgrid
from
MDANSE
import
LOGGER
from
MDANSE
import
LOGGER
from
MDANSE.Framework.Widgets.UserDefinitionWidget
import
UserDefinition
s
Plugin
from
MDANSE.Framework.Widgets.UserDefinitionWidget
import
UserDefinitionPlugin
class
PartialChargesPlugin
(
UserDefinition
s
Plugin
):
class
PartialChargesPlugin
(
UserDefinitionPlugin
):
type
=
'partial_charges'
type
=
'partial_charges'
...
@@ -54,7 +54,7 @@ class PartialChargesPlugin(UserDefinitionsPlugin):
...
@@ -54,7 +54,7 @@ class PartialChargesPlugin(UserDefinitionsPlugin):
self
.
_selectedAtoms
=
[]
self
.
_selectedAtoms
=
[]
UserDefinition
s
Plugin
.
__init__
(
self
,
parent
)
UserDefinitionPlugin
.
__init__
(
self
,
parent
)
def
build_panel
(
self
):
def
build_panel
(
self
):
...
...
MDANSE/Framework/Plugins/QVectorsPlugin.py
View file @
0efc02a7
...
@@ -38,7 +38,7 @@ import wx.grid as wxgrid
...
@@ -38,7 +38,7 @@ import wx.grid as wxgrid
from
wx.lib.delayedresult
import
startWorker
from
wx.lib.delayedresult
import
startWorker
from
MDANSE
import
LOGGER
,
REGISTRY
from
MDANSE
import
LOGGER
,
REGISTRY
from
MDANSE.Framework.Widgets.UserDefinitionWidget
import
UserDefinition
s
Plugin
from
MDANSE.Framework.Widgets.UserDefinitionWidget
import
UserDefinitionPlugin
from
MDANSE.GUI.ComboWidgets.ConfigurationPanel
import
ConfigurationPanel
from
MDANSE.GUI.ComboWidgets.ConfigurationPanel
import
ConfigurationPanel
from
MDANSE.GUI.ComboWidgets.ProgressBar
import
ProgressBar
from
MDANSE.GUI.ComboWidgets.ProgressBar
import
ProgressBar
...
@@ -151,7 +151,7 @@ class QVectorsPanel(wx.Panel):
...
@@ -151,7 +151,7 @@ class QVectorsPanel(wx.Panel):
return
self
.
_progress
return
self
.
_progress
class
QVectorsPlugin
(
UserDefinition
s
Plugin
):
class
QVectorsPlugin
(
UserDefinitionPlugin
):
type
=
'q_vectors'
type
=
'q_vectors'
...
@@ -165,7 +165,7 @@ class QVectorsPlugin(UserDefinitionsPlugin):
...
@@ -165,7 +165,7 @@ class QVectorsPlugin(UserDefinitionsPlugin):
self
.
_value
=
None
self
.
_value
=
None
UserDefinition
s
Plugin
.
__init__
(
self
,
parent
,
size
=
(
800
,
700
))
UserDefinitionPlugin
.
__init__
(
self
,
parent
,
size
=
(
800
,
700
))
def
build_panel
(
self
):
def
build_panel
(
self
):
...
...
MDANSE/Framework/UserDefinition
s
Store.py
→
MDANSE/Framework/UserDefinitionStore.py
View file @
0efc02a7
...
@@ -5,11 +5,11 @@ from MDANSE import PLATFORM
...
@@ -5,11 +5,11 @@ from MDANSE import PLATFORM
from
MDANSE.Core.Error
import
Error
from
MDANSE.Core.Error
import
Error
from
MDANSE.Core.Singleton
import
Singleton
from
MDANSE.Core.Singleton
import
Singleton
class
UserDefinition
s
StoreError
(
Error
):
class
UserDefinitionStoreError
(
Error
):
pass
pass
class
UserDefinition
s
Store
(
dict
):
class
UserDefinitionStore
(
dict
):
'''
'''
This class is used to register, save and delete MDANSE user definitions (a.k.a. UD).
This class is used to register, save and delete MDANSE user definitions (a.k.a. UD).
...
@@ -34,12 +34,12 @@ class UserDefinitionsStore(dict):
...
@@ -34,12 +34,12 @@ class UserDefinitionsStore(dict):
Load the user definitions.
Load the user definitions.
'''
'''
if
not
os
.
path
.
exists
(
UserDefinition
s
Store
.
UD_PATH
):
if
not
os
.
path
.
exists
(
UserDefinitionStore
.
UD_PATH
):
return
return
# Try to open the UD file.
# Try to open the UD file.
try
:
try
:
f
=
open
(
UserDefinition
s
Store
.
UD_PATH
,
"rb"
)
f
=
open
(
UserDefinitionStore
.
UD_PATH
,
"rb"
)
UD
=
cPickle
.
load
(
f
)
UD
=
cPickle
.
load
(
f
)
# If for whatever reason the pickle file loading failed do not even try to restore it
# If for whatever reason the pickle file loading failed do not even try to restore it
...
@@ -59,7 +59,7 @@ class UserDefinitionsStore(dict):
...
@@ -59,7 +59,7 @@ class UserDefinitionsStore(dict):
'''
'''
try
:
try
:
f
=
open
(
UserDefinition
s
Store
.
UD_PATH
,
"wb"
)
f
=
open
(
UserDefinitionStore
.
UD_PATH
,
"wb"
)
except
IOError
:
except
IOError
:
return
return
else
:
else
:
...
@@ -75,7 +75,7 @@ class UserDefinitionsStore(dict):
...
@@ -75,7 +75,7 @@ class UserDefinitionsStore(dict):
'''
'''
if
not
self
.
has_definition
(
target
,
section
,
name
):
if
not
self
.
has_definition
(
target
,
section
,
name
):
raise
UserDefinition
s
StoreError
(
'The item %r could not be found'
%
(
target
,
section
,
name
))
raise
UserDefinitionStoreError
(
'The item %r could not be found'
%
(
target
,
section
,
name
))
ud
=
self
[
target
][
section
][
name
]
ud
=
self
[
target
][
section
][
name
]
...
@@ -99,7 +99,7 @@ class UserDefinitionsStore(dict):
...
@@ -99,7 +99,7 @@ class UserDefinitionsStore(dict):
def
set_definition
(
self
,
target
,
section
,
name
,
value
):
def
set_definition
(
self
,
target
,
section
,
name
,
value
):
if
self
.
has_definition
(
target
,
section
,
name
):
if
self
.
has_definition
(
target
,
section
,
name
):
raise
UserDefinition
s
StoreError
(
'Item %s is already registered as an user definition. You must delete it before setting it.'
%
(
target
,
section
,
name
))
raise
UserDefinitionStoreError
(
'Item %s is already registered as an user definition. You must delete it before setting it.'
%
(
target
,
section
,
name
))
self
.
setdefault
(
target
,{}).
setdefault
(
section
,{})[
name
]
=
value
self
.
setdefault
(
target
,{}).
setdefault
(
section
,{})[
name
]
=
value
...
@@ -128,4 +128,4 @@ class UserDefinitionsStore(dict):
...
@@ -128,4 +128,4 @@ class UserDefinitionsStore(dict):
return
self
[
target
][
section
].
has_key
(
name
)
return
self
[
target
][
section
].
has_key
(
name
)
UD_STORE
=
UserDefinition
s
Store
()
UD_STORE
=
UserDefinitionStore
()
MDANSE/Framework/Widgets/AtomSelectionWidget.py
View file @
0efc02a7
...
@@ -35,8 +35,8 @@ import os
...
@@ -35,8 +35,8 @@ import os
import
wx
import
wx
from
MDANSE.Externals.pubsub
import
pub
from
MDANSE.Externals.pubsub
import
pub
from
MDANSE.Framework.UserDefinition
s
Store
import
UD_STORE
from
MDANSE.Framework.UserDefinitionStore
import
UD_STORE
from
MDANSE.Framework.Widgets.UserDefinitionWidget
import
UserDefinition
s
Dialog
,
UserDefinitionWidget
from
MDANSE.Framework.Widgets.UserDefinitionWidget
import
UserDefinitionDialog
,
UserDefinitionWidget
from
MDANSE.GUI.Icons
import
ICONS
from
MDANSE.GUI.Icons
import
ICONS
class
AtomSelectionWidget
(
UserDefinitionWidget
):
class
AtomSelectionWidget
(
UserDefinitionWidget
):
...
@@ -152,7 +152,7 @@ if __name__ == "__main__":
...
@@ -152,7 +152,7 @@ if __name__ == "__main__":
app
=
wx
.
App
(
False
)
app
=
wx
.
App
(
False
)
p
=
UserDefinition
s
Dialog
(
None
,
t
,
'atoms_list'
)
p
=
UserDefinitionDialog
(
None
,
t
,
'atoms_list'
)
p
.
SetSize
((
800
,
800
))
p
.
SetSize
((
800
,
800
))
...
...
MDANSE/Framework/Widgets/AtomTransmutationWidget.py
View file @
0efc02a7
...
@@ -34,7 +34,7 @@ import wx
...
@@ -34,7 +34,7 @@ import wx
from
MDANSE
import
ELEMENTS
from
MDANSE
import
ELEMENTS
from
MDANSE.Framework.UserDefinition
s
Store
import
UD_STORE
from
MDANSE.Framework.UserDefinitionStore
import
UD_STORE
from
MDANSE.Framework.Widgets.AtomSelectionWidget
import
AtomSelectionWidget
from
MDANSE.Framework.Widgets.AtomSelectionWidget
import
AtomSelectionWidget
from
MDANSE.GUI.Icons
import
ICONS
from
MDANSE.GUI.Icons
import
ICONS
...
...
MDANSE/Framework/Widgets/AtomsListWidget.py
View file @
0efc02a7
...
@@ -30,8 +30,8 @@ Created on Jun 30, 2015
...
@@ -30,8 +30,8 @@ Created on Jun 30, 2015
:author: Eric C. Pellegrini
:author: Eric C. Pellegrini
'''
'''
from
MDANSE.Framework.UserDefinition
s
Store
import
UD_STORE
from
MDANSE.Framework.UserDefinitionStore
import
UD_STORE
from
MDANSE.Framework.Widgets.UserDefinitionWidget
import
UserDefinitionWidget
,
UserDefinition
s
Dialog
from
MDANSE.Framework.Widgets.UserDefinitionWidget
import
UserDefinitionWidget
,
UserDefinitionDialog
class
AtomListWidget
(
UserDefinitionWidget
):
class
AtomListWidget
(
UserDefinitionWidget
):
...
@@ -39,7 +39,7 @@ class AtomListWidget(UserDefinitionWidget):
...
@@ -39,7 +39,7 @@ class AtomListWidget(UserDefinitionWidget):
def
on_new_user_definition
(
self
,
event
):
def
on_new_user_definition
(
self
,
event
):
dlg
=
UserDefinition
s
Dialog
(
self
,
self
.
_trajectory
,
self
.
type
)
dlg
=
UserDefinitionDialog
(
self
,
self
.
_trajectory
,
self
.
type
)
dlg
.
plugin
.
set_natoms
(
self
.
_configurator
.
_nAtoms
)
dlg
.
plugin
.
set_natoms
(
self
.
_configurator
.
_nAtoms
)
...
...
MDANSE/Framework/Widgets/PartialChargesWidget.py
View file @
0efc02a7
...
@@ -34,7 +34,7 @@ import os
...
@@ -34,7 +34,7 @@ import os
import
wx
import
wx
from
MDANSE.Framework.Widgets.UserDefinitionWidget
import
UserDefinition
s
Dialog
,
UserDefinitionWidget
from
MDANSE.Framework.Widgets.UserDefinitionWidget
import
UserDefinitionDialog
,
UserDefinitionWidget
class
PartialChargesWidget
(
UserDefinitionWidget
):
class
PartialChargesWidget
(
UserDefinitionWidget
):
...
@@ -50,7 +50,7 @@ if __name__ == "__main__":
...
@@ -50,7 +50,7 @@ if __name__ == "__main__":
app
=
wx
.
App
(
False
)
app
=
wx
.
App
(
False
)
p
=
UserDefinition
s
Dialog
(
None
,
t
,
'partial_charges'
)
p
=
UserDefinitionDialog
(
None
,
t
,
'partial_charges'
)
p
.
SetSize
((
800
,
800
))
p
.
SetSize
((
800
,
800
))
...
...
MDANSE/Framework/Widgets/QVectorsWidget.py
View file @
0efc02a7
...
@@ -34,7 +34,7 @@ import os
...
@@ -34,7 +34,7 @@ import os
import
wx
import
wx
from
MDANSE.Framework.Widgets.UserDefinitionWidget
import
UserDefinition
s
Dialog
,
UserDefinitionWidget
from
MDANSE.Framework.Widgets.UserDefinitionWidget
import
UserDefinitionDialog
,
UserDefinitionWidget
class
QVectorsWidget
(
UserDefinitionWidget
):
class
QVectorsWidget
(
UserDefinitionWidget
):
...
@@ -50,7 +50,7 @@ if __name__ == "__main__":
...
@@ -50,7 +50,7 @@ if __name__ == "__main__":
app
=
wx
.
App
(
False
)
app
=
wx
.
App
(
False
)
p
=
UserDefinition
s
Dialog
(
None
,
t
,
'q_vectors'
)
p
=
UserDefinitionDialog
(
None
,
t
,
'q_vectors'
)
p
.
SetSize
((
800
,
800
))
p
.
SetSize
((
800
,
800
))
...
...
MDANSE/Framework/Widgets/UserDefinitionWidget.py
View file @
0efc02a7
...
@@ -39,11 +39,11 @@ import wx.aui as wxaui
...
@@ -39,11 +39,11 @@ import wx.aui as wxaui
from
MDANSE
import
LOGGER
,
REGISTRY
from
MDANSE
import
LOGGER
,
REGISTRY
from
MDANSE.Externals.pubsub
import
pub
from
MDANSE.Externals.pubsub
import
pub
from
MDANSE.Framework.Plugins.ComponentPlugin
import
ComponentPlugin
from
MDANSE.Framework.Plugins.ComponentPlugin
import
ComponentPlugin
from
MDANSE.Framework.UserDefinition
s
Store
import
UD_STORE
from
MDANSE.Framework.UserDefinitionStore
import
UD_STORE
from
MDANSE.Framework.Widgets.IWidget
import
IWidget
from
MDANSE.Framework.Widgets.IWidget
import
IWidget
from
MDANSE.GUI
import
DATA_CONTROLLER
from
MDANSE.GUI
import
DATA_CONTROLLER
class
UserDefinition
s
Dialog
(
wx
.
Dialog
):
class
UserDefinitionDialog
(
wx
.
Dialog
):
def
__init__
(
self
,
parent
,
trajectory
,
udType
,
*
args
,
**
kwargs
):
def
__init__
(
self
,
parent
,
trajectory
,
udType
,
*
args
,
**
kwargs
):
...
@@ -114,7 +114,7 @@ class UserDefinitionWidget(IWidget):
...
@@ -114,7 +114,7 @@ class UserDefinitionWidget(IWidget):
def
on_new_definition
(
self
,
event
):
def
on_new_definition
(
self
,
event
):
dlg
=
UserDefinition
s
Dialog
(
None
,
self
.
_trajectory
,
self
.
type
)
dlg
=
UserDefinitionDialog
(
None
,
self
.
_trajectory
,
self
.
type
)
dlg
.
ShowModal
()
dlg
.
ShowModal
()
...
@@ -138,7 +138,7 @@ class UserDefinitionWidget(IWidget):
...
@@ -138,7 +138,7 @@ class UserDefinitionWidget(IWidget):
self
.
_availableUDs
.
SetItems
(
uds
)
self
.
_availableUDs
.
SetItems
(
uds
)
class
UserDefinition
s
Plugin
(
ComponentPlugin
):
class
UserDefinitionPlugin
(
ComponentPlugin
):
category
=
(
'User definition'
,)
category
=
(
'User definition'
,)
...
...
MDANSE/GUI/UserDefinitionViewer.py
View file @
0efc02a7
...
@@ -34,7 +34,7 @@ import wx
...
@@ -34,7 +34,7 @@ import wx
from
MDANSE
import
LOGGER
from
MDANSE
import
LOGGER
from
MDANSE.Externals.pubsub
import
pub
from
MDANSE.Externals.pubsub
import
pub
from
MDANSE.Framework.UserDefinition
s
Store
import
UD_STORE
from
MDANSE.Framework.UserDefinitionStore
import
UD_STORE
class
UserDefinitionViewer
(
wx
.
Frame
):
class
UserDefinitionViewer
(
wx
.
Frame
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment