def make_browser(self):
        # Create Browser widget here
        buttons = [  # ('Add new OD flow', self.on_add_new, 'Add a new flow by defining zones of origin, destination and number of trips in table.'),
            ('Save flows', self.on_add, 'Save OD flows to current demand.'),
            ('Cancel', self.on_close, 'Close wizzard without adding flows.'),
        ]
        defaultbuttontext = 'Save flows'
        # standartbuttons=['cancel','apply','ok']# apply does not show
        standartbuttons = ['apply']

        browser = ObjPanel(
            self,
            self.wizzard,
            attrconfigs=None,
            id=None,
            ids=None,
            groupnames=None,
            func_change_obj=None,
            show_groupnames=False,
            show_title=False,
            is_modal=True,
            mainframe=None,
            pos=wx.DefaultPosition,
            size=wx.DefaultSize,
            style=wx.MAXIMIZE_BOX | wx.RESIZE_BORDER,
            immediate_apply=False,  # True,
            panelstyle='default',
            buttons=buttons,
            standartbuttons=standartbuttons,
            defaultbutton=defaultbuttontext,
        )
        return browser
    def get_optionspanel(self, parent, size=wx.DefaultSize):
        """
        Return tool option widgets on given parent
        """
        size = (200, -1)
        buttons = [
            ('Add line', self.on_add_line, 'Add public transport line.'),
            ('Clear route', self.on_clear_route,
             'Clear edges (the route) of public transport service.'),
            ('Clear stops', self.on_clear_stops,
             'Clear stopsof public transport service.'),
        ]
        defaultbuttontext = 'Add line'
        self._optionspanel = ObjPanel(
            parent,
            obj=self,
            attrconfigs=None,
            groupnames=['options'],
            func_change_obj=None,
            show_groupnames=False,
            show_title=True,
            is_modal=False,
            mainframe=self.parent.get_mainframe(),
            pos=wx.DefaultPosition,
            size=size,
            style=wx.MAXIMIZE_BOX | wx.RESIZE_BORDER,
            immediate_apply=True,
            panelstyle='default',  # 'instrumental'
            buttons=buttons,
            defaultbutton=defaultbuttontext,
            standartbuttons=[],  # standartbuttons=['restore']
        )

        return self._optionspanel
    def get_optionspanel(self, parent, size=wx.DefaultSize):
        """
        Return tool option widgets on given parent
        """
        size = (200, -1)
        buttons = [
            ('Add flow', self.on_add_new, 'Add a new OD flow to demand.'),
            ('Rest Zones', self.on_clear_zones,
             'Clear the fields with zones of origin and destination.'),
            #('Save flows', self.on_add, 'Save OD flows to current demand.'),
            #('Cancel', self.on_close, 'Close wizzard without adding flows.'),
        ]
        defaultbuttontext = 'Add flow'
        self._optionspanel = ObjPanel(
            parent,
            obj=self,
            attrconfigs=None,
            groupnames=['options'],
            func_change_obj=None,
            show_groupnames=False,
            show_title=True,
            is_modal=False,
            mainframe=self.parent.get_mainframe(),
            pos=wx.DefaultPosition,
            size=size,
            style=wx.MAXIMIZE_BOX | wx.RESIZE_BORDER,
            immediate_apply=True,
            panelstyle='default',  # 'instrumental'
            buttons=buttons,
            defaultbutton=defaultbuttontext,
            standartbuttons=[],  # standartbuttons=['restore']
        )

        return self._optionspanel
Пример #4
0
    def make_browser(self):
        # Create Browser widget here
        buttons = [
            ('Add ODM', self.on_add, 'Add ODM data to current scenario.'),
            ('Cancel', self.on_close, 'Close wizzard without adding ODM.'),
            #('OK', self.on_add_close, 'Add ODM data to current scenario and close wizzard.'),
        ]
        defaultbuttontext = 'Add ODM'
        # standartbuttons=['cancel','apply','ok']# apply does not show
        standartbuttons = ['apply']

        browser = ObjPanel(
            self,
            self.wizzard,
            attrconfigs=None,
            id=None,
            ids=None,
            groupnames=None,
            func_change_obj=None,
            show_groupnames=False,
            show_title=False,
            is_modal=True,
            mainframe=None,
            pos=wx.DefaultPosition,
            size=wx.DefaultSize,
            style=wx.MAXIMIZE_BOX | wx.RESIZE_BORDER,
            immediate_apply=False,  # True,
            panelstyle='default',
            buttons=buttons,
            standartbuttons=standartbuttons,
            defaultbutton=defaultbuttontext,
        )
        return browser