Dev:Adding a Render progress bar
From Synfig Studio :: Documentation
Now let's implement a Render Progress Bar!
It has been requested several time:
Indication needed that rendering is in progress. #383
Feature request: Give feedback when rendering is happening and complete #626
also in Default render parameter are bad #464
Contents
Things to take into account
- Where to place the Progress Bar?
- How does really a render work?
- Where to do calls and implementation?
Where to place the Progress Bar?
I chose to implement it in the Dock_Info panel.
After all, this is a kind of information!
Implementation
synfig-studio/src/gui/docks/dock_info.h
- Declare the components and members
In #include section
#include <gtkmm/progressbar.h>
In private section
Gtk::ProgressBar render_progress; //! Number of passes request - 1 or 2 (if alpha) int n_passes_requested; //! Number of passes pending - 2,1,0 int n_passes_pending;
In public section
//! Current render progress - 0.0 to 1.0 // depends on n_passes_requested and current_pass void set_render_progress (float value); void set_n_passes_requested(int value); void set_n_passes_pending (int value);