Commit a499648a authored by Jason Wood's avatar Jason Wood

Added slightly improved granularity for reporting rendering error messages. Still needs work.

svn path=/trunk/kdenlive/; revision=267
parent 1b6c777c
This diff is collapsed.
......@@ -57,6 +57,10 @@ struct StackValue {
class KRender : public QObject, public QXmlDefaultHandler {
Q_OBJECT
public:
enum FailStates { OK = 0,
APP_NOEXIST
};
KRender(const QString &rendererName, KURL appPath, unsigned int port, QObject *parent=0, const char *name=0);
~KRender();
/** Wraps the VEML command of the same name; requests that the renderer
......@@ -267,8 +271,12 @@ signals: // Signals
void recievedStdout(const QString &, const QString &);
/** Emitted when the renderer has recieved text from stderr */
void recievedStderr(const QString &, const QString &);
/** Emitted when the renderer has some information to pass on */
void recievedInfo(const QString &, const QString &);
/** Emits useful rendering debug info. */
void renderDebug(const QString &, const QString &);
/** Emits renderer warnings info. */
void renderWarning(const QString &, const QString &);
/** Emits renderer errors. */
void renderError(const QString &, const QString &);
/** Emitted when the renderer stops, either playing or rendering. */
void stopped();
/** Emitted when the renderer starts playing. */
......
......@@ -35,17 +35,25 @@ KRenderManager::~KRenderManager()
/** Creates a new renderer, guaranteeing it it's own port number, etc. */
KRender * KRenderManager::createRenderer(const QString &name)
{
KRender *render = new KRender(name, m_renderAppPath, m_currentPort);
KRender *render = new KRender(name, m_renderAppPath, m_currentPort);
connect(render, SIGNAL(recievedStderr(const QString &, const QString &)), this, SIGNAL(recievedStderr(const QString &, const QString &)));
connect(render, SIGNAL(recievedStdout(const QString &, const QString &)), this, SIGNAL(recievedStdout(const QString &, const QString &)));
connect(render, SIGNAL(recievedInfo(const QString &, const QString &)), this, SIGNAL(recievedInfo(const QString &, const QString &)));
connect(render, SIGNAL(error(const QString &, const QString &)), this, SIGNAL(error(const QString &, const QString &)));
connect(render, SIGNAL(recievedStderr(const QString &, const QString &)),
this, SIGNAL(recievedStderr(const QString &, const QString &)));
connect(render, SIGNAL(recievedStdout(const QString &, const QString &)),
this, SIGNAL(recievedStdout(const QString &, const QString &)));
connect(render, SIGNAL(error(const QString &, const QString &)),
this, SIGNAL(error(const QString &, const QString &)));
connect(render, SIGNAL(renderDebug(const QString &, const QString &)),
this, SIGNAL(renderDebug(const QString &, const QString &)));
connect(render, SIGNAL(renderWarning(const QString &, const QString &)),
this, SIGNAL(renderWarning(const QString &, const QString &)));
connect(render, SIGNAL(renderError(const QString &, const QString &)),
this, SIGNAL(renderError(const QString &, const QString &)));
++m_currentPort;
++m_currentPort;
m_renderList.append(render);
return render;
m_renderList.append(render);
return render;
}
/** Reads the configuration details for the renderer manager */
......
......@@ -63,8 +63,12 @@ signals:
void recievedStdout(const QString &, const QString &);
/** Emitted when the renderer has recieved text from stderr */
void recievedStderr(const QString &, const QString &);
/** Emitted when the renderer has recieved some info */
void recievedInfo(const QString &, const QString &);
/** Emits useful rendering debug info. */
void renderDebug(const QString &, const QString &);
/** Emits renderer warnings info. */
void renderWarning(const QString &, const QString &);
/** Emits renderer errors. */
void renderError(const QString &, const QString &);
/** emitted when an error occurs within one of the managed renderers. */
void error(const QString &, const QString &);
};
......
......@@ -45,6 +45,21 @@ RenderDebugPanel::~RenderDebugPanel()
{
}
void RenderDebugPanel::slotPrintRenderDebug(const QString &name, const QString &message)
{
slotPrintDebug(name, message);
}
void RenderDebugPanel::slotPrintRenderWarning(const QString &name, const QString &message)
{
slotPrintWarning(name, message);
}
void RenderDebugPanel::slotPrintRenderError(const QString &name, const QString &message)
{
slotPrintError(name, message);
}
/** Prints a warning message to the debug area. */
void RenderDebugPanel::slotPrintWarning(const QString &name, const QString &message)
{
......
......@@ -47,9 +47,14 @@ private:
QMap<QString, int> m_boxNames;
int m_nextId;
public slots: // Public slots
/** Prints a debug (informational) message to the debug */
void slotPrintRenderDebug(const QString &name, const QString &message);
/** Prints a warning (oh oh....) message to the debug */
void slotPrintRenderWarning(const QString &name, const QString &message);
/** Prints an error (ARRGHH!) message to the debug window */
void slotPrintRenderError(const QString &name, const QString &message);
/** Prints a debug (informational) message to the debug */
void slotPrintDebug(const QString &name, const QString &message);
public slots: // Public slots
/** Prints an error message to the debug window. */
void slotPrintError(const QString &name, const QString &message);
/** Prints a warning message to the debug area. */
......
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