Commit b8bb94c9 authored by Jason Wood's avatar Jason Wood

Fixed progress bar - it now updates while a render is in progress.

svn path=/trunk/kdenlive/; revision=243
parent 3e8aa55a
......@@ -287,6 +287,9 @@ void KdenliveApp::initView()
connect(getDocument(), SIGNAL(sceneListChanged(const QDomDocument &)), m_workspaceMonitor, SLOT(setSceneList(const QDomDocument &)));
connect(getDocument()->renderer(), SIGNAL(effectListChanged(const QPtrList<EffectDesc> &)), m_effectListDialog, SLOT(setEffectList(const QPtrList<EffectDesc> &)));
connect(getDocument()->renderer(), SIGNAL(rendering(const GenTime &)), this, SLOT(slotSetRenderProgress(const GenTime &)));
connect(getDocument()->renderer(), SIGNAL(renderFinished()), this, SLOT(slotSetRenderFinished()));
connect(m_renderManager, SIGNAL(recievedInfo(const QString &, const QString &)), m_renderDebugPanel, SLOT(slotPrintDebug(const QString &, const QString &)));
connect(m_renderManager, SIGNAL(recievedStdout(const QString &, const QString &)), m_renderDebugPanel, SLOT(slotPrintWarning(const QString &, const QString &)));
......@@ -1025,3 +1028,17 @@ void KdenliveApp::slotRenderError(const QString &name, const QString &message)
{
KMessageBox::sorry(this, message, name);
}
void KdenliveApp::slotSetRenderProgress(const GenTime &time)
{
m_statusBarProgress->setPercentageVisible(true);
m_statusBarProgress->setTotalSteps(m_timeline->projectLength().frames(getDocument()->framesPerSecond()));
m_statusBarProgress->setProgress(time.frames(getDocument()->framesPerSecond()));
}
void KdenliveApp::slotSetRenderFinished()
{
std::cerr << "FINISHED RENDERING!" << std::endl;
m_statusBarProgress->setPercentageVisible(false);
m_statusBarProgress->setProgress(m_statusBarProgress->totalSteps());
}
......@@ -74,6 +74,9 @@ class KdenliveApp : public KDockMainWindow
friend class KdenliveView;
public:
/** The various editing modes that the timeline is capable of */
enum TimelineEditMode {Move, Razor, Spacer};
/** construtor of KdenliveApp, calls all init functions to create the application.
*/
KdenliveApp(QWidget* parent=0, const char* name=0);
......@@ -83,8 +86,8 @@ class KdenliveApp : public KDockMainWindow
void openDocumentFile(const KURL& url=0);
/** returns a pointer to the current document connected to the KTMainWindow instance and is used by
* the View class to access the document object's methods
*/
KdenliveDoc *getDocument() const;
*/
KdenliveDoc *getDocument() const;
/** Returns true if snapToFrame is enabled, false otherwise */
bool snapToFrameEnabled();
/** Returns true if snapToBorder is checked, false otherwise */
......@@ -92,9 +95,6 @@ class KdenliveApp : public KDockMainWindow
/** Adds a command to the command history, execute it if execute is true. */
void addCommand(KCommand *command, bool execute=true);
/** The various editing modes that the timeline is capable of */
enum TimelineEditMode {Move, Razor, Spacer};
/** Returns the editing mode that the timeline should operate with */
TimelineEditMode timelineEditMode();
/** Returns the render manager. */
......@@ -103,7 +103,7 @@ class KdenliveApp : public KDockMainWindow
protected:
/** save general Options like all bar positions and status as well as the geometry and the recent file list to the configuration
* file
*/
*/
void saveOptions();
/** read general Options again and initialize all variables like the recent file list
*/
......@@ -198,7 +198,7 @@ class KdenliveApp : public KDockMainWindow
void slotTimelineMoveTool();
/** Called when the user activates the "Export Timeline" action */
void slotRenderExportTimeline();
/** Called when the user activates the "Preferencfes" action */
/** Called when the user activates the "Preferences" action */
void slotOptionsPreferences();
/** Updates the current time in the status bar. */
void slotUpdateCurrentTime(const GenTime &time);
......@@ -231,6 +231,8 @@ class KdenliveApp : public KDockMainWindow
/** Sets the clip monitor source to be the given clip. */
void slotSetClipMonitorSource(DocClipBase *clip);
/** SLots to Save/Load the current dockwidget layout to/from the layout number specified. */
void slotSetRenderProgress(const GenTime &);
void slotSetRenderFinished();
void loadLayout1();
void loadLayout2();
void loadLayout3();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment