示例#1
0
 def _load_path_fired(self):
     dlg = pyface.FileDialog(
         action='open',
         wildcard="*.cpath",
     )
     if dlg.open() == pyface.OK:
         print "Loading:", dlg.path
         self.load_camera_path(dlg.path)
示例#2
0
 def _save_path_fired(self):
     dlg = pyface.FileDialog(
         action='save as',
         wildcard="*.cpath",
     )
     if dlg.open() == pyface.OK:
         print "Saving:", dlg.path
         self.dump_camera_path(dlg.path)
示例#3
0
 def _save_function_fired(self):
     self._redraw()
     dlg = pyface.FileDialog(
         action='save as',
         wildcard="*.ctf",
     )
     if dlg.open() == pyface.OK:
         print "Saving:", dlg.path
         tf = self.transfer_function
         f = open(dlg.path, "wb")
         cPickle.dump(tf, f)
示例#4
0
 def _save_button_fired(self):
     f = pyface.FileDialog(action = 'save as') 
                    #wildcard = self.filter)
     if f.open() == pyface.OK: 
         self.save_image(f.path)                 
示例#5
0
 def _save_construction_fired(self):
     file_dialog = pyface.FileDialog(
         action='save as', wildcard='Constructions (*.con)|*.con|')
     if file_dialog.open() == pyface.OK:
         pickle.dump((self.construction, self.ga),
                     open(file_dialog.path, 'w'))
示例#6
0
 def _open_construction_fired(self):
     file_dialog = pyface.FileDialog(
         action='open', wildcard='Constructions (*.con)|*.con|')
     if file_dialog.open() == pyface.OK:
         self.construction, self.ga = pickle.load(open(file_dialog.path))