Exemple #1
0
    def __init__(self, parent, giface, iclass_mapwin=None, id=wx.ID_ANY):

        # wx.SplitterWindow.__init__(self, parent = parent, id = id,
        #                           style = wx.SP_LIVE_UPDATE)
        wx.Panel.__init__(self, parent=parent, id=wx.ID_ANY)
        ManageBusyCursorMixin.__init__(self, window=self)

        self.scatt_mgr = self._createScattMgr(guiparent=parent,
                                              giface=giface,
                                              iclass_mapwin=iclass_mapwin)

        # toobars
        self.toolbars = {}
        self.toolbars['mainToolbar'] = self._createMainToolbar()
        self.toolbars['editingToolbar'] = EditingToolbar(
            parent=self, scatt_mgr=self.scatt_mgr)

        self._createCategoryPanel(self)

        self.plot_panel = ScatterPlotsPanel(self, self.scatt_mgr)

        self.mainsizer = wx.BoxSizer(wx.VERTICAL)
        self.mainsizer.Add(self.toolbars['mainToolbar'],
                           proportion=0,
                           flag=wx.EXPAND)
        self.mainsizer.Add(self.toolbars['editingToolbar'],
                           proportion=0,
                           flag=wx.EXPAND)
        self.mainsizer.Add(self.catsPanel,
                           proportion=0,
                           flag=wx.EXPAND | wx.LEFT | wx.RIGHT,
                           border=5)
        self.mainsizer.Add(self.plot_panel, proportion=1, flag=wx.EXPAND)

        self.catsPanel.Hide()
        self.toolbars['editingToolbar'].Hide()

        self.SetSizer(self.mainsizer)

        self.scatt_mgr.computingStarted.connect(
            lambda: self.UpdateCur(busy=True))
        self.scatt_mgr.renderingStarted.connect(
            lambda: self.UpdateCur(busy=True))
        self.scatt_mgr.renderingFinished.connect(
            lambda: self.UpdateCur(busy=False))

        # self.SetSashGravity(0.5)
        #self.SplitHorizontally(self.head_panel, self.plot_panel, -50)
        self.Layout()
Exemple #2
0
    def __init__(self, parent, giface, iclass_mapwin=None,
                 id=wx.ID_ANY):

        # wx.SplitterWindow.__init__(self, parent = parent, id = id,
        #                           style = wx.SP_LIVE_UPDATE)
        wx.Panel.__init__(self, parent=parent, id=wx.ID_ANY)
        ManageBusyCursorMixin.__init__(self, window=self)

        self.scatt_mgr = self._createScattMgr(guiparent=parent, giface=giface,
                                              iclass_mapwin=iclass_mapwin)

        # toobars
        self.toolbars = {}
        self.toolbars['mainToolbar'] = self._createMainToolbar()
        self.toolbars['editingToolbar'] = EditingToolbar(
            parent=self, scatt_mgr=self.scatt_mgr)

        self._createCategoryPanel(self)

        self.plot_panel = ScatterPlotsPanel(self, self.scatt_mgr)

        self.mainsizer = wx.BoxSizer(wx.VERTICAL)
        self.mainsizer.Add(
            item=self.toolbars['mainToolbar'],
            proportion=0, flag=wx.EXPAND)
        self.mainsizer.Add(
            item=self.toolbars['editingToolbar'],
            proportion=0, flag=wx.EXPAND)
        self.mainsizer.Add(item=self.catsPanel, proportion=0,
                           flag=wx.EXPAND | wx.LEFT | wx.RIGHT, border=5)
        self.mainsizer.Add(item=self.plot_panel, proportion=1, flag=wx.EXPAND)

        self.catsPanel.Hide()
        self.toolbars['editingToolbar'].Hide()

        self.SetSizer(self.mainsizer)

        self.scatt_mgr.computingStarted.connect(
            lambda: self.UpdateCur(busy=True))
        self.scatt_mgr.renderingStarted.connect(
            lambda: self.UpdateCur(busy=True))
        self.scatt_mgr.renderingFinished.connect(
            lambda: self.UpdateCur(busy=False))

        # self.SetSashGravity(0.5)
        #self.SplitHorizontally(self.head_panel, self.plot_panel, -50)
        self.Layout()
Exemple #3
0
    def __init__(self, parent, scatt_id, scatt_mgr, transpose,
                 id=wx.ID_ANY):
        # TODO should not be transpose and scatt_id but x, y
        wx.Panel.__init__(self, parent, id)
        # bacause of aui (if floatable it can not take cursor from parent)
        ManageBusyCursorMixin.__init__(self, window=self)

        self.parent = parent
        self.full_extend = None
        self.mode = None

        self._createWidgets()
        self._doLayout()
        self.scatt_id = scatt_id
        self.scatt_mgr = scatt_mgr

        self.cidpress = None
        self.cidrelease = None

        self.rend_dt = {}

        self.transpose = transpose

        self.inverse = False

        self.SetSize((200, 100))
        self.Layout()

        self.base_scale = 1.2
        self.Bind(wx.EVT_CLOSE, lambda event: self.CleanUp())

        self.plotClosed = Signal("ScatterPlotWidget.plotClosed")
        self.cursorMove = Signal("ScatterPlotWidget.cursorMove")

        self.contex_menu = ScatterPlotContextMenu(plot=self)

        self.ciddscroll = None

        self.canvas.mpl_connect('motion_notify_event', self.Motion)
        self.canvas.mpl_connect('button_press_event', self.OnPress)
        self.canvas.mpl_connect('button_release_event', self.OnRelease)
        self.canvas.mpl_connect('draw_event', self.DrawCallback)
        self.canvas.mpl_connect('figure_leave_event', self.OnCanvasLeave)
Exemple #4
0
    def __init__(self, parent, scatt_id, scatt_mgr, transpose,
                 id = wx.ID_ANY):
        #TODO should not be transpose and scatt_id but x, y
        wx.Panel.__init__(self, parent, id)
        # bacause of aui (if floatable it can not take cursor from parent)        
        ManageBusyCursorMixin.__init__(self, window=self)

        self.parent = parent
        self.full_extend = None
        self.mode = None

        self._createWidgets()
        self._doLayout()
        self.scatt_id = scatt_id
        self.scatt_mgr = scatt_mgr

        self.cidpress = None
        self.cidrelease = None

        self.rend_dt = {}

        self.transpose = transpose

        self.inverse = False

        self.SetSize((200, 100))
        self.Layout()

        self.base_scale = 1.2
        self.Bind(wx.EVT_CLOSE,lambda event : self.CleanUp())

        self.plotClosed = Signal("ScatterPlotWidget.plotClosed")
        self.cursorMove = Signal("ScatterPlotWidget.cursorMove")

        self.contex_menu = ScatterPlotContextMenu(plot = self)

        self.ciddscroll = None

        self.canvas.mpl_connect('motion_notify_event', self.Motion)
        self.canvas.mpl_connect('button_press_event', self.OnPress)
        self.canvas.mpl_connect('button_release_event', self.OnRelease)
        self.canvas.mpl_connect('draw_event', self.DrawCallback)
        self.canvas.mpl_connect('figure_leave_event', self.OnCanvasLeave)
Exemple #5
0
 def UpdateCur(self, busy):
     self.plot_panel.SetBusy(busy)
     ManageBusyCursorMixin.UpdateCur(self, busy)