Open GoogleCodeExporter opened 9 years ago
Hi Jakob,
Thanks for the suggestions. The features you mentioned are features that I have
considered implementing before, but I haven't had any time to work on them.
I have just used screen capture programs in the past since that has been
sufficient. You could write a function to save the active panel/window to disk
via a DC using wxPython, if you wanted to do it programmatically.
Regarding your first question, there is currently no preference setting for a
text input field. However you can save and retrieve arbitrary data to the
preferences file, using your own GUI (maybe create your own dialog?).
For example:
In dicomgui.py, the last directory that was used to browse is saved to
preferences via:
pub.sendMessage('preferences.updated.value',
{'general.dicom.import_location':self.path})
where the setting name is called 'general.dicom.import_location' and the value
is self.path.
The value is retrieved by binding a function to the pub.subscribe event, then
requesting the values for the 'dicom' settings as follows:
# Initialize the import location via pubsub
pub.subscribe(self.OnImportPrefsChange, 'general.dicom')
pub.sendMessage('preferences.requested.values', 'general.dicom')
def OnImportPrefsChange(self, msg):
"""When the import preferences change, update the values."""
if (msg.topic[2] == 'import_location'):
self.path = unicode(msg.data)
That's how I've done it before for my own custom plugins.
Hope that helps.
Original comment by bastula
on 5 Sep 2012 at 1:49
Original issue reported on code.google.com by
jakob.to...@gmail.com
on 3 Sep 2012 at 9:08