CSV format import-export
Boudewijn Rempt
boud at valdyas.org
Fri Mar 4 13:56:45 UTC 2016
On Fri, 4 Mar 2016, Dmitry Kazakov wrote:
> Hi, Laszlo!
>
> - for bigger scenes, it takes a long time to load or save the animation with this format (the plugin loads or saves a bunch of png files). So I want to show the status with
> the progress bar at the bottom of the main window. What is the correct way to do it? It seems the png importer also using this same bar, so maybe I have to supress that
> while showing mine.
>
> - during these long import/export operations, the gui stops working. Is it a co-operative multitasking thing? What can I do to make it more user friendly? Is there a
> callback or something?
>
>
> As far as I know, in the import/export plugins we don't have any progress reporting framework (Boud will correct me if I'm wrong), though it might be a good idea to have one.
There actually is one, you can set an updater using KisImportExportFilter::setUpdater and report progress with the sigProgress(int percent); whether that actually works is another thing. Adding progress reporting to our import/export plugins has been a todo since we moved away from the built-in ImageMagick filters, I think!
But the proper thing to do is emit that signal from the filter and then let me worry about how whether the progress bar is shown.
> I guess
> you can try to implement one. The entry point to access a progress bar in the bottom is: KisViewManager::createProgressUpdater(). The saving itself happens in KisDocument. It uses
> d->filterManager->exportDocument() to save the documents. You can add some signal to the export filter and bind it to the document's signal. The KisViewManager can connect to this
> signal on switching views and show the progress to the user.
>
> Actually because of this reason in "Export Animation" action we use a "hackish" approach to show a separate dialog with a progress bar. We just don't use export plugins at all, but this
> is wrong, of course.
>
>
> --
> Dmitry Kazakov
>
>
--
Boudewijn Rempt | http://www.krita.org, http://www.valdyas.org
More information about the kimageshop
mailing list