3 #include <QStylePainter>
11 Monitor::Monitor(QString name, QWidget *parent)
15 if (name == "project") {
16 render = new Render(name, this);
17 render->createVideoXWindow(ui.video_frame->winId(), -1);
18 connect(ui.button_play, SIGNAL(clicked()), this, SLOT(slotOpen()));
19 connect(ui.button_rew, SIGNAL(clicked()), this, SLOT(slotRewind()));
20 connect(ui.button_play_2, SIGNAL(clicked()), this, SLOT(slotPlay()));
24 void Monitor::slotOpen()
27 render->mltInsertClip(2, GenTime(1, 25), QString("<westley><producer mlt_service=\"colour\" colour=\"red\" in=\"1\" out=\"30\" /></westley>"));
28 render->mltInsertClip(2, GenTime(0, 25), QString("<westley><producer mlt_service=\"avformat\" resource=\"/home/one/.vids/clip3e.mpg\" in=\"1\" out=\"300\" /></westley>"));
31 void Monitor::slotRewind()
33 render->seek(GenTime(0));
37 void Monitor::slotPlay()
42 void Monitor::slotSetXml(const QDomElement &e)
45 QDomElement westley = doc.createElement("westley");
46 doc.appendChild(westley);
47 westley.appendChild(e);
48 render->setSceneList(doc, 0);
52 void Monitor::slotOpenFile(const QString &file)
55 QDomElement westley = doc.createElement("westley");
56 doc.appendChild(westley);
57 QDomElement prod = doc.createElement("producer");
58 westley.appendChild(prod);
59 prod.setAttribute("mlt_service", "avformat");
60 prod.setAttribute("resource", file);
61 render->setSceneList(doc, 0);
66 #include "monitor.moc"