Commit 6ebc4a2b authored by Marco Gittler's avatar Marco Gittler

use more forward decl. to have no unneeded recompiling

svn path=/branches/KDE4/; revision=2095
parent abef5a87
......@@ -20,6 +20,7 @@
#include <KLocale>
#include "addclipcommand.h"
#include "kdenlivedoc.h"
AddClipCommand::AddClipCommand(KdenliveDoc *doc, const QDomElement &xml, const uint id, bool doIt)
: m_doc(doc), m_xml(xml), m_id(id), m_doIt(doIt) {
......
......@@ -23,8 +23,9 @@
#include <QUndoCommand>
#include <KDebug>
#include <QDomElement>
#include "kdenlivedoc.h"
class KdenliveDoc;
class AddClipCommand : public QUndoCommand {
public:
......
......@@ -20,6 +20,7 @@
#include <KLocale>
#include "addeffectcommand.h"
#include "customtrackview.h"
AddEffectCommand::AddEffectCommand(CustomTrackView *view, const int track, GenTime pos, QDomElement effect, bool doIt)
: m_view(view), m_track(track), m_pos(pos), m_effect(effect), m_doIt(doIt) {
......
......@@ -23,8 +23,10 @@
#include <QUndoCommand>
#include <KDebug>
#include <QDomElement>
#include "gentime.h"
#include "customtrackview.h"
class CustomTrackView;
class AddEffectCommand : public QUndoCommand {
public:
......
......@@ -20,6 +20,7 @@
#include <KLocale>
#include "addtimelineclipcommand.h"
#include "customtrackview.h"
AddTimelineClipCommand::AddTimelineClipCommand(CustomTrackView *view, QDomElement xml, int clipId, int track, GenTime startpos, QRectF rect, GenTime duration, bool doIt, bool doRemove)
: m_view(view), m_xml(xml), m_clipId(clipId), m_clipTrack(track), m_clipPos(startpos), m_clipRect(rect), m_clipDuration(duration), m_doIt(doIt), m_remove(doRemove) {
......
......@@ -24,12 +24,12 @@
#include <QUndoCommand>
#include <QGraphicsView>
#include <QPointF>
#include <QDomElement>
#include <KDebug>
#include "gentime.h"
#include "projectlist.h"
#include "customtrackview.h"
class CustomTrackView;
class AddTimelineClipCommand : public QUndoCommand {
public:
......
......@@ -17,6 +17,7 @@
#include <KLocale>
#include "addtransitioncommand.h"
#include "customtrackview.h"
AddTransitionCommand::AddTransitionCommand(CustomTrackView *view, int track, QDomElement xml, GenTime pos, bool doIt) : m_view(view), m_track(track), m_xml(xml), m_pos(pos), m_doIt(doIt) {
if (m_doIt) setText(i18n("Add transition to clip"));
......
......@@ -21,12 +21,13 @@
#include <QUndoCommand>
#include <QGraphicsView>
#include <QPointF>
#include <QDomElement>
#include <KDebug>
#include "gentime.h"
#include "projectlist.h"
#include "customtrackview.h"
class CustomTrackView;
class AddTransitionCommand : public QUndoCommand {
public:
......
......@@ -35,8 +35,11 @@
#include "clipitem.h"
#include "customtrackview.h"
#include "renderer.h"
#include "docclipbase.h"
#include "transition.h"
#include "events.h"
#include "kdenlivesettings.h"
#include "kthumb.h"
ClipItem::ClipItem(DocClipBase *clip, int track, GenTime startpos, const QRectF & rect, GenTime duration, double fps)
: AbstractClipItem(rect), m_clip(clip), m_resizeMode(NONE), m_grabPoint(0), m_maxTrack(0), m_hasThumbs(false), startThumbTimer(NULL), endThumbTimer(NULL), m_effectsCounter(1), audioThumbWasDrawn(false), m_opacity(1.0), m_timeLine(0), m_thumbsRequested(0), m_hover(false) {
......
......@@ -29,11 +29,11 @@
#include "definitions.h"
#include "gentime.h"
#include "effectslist.h"
#include "docclipbase.h"
#include "kthumb.h"
#include "transition.h"
#include "abstractclipitem.h"
class DocClipBase;
class Transition;
class ClipItem : public AbstractClipItem {
Q_OBJECT
......
......@@ -23,6 +23,7 @@
#include "kdenlivesettings.h"
#include "clipmanager.h"
#include "docclipbase.h"
#include "kdenlivedoc.h"
ClipManager::ClipManager(KdenliveDoc *doc): m_doc(doc) {
m_clipIdCounter = 1;
......
......@@ -21,9 +21,9 @@
#include <KIcon>
#include "ui_keyframewidget_ui.h"
#include "clipitem.h"
class EffectsList;
class EffectsList;
class ClipItem;
class ComplexParameter : public QWidget {
Q_OBJECT
......
......@@ -29,6 +29,7 @@
#include <KCursor>
#include "customtrackview.h"
#include "docclipbase.h"
#include "clipitem.h"
#include "definitions.h"
#include "moveclipcommand.h"
......@@ -40,7 +41,9 @@
#include "edittransitioncommand.h"
#include "kdenlivesettings.h"
#include "transition.h"
#include "clipitem.h"
#include "customtrackview.h"
#include "clipmanager.h"
//TODO:
// disable animation if user asked it in KDE's global settings
// http://lists.kde.org/?l=kde-commits&m=120398724717624&w=2
......@@ -560,7 +563,7 @@ void CustomTrackView::addTransition(int startTrack, GenTime startPos , QDomEleme
)
map[attribs.item(i).nodeName()] = attribs.item(i).nodeValue();
}
map["resource"] = "%luma12.pgm";
kDebug() << "---- ADDING transition " << e.attribute("type") << ", on tracks " << m_tracksList.count() - e.attribute("transition_track").toInt() << " / " << getPreviousVideoTrack(e.attribute("transition_track").toInt());
m_document->renderer()->mltAddTransition(e.attribute("type"), getPreviousVideoTrack(e.attribute("transition_track").toInt()), m_tracksList.count() - e.attribute("transition_track").toInt() ,
GenTime(e.attribute("start").toInt(), m_document->renderer()->fps()),
......
......@@ -29,9 +29,10 @@
#include <KUndoStack>
#include "kdenlivedoc.h"
#include "clipitem.h"
class ClipItem;
class AbstractClipItem;
class Transition;
class CustomTrackView : public QGraphicsView {
Q_OBJECT
......
......@@ -19,6 +19,8 @@
#include "kdenlivesettings.h"
#include "docclipbase.h"
#include "kthumb.h"
#include "clipmanager.h"
DocClipBase::DocClipBase(ClipManager *clipManager, QDomElement xml, uint id):
m_xml(xml), m_id(id), m_description(""), m_refcount(0), m_projectThumbFrame(0), m_audioThumbCreated(false), m_duration(GenTime()), m_thumbProd(NULL), m_audioTimer(NULL) {
......
......@@ -31,9 +31,7 @@
#include <klocale.h>
#include "gentime.h"
#include "clipmanager.h"
#include "definitions.h"
#include "kthumb.h"
/*
class DocTrackBase;
......@@ -42,6 +40,8 @@ class DocClipTextFile;
class DocClipVirtual;
class EffectDescriptionList;*/
class KdenliveDoc;
class KThumb;
class ClipManager;
class CommentedTime {
public:
......
......@@ -20,6 +20,7 @@
#include <KLocale>
#include "editeffectcommand.h"
#include "customtrackview.h"
EditEffectCommand::EditEffectCommand(CustomTrackView *view, const int track, GenTime pos, QDomElement oldeffect, QDomElement effect, bool doIt)
: m_view(view), m_track(track), m_pos(pos), m_oldeffect(oldeffect), m_doIt(doIt) {
......
......@@ -23,8 +23,10 @@
#include <QUndoCommand>
#include <KDebug>
#include <gentime.h>
#include <QDomElement>
#include "customtrackview.h"
class CustomTrackView;
class EditEffectCommand : public QUndoCommand {
public:
......
......@@ -17,6 +17,7 @@
#include <KLocale>
#include "edittransitioncommand.h"
#include "customtrackview.h"
EditTransitionCommand::EditTransitionCommand(CustomTrackView *view, const int track, GenTime pos, QDomElement oldeffect, QDomElement effect, bool doIt)
: m_view(view), m_track(track), m_pos(pos), m_oldeffect(oldeffect), m_doIt(doIt) {
......@@ -48,7 +49,7 @@ void EditTransitionCommand::undo() {
}
// virtual
void EditTransitionCommand::redo() {
m_view->updateTransition(m_track, m_pos,m_oldeffect, m_effect);
m_view->updateTransition(m_track, m_pos, m_oldeffect, m_effect);
}
#include "editeffectcommand.moc"
......@@ -20,8 +20,10 @@
#include <QUndoCommand>
#include <KDebug>
#include <QDomElement>
#include "gentime.h"
#include "customtrackview.h"
class CustomTrackView;
class EditTransitionCommand : public QUndoCommand {
public:
......
......@@ -22,6 +22,8 @@
#include <KLocale>
#include "effectslistview.h"
#include "effectslistwidget.h"
#include "effectslist.h"
EffectsListView::EffectsListView(EffectsList *audioEffectList, EffectsList *videoEffectList, EffectsList *customEffectList, QWidget *parent)
: QWidget(parent) {
......
......@@ -24,9 +24,12 @@
#include <KIcon>
#include "ui_effectlist_ui.h"
#include "effectslistwidget.h"
#include "gentime.h"
#include "effectslist.h"
#include <QDomElement>
class EffectsList;
class EffectsListWidget;
class KListWidget;
class EffectsListView : public QWidget {
Q_OBJECT
......
......@@ -23,6 +23,7 @@
#include "KDebug"
#include "effectslistwidget.h"
#include "effectslist.h"
#define EFFECT_VIDEO 1
#define EFFECT_AUDIO 2
......
......@@ -22,7 +22,9 @@
#define EFFECTLISTWIDGET_H
#include <KListWidget>
#include "effectslist.h"
#include <QDomElement>
class EffectsList;
class EffectsListWidget : public KListWidget {
Q_OBJECT
......
......@@ -18,11 +18,10 @@
#ifndef EFFECTSTACKVIEW_H
#define EFFECTSTACKVIEW_H
#include "clipitem.h"
#include "ui_effectstack_ui.h"
#include "effectstackedit.h"
class EffectsList;
class ClipItem;
class EffectStackView : public QWidget {
Q_OBJECT
......
......@@ -27,6 +27,8 @@
#include <KStandardDirs>
#include "initeffects.h"
#include "kdenlivesettings.h"
#include "effectslist.h"
initEffects::initEffects() {
}
......@@ -405,6 +407,8 @@ QDomDocument initEffects::createDescriptionFromMlt(Mlt::Repository* repository,
void initEffects::fillTransitionsList(Mlt::Repository * repository, EffectsList* transitions, QStringList names) {
foreach(QString name, names) {
QDomDocument ret;
Mlt::Properties *metadata = repository->metadata(transition_type, name.toAscii().data());
//kDebug() << filtername;
if (metadata && metadata->is_valid()) {
......@@ -417,9 +421,11 @@ void initEffects::fillTransitionsList(Mlt::Repository * repository, EffectsList*
ktrans.appendChild(tname);
}
transitions->append(ret.documentElement());
kDebug() << ret.toString();
//kDebug() << ret.toString();
} else {
if (name == "luma") {
QDomDocument ret;
QDomElement ktrans = ret.createElement("ktransition");
ret.appendChild(ktrans);
......@@ -436,6 +442,18 @@ void initEffects::fillTransitionsList(Mlt::Repository * repository, EffectsList*
QDomElement tname1 = ret.createElement("name");
tname1.appendChild(ret1.createTextNode("Lumafile"));
ktrans1.appendChild(tname1);
QString path(mlt_environment("MLT_DATA"));
path.append("/lumas/").append(mlt_environment("MLT_NORMALISATION"));
Mlt::Properties entries;
mlt_properties_dir_list(entries.get_properties(), path.toAscii().data(), "*.*", 1);
kDebug() << path << entries.count();
for (int i = 0;i < entries.count();i++) {
kDebug() << "luma:" << entries.get(i);
}
transitions->append(ret1.documentElement());
} else if (name == "composite") {
QDomDocument ret;
......
......@@ -19,16 +19,16 @@
#define InitEffects_H
#include <klocale.h>
#include <QDomDocument>
#include <mlt++/Mlt.h>
#include "kdenlivesettings.h"
#include "effectslist.h"
/**Init the MLT effects
*@author Jean-Baptiste Mardelle
*/
class EffectsList;
class initEffects {
public:
initEffects();
......
......@@ -29,6 +29,8 @@
#include "docclipbase.h"
#include "profilesdialog.h"
#include "kdenlivesettings.h"
#include "renderer.h"
#include "clipmanager.h"
KdenliveDoc::KdenliveDoc(const KUrl &url, MltVideoProfile profile, QUndoGroup *undoGroup, QWidget *parent): QObject(parent), m_render(NULL), m_url(url), m_profile(profile), m_fps((double)profile.frame_rate_num / profile.frame_rate_den), m_width(profile.width), m_height(profile.height), m_commandStack(new KUndoStack(undoGroup)), m_modified(false) {
m_clipManager = new ClipManager(this);
......
......@@ -33,10 +33,12 @@
#include "gentime.h"
#include "timecode.h"
#include "renderer.h"
#include "clipmanager.h"
#include "definitions.h"
class Render;
class ClipManager;
class DocClipBase;
class KdenliveDoc: public QObject {
Q_OBJECT public:
......
......@@ -57,6 +57,19 @@
#include "projectsettings.h"
#include "events.h"
#include "renderjob.h"
#include "clipmanager.h"
#include "projectlist.h"
#include "monitor.h"
#include "recmonitor.h"
#include "monitormanager.h"
#include "kdenlivedoc.h"
#include "trackview.h"
#include "customtrackview.h"
#include "effectslistview.h"
#include "effectstackview.h"
#include "transitionsettings.h"
#include "renderwidget.h"
#include "jogshuttle.h"
#define ID_STATUS_MSG 1
#define ID_EDITMODE_MSG 2
......
......@@ -35,20 +35,21 @@
#include <KRecentFilesAction>
#include <KComboBox>
#include "projectlist.h"
#include "monitor.h"
#include "recmonitor.h"
#include "monitormanager.h"
#include "kdenlivedoc.h"
#include "trackview.h"
#include "customtrackview.h"
#include "effectslist.h"
#include "effectslistview.h"
#include "effectstackview.h"
#include "transitionsettings.h"
#include "ui_timelinebuttons_ui.h"
#include "renderwidget.h"
#include "jogshuttle.h"
#include "effectslist.h"
#include "gentime.h"
class KdenliveDoc;
class TrackView;
class MonitorManager;
class ProjectList;
class EffectsListView;
class EffectStackView;
class TransitionSettings;
class Monitor;
class RecMonitor;
class CustomTrackView;
class RenderWidget;
class JogShuttle;
class MainWindow : public KXmlGuiWindow {
Q_OBJECT
......
......@@ -43,7 +43,7 @@
#include "definitions.h"
#include "titlewidget.h"
#include "clipmanager.h"
#include <QtGui>
ProjectList::ProjectList(QWidget *parent)
......
......@@ -1407,6 +1407,7 @@ void Render::mltDeleteTransition(QString tag, int a_track, int b_track, GenTime
replaceTimelineTractor(newTractor);
m_mltProducer->seek(old_position);
refresh();
}
......@@ -1442,18 +1443,19 @@ void Render::mltAddTransition(QString tag, int a_track, int b_track, GenTime in,
field->plant_transition(transition, a_track, b_track);
delete[] transId;
m_isBlocked = false;
mltSavePlaylist();
refresh();
}
void Render::mltSavePlaylist() {
kWarning() << "// UPDATING PLAYLIST TO DISK++++++++++++++++";
Mlt::Consumer *fileConsumer = new Mlt::Consumer(*m_mltProfile, "westley");
fileConsumer->set("resource", "/tmp/playlist.westley");
Mlt::Consumer fileConsumer(*m_mltProfile, "westley");
fileConsumer.set("resource", "/tmp/playlist.westley");
Mlt::Service service(m_mltProducer->get_service());
fileConsumer->connect(service);
fileConsumer->start();
fileConsumer.connect(service);
fileConsumer.start();
}
......
......@@ -29,6 +29,7 @@
#include "trackview.h"
#include "clipitem.h"
#include "kdenlivesettings.h"
#include "clipmanager.h"
TrackView::TrackView(KdenliveDoc *doc, QWidget *parent)
: QWidget(parent), m_doc(doc), m_scale(1.0), m_projectTracks(0), m_currentZoom(4) {
......
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