mlhim-specs-dev team mailing list archive
-
mlhim-specs-dev team
-
Mailing list archive
-
Message #00584
[Branch ~cdd-dev/cdd/trunk] Rev 170: Working on tree to panel display for metadata. Added mlhim2.py
------------------------------------------------------------
revno: 170
committer: Timothy W. Cook <timothywayne.cook@xxxxxxxxx>
branch nick: cdd
timestamp: Sat 2012-07-14 09:53:02 -0300
message:
Working on tree to panel display for metadata. Added mlhim2.py
added:
src/mlhim2.py
modified:
src/cdd.py
--
lp:cdd
https://code.launchpad.net/~cdd-dev/cdd/trunk
Your team MLHIM Specifications Developers is subscribed to branch lp:cdd.
To unsubscribe from this branch go to https://code.launchpad.net/~cdd-dev/cdd/trunk/+edit-subscription
=== modified file 'src/cdd.py'
--- src/cdd.py 2012-07-14 11:11:57 +0000
+++ src/cdd.py 2012-07-14 12:53:02 +0000
@@ -1,12 +1,13 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
-# CDD.py - CCD editor for MLHIM.
+# cdd.py - CCD editor for MLHIM.
# (c) 2012 - Timothy w.Cook & Contributors. (see: credits)
import gettext
import wx
from wx.lib.wordwrap import wordwrap
+import mlhim2
import cdd_utils
gettext.bindtextdomain('CDD','locales/en')
@@ -146,18 +147,15 @@
if selText == "CCD":
self.display.SetLabel(_("You are at the root, nothing to do here."))
+
elif selText == "Metadata":
- self.metaData()
+ self.tree.SetItemPyData(item, mlhim2.Metadata(self.panel2)) # set the item to the Metadata form object
elif selText == "definition":
self.display.SetLabel("definition selected.")
else:
self.display.SetLabel(_("Something bad happened; now I'm lost."))
- def metaData(self):
- #build a page in panel2 to edit the metadata
-
- self.display.SetLabel("Should be showing some metadata fields.")
def newFile(self, evt):
msg = "File->New Not Yet Implemented."
=== added file 'src/mlhim2.py'
--- src/mlhim2.py 1970-01-01 00:00:00 +0000
+++ src/mlhim2.py 2012-07-14 12:53:02 +0000
@@ -0,0 +1,27 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+# mlhim2.py - part of the CCD; editor for MLHIM.
+# contins classes for the data entry forms for MLHIM2 RM
+# (c) 2012 - Timothy w.Cook & Contributors. (see: credits)
+
+import gettext
+import wx
+from wx.lib.wordwrap import wordwrap
+
+import cdd_utils
+
+gettext.bindtextdomain('CDD','locales/en')
+gettext.textdomain('CDD')
+_ = gettext.gettext
+
+class Metadata(wx.Panel):
+ # form for entering metadata.
+ def __init__(self,parent):
+ wx.Panel.__init__(self,parent, -1, size=(200,300), style=wx.DOUBLE_BORDER)
+ wx.StaticText(self, -1, "This is my Metadata form.", (20,10))
+ b = wx.Button(self, -1, "Finished", (20,20))
+ self.Bind(wx.EVT_BUTTON, self.OnExit, b)
+
+
+ def OnExit(self, event):
+ self.Destroy()
\ No newline at end of file