本文整理汇总了Python中agilepy.lib_wx.processdialog.ProcessDialog类的典型用法代码示例。如果您正苦于以下问题:Python ProcessDialog类的具体用法?Python ProcessDialog怎么用?Python ProcessDialog使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了ProcessDialog类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: on_geomfilter_trips
def on_geomfilter_trips(self, event=None):
"""
Select GPS traces to satisfy geometric requirements.
This should be done before the mapmatching process.
"""
p = mapmatching.TripGeomfilter(self._mapmatching, logger=self._mainframe.get_logger())
dlg = ProcessDialog(self._mainframe, p, immediate_apply=True)
dlg.CenterOnScreen()
# this does not return until the dialog is closed.
val = dlg.ShowModal()
# print ' val,val == wx.ID_OK',val,wx.ID_OK,wx.ID_CANCEL,val == wx.ID_CANCEL
# print ' status =',dlg.get_status()
if dlg.get_status() != 'success': # val == wx.ID_CANCEL:
# print ">>>>>>>>>Unsuccessful\n"
dlg.Destroy()
if dlg.get_status() == 'success':
# print ">>>>>>>>>successful\n"
# apply current widget values to scenario instance
dlg.apply()
dlg.Destroy()
self._mainframe.browse_obj(self._mapmatching.trips)
self._is_needs_refresh = True
self.refresh_widgets()
示例2: on_provide_stopaccess
def on_provide_stopaccess(self, event=None):
"""
Make sure, all public transport stops are accessible by foot or bike
from the road network.
"""
p = pt.StopAccessProvider(self._net, logger=self._mainframe.get_logger())
dlg = ProcessDialog(self._mainframe, p, immediate_apply=True)
dlg.CenterOnScreen()
# this does not return until the dialog is closed.
val = dlg.ShowModal()
# print ' val,val == wx.ID_OK',val,wx.ID_OK,wx.ID_CANCEL,val == wx.ID_CANCEL
# print ' status =',dlg.get_status()
if dlg.get_status() != 'success': # val == wx.ID_CANCEL:
# print ">>>>>>>>>Unsuccessful\n"
dlg.Destroy()
if dlg.get_status() == 'success':
# print ">>>>>>>>>successful\n"
# apply current widget values to scenario instance
dlg.apply()
dlg.Destroy()
self._mainframe.browse_obj(self._net.edges)
self._mainframe.refresh_moduleguis()
示例3: on_make_parking
def on_make_parking(self, event=None):
"""
Generate on road parking areas on the street network
"""
# self._landuse.parking.make_parking()
#self._canvas = canvas.draw()
#drawing = self.get_drawing().get_drawobj_by_ident('parkingdraws')
# TODO: make a proper import mask that allows to set parameters
# self._landuse.maps.download()
proc = landuse.ParkingGenerator('parkinggenerator', self._landuse.parking, logger=self._mainframe.get_logger())
dlg = ProcessDialog(self._mainframe, proc, immediate_apply=True)
dlg.CenterOnScreen()
# this does not return until the dialog is closed.
val = dlg.ShowModal()
# print ' val,val == wx.ID_OK',val,wx.ID_OK,wx.ID_CANCEL,val == wx.ID_CANCEL
# print ' status =',dlg.get_status()
if dlg.get_status() != 'success': # val == wx.ID_CANCEL:
# print ">>>>>>>>>Unsuccessful\n"
dlg.Destroy()
if dlg.get_status() == 'success':
# print ">>>>>>>>>successful\n"
# apply current widget values to scenario instance
dlg.apply()
dlg.Destroy()
self._mainframe.browse_obj(self._landuse.parking)
self._mainframe.refresh_moduleguis()
示例4: on_postmatchfilter_trips
def on_postmatchfilter_trips(self, event=None):
"""
Select trips by different parameters to ensure the quality of the mapmatching results.
This should be done after the map-matching process.
"""
p = mapmatching.PostMatchfilter(self._mapmatching, logger=self._mainframe.get_logger())
dlg = ProcessDialog(self._mainframe, p, immediate_apply=True)
dlg.CenterOnScreen()
# this does not return until the dialog is closed.
val = dlg.ShowModal()
# print ' val,val == wx.ID_OK',val,wx.ID_OK,wx.ID_CANCEL,val == wx.ID_CANCEL
# print ' status =',dlg.get_status()
if dlg.get_status() != 'success': # val == wx.ID_CANCEL:
# print ">>>>>>>>>Unsuccessful\n"
dlg.Destroy()
if dlg.get_status() == 'success':
# print ">>>>>>>>>successful\n"
# apply current widget values to scenario instance
dlg.apply()
dlg.Destroy()
self._mainframe.browse_obj(self._mapmatching.trips)
self._is_needs_refresh = True
self.refresh_widgets()
示例5: on_import_turnflows
def on_import_turnflows(self, event=None):
tfimporter = turnflows.TurnflowImporter(self._demand.turnflows,
logger=self._mainframe.get_logger()
)
dlg = ProcessDialog(self._mainframe, tfimporter)
dlg.CenterOnScreen()
# this does not return until the dialog is closed.
val = dlg.ShowModal()
# print ' val,val == wx.ID_OK',val,wx.ID_OK,wx.ID_CANCEL,val == wx.ID_CANCEL
# print ' status =',dlg.get_status()
if dlg.get_status() != 'success': # val == wx.ID_CANCEL:
# print ">>>>>>>>>Unsuccessful\n"
dlg.Destroy()
if dlg.get_status() == 'success':
# print ">>>>>>>>>successful\n"
# apply current widget values to scenario instance
dlg.apply()
dlg.Destroy()
self._mainframe.browse_obj(self._demand.turnflows)
#del self._scenario
#self._scenario = scenariocreator.get_scenario()
# self._scenario.import_xml()
# this should update all widgets for the new scenario!!
# print 'call self._mainframe.refresh_moduleguis()'
# self._mainframe.refresh_moduleguis()
if event:
event.Skip()
示例6: on_import_osm
def on_import_osm(self, event=None):
# TODO: here we should actually replace the current network
# so we would need a clear net method in scenario
# alternatively we could merge properly
importer = network.OsmImporter(self._net, logger=self._mainframe.get_logger())
dlg = ProcessDialog(self._mainframe, importer)
dlg.CenterOnScreen()
# this does not return until the dialog is closed.
val = dlg.ShowModal()
# print ' val,val == wx.ID_OK',val,wx.ID_OK,wx.ID_CANCEL,val == wx.ID_CANCEL
# print ' status =',dlg.get_status()
if dlg.get_status() != 'success': # val == wx.ID_CANCEL:
# print ">>>>>>>>>Unsuccessful\n"
dlg.Destroy()
if dlg.get_status() == 'success':
# print ">>>>>>>>>successful\n"
# apply current widget values to scenario instance
dlg.apply()
dlg.Destroy()
self._mainframe.browse_obj(self._net.nodes)
# this should update all widgets for the new scenario!!
# print 'call self._mainframe.refresh_moduleguis()'
self._mainframe.refresh_moduleguis()
示例7: on_generate_tls
def on_generate_tls(self, event=None):
"""Generates traffic light systems"""
# TODO: here we should actually replace the current network
# so we would need a clear net method in scenario
# alternatively we could merge properly
obj = networktools.TlsGenerator(self._net, logger=self._mainframe.get_logger())
dlg = ProcessDialog(self._mainframe, obj)
dlg.CenterOnScreen()
# this does not return until the dialog is closed.
val = dlg.ShowModal()
# print ' val,val == wx.ID_OK',val,wx.ID_OK,wx.ID_CANCEL,val == wx.ID_CANCEL
# print ' status =',dlg.get_status()
if dlg.get_status() != 'success': # val == wx.ID_CANCEL:
# print ">>>>>>>>>Unsuccessful\n"
dlg.Destroy()
if dlg.get_status() == 'success':
# print ">>>>>>>>>successful\n"
dlg.apply()
dlg.Destroy()
self._mainframe.browse_obj(self._net)
# this should update all widgets for the new scenario!!
# print 'call self._mainframe.refresh_moduleguis()'
self._mainframe.refresh_moduleguis()
示例8: on_import_gpx
def on_import_gpx(self, event=None):
"""
Import and filter data from GPX file.
"""
p = mapmatching.GpxImporter(self._mapmatching, logger=self._mainframe.get_logger())
dlg = ProcessDialog(self._mainframe, p, immediate_apply=True)
dlg.CenterOnScreen()
# this does not return until the dialog is closed.
val = dlg.ShowModal()
# print ' val,val == wx.ID_OK',val,wx.ID_OK,wx.ID_CANCEL,val == wx.ID_CANCEL
# print ' status =',dlg.get_status()
if dlg.get_status() != 'success': # val == wx.ID_CANCEL:
# print ">>>>>>>>>Unsuccessful\n"
dlg.Destroy()
if dlg.get_status() == 'success':
# print ">>>>>>>>>successful\n"
# apply current widget values to scenario instance
dlg.apply()
dlg.Destroy()
self._mainframe.browse_obj(self._mapmatching.trips)
self._is_needs_refresh = True
self.refresh_widgets()
示例9: on_route_congested
def on_route_congested(self, event=None):
"""Generates routes from current trip info using routing methods with congested network assumption.
Based on marouter.
"""
# self._demand.trips.clear_routes()
obj = routing.MacroRouter(self.get_scenario().net,
trips=self._demand.trips,
logger=self._mainframe.get_logger())
dlg = ProcessDialog(self._mainframe, obj)
dlg.CenterOnScreen()
# this does not return until the dialog is closed.
val = dlg.ShowModal()
# print ' val,val == wx.ID_OK',val,wx.ID_OK,wx.ID_CANCEL,val == wx.ID_CANCEL
# print ' status =',dlg.get_status()
if dlg.get_status() != 'success': # val == wx.ID_CANCEL:
# print ">>>>>>>>>Unsuccessful\n"
dlg.Destroy()
if dlg.get_status() == 'success':
# print ">>>>>>>>>successful\n"
dlg.apply()
dlg.Destroy()
self._mainframe.browse_obj(self._demand.trips)
示例10: on_route_fastest
def on_route_fastest(self, event=None):
"""
Fastest path routing of matched routes.
"""
p = mapmatching.Fastestrouter('fastestpathrouter', self._mapmatching,
matchresults=self._results,
logger=self._mainframe.get_logger()
)
dlg = ProcessDialog(self._mainframe, p, immediate_apply=True)
dlg.CenterOnScreen()
# this does not return until the dialog is closed.
val = dlg.ShowModal()
# print ' val,val == wx.ID_OK',val,wx.ID_OK,wx.ID_CANCEL,val == wx.ID_CANCEL
# print ' status =',dlg.get_status()
if dlg.get_status() != 'success': # val == wx.ID_CANCEL:
# print ">>>>>>>>>Unsuccessful\n"
dlg.Destroy()
if dlg.get_status() == 'success':
# print ">>>>>>>>>successful\n"
# apply current widget values to scenario instance
dlg.apply()
dlg.Destroy()
self._mainframe.browse_obj(self._mapmatching.trips)
self._is_needs_refresh = True
self.refresh_widgets()
示例11: on_match_birgil
def on_match_birgil(self, event=None):
"""
Match selected traces with Birgillito's method.
"""
p = mapmatching.BirgilMatcher(self._mapmatching, logger=self._mainframe.get_logger())
# dlg = ProcessDialogInteractive( self._mainframe,
# p,
# #title = 'SUMO-Traci Dialog',
# #func_close = self.close_sumodialog_interactive,
# )
dlg = ProcessDialog(self._mainframe, p, immediate_apply=True)
dlg.CenterOnScreen()
# this does not return until the dialog is closed.
val = dlg.ShowModal()
# print ' val,val == wx.ID_OK',val,wx.ID_OK,wx.ID_CANCEL,val == wx.ID_CANCEL
# print ' status =',dlg.get_status()
if dlg.get_status() != 'success': # val == wx.ID_CANCEL:
# print ">>>>>>>>>Unsuccessful\n"
dlg.Destroy()
if dlg.get_status() == 'success':
# print ">>>>>>>>>successful\n"
# apply current widget values to scenario instance
dlg.apply()
dlg.Destroy()
self._mainframe.browse_obj(self._mapmatching.trips)
self._is_needs_refresh = True
self.refresh_widgets()
示例12: on_create
def on_create(self, event=None):
# print 'on_create'
scenariocreator = scenario.ScenarioCreator(logger=self._mainframe.get_logger(),
workdirpath=scenario.DIRPATH_SCENARIO,
)
dlg = ProcessDialog(self._mainframe, scenariocreator)
dlg.CenterOnScreen()
# this does not return until the dialog is closed.
val = dlg.ShowModal()
# print ' val,val == wx.ID_OK',val,wx.ID_OK,wx.ID_CANCEL,val == wx.ID_CANCEL
# print ' status =',dlg.get_status()
if dlg.get_status() != 'success': # val == wx.ID_CANCEL:
# print ">>>>>>>>>Unsuccessful\n"
dlg.Destroy()
if dlg.get_status() == 'success':
# print ">>>>>>>>>successful\n"
# apply current widget values to scenario instance
dlg.apply()
dlg.Destroy()
del self._scenario
self._scenario = scenariocreator.get_scenario()
self._mainframe.browse_obj(self._scenario)
# this should update all widgets for the new scenario!!
# print 'call self._mainframe.refresh_moduleguis()'
self._mainframe.refresh_moduleguis()
示例13: on_import_osm
def on_import_osm(self, event=None):
importer = landuse.OsmPolyImporter(
self._landuse, logger=self._mainframe.get_logger())
dlg = ProcessDialog(self._mainframe, importer)
dlg.CenterOnScreen()
# this does not return until the dialog is closed.
val = dlg.ShowModal()
# print ' val,val == wx.ID_OK',val,wx.ID_OK,wx.ID_CANCEL,val == wx.ID_CANCEL
# print ' status =',dlg.get_status()
if dlg.get_status() != 'success': # val == wx.ID_CANCEL:
dlg.Destroy()
if dlg.get_status() == 'success':
dlg.apply()
dlg.Destroy()
self._mainframe.browse_obj(self._landuse)
self._mainframe.refresh_moduleguis()
示例14: on_add_vehicles
def on_add_vehicles(self, event=None):
p = prt.VehicleAdder(self._prtservice.prtvehicles, logger=self._mainframe.get_logger())
dlg = ProcessDialog(self._mainframe, p, immediate_apply=True)
dlg.CenterOnScreen()
# this does not return until the dialog is closed.
val = dlg.ShowModal()
# print ' val,val == wx.ID_OK',val,wx.ID_OK,wx.ID_CANCEL,val == wx.ID_CANCEL
# print ' status =',dlg.get_status()
if dlg.get_status() != 'success': # val == wx.ID_CANCEL:
# print ">>>>>>>>>Unsuccessful\n"
dlg.Destroy()
if dlg.get_status() == 'success':
# print ">>>>>>>>>successful\n"
# apply current widget values to scenario instance
dlg.apply()
dlg.Destroy()
self._mainframe.browse_obj(self._prtservice.prtvehicles)
示例15: on_import_osmnx
def on_import_osmnx(self, event=None):
"""
Import net and buildings from OSMnx
"""
# proc = OxScenariocreator(\
# workdirpath = scenario.DIRPATH_SCENARIO,
# logger = self._mainframe.get_logger(),
# )
proc = networkxtools.OxImporter(self._scenario,
logger=self._mainframe.get_logger(),
)
dlg = ProcessDialog(self._mainframe, proc)
dlg.CenterOnScreen()
# this does not return until the dialog is closed.
val = dlg.ShowModal()
# print ' val,val == wx.ID_OK',val,wx.ID_OK,wx.ID_CANCEL,val == wx.ID_CANCEL
# print ' status =',dlg.get_status()
if dlg.get_status() != 'success': # val == wx.ID_CANCEL:
# print ">>>>>>>>>Unsuccessful\n"
dlg.Destroy()
if dlg.get_status() == 'success':
# print ">>>>>>>>>successful\n"
# apply current widget values to scenario instance
dlg.apply()
dlg.Destroy()
#del self._scenario
#self._scenario = scenariocreator.get_scenario()
# self._scenario.import_xml()
self._mainframe.browse_obj(self._scenario)
# this should update all widgets for the new scenario!!
# print 'call self._mainframe.refresh_moduleguis()'
self._mainframe.refresh_moduleguis()