Ejemplo n.º 1
0
 def _screenshot():
     img = func()
     try:
         from pyvista.plotting.qt_plotting import FileDialog
     except ImportError:
         from pyvistaqt.plotting import FileDialog
     FileDialog(
         self.plotter.app_window,
         callback=partial(_save_ndarray_img, img=img),
     )
Ejemplo n.º 2
0
    def save_movie(self, filename=None, **kwargs):
        from pyvista.plotting.qt_plotting import FileDialog

        if filename is None:
            self.status_msg.setText("Choose movie path ...")
            self.status_msg.show()
            self.status_progress.setValue(0)

            def _clean(unused):
                del unused
                self.status_msg.hide()
                self.status_progress.hide()

            dialog = FileDialog(self.plotter.app_window,
                                callback=partial(self._save_movie, **kwargs))
            dialog.setDirectory(os.getcwd())
            dialog.finished.connect(_clean)
            return dialog
        else:
            self._save_movie(filename=filename, **kwargs)
            return
Ejemplo n.º 3
0
 def callback():
     return FileDialog(
         self.plotter.app_window,
         callback=func,
     )