Exemplo n.º 1
0
Arquivo: main.py Projeto: rp3d/ciclop
 def onSaveProfile(self, event):
     """ """
     dlg=wx.FileDialog(self, _("Select profile file to save"), os.path.split(profile.getPreference('last_profile'))[0], style=wx.FD_SAVE)
     dlg.SetWildcard("ini files (*.ini)|*.ini")
     if dlg.ShowModal() == wx.ID_OK:
         profileFile = dlg.GetPath()
         if not profileFile.endswith('.ini'):
             if platform.system() == 'Linux': #hack for linux, as for some reason the .ini is not appended.
                 profileFile += '.ini'
         profile.saveProfile(profileFile)
     dlg.Destroy()
Exemplo n.º 2
0
Arquivo: main.py Projeto: rp3d/ciclop
 def onScanningPageNextClicked(self):
     self.driver.board.setLeftLaserOff()
     self.driver.board.setRightLaserOff()
     profile.saveProfile(os.path.join(profile.getBasePath(), 'current-profile.ini'))
     dlg = wx.MessageDialog(self, _("You have finished the wizard.\nPress Play button to start scanning."), _("Ready to scan!"), wx.OK | wx.ICON_INFORMATION)
     result = dlg.ShowModal() == wx.ID_OK
     dlg.Destroy()
     if result:
         self.connectionPage.videoView.stop()
         self.calibrationPage.videoView.stop()
         self.scanningPage.videoView.stop()
         profile.putPreference('workbench', 'Scanning workbench')
         self.parent.updatePCGProfile()
         self.parent.updateCalibrationProfile()
         self.parent.workbenchUpdate()
         self.Destroy()
Exemplo n.º 3
0
 def onScanningPageNextClicked(self):
     self.driver.board.setLeftLaserOff()
     self.driver.board.setRightLaserOff()
     profile.saveProfile(
         os.path.join(profile.getBasePath(), 'current-profile.ini'))
     dlg = wx.MessageDialog(
         self,
         _("You have finished the wizard.\nPress Play button to start scanning."
           ), _("Ready to scan!"), wx.OK | wx.ICON_INFORMATION)
     result = dlg.ShowModal() == wx.ID_OK
     dlg.Destroy()
     if result:
         self.connectionPage.videoView.stop()
         self.calibrationPage.videoView.stop()
         self.scanningPage.videoView.stop()
         profile.putPreference('workbench', 'Scanning workbench')
         self.parent.updatePCGProfile()
         self.parent.updateCalibrationProfile()
         self.parent.workbenchUpdate()
         self.Destroy()
Exemplo n.º 4
0
 def __del__(self):
     #-- Save Profile and Preferences
     profile.savePreferences(os.path.join(self.basePath, 'preferences.ini'))
     profile.saveProfile(os.path.join(self.basePath, 'current-profile.ini'))
Exemplo n.º 5
0
 def onComboBoxWorkbenchSelected(self, event):
     """ """
     if _(profile.getPreference('workbench')) != event.GetEventObject().GetValue():
         profile.putPreference('workbench', self.workbenchDict[event.GetEventObject().GetValue()])
         profile.saveProfile(os.path.join(profile.getBasePath(), 'current-profile.ini'))
         self.workbenchUpdate()
Exemplo n.º 6
0
	def __del__(self):
		#-- Save Profile and Preferences
		profile.savePreferences(os.path.join(self.basePath, 'preferences.ini'))
		profile.saveProfile(os.path.join(self.basePath, 'current-profile.ini'))
Exemplo n.º 7
0
Arquivo: main.py Projeto: rp3d/ciclop
 def onComboBoxWorkbenchSelected(self, event):
     """ """
     if _(profile.getPreference('workbench')) != event.GetEventObject().GetValue():
         profile.putPreference('workbench', self.workbenchDict[event.GetEventObject().GetValue()])
         profile.saveProfile(os.path.join(profile.getBasePath(), 'current-profile.ini'))
         self.workbenchUpdate()