def __init__(self, session, parent=None): super(ScatterWidget, self).__init__(session, parent) self.central_widget = MplWidget() self.setCentralWidget(self.central_widget) self.option_widget = QtWidgets.QWidget() self.ui = load_ui('options_widget.ui', self.option_widget, directory=os.path.dirname(__file__)) self._tweak_geometry() self.client = ScatterClient( self._data, self.central_widget.canvas.fig, layer_artist_container=self._layer_artist_container) self._connect() self.unique_fields = set() tb = self.make_toolbar() cache_axes(self.client.axes, tb) self.statusBar().setSizeGripEnabled(False) self.setFocusPolicy(Qt.StrongFocus)
def __init__(self, session, parent=None): super(ScatterWidget, self).__init__(session, parent) self.central_widget = MplWidget() self.option_widget = QtGui.QWidget() self.setCentralWidget(self.central_widget) self.ui = load_ui('options_widget.ui', self.option_widget, directory=os.path.dirname(__file__)) self._tweak_geometry() self.client = ScatterClient(self._data, self.central_widget.canvas.fig, layer_artist_container=self._layer_artist_container) self._connect() self.unique_fields = set() tb = self.make_toolbar() cache_axes(self.client.axes, tb) self.statusBar().setSizeGripEnabled(False) self.setFocusPolicy(Qt.StrongFocus)
def initialize_toolbar(self): super(ScatterWidget, self).initialize_toolbar() cache_axes(self.client.axes, self.toolbar)