]> git.sesse.net Git - kdenlive/commitdiff
Reindent the codebase using 'linux' bracket placement.
authorRay Lehtiniemi <rayl@mail.com>
Sat, 4 Apr 2009 01:33:40 +0000 (01:33 +0000)
committerRay Lehtiniemi <rayl@mail.com>
Sat, 4 Apr 2009 01:33:40 +0000 (01:33 +0000)
Signed-off-by: Ray Lehtiniemi <rayl@mail.com>
svn path=/trunk/kdenlive/; revision=3207

175 files changed:
plugins/sampleplugin/sampleplugin.cpp
plugins/sampleplugin/sampleplugin.h
renderer/kdenlive_render.cpp
renderer/renderjob.cpp
renderer/renderjob.h
src/abstractclipitem.cpp
src/abstractclipitem.h
src/abstractgroupitem.cpp
src/abstractgroupitem.h
src/addclipcommand.cpp
src/addclipcommand.h
src/addeffectcommand.cpp
src/addeffectcommand.h
src/addfoldercommand.cpp
src/addfoldercommand.h
src/addmarkercommand.cpp
src/addmarkercommand.h
src/addtimelineclipcommand.cpp
src/addtimelineclipcommand.h
src/addtrackcommand.cpp
src/addtrackcommand.h
src/addtransitioncommand.cpp
src/addtransitioncommand.h
src/changecliptypecommand.cpp
src/changecliptypecommand.h
src/changespeedcommand.cpp
src/changespeedcommand.h
src/changetrackcommand.cpp
src/changetrackcommand.h
src/clipdurationdialog.cpp
src/clipdurationdialog.h
src/clipitem.cpp
src/clipitem.h
src/clipmanager.cpp
src/clipmanager.h
src/clipproperties.cpp
src/clipproperties.h
src/complexparameter.cpp
src/complexparameter.h
src/customruler.cpp
src/customruler.h
src/customtrackscene.cpp
src/customtrackscene.h
src/customtrackview.cpp
src/customtrackview.h
src/definitions.h
src/docclipbase.cpp
src/docclipbase.h
src/dvdwizard.cpp
src/dvdwizard.h
src/dvdwizardmenu.cpp
src/dvdwizardmenu.h
src/dvdwizardvob.cpp
src/dvdwizardvob.h
src/editclipcommand.cpp
src/editclipcommand.h
src/editeffectcommand.cpp
src/editeffectcommand.h
src/editfoldercommand.cpp
src/editfoldercommand.h
src/editguidecommand.cpp
src/editguidecommand.h
src/editkeyframecommand.cpp
src/editkeyframecommand.h
src/edittransitioncommand.cpp
src/edittransitioncommand.h
src/effectslist.cpp
src/effectslist.h
src/effectslistview.cpp
src/effectslistview.h
src/effectslistwidget.cpp
src/effectslistwidget.h
src/effectstackedit.cpp
src/effectstackedit.h
src/effectstackview.cpp
src/effectstackview.h
src/events.h
src/gentime.cpp
src/gentime.h
src/geometryval.cpp
src/geometryval.h
src/graphicsscenerectmove.cpp
src/graphicsscenerectmove.h
src/groupclipscommand.cpp
src/groupclipscommand.h
src/guide.cpp
src/guide.h
src/headertrack.cpp
src/headertrack.h
src/initeffects.cpp
src/initeffects.h
src/insertspacecommand.cpp
src/insertspacecommand.h
src/interfaces.h
src/jogshuttle.cpp
src/jogshuttle.h
src/kdenlivedoc.cpp
src/kdenlivedoc.h
src/kdenlivesettingsdialog.cpp
src/kdenlivesettingsdialog.h
src/keyframehelper.cpp
src/keyframehelper.h
src/kthumb.cpp
src/kthumb.h
src/locktrackcommand.cpp
src/locktrackcommand.h
src/main.cpp
src/mainwindow.cpp
src/mainwindow.h
src/managecapturesdialog.cpp
src/managecapturesdialog.h
src/markerdialog.cpp
src/markerdialog.h
src/monitor.cpp
src/monitor.h
src/monitormanager.cpp
src/monitormanager.h
src/moveclipcommand.cpp
src/moveclipcommand.h
src/moveeffectcommand.cpp
src/moveeffectcommand.h
src/movegroupcommand.cpp
src/movegroupcommand.h
src/movetransitioncommand.cpp
src/movetransitioncommand.h
src/parameterplotter.cpp
src/parameterplotter.h
src/profilesdialog.cpp
src/profilesdialog.h
src/projectitem.cpp
src/projectitem.h
src/projectlist.cpp
src/projectlist.h
src/projectlistview.cpp
src/projectlistview.h
src/projectsettings.cpp
src/projectsettings.h
src/razorclipcommand.cpp
src/razorclipcommand.h
src/recmonitor.cpp
src/recmonitor.h
src/regiongrabber.cpp
src/regiongrabber.h
src/renderer.cpp
src/renderer.h
src/renderwidget.cpp
src/renderwidget.h
src/resizeclipcommand.cpp
src/resizeclipcommand.h
src/slideshowclip.cpp
src/slideshowclip.h
src/smallruler.cpp
src/smallruler.h
src/spacerdialog.cpp
src/spacerdialog.h
src/splitaudiocommand.cpp
src/splitaudiocommand.h
src/statusbarmessagelabel.cpp
src/statusbarmessagelabel.h
src/timecode.cpp
src/timecode.h
src/titledocument.cpp
src/titledocument.h
src/titlewidget.cpp
src/titlewidget.h
src/trackview.cpp
src/trackview.h
src/transition.cpp
src/transition.h
src/transitionsettings.cpp
src/transitionsettings.h
src/wizard.cpp
src/wizard.h
thumbnailer/westleypreview.cpp
thumbnailer/westleypreview.h

index be61870852c30b7b563d9829b7895ebdda33e7e5..bdec16e54396653f29f46c51f357cb01a13328c8 100644 (file)
 #include <QDomDocument>
 #include <QInputDialog>
 
-QStringList SamplePlugin::generators() const {
+QStringList SamplePlugin::generators() const
+{
     return QStringList() << i18n("Countdown") << i18n("Noise");
 }
 
 
-KUrl SamplePlugin::generatedClip(const QString &generator, const KUrl &projectFolder, const QStringList &/*lumaNames*/, const QStringList &/*lumaFiles*/, const double fps, const int /*width*/, const int /*height*/) {
+KUrl SamplePlugin::generatedClip(const QString &generator, const KUrl &projectFolder, const QStringList &/*lumaNames*/, const QStringList &/*lumaFiles*/, const double fps, const int /*width*/, const int /*height*/)
+{
     QString prePath;
     if (generator == i18n("Noise")) {
         prePath = projectFolder.path() + "/noise";
index 9238d707f99508a642f778254d4ab830c55cec95..64289c3317632dabda05d46f9e2a34415c19224a 100644 (file)
@@ -28,7 +28,8 @@
 
 #include "interfaces.h"
 
-class SamplePlugin : public QObject, public ClipGenerator {
+class SamplePlugin : public QObject, public ClipGenerator
+{
     Q_OBJECT
     Q_INTERFACES(ClipGenerator)
 
index a215f00a6750d60e6185c031e73aa35e9c2cda8e..ca352bdbc35997e3919611eb156f0f1657f3424d 100644 (file)
@@ -25,7 +25,8 @@
 
 #include "renderjob.h"
 
-int main(int argc, char **argv) {
+int main(int argc, char **argv)
+{
     QCoreApplication app(argc, argv);
     QStringList args = app.arguments();
     QStringList preargs;
index 1ab486dcac3bd780bb3ef011fabfbe136dbdbecc..bdd6e1cc9164bbf64fbd5bc46b73f3554a2272e5 100644 (file)
@@ -25,7 +25,8 @@
 #include <QThread>
 
 // Can't believe I need to do this to sleep.
-class SleepThread : QThread {
+class SleepThread : QThread
+{
 public:
     virtual void run() {};
     static void msleep(unsigned long msecs) {
@@ -35,7 +36,8 @@ public:
 
 static QDBusConnection connection(QLatin1String(""));
 
-RenderJob::RenderJob(bool erase, bool usekuiserver, const QString &renderer, const QString &profile, const QString &rendermodule, const QString &player, const QString &scenelist, const QString &dest, const QStringList &preargs, const QStringList &args, int in, int out) : QObject(), m_usekuiserver(usekuiserver), m_jobUiserver(NULL), m_kdenliveinterface(NULL) {
+RenderJob::RenderJob(bool erase, bool usekuiserver, const QString &renderer, const QString &profile, const QString &rendermodule, const QString &player, const QString &scenelist, const QString &dest, const QStringList &preargs, const QStringList &args, int in, int out) : QObject(), m_usekuiserver(usekuiserver), m_jobUiserver(NULL), m_kdenliveinterface(NULL)
+{
     m_scenelist = scenelist;
     m_dest = dest;
     m_player = player;
@@ -85,16 +87,19 @@ RenderJob::RenderJob(bool erase, bool usekuiserver, const QString &renderer, con
 }
 
 
-RenderJob::~RenderJob() {
+RenderJob::~RenderJob()
+{
     if (m_renderProcess) delete m_renderProcess;
     // m_logfile.close();
 }
 
-void RenderJob::slotAbort(const QString& url) {
+void RenderJob::slotAbort(const QString& url)
+{
     if (m_dest == url) slotAbort();
 }
 
-void RenderJob::slotAbort() {
+void RenderJob::slotAbort()
+{
     qDebug() << "Kdenlive-render: JOB ABORTED BY USER...";
     m_renderProcess->kill();
 
@@ -118,7 +123,8 @@ void RenderJob::slotAbort() {
     qApp->quit();
 }
 
-void RenderJob::receivedStderr() {
+void RenderJob::receivedStderr()
+{
     QString result = QString(m_renderProcess->readAllStandardError()).simplified();
     if (!result.startsWith("Current Frame")) m_errorMessage.append(result + "<br>");
     else {
@@ -153,7 +159,8 @@ void RenderJob::receivedStderr() {
     }
 }
 
-void RenderJob::start() {
+void RenderJob::start()
+{
     QDBusConnectionInterface* interface = QDBusConnection::sessionBus().interface();
     if (interface && m_usekuiserver) {
         if (!interface->isServiceRegistered("org.kde.JobViewServer")) {
@@ -199,7 +206,8 @@ void RenderJob::start() {
 }
 
 
-void RenderJob::initKdenliveDbusInterface() {
+void RenderJob::initKdenliveDbusInterface()
+{
     QString kdenliveId;
     QDBusConnection connection = QDBusConnection::sessionBus();
     QDBusConnectionInterface *ibus = connection.interface();
@@ -228,7 +236,8 @@ void RenderJob::initKdenliveDbusInterface() {
 }
 
 
-void RenderJob::slotIsOver(int /*exitcode*/, QProcess::ExitStatus status) {
+void RenderJob::slotIsOver(int /*exitcode*/, QProcess::ExitStatus status)
+{
     if (m_jobUiserver) m_jobUiserver->call("terminate", QString());
     if (m_erase) {
         QFile f(m_scenelist);
index 549a086efd68b9b58ecf63f1dd01a69f2aafc947..7221585781314d85d885268971a98bcabf1eeef7 100644 (file)
@@ -29,7 +29,8 @@
 #include <QTemporaryFile>
 #include <QTextStream>
 
-class RenderJob : public QObject {
+class RenderJob : public QObject
+{
     Q_OBJECT
 
 public:
index 7636b0a5aab6cb4200eac6b1028f9fe8fe87a7a3..c6bd71fd9ed0916ad2a5b910395e2585653862b5 100644 (file)
 #include <QPainter>
 #include <QToolTip>
 
-AbstractClipItem::AbstractClipItem(const ItemInfo info, const QRectF& rect, double fps): QGraphicsRectItem(rect), m_track(0), m_fps(fps), m_editedKeyframe(-1), m_selectedKeyframe(0), m_keyframeFactor(1) {
+AbstractClipItem::AbstractClipItem(const ItemInfo info, const QRectF& rect, double fps): QGraphicsRectItem(rect), m_track(0), m_fps(fps), m_editedKeyframe(-1), m_selectedKeyframe(0), m_keyframeFactor(1)
+{
     setFlags(/*QGraphicsItem::ItemClipsToShape | */QGraphicsItem::ItemIsMovable | QGraphicsItem::ItemIsSelectable);
     setTrack(info.track);
     m_startPos = info.startPos;
     m_cropDuration = info.endPos - info.startPos;
 }
 
-ItemInfo AbstractClipItem::info() const {
+ItemInfo AbstractClipItem::info() const
+{
     ItemInfo itemInfo;
     itemInfo.startPos = startPos();
     itemInfo.endPos = endPos();
@@ -44,36 +46,44 @@ ItemInfo AbstractClipItem::info() const {
     return itemInfo;
 }
 
-GenTime AbstractClipItem::endPos() const {
+GenTime AbstractClipItem::endPos() const
+{
     return m_startPos + m_cropDuration;
 }
 
-int AbstractClipItem::track() const {
+int AbstractClipItem::track() const
+{
     return m_track;
 }
 
-GenTime AbstractClipItem::cropStart() const {
+GenTime AbstractClipItem::cropStart() const
+{
     return m_cropStart;
 }
 
-GenTime AbstractClipItem::cropDuration() const {
+GenTime AbstractClipItem::cropDuration() const
+{
     return m_cropDuration;
 }
 
-void AbstractClipItem::setCropStart(GenTime pos) {
+void AbstractClipItem::setCropStart(GenTime pos)
+{
     m_cropStart = pos;
 }
 
-void AbstractClipItem::updateItem() {
+void AbstractClipItem::updateItem()
+{
     m_track = (int)(scenePos().y() / KdenliveSettings::trackheight());
     m_startPos = GenTime((int) scenePos().x(), m_fps);
 }
 
-void AbstractClipItem::updateRectGeometry() {
+void AbstractClipItem::updateRectGeometry()
+{
     setRect(0, 0, cropDuration().frames(m_fps) - 0.02, rect().height());
 }
 
-void AbstractClipItem::resizeStart(int posx, double speed) {
+void AbstractClipItem::resizeStart(int posx, double speed)
+{
     GenTime durationDiff = GenTime(posx, m_fps) - m_startPos;
     if (durationDiff == GenTime()) return;
     //kDebug() << "-- RESCALE DIFF=" << durationDiff.frames(25) << ", CLIP: " << startPos().frames(25) << "-" << endPos().frames(25);
@@ -124,7 +134,8 @@ void AbstractClipItem::resizeStart(int posx, double speed) {
         }*/
 }
 
-void AbstractClipItem::resizeEnd(int posx, double speed, bool /*updateKeyFrames*/) {
+void AbstractClipItem::resizeEnd(int posx, double speed, bool /*updateKeyFrames*/)
+{
     GenTime durationDiff = GenTime(posx, m_fps) - endPos();
     if (durationDiff == GenTime()) return;
     //kDebug() << "// DUR DIFF1:" << durationDiff.frames(25) << ", ADJUSTED: " << durationDiff.frames(25) * speed << ", SPED:" << speed;
@@ -154,31 +165,38 @@ void AbstractClipItem::resizeEnd(int posx, double speed, bool /*updateKeyFrames*
     }
 }
 
-GenTime AbstractClipItem::duration() const {
+GenTime AbstractClipItem::duration() const
+{
     return m_cropDuration;
 }
 
-GenTime AbstractClipItem::startPos() const {
+GenTime AbstractClipItem::startPos() const
+{
     return m_startPos;
 }
 
-void AbstractClipItem::setTrack(int track) {
+void AbstractClipItem::setTrack(int track)
+{
     m_track = track;
 }
 
-double AbstractClipItem::fps() const {
+double AbstractClipItem::fps() const
+{
     return m_fps;
 }
 
-GenTime AbstractClipItem::maxDuration() const {
+GenTime AbstractClipItem::maxDuration() const
+{
     return m_maxDuration;
 }
 
-void AbstractClipItem::setMaxDuration(const GenTime &max) {
+void AbstractClipItem::setMaxDuration(const GenTime &max)
+{
     m_maxDuration = max;
 }
 
-QPainterPath AbstractClipItem::upperRectPart(QRectF br) {
+QPainterPath AbstractClipItem::upperRectPart(QRectF br)
+{
     QPainterPath roundRectPathUpper;
     double roundingY = 20;
     double roundingX = 20;
@@ -202,7 +220,8 @@ QPainterPath AbstractClipItem::upperRectPart(QRectF br) {
     return roundRectPathUpper;
 }
 
-QPainterPath AbstractClipItem::lowerRectPart(QRectF br) {
+QPainterPath AbstractClipItem::lowerRectPart(QRectF br)
+{
     QPainterPath roundRectPathLower;
     double roundingY = 20;
     double roundingX = 20;
@@ -225,7 +244,8 @@ QPainterPath AbstractClipItem::lowerRectPart(QRectF br) {
     return roundRectPathLower;
 }
 
-void AbstractClipItem::drawKeyFrames(QPainter *painter, QRectF /*exposedRect*/) {
+void AbstractClipItem::drawKeyFrames(QPainter *painter, QRectF /*exposedRect*/)
+{
     if (m_keyframes.count() < 2) return;
     QRectF br = rect();
     double maxw = br.width() / m_cropDuration.frames(m_fps);
@@ -275,7 +295,8 @@ void AbstractClipItem::drawKeyFrames(QPainter *painter, QRectF /*exposedRect*/)
     if (isSelected()) painter->fillRect(l2.x2() - 3, l2.y2() - 3, 6, 6, QBrush(color));
 }
 
-int AbstractClipItem::mouseOverKeyFrames(QPointF pos) {
+int AbstractClipItem::mouseOverKeyFrames(QPointF pos)
+{
     QRectF br = sceneBoundingRect();
     double maxw = br.width() / m_cropDuration.frames(m_fps);
     double maxh = br.height() / 100.0 * m_keyframeFactor;
@@ -297,7 +318,8 @@ int AbstractClipItem::mouseOverKeyFrames(QPointF pos) {
     return -1;
 }
 
-void AbstractClipItem::updateSelectedKeyFrame() {
+void AbstractClipItem::updateSelectedKeyFrame()
+{
     if (m_editedKeyframe == -1) return;
     QRectF br = sceneBoundingRect();
     double maxw = br.width() / m_cropDuration.frames(m_fps);
@@ -307,15 +329,18 @@ void AbstractClipItem::updateSelectedKeyFrame() {
     update(br.x() + maxw * (m_selectedKeyframe - m_cropStart.frames(m_fps)) - 3, br.bottom() - m_keyframes[m_selectedKeyframe] * maxh - 3, 12, 12);
 }
 
-int AbstractClipItem::selectedKeyFramePos() const {
+int AbstractClipItem::selectedKeyFramePos() const
+{
     return m_editedKeyframe;
 }
 
-double AbstractClipItem::selectedKeyFrameValue() const {
+double AbstractClipItem::selectedKeyFrameValue() const
+{
     return m_keyframes[m_editedKeyframe];
 }
 
-void AbstractClipItem::updateKeyFramePos(const GenTime pos, const double value) {
+void AbstractClipItem::updateKeyFramePos(const GenTime pos, const double value)
+{
     if (!m_keyframes.contains(m_selectedKeyframe)) return;
     int newpos = (int) pos.frames(m_fps);
     int start = m_cropStart.frames(m_fps);
@@ -345,11 +370,13 @@ void AbstractClipItem::updateKeyFramePos(const GenTime pos, const double value)
     update();
 }
 
-double AbstractClipItem::keyFrameFactor() const {
+double AbstractClipItem::keyFrameFactor() const
+{
     return m_keyframeFactor;
 }
 
-void AbstractClipItem::addKeyFrame(const GenTime pos, const double value) {
+void AbstractClipItem::addKeyFrame(const GenTime pos, const double value)
+{
     QRectF br = sceneBoundingRect();
     double maxh = 100.0 / br.height() / m_keyframeFactor;
     double newval = (br.bottom() - value) * maxh;
@@ -360,7 +387,8 @@ void AbstractClipItem::addKeyFrame(const GenTime pos, const double value) {
     update();
 }
 
-bool AbstractClipItem::hasKeyFrames() const {
+bool AbstractClipItem::hasKeyFrames() const
+{
     return !m_keyframes.isEmpty();
 }
 
@@ -375,12 +403,14 @@ bool AbstractClipItem::hasKeyFrames() const {
     return rectInView;
 }*/
 
-CustomTrackScene* AbstractClipItem::projectScene() {
+CustomTrackScene* AbstractClipItem::projectScene()
+{
     if (scene()) return static_cast <CustomTrackScene*>(scene());
     return NULL;
 }
 
-void AbstractClipItem::setItemLocked(bool locked) {
+void AbstractClipItem::setItemLocked(bool locked)
+{
     if (locked) {
         setSelected(false);
         setFlag(QGraphicsItem::ItemIsMovable, false);
@@ -388,7 +418,8 @@ void AbstractClipItem::setItemLocked(bool locked) {
     } else setFlags(QGraphicsItem::ItemIsMovable | QGraphicsItem::ItemIsSelectable);
 }
 
-bool AbstractClipItem::isItemLocked() const {
+bool AbstractClipItem::isItemLocked() const
+{
     return !(flags() & (QGraphicsItem::ItemIsSelectable));
 }
 
index e91c479f8edd2810e119b2b5d85e2e8be6c2d223..09b02b54c17e34941fdb711d03af258b2e192306 100644 (file)
@@ -27,7 +27,8 @@
 
 class CustomTrackScene;
 
-class AbstractClipItem : public QObject , public QGraphicsRectItem {
+class AbstractClipItem : public QObject , public QGraphicsRectItem
+{
     Q_OBJECT
 public:
     AbstractClipItem(const ItemInfo info, const QRectF& rect, double fps);
index 2390bcd178cc498c33580d2083f6bb817e1b27bb..c2fc010d00d36753873cb675556594a81a05e2de 100644 (file)
 #include <QMimeData>
 
 
-AbstractGroupItem::AbstractGroupItem(double fps): QGraphicsItemGroup(), m_fps(fps) {
+AbstractGroupItem::AbstractGroupItem(double fps): QGraphicsItemGroup(), m_fps(fps)
+{
     setZValue(2);
     setFlags(QGraphicsItem::ItemClipsToShape | QGraphicsItem::ItemIsMovable | QGraphicsItem::ItemIsSelectable);
     setAcceptDrops(true);
 }
 
-int AbstractGroupItem::type() const {
+int AbstractGroupItem::type() const
+{
     return GROUPWIDGET;
 }
 
-int AbstractGroupItem::track() const {
+int AbstractGroupItem::track() const
+{
     return (int)(scenePos().y() / KdenliveSettings::trackheight());
 }
 
-CustomTrackScene* AbstractGroupItem::projectScene() {
+CustomTrackScene* AbstractGroupItem::projectScene()
+{
     if (scene()) return static_cast <CustomTrackScene*>(scene());
     return NULL;
 }
 
-QPainterPath AbstractGroupItem::groupShape(QPointF offset) {
+QPainterPath AbstractGroupItem::groupShape(QPointF offset)
+{
     QPainterPath path;
     QList<QGraphicsItem *> children = childItems();
     for (int i = 0; i < children.count(); i++) {
@@ -64,12 +69,14 @@ QPainterPath AbstractGroupItem::groupShape(QPointF offset) {
     return path;
 }
 
-void AbstractGroupItem::addItem(QGraphicsItem * item) {
+void AbstractGroupItem::addItem(QGraphicsItem * item)
+{
     addToGroup(item);
     //fixItemRect();
 }
 
-void AbstractGroupItem::fixItemRect() {
+void AbstractGroupItem::fixItemRect()
+{
     QPointF start = boundingRect().topLeft();
     if (start != QPointF(0, 0)) {
         translate(0 - start.x(), 0 - start.y());
@@ -85,7 +92,8 @@ void AbstractGroupItem::fixItemRect() {
 }*/
 
 // virtual
-void AbstractGroupItem::paint(QPainter *p, const QStyleOptionGraphicsItem *option, QWidget *) {
+void AbstractGroupItem::paint(QPainter *p, const QStyleOptionGraphicsItem *option, QWidget *)
+{
     const double scale = option->matrix.m11();
     QRect clipRect = option->exposedRect.toRect();
     clipRect.adjust(0, 0, 1 / scale + 0.5, 1);
@@ -99,7 +107,8 @@ void AbstractGroupItem::paint(QPainter *p, const QStyleOptionGraphicsItem *optio
 }
 
 //virtual
-QVariant AbstractGroupItem::itemChange(GraphicsItemChange change, const QVariant &value) {
+QVariant AbstractGroupItem::itemChange(GraphicsItemChange change, const QVariant &value)
+{
     if (change == ItemPositionChange && scene()) {
         // calculate new position.
         const int trackHeight = KdenliveSettings::trackheight();
@@ -203,7 +212,8 @@ QVariant AbstractGroupItem::itemChange(GraphicsItemChange change, const QVariant
 }
 
 //virtual
-void AbstractGroupItem::dropEvent(QGraphicsSceneDragDropEvent * event) {
+void AbstractGroupItem::dropEvent(QGraphicsSceneDragDropEvent * event)
+{
     QString effects = QString(event->mimeData()->data("kdenlive/effectslist"));
     QDomDocument doc;
     doc.setContent(effects, true);
@@ -213,10 +223,12 @@ void AbstractGroupItem::dropEvent(QGraphicsSceneDragDropEvent * event) {
 }
 
 //virtual
-void AbstractGroupItem::dragEnterEvent(QGraphicsSceneDragDropEvent *event) {
+void AbstractGroupItem::dragEnterEvent(QGraphicsSceneDragDropEvent *event)
+{
     event->setAccepted(event->mimeData()->hasFormat("kdenlive/effectslist"));
 }
 
-void AbstractGroupItem::dragLeaveEvent(QGraphicsSceneDragDropEvent *event) {
+void AbstractGroupItem::dragLeaveEvent(QGraphicsSceneDragDropEvent *event)
+{
     Q_UNUSED(event);
 }
index 8ce2e3c36ea80182bb2879db6e854e6f09408e4e..85a01b545be66538a9e1dfe808215266a6347cd9 100644 (file)
@@ -29,7 +29,8 @@
 
 class CustomTrackScene;
 
-class AbstractGroupItem : public QObject , public QGraphicsItemGroup {
+class AbstractGroupItem : public QObject , public QGraphicsItemGroup
+{
     Q_OBJECT
 public:
     AbstractGroupItem(double fps);
index b6b4b4c1aa543c51a052ddf8076d79941f065852..ef516dde1e088611ca10a7aaa958d4be30da3991 100644 (file)
 
 #include <KLocale>
 
-AddClipCommand::AddClipCommand(KdenliveDoc *doc, const QDomElement &xml, const QString &id, bool doIt, QUndoCommand * parent) : QUndoCommand(parent), m_doc(doc), m_xml(xml), m_id(id), m_doIt(doIt) {
+AddClipCommand::AddClipCommand(KdenliveDoc *doc, const QDomElement &xml, const QString &id, bool doIt, QUndoCommand * parent) : QUndoCommand(parent), m_doc(doc), m_xml(xml), m_id(id), m_doIt(doIt)
+{
     if (doIt) setText(i18n("Add clip"));
     else setText(i18n("Delete clip"));
 }
 
 
 // virtual
-void AddClipCommand::undo() {
+void AddClipCommand::undo()
+{
     kDebug() << "----  undoing action";
     if (m_doIt) m_doc->deleteClip(m_id);
     else m_doc->addClip(m_xml, m_id);
 }
 // virtual
-void AddClipCommand::redo() {
+void AddClipCommand::redo()
+{
     kDebug() << "----  redoing action";
     if (m_doIt) m_doc->addClip(m_xml, m_id);
     else m_doc->deleteClip(m_id);
index 109ce99b55289fc30ac1f3a03330ba647341ad04..a549ee682a275aca976020cb6352685d99608512 100644 (file)
@@ -27,7 +27,8 @@
 
 class KdenliveDoc;
 
-class AddClipCommand : public QUndoCommand {
+class AddClipCommand : public QUndoCommand
+{
 public:
     AddClipCommand(KdenliveDoc *doc, const QDomElement &xml, const QString &id, bool doIt, QUndoCommand * parent = 0);
 
index 7d8d5057af28b5fc1a539c299ffad4470389d3f9..c16cec6481add61059436779d5973b0179464e0a 100644 (file)
@@ -23,7 +23,8 @@
 
 #include <KLocale>
 
-AddEffectCommand::AddEffectCommand(CustomTrackView *view, const int track, GenTime pos, QDomElement effect, bool doIt, QUndoCommand * parent) : QUndoCommand(parent), m_view(view), m_track(track), m_pos(pos), m_effect(effect), m_doIt(doIt) {
+AddEffectCommand::AddEffectCommand(CustomTrackView *view, const int track, GenTime pos, QDomElement effect, bool doIt, QUndoCommand * parent) : QUndoCommand(parent), m_view(view), m_track(track), m_pos(pos), m_effect(effect), m_doIt(doIt)
+{
     QString effectName;
     QDomNode namenode = effect.elementsByTagName("name").item(0);
     if (!namenode.isNull()) effectName = i18n(namenode.toElement().text().toUtf8().data());
@@ -34,13 +35,15 @@ AddEffectCommand::AddEffectCommand(CustomTrackView *view, const int track, GenTi
 
 
 // virtual
-void AddEffectCommand::undo() {
+void AddEffectCommand::undo()
+{
     kDebug() << "----  undoing action";
     if (m_doIt) m_view->deleteEffect(m_track, m_pos, m_effect);
     else m_view->addEffect(m_track, m_pos, m_effect);
 }
 // virtual
-void AddEffectCommand::redo() {
+void AddEffectCommand::redo()
+{
     kDebug() << "----  redoing action";
     if (m_doIt) m_view->addEffect(m_track, m_pos, m_effect);
     else m_view->deleteEffect(m_track, m_pos, m_effect);
index d44b08b1ba824f13e468dc05b766281ec971d545..f929dc57dc2160585428d5ab4da19223272549f3 100644 (file)
@@ -28,7 +28,8 @@
 
 class CustomTrackView;
 
-class AddEffectCommand : public QUndoCommand {
+class AddEffectCommand : public QUndoCommand
+{
 public:
     AddEffectCommand(CustomTrackView *view, const int track, GenTime pos, QDomElement effect, bool doIt, QUndoCommand * parent = 0);
 
index 59760de04164382ba55b6accae1ce74152d6ff1c..7d0184ee1852a679c97ef27bb211a5c7403c67ca 100644 (file)
 
 #include <KLocale>
 
-AddFolderCommand::AddFolderCommand(ProjectList *view, const QString folderName, const QString &clipId, bool doIt, QUndoCommand *parent) : QUndoCommand(parent), m_view(view), m_name(folderName), m_id(clipId), m_doIt(doIt) {
+AddFolderCommand::AddFolderCommand(ProjectList *view, const QString folderName, const QString &clipId, bool doIt, QUndoCommand *parent) : QUndoCommand(parent), m_view(view), m_name(folderName), m_id(clipId), m_doIt(doIt)
+{
     if (doIt) setText(i18n("Add folder"));
     else setText(i18n("Delete folder"));
 }
 
 // virtual
-void AddFolderCommand::undo() {
+void AddFolderCommand::undo()
+{
     if (m_doIt) m_view->slotAddFolder(m_name, m_id, true);
     else m_view->slotAddFolder(m_name, m_id, false);
 }
 // virtual
-void AddFolderCommand::redo() {
+void AddFolderCommand::redo()
+{
     if (m_doIt) m_view->slotAddFolder(m_name, m_id, false);
     else m_view->slotAddFolder(m_name, m_id, true);
 }
index 0e4860e1d79d566b44a6483459e66a9d53378e07..3028a18167624a3b9759c6d3afd11dea85c54ee9 100644 (file)
@@ -25,7 +25,8 @@
 
 class ProjectList;
 
-class AddFolderCommand : public QUndoCommand {
+class AddFolderCommand : public QUndoCommand
+{
 public:
     AddFolderCommand(ProjectList *view, const QString folderName, const QString &clipId, bool doIt, QUndoCommand *parent = 0);
 
index ed1c2a1ca6a5b52bfcf1b787b0d0a68ae3dcbe5d..e3287ec96a66ec85f815d816cca9d2a3a6eb336c 100644 (file)
@@ -21,7 +21,8 @@
 
 #include <KLocale>
 
-AddMarkerCommand::AddMarkerCommand(CustomTrackView *view, const QString &oldcomment, const QString &comment, const QString &id, const GenTime &pos, bool doIt, QUndoCommand * parent) : QUndoCommand(parent), m_view(view), m_oldcomment(oldcomment), m_comment(comment), m_id(id), m_pos(pos), m_doIt(doIt) {
+AddMarkerCommand::AddMarkerCommand(CustomTrackView *view, const QString &oldcomment, const QString &comment, const QString &id, const GenTime &pos, bool doIt, QUndoCommand * parent) : QUndoCommand(parent), m_view(view), m_oldcomment(oldcomment), m_comment(comment), m_id(id), m_pos(pos), m_doIt(doIt)
+{
     if (m_comment.isEmpty()) setText(i18n("Delete marker"));
     else if (m_oldcomment.isEmpty()) setText(i18n("Add marker"));
     else setText(i18n("Edit marker"));
@@ -29,11 +30,13 @@ AddMarkerCommand::AddMarkerCommand(CustomTrackView *view, const QString &oldcomm
 
 
 // virtual
-void AddMarkerCommand::undo() {
+void AddMarkerCommand::undo()
+{
     m_view->addMarker(m_id, m_pos, m_oldcomment);
 }
 // virtual
-void AddMarkerCommand::redo() {
+void AddMarkerCommand::redo()
+{
     if (m_doIt) {
         m_view->addMarker(m_id, m_pos, m_comment);
     }
index cb539dac933e877ee3656e2b5b5e21fba73261d6..483d9bcf392a4077e71aee54b9ef73896d26cfde 100644 (file)
@@ -29,7 +29,8 @@
 class CustomTrackView;
 
 
-class AddMarkerCommand : public QUndoCommand {
+class AddMarkerCommand : public QUndoCommand
+{
 public:
     AddMarkerCommand(CustomTrackView *view, const QString &oldcomment, const QString &comment, const QString &id, const GenTime &pos, bool doIt, QUndoCommand * parent = 0);
     virtual void undo();
index 394a7aff07bfcd0030fae4831001804ff8b3ab5a..3f75319b78bfb37f3acae339645307e49ede1355 100644 (file)
 
 #include <KLocale>
 
-AddTimelineClipCommand::AddTimelineClipCommand(CustomTrackView *view, QDomElement xml, const QString &clipId, ItemInfo info, EffectsList effects, bool doIt, bool doRemove, QUndoCommand * parent) : QUndoCommand(parent), m_view(view), m_xml(xml), m_clipId(clipId), m_clipInfo(info), m_effects(effects),  m_doIt(doIt), m_remove(doRemove) {
+AddTimelineClipCommand::AddTimelineClipCommand(CustomTrackView *view, QDomElement xml, const QString &clipId, ItemInfo info, EffectsList effects, bool doIt, bool doRemove, QUndoCommand * parent) : QUndoCommand(parent), m_view(view), m_xml(xml), m_clipId(clipId), m_clipInfo(info), m_effects(effects),  m_doIt(doIt), m_remove(doRemove)
+{
     if (!m_remove) setText(i18n("Add timeline clip"));
     else setText(i18n("Delete timeline clip"));
 }
 
 
 // virtual
-void AddTimelineClipCommand::undo() {
+void AddTimelineClipCommand::undo()
+{
     if (!m_remove) m_view->deleteClip(m_clipInfo);
     else m_view->addClip(m_xml, m_clipId, m_clipInfo, m_effects);
 }
 // virtual
-void AddTimelineClipCommand::redo() {
+void AddTimelineClipCommand::redo()
+{
     if (m_doIt) {
         if (!m_remove) m_view->addClip(m_xml, m_clipId, m_clipInfo, m_effects);
         else m_view->deleteClip(m_clipInfo);
index 4138c5a913257e63ae784a5f026083f4805bdad2..ef713aa21b4ba92b5c6f68a3cf2feeb726e436fb 100644 (file)
@@ -31,7 +31,8 @@
 
 class CustomTrackView;
 
-class AddTimelineClipCommand : public QUndoCommand {
+class AddTimelineClipCommand : public QUndoCommand
+{
 public:
     AddTimelineClipCommand(CustomTrackView *view, QDomElement xml, const QString &clipId, ItemInfo info, EffectsList effects, bool doIt, bool doRemove, QUndoCommand * parent = 0);
     virtual void undo();
index 5e848726515dad8a02640b3c538bcd54b4b58688..7fe8087aac2ea3d52a00e6adcc56428bc05db5eb 100644 (file)
 
 #include <KLocale>
 
-AddTrackCommand::AddTrackCommand(CustomTrackView *view, int ix, TrackInfo info, bool addTrack, bool doIt, QUndoCommand * parent) : QUndoCommand(parent), m_view(view), m_ix(ix), m_info(info), m_addTrack(addTrack), m_doIt(doIt) {
+AddTrackCommand::AddTrackCommand(CustomTrackView *view, int ix, TrackInfo info, bool addTrack, bool doIt, QUndoCommand * parent) : QUndoCommand(parent), m_view(view), m_ix(ix), m_info(info), m_addTrack(addTrack), m_doIt(doIt)
+{
     if (addTrack) setText(i18n("Add track"));
     else setText(i18n("Delete track"));
 }
 
 
 // virtual
-void AddTrackCommand::undo() {
+void AddTrackCommand::undo()
+{
 // kDebug()<<"----  undoing action";
     m_doIt = true;
     if (m_addTrack) m_view->removeTrack(m_ix);
     else m_view->addTrack(m_info, m_ix);
 }
 // virtual
-void AddTrackCommand::redo() {
+void AddTrackCommand::redo()
+{
     kDebug() << "----  redoing action";
     if (m_doIt) {
         if (m_addTrack) m_view->addTrack(m_info, m_ix);
index 787a03f7bb2a9a2fc73958b66f2070e7390daedd..595c65ca23812e2b82e833b9a8fbb4a31c4af273 100644 (file)
@@ -30,7 +30,8 @@
 
 class CustomTrackView;
 
-class AddTrackCommand : public QUndoCommand {
+class AddTrackCommand : public QUndoCommand
+{
 public:
     AddTrackCommand(CustomTrackView *view, int ix, TrackInfo info, bool addTrack, bool doIt, QUndoCommand * parent = 0);
     virtual void undo();
index 7f402f1dff28071bc19e4506e6dc1cfefff39375..ec3ff832e6659ac21bf0a3d492a513a9fa123238 100644 (file)
 
 #include <KLocale>
 
-AddTransitionCommand::AddTransitionCommand(CustomTrackView *view, ItemInfo info, int transitiontrack, QDomElement params, bool remove, bool doIt, QUndoCommand * parent) : QUndoCommand(parent), m_view(view), m_info(info), m_track(transitiontrack), m_params(params), m_remove(remove), m_doIt(doIt) {
+AddTransitionCommand::AddTransitionCommand(CustomTrackView *view, ItemInfo info, int transitiontrack, QDomElement params, bool remove, bool doIt, QUndoCommand * parent) : QUndoCommand(parent), m_view(view), m_info(info), m_track(transitiontrack), m_params(params), m_remove(remove), m_doIt(doIt)
+{
     if (m_remove) setText(i18n("Delete transition from clip"));
     else setText(i18n("Add transition to clip"));
 }
 
 
 // virtual
-void AddTransitionCommand::undo() {
+void AddTransitionCommand::undo()
+{
     if (m_remove) m_view->addTransition(m_info, m_track, m_params);
     else m_view->deleteTransition(m_info, m_track, m_params);
 }
 // virtual
-void AddTransitionCommand::redo() {
+void AddTransitionCommand::redo()
+{
     if (m_doIt) {
         if (m_remove) m_view->deleteTransition(m_info, m_track, m_params);
         else m_view->addTransition(m_info, m_track, m_params);
index 1994d10aed08762773f2ee0dcd4604adb401da56..0f09c57d5fffe6fa4c483893e381f758dd547ce8 100644 (file)
@@ -29,7 +29,8 @@
 class CustomTrackView;
 
 
-class AddTransitionCommand : public QUndoCommand {
+class AddTransitionCommand : public QUndoCommand
+{
 public:
     AddTransitionCommand(CustomTrackView *view, ItemInfo info, int transitiontrack, QDomElement params, bool remove, bool doIt, QUndoCommand * parent = 0);
     virtual void undo();
index 51dc10fccee39a8d466ee4c2e123f6215c986c60..cfae86569234822d3a02524fc845204684bee3d8 100644 (file)
 
 #include <KLocale>
 
-ChangeClipTypeCommand::ChangeClipTypeCommand(CustomTrackView *view, const int track, const GenTime &pos, bool videoOnly, bool audioOnly, bool originalVideo, bool originalAudio, bool doIt, QUndoCommand * parent) : QUndoCommand(parent), m_view(view), m_track(track), m_pos(pos), m_videoOnly(videoOnly), m_audioOnly(audioOnly), m_originalVideoOnly(originalVideo), m_originalAudioOnly(originalAudio), m_doIt(doIt) {
+ChangeClipTypeCommand::ChangeClipTypeCommand(CustomTrackView *view, const int track, const GenTime &pos, bool videoOnly, bool audioOnly, bool originalVideo, bool originalAudio, bool doIt, QUndoCommand * parent) : QUndoCommand(parent), m_view(view), m_track(track), m_pos(pos), m_videoOnly(videoOnly), m_audioOnly(audioOnly), m_originalVideoOnly(originalVideo), m_originalAudioOnly(originalAudio), m_doIt(doIt)
+{
     setText(i18n("Change clip type"));
 }
 
 // virtual
-void ChangeClipTypeCommand::undo() {
+void ChangeClipTypeCommand::undo()
+{
 // kDebug()<<"----  undoing action";
     m_doIt = true;
     m_view->doChangeClipType(m_pos, m_track, m_originalVideoOnly, m_originalAudioOnly);
 }
 // virtual
-void ChangeClipTypeCommand::redo() {
+void ChangeClipTypeCommand::redo()
+{
     kDebug() << "----  redoing action";
     if (m_doIt)
         m_view->doChangeClipType(m_pos, m_track, m_videoOnly, m_audioOnly);
index 86174aef990f19032529da179bb3daee5ba2e8d7..17d2313cdeae9e2294585cfb75dce577614896b9 100644 (file)
@@ -31,7 +31,8 @@
 class GenTime;
 class CustomTrackView;
 
-class ChangeClipTypeCommand : public QUndoCommand {
+class ChangeClipTypeCommand : public QUndoCommand
+{
 public:
     ChangeClipTypeCommand(CustomTrackView *view, const int track, const GenTime &pos, bool videoOnly, bool audioOnly, bool originalVideo, bool originalAudio, bool doIt, QUndoCommand * parent = 0);
     virtual void undo();
index badcb9b0e075954e11a556fd46d1008f3c00c4c2..38b5f2e1e2b586b09647cb3820b0188ccb1cbe58 100644 (file)
 
 #include <KLocale>
 
-ChangeSpeedCommand::ChangeSpeedCommand(CustomTrackView *view, ItemInfo info, double old_speed, double new_speed, const QString &clipId, bool doIt, QUndoCommand * parent) : QUndoCommand(parent), m_view(view), m_clipInfo(info), m_old_speed(old_speed), m_new_speed(new_speed), m_clipId(clipId), m_doIt(doIt) {
+ChangeSpeedCommand::ChangeSpeedCommand(CustomTrackView *view, ItemInfo info, double old_speed, double new_speed, const QString &clipId, bool doIt, QUndoCommand * parent) : QUndoCommand(parent), m_view(view), m_clipInfo(info), m_old_speed(old_speed), m_new_speed(new_speed), m_clipId(clipId), m_doIt(doIt)
+{
     setText(i18n("Adjust clip length"));
 }
 
 
 // virtual
-void ChangeSpeedCommand::undo() {
+void ChangeSpeedCommand::undo()
+{
     m_view->doChangeClipSpeed(m_clipInfo, m_old_speed, m_new_speed, m_clipId);
 }
 // virtual
-void ChangeSpeedCommand::redo() {
+void ChangeSpeedCommand::redo()
+{
     if (m_doIt) {
         m_view->doChangeClipSpeed(m_clipInfo, m_new_speed, m_old_speed, m_clipId);
     }
index a95463cb317c2380210157b4887ce07ff8316f36..7852843ffedb68c3bd0da86624ee55d1cfb0a5f8 100644 (file)
@@ -30,7 +30,8 @@
 
 class CustomTrackView;
 
-class ChangeSpeedCommand : public QUndoCommand {
+class ChangeSpeedCommand : public QUndoCommand
+{
 public:
     ChangeSpeedCommand(CustomTrackView *view, ItemInfo info, double old_speed, double new_speed, const QString &clipId, bool doIt, QUndoCommand * parent = 0);
     virtual void undo();
index a532d1c3bee4a8246c0ba96dd82d2c9e6eadaba2..b33a2d04b804c551ddcf97a5ba3b953dd61ceff4 100644 (file)
 
 #include <KLocale>
 
-ChangeTrackCommand::ChangeTrackCommand(CustomTrackView *view, int ix, TrackInfo oldInfo, TrackInfo newInfo, bool doIt, QUndoCommand * parent) : QUndoCommand(parent), m_view(view), m_ix(ix), m_oldinfo(oldInfo), m_newinfo(newInfo), m_doIt(doIt) {
+ChangeTrackCommand::ChangeTrackCommand(CustomTrackView *view, int ix, TrackInfo oldInfo, TrackInfo newInfo, bool doIt, QUndoCommand * parent) : QUndoCommand(parent), m_view(view), m_ix(ix), m_oldinfo(oldInfo), m_newinfo(newInfo), m_doIt(doIt)
+{
     setText(i18n("Change track type"));
 }
 
 
 // virtual
-void ChangeTrackCommand::undo() {
+void ChangeTrackCommand::undo()
+{
 // kDebug()<<"----  undoing action";
     m_doIt = true;
     m_view->changeTrack(m_ix, m_oldinfo);
 }
 // virtual
-void ChangeTrackCommand::redo() {
+void ChangeTrackCommand::redo()
+{
     if (m_doIt) m_view->changeTrack(m_ix, m_newinfo);
     m_doIt = true;
 }
index 7b714d581f06012c7c20ee90991a700fc9951fa1..85d871f991844dd4f05955d85856f1a14f3690c1 100644 (file)
@@ -30,7 +30,8 @@
 
 class CustomTrackView;
 
-class ChangeTrackCommand : public QUndoCommand {
+class ChangeTrackCommand : public QUndoCommand
+{
 public:
     ChangeTrackCommand(CustomTrackView *view, int ix, TrackInfo oldInfo, TrackInfo newInfo, bool doIt, QUndoCommand * parent = 0);
     virtual void undo();
index 6d40276e41507bf7115db3f4829c284fdcfd8eb9..e941293dfa702b6013d3f56bb56cbadfc7b263a2 100644 (file)
@@ -26,7 +26,8 @@
 
 #include <QWheelEvent>
 
-ClipDurationDialog::ClipDurationDialog(AbstractClipItem *clip, Timecode tc, QWidget * parent): QDialog(parent), m_tc(tc), m_clip(clip) {
+ClipDurationDialog::ClipDurationDialog(AbstractClipItem *clip, Timecode tc, QWidget * parent): QDialog(parent), m_tc(tc), m_clip(clip)
+{
     setFont(KGlobalSettings::toolBarFont());
     m_fps = m_tc.fps();
     m_view.setupUi(this);
@@ -58,17 +59,20 @@ ClipDurationDialog::ClipDurationDialog(AbstractClipItem *clip, Timecode tc, QWid
     adjustSize();
 }
 
-ClipDurationDialog::~ClipDurationDialog() {
+ClipDurationDialog::~ClipDurationDialog()
+{
 }
 
-void ClipDurationDialog::setMargins(GenTime min, GenTime max) {
+void ClipDurationDialog::setMargins(GenTime min, GenTime max)
+{
     m_min = min;
     m_max = max;
     connect(m_view.clip_position, SIGNAL(textChanged(const QString &)), this, SLOT(slotCheckStart()));
     connect(m_view.clip_duration, SIGNAL(textChanged(const QString &)), this, SLOT(slotCheckDuration()));
 }
 
-void ClipDurationDialog::slotCheckStart() {
+void ClipDurationDialog::slotCheckStart()
+{
     int pos = m_tc.getFrameCount(m_view.clip_position->text(), m_fps);
     int dur = m_tc.getFrameCount(m_view.clip_duration->text(), m_fps);
     GenTime start(pos, m_fps);
@@ -80,7 +84,8 @@ void ClipDurationDialog::slotCheckStart() {
     }
 }
 
-void ClipDurationDialog::slotCheckDuration() {
+void ClipDurationDialog::slotCheckDuration()
+{
     int pos = m_tc.getFrameCount(m_view.clip_position->text(), m_fps);
     int dur = m_tc.getFrameCount(m_view.clip_duration->text(), m_fps);
     GenTime start(pos, m_fps);
@@ -91,7 +96,8 @@ void ClipDurationDialog::slotCheckDuration() {
     }
 }
 
-void ClipDurationDialog::slotCheckCrop() {
+void ClipDurationDialog::slotCheckCrop()
+{
     int dur = m_tc.getFrameCount(m_view.clip_duration->text(), m_fps);
     int crop = m_tc.getFrameCount(m_view.crop_position->text(), m_fps);
     GenTime duration(dur, m_fps);
@@ -102,21 +108,24 @@ void ClipDurationDialog::slotCheckCrop() {
     }
 }
 
-void ClipDurationDialog::slotPosUp() {
+void ClipDurationDialog::slotPosUp()
+{
     int position = m_tc.getFrameCount(m_view.clip_position->text(), m_fps);
     //if (duration >= m_clip->duration().frames(m_fps)) return;
     position ++;
     m_view.clip_position->setText(m_tc.getTimecode(GenTime(position, m_fps), m_fps));
 }
 
-void ClipDurationDialog::slotPosDown() {
+void ClipDurationDialog::slotPosDown()
+{
     int position = m_tc.getFrameCount(m_view.clip_position->text(), m_fps);
     //if (duration >= m_clip->duration().frames(m_fps)) return;
     position --;
     m_view.clip_position->setText(m_tc.getTimecode(GenTime(position, m_fps), m_fps));
 }
 
-void ClipDurationDialog::slotDurUp() {
+void ClipDurationDialog::slotDurUp()
+{
     int duration = m_tc.getFrameCount(m_view.clip_duration->text(), m_fps);
     int crop = m_tc.getFrameCount(m_view.crop_position->text(), m_fps);
     if (duration + crop > m_clip->maxDuration().frames(m_fps)) return;
@@ -124,14 +133,16 @@ void ClipDurationDialog::slotDurUp() {
     m_view.clip_duration->setText(m_tc.getTimecode(GenTime(duration, m_fps), m_fps));
 }
 
-void ClipDurationDialog::slotDurDown() {
+void ClipDurationDialog::slotDurDown()
+{
     int duration = m_tc.getFrameCount(m_view.clip_duration->text(), m_fps);
     if (duration <= 0) return;
     duration --;
     m_view.clip_duration->setText(m_tc.getTimecode(GenTime(duration, m_fps), m_fps));
 }
 
-void ClipDurationDialog::slotCropUp() {
+void ClipDurationDialog::slotCropUp()
+{
     int crop = m_tc.getFrameCount(m_view.crop_position->text(), m_fps);
     int duration = m_tc.getFrameCount(m_view.clip_duration->text(), m_fps);
     if (duration + crop > m_clip->maxDuration().frames(m_fps)) return;
@@ -139,29 +150,34 @@ void ClipDurationDialog::slotCropUp() {
     m_view.crop_position->setText(m_tc.getTimecode(GenTime(crop, m_fps), m_fps));
 }
 
-void ClipDurationDialog::slotCropDown() {
+void ClipDurationDialog::slotCropDown()
+{
     int crop = m_tc.getFrameCount(m_view.crop_position->text(), m_fps);
     if (crop <= 0) return;
     crop --;
     m_view.crop_position->setText(m_tc.getTimecode(GenTime(crop, m_fps), m_fps));
 }
 
-GenTime ClipDurationDialog::startPos() const {
+GenTime ClipDurationDialog::startPos() const
+{
     int pos = m_tc.getFrameCount(m_view.clip_position->text(), m_fps);
     return GenTime(pos, m_fps);
 }
 
-GenTime ClipDurationDialog::cropStart() const {
+GenTime ClipDurationDialog::cropStart() const
+{
     int pos = m_tc.getFrameCount(m_view.crop_position->text(), m_fps);
     return GenTime(pos, m_fps);
 }
 
-GenTime ClipDurationDialog::duration() const {
+GenTime ClipDurationDialog::duration() const
+{
     int pos = m_tc.getFrameCount(m_view.clip_duration->text(), m_fps);
     return GenTime(pos, m_fps);
 }
 
-void ClipDurationDialog::wheelEvent(QWheelEvent * event) {
+void ClipDurationDialog::wheelEvent(QWheelEvent * event)
+{
     if (m_view.clip_position->underMouse()) {
         if (event->delta() > 0)
             slotPosUp();
index 81536662904c55653711918055f00d9446e5295b..aaac24c9f97e6c8f1dfafdc72eac809a7a56af10 100644 (file)
@@ -27,7 +27,8 @@
 #include "ui_clipdurationdialog_ui.h"
 
 
-class ClipDurationDialog : public QDialog {
+class ClipDurationDialog : public QDialog
+{
     Q_OBJECT
 
 public:
index 61668d7a541fd418dba4b58f61b09f19645f32f9..317a5da8641f125476f72053de64918983d56bd7 100644 (file)
@@ -37,7 +37,8 @@
 #include <QMimeData>
 
 ClipItem::ClipItem(DocClipBase *clip, ItemInfo info, double fps, double speed, bool generateThumbs)
-        : AbstractClipItem(info, QRectF(), fps), m_clip(clip), m_resizeMode(NONE), m_grabPoint(0), m_maxTrack(0), m_hasThumbs(false), startThumbTimer(NULL), endThumbTimer(NULL), audioThumbWasDrawn(false), m_opacity(1.0), m_timeLine(0), m_startThumbRequested(false), m_endThumbRequested(false), m_startFade(0), m_endFade(0), m_hover(false), m_selectedEffect(-1), m_speed(speed), framePixelWidth(0), m_startPix(QPixmap()), m_endPix(QPixmap()), m_videoOnly(false), m_audioOnly(false)  {
+        : AbstractClipItem(info, QRectF(), fps), m_clip(clip), m_resizeMode(NONE), m_grabPoint(0), m_maxTrack(0), m_hasThumbs(false), startThumbTimer(NULL), endThumbTimer(NULL), audioThumbWasDrawn(false), m_opacity(1.0), m_timeLine(0), m_startThumbRequested(false), m_endThumbRequested(false), m_startFade(0), m_endFade(0), m_hover(false), m_selectedEffect(-1), m_speed(speed), framePixelWidth(0), m_startPix(QPixmap()), m_endPix(QPixmap()), m_videoOnly(false), m_audioOnly(false)
+{
     setZValue(1);
     setRect(0, 0, (info.endPos - info.startPos).frames(fps) - 0.02, (double)(KdenliveSettings::trackheight() - 2));
     setPos(info.startPos.frames(fps), (double)(info.track * KdenliveSettings::trackheight()) + 1);
@@ -104,13 +105,15 @@ ClipItem::ClipItem(DocClipBase *clip, ItemInfo info, double fps, double speed, b
 }
 
 
-ClipItem::~ClipItem() {
+ClipItem::~ClipItem()
+{
     if (startThumbTimer) delete startThumbTimer;
     if (endThumbTimer) delete endThumbTimer;
     if (m_timeLine) delete m_timeLine;
 }
 
-ClipItem *ClipItem::clone(ItemInfo info) const {
+ClipItem *ClipItem::clone(ItemInfo info) const
+{
     ClipItem *duplicate = new ClipItem(m_clip, info, m_fps, m_speed);
     if (info.cropStart == m_cropStart) duplicate->slotSetStartThumb(m_startPix);
     if (info.cropStart + (info.endPos - info.startPos) == m_cropStart + m_cropDuration) duplicate->slotSetEndThumb(m_endPix);
@@ -120,20 +123,24 @@ ClipItem *ClipItem::clone(ItemInfo info) const {
     return duplicate;
 }
 
-void ClipItem::setEffectList(const EffectsList effectList) {
+void ClipItem::setEffectList(const EffectsList effectList)
+{
     m_effectList = effectList;
     m_effectNames = m_effectList.effectNames().join(" / ");
 }
 
-const EffectsList ClipItem::effectList() {
+const EffectsList ClipItem::effectList()
+{
     return m_effectList;
 }
 
-int ClipItem::selectedEffectIndex() const {
+int ClipItem::selectedEffectIndex() const
+{
     return m_selectedEffect;
 }
 
-void ClipItem::initEffect(QDomElement effect) {
+void ClipItem::initEffect(QDomElement effect)
+{
     // the kdenlive_ix int is used to identify an effect in mlt's playlist, should
     // not be changed
     if (effect.attribute("kdenlive_ix").toInt() == 0)
@@ -195,7 +202,8 @@ void ClipItem::initEffect(QDomElement effect) {
     }
 }
 
-bool ClipItem::checkKeyFrames() {
+bool ClipItem::checkKeyFrames()
+{
     bool clipEffectsModified = false;
     for (int ix = 0; ix < m_effectList.count(); ix ++) {
         QString kfr = keyframes(ix);
@@ -253,7 +261,8 @@ bool ClipItem::checkKeyFrames() {
     return clipEffectsModified;
 }
 
-void ClipItem::setKeyframes(const int ix, const QString keyframes) {
+void ClipItem::setKeyframes(const int ix, const QString keyframes)
+{
     QDomElement effect = effectAt(ix);
     if (effect.attribute("disabled") == "1") return;
     QDomNodeList params = effect.elementsByTagName("parameter");
@@ -283,7 +292,8 @@ void ClipItem::setKeyframes(const int ix, const QString keyframes) {
 }
 
 
-void ClipItem::setSelectedEffect(const int ix) {
+void ClipItem::setSelectedEffect(const int ix)
+{
     m_selectedEffect = ix;
     QDomElement effect = effectAt(m_selectedEffect);
     QDomNodeList params = effect.elementsByTagName("parameter");
@@ -313,7 +323,8 @@ void ClipItem::setSelectedEffect(const int ix) {
     }
 }
 
-QString ClipItem::keyframes(const int index) {
+QString ClipItem::keyframes(const int index)
+{
     QString result;
     QDomElement effect = effectAt(index);
     QDomNodeList params = effect.elementsByTagName("parameter");
@@ -328,7 +339,8 @@ QString ClipItem::keyframes(const int index) {
     return result;
 }
 
-void ClipItem::updateKeyframeEffect() {
+void ClipItem::updateKeyframeEffect()
+{
     // regenerate xml parameter from the clip keyframes
     QDomElement effect = effectAt(m_selectedEffect);
     if (effect.attribute("disabled") == "1") return;
@@ -353,12 +365,14 @@ void ClipItem::updateKeyframeEffect() {
     }
 }
 
-QDomElement ClipItem::selectedEffect() {
+QDomElement ClipItem::selectedEffect()
+{
     if (m_selectedEffect == -1 || m_effectList.isEmpty()) return QDomElement();
     return effectAt(m_selectedEffect);
 }
 
-void ClipItem::resetThumbs() {
+void ClipItem::resetThumbs()
+{
     m_startPix = QPixmap();
     m_endPix = QPixmap();
     slotFetchThumbs();
@@ -366,7 +380,8 @@ void ClipItem::resetThumbs() {
 }
 
 
-void ClipItem::refreshClip() {
+void ClipItem::refreshClip()
+{
     m_maxDuration = m_clip->maxDuration();
     if (m_clipType == COLOR) {
         QString colour = m_clip->getProperty("colour");
@@ -375,7 +390,8 @@ void ClipItem::refreshClip() {
     } else slotFetchThumbs();
 }
 
-void ClipItem::slotFetchThumbs() {
+void ClipItem::slotFetchThumbs()
+{
     if (m_endPix.isNull() && m_startPix.isNull()) {
         m_startThumbRequested = true;
         m_endThumbRequested = true;
@@ -403,14 +419,16 @@ void ClipItem::slotFetchThumbs() {
         } else if (m_startPix.isNull()) slotGetStartThumb();*/
 }
 
-void ClipItem::slotGetStartThumb() {
+void ClipItem::slotGetStartThumb()
+{
     m_startThumbRequested = true;
     emit getThumb((int)cropStart().frames(m_fps), -1);
     //videoThumbProducer.setThumbFrames(m_clip->producer(), (int)m_cropStart.frames(m_fps),  - 1);
     //videoThumbProducer.start(QThread::LowestPriority);
 }
 
-void ClipItem::slotGetEndThumb() {
+void ClipItem::slotGetEndThumb()
+{
     m_endThumbRequested = true;
     emit getThumb(-1, (int)(cropStart() + cropDuration()).frames(m_fps) - 1);
     //videoThumbProducer.setThumbFrames(m_clip->producer(), -1, (int)(m_cropStart + m_cropDuration).frames(m_fps) - 1);
@@ -418,7 +436,8 @@ void ClipItem::slotGetEndThumb() {
 }
 
 
-void ClipItem::slotSetStartThumb(QImage img) {
+void ClipItem::slotSetStartThumb(QImage img)
+{
     if (!img.isNull() && img.format() == QImage::Format_ARGB32) {
         QPixmap pix = QPixmap::fromImage(img);
         m_startPix = pix;
@@ -428,7 +447,8 @@ void ClipItem::slotSetStartThumb(QImage img) {
     }
 }
 
-void ClipItem::slotSetEndThumb(QImage img) {
+void ClipItem::slotSetEndThumb(QImage img)
+{
     if (!img.isNull() && img.format() == QImage::Format_ARGB32) {
         QPixmap pix = QPixmap::fromImage(img);
         m_endPix = pix;
@@ -438,7 +458,8 @@ void ClipItem::slotSetEndThumb(QImage img) {
     }
 }
 
-void ClipItem::slotThumbReady(int frame, QPixmap pix) {
+void ClipItem::slotThumbReady(int frame, QPixmap pix)
+{
     if (scene() == NULL) return;
     QRectF r = sceneBoundingRect();
     double width = m_startPix.width() / projectScene()->scale();
@@ -455,23 +476,28 @@ void ClipItem::slotThumbReady(int frame, QPixmap pix) {
     }
 }
 
-void ClipItem::slotSetStartThumb(const QPixmap pix) {
+void ClipItem::slotSetStartThumb(const QPixmap pix)
+{
     m_startPix = pix;
 }
 
-void ClipItem::slotSetEndThumb(const QPixmap pix) {
+void ClipItem::slotSetEndThumb(const QPixmap pix)
+{
     m_endPix = pix;
 }
 
-QPixmap ClipItem::startThumb() const {
+QPixmap ClipItem::startThumb() const
+{
     return m_startPix;
 }
 
-QPixmap ClipItem::endThumb() const {
+QPixmap ClipItem::endThumb() const
+{
     return m_endPix;
 }
 
-void ClipItem::slotGotAudioData() {
+void ClipItem::slotGotAudioData()
+{
     audioThumbReady = true;
     if (m_clipType == AV) {
         QRectF r = boundingRect();
@@ -480,37 +506,45 @@ void ClipItem::slotGotAudioData() {
     } else update();
 }
 
-int ClipItem::type() const {
+int ClipItem::type() const
+{
     return AVWIDGET;
 }
 
-DocClipBase *ClipItem::baseClip() const {
+DocClipBase *ClipItem::baseClip() const
+{
     return m_clip;
 }
 
-QDomElement ClipItem::xml() const {
+QDomElement ClipItem::xml() const
+{
     QDomElement xml = m_clip->toXML();
     if (m_speed != 1.0) xml.setAttribute("speed", m_speed);
     return xml;
 }
 
-int ClipItem::clipType() const {
+int ClipItem::clipType() const
+{
     return m_clipType;
 }
 
-QString ClipItem::clipName() const {
+QString ClipItem::clipName() const
+{
     return m_clipName;
 }
 
-void ClipItem::setClipName(const QString &name) {
+void ClipItem::setClipName(const QString &name)
+{
     m_clipName = name;
 }
 
-const QString &ClipItem::clipProducer() const {
+const QString &ClipItem::clipProducer() const
+{
     return m_producer;
 }
 
-void ClipItem::flashClip() {
+void ClipItem::flashClip()
+{
     if (m_timeLine == 0) {
         m_timeLine = new QTimeLine(750, this);
         m_timeLine->setCurveShape(QTimeLine::EaseInOutCurve);
@@ -519,7 +553,8 @@ void ClipItem::flashClip() {
     m_timeLine->start();
 }
 
-void ClipItem::animate(qreal /*value*/) {
+void ClipItem::animate(qreal /*value*/)
+{
     QRectF r = boundingRect();
     r.setHeight(20);
     update(r);
@@ -528,7 +563,8 @@ void ClipItem::animate(qreal /*value*/) {
 // virtual
 void ClipItem::paint(QPainter *painter,
                      const QStyleOptionGraphicsItem *option,
-                     QWidget *) {
+                     QWidget *)
+{
     /*if (parentItem()) m_opacity = 0.5;
     else m_opacity = 1.0;
     painter->setOpacity(m_opacity);*/
@@ -780,7 +816,8 @@ void ClipItem::paint(QPainter *painter,
 }
 
 
-OPERATIONTYPE ClipItem::operationMode(QPointF pos) {
+OPERATIONTYPE ClipItem::operationMode(QPointF pos)
+{
     if (isItemLocked()) return NONE;
 
     if (isSelected()) {
@@ -816,7 +853,8 @@ OPERATIONTYPE ClipItem::operationMode(QPointF pos) {
     return MOVE;
 }
 
-QList <GenTime> ClipItem::snapMarkers() const {
+QList <GenTime> ClipItem::snapMarkers() const
+{
     QList < GenTime > snaps;
     QList < GenTime > markers = baseClip()->snapMarkers();
     GenTime pos;
@@ -831,7 +869,8 @@ QList <GenTime> ClipItem::snapMarkers() const {
     return snaps;
 }
 
-QList <CommentedTime> ClipItem::commentedSnapMarkers() const {
+QList <CommentedTime> ClipItem::commentedSnapMarkers() const
+{
     QList < CommentedTime > snaps;
     QList < CommentedTime > markers = baseClip()->commentedSnapMarkers();
     GenTime pos;
@@ -846,7 +885,8 @@ QList <CommentedTime> ClipItem::commentedSnapMarkers() const {
     return snaps;
 }
 
-void ClipItem::slotPrepareAudioThumb(double pixelForOneFrame, int startpixel, int endpixel, int channels) {
+void ClipItem::slotPrepareAudioThumb(double pixelForOneFrame, int startpixel, int endpixel, int channels)
+{
     QRectF re =  sceneBoundingRect();
     if (m_clipType == AV && !isAudioOnly()) re.setTop(re.y() + re.height() / 2);
 
@@ -930,16 +970,19 @@ void ClipItem::slotPrepareAudioThumb(double pixelForOneFrame, int startpixel, in
     //}
 }
 
-uint ClipItem::fadeIn() const {
+uint ClipItem::fadeIn() const
+{
     return m_startFade;
 }
 
-uint ClipItem::fadeOut() const {
+uint ClipItem::fadeOut() const
+{
     return m_endFade;
 }
 
 
-void ClipItem::setFadeIn(int pos) {
+void ClipItem::setFadeIn(int pos)
+{
     if (pos == m_startFade) return;
     int oldIn = m_startFade;
     if (pos < 0) pos = 0;
@@ -949,7 +992,8 @@ void ClipItem::setFadeIn(int pos) {
     update(rect.x(), rect.y(), qMax(oldIn, pos), rect.height());
 }
 
-void ClipItem::setFadeOut(int pos) {
+void ClipItem::setFadeOut(int pos)
+{
     if (pos == m_endFade) return;
     int oldOut = m_endFade;
     if (pos < 0) pos = 0;
@@ -961,7 +1005,8 @@ void ClipItem::setFadeOut(int pos) {
 }
 
 // virtual
-void ClipItem::mousePressEvent(QGraphicsSceneMouseEvent * event) {
+void ClipItem::mousePressEvent(QGraphicsSceneMouseEvent * event)
+{
     /*m_resizeMode = operationMode(event->pos());
     if (m_resizeMode == MOVE) {
       m_maxTrack = scene()->sceneRect().height();
@@ -971,13 +1016,15 @@ void ClipItem::mousePressEvent(QGraphicsSceneMouseEvent * event) {
 }
 
 // virtual
-void ClipItem::mouseReleaseEvent(QGraphicsSceneMouseEvent * event) {
+void ClipItem::mouseReleaseEvent(QGraphicsSceneMouseEvent * event)
+{
     m_resizeMode = NONE;
     QGraphicsRectItem::mouseReleaseEvent(event);
 }
 
 //virtual
-void ClipItem::hoverEnterEvent(QGraphicsSceneHoverEvent */*e*/) {
+void ClipItem::hoverEnterEvent(QGraphicsSceneHoverEvent */*e*/)
+{
     //if (e->pos().x() < 20) m_hover = true;
     if (isItemLocked()) return;
     m_hover = true;
@@ -990,7 +1037,8 @@ void ClipItem::hoverEnterEvent(QGraphicsSceneHoverEvent */*e*/) {
 }
 
 //virtual
-void ClipItem::hoverLeaveEvent(QGraphicsSceneHoverEvent *) {
+void ClipItem::hoverLeaveEvent(QGraphicsSceneHoverEvent *)
+{
     if (isItemLocked()) return;
     m_hover = false;
     QRectF r = boundingRect();
@@ -1001,7 +1049,8 @@ void ClipItem::hoverLeaveEvent(QGraphicsSceneHoverEvent *) {
     update(r.right() - width, r.y() + height, width, height);
 }
 
-void ClipItem::resizeStart(int posx, double /*speed*/) {
+void ClipItem::resizeStart(int posx, double /*speed*/)
+{
     const int min = (startPos() - cropStart()).frames(m_fps);
     if (posx < min) posx = min;
     if (posx == startPos().frames(m_fps)) return;
@@ -1016,7 +1065,8 @@ void ClipItem::resizeStart(int posx, double /*speed*/) {
     }
 }
 
-void ClipItem::resizeEnd(int posx, double /*speed*/, bool updateKeyFrames) {
+void ClipItem::resizeEnd(int posx, double /*speed*/, bool updateKeyFrames)
+{
     const int max = (startPos() - cropStart() + maxDuration()).frames(m_fps) + 1;
     if (posx > max) posx = max;
     if (posx == endPos().frames(m_fps)) return;
@@ -1033,7 +1083,8 @@ void ClipItem::resizeEnd(int posx, double /*speed*/, bool updateKeyFrames) {
 }
 
 
-void ClipItem::checkEffectsKeyframesPos(const int previous, const int current, bool fromStart) {
+void ClipItem::checkEffectsKeyframesPos(const int previous, const int current, bool fromStart)
+{
     for (int i = 0; i < m_effectList.size(); i++) {
         QDomElement effect = m_effectList.at(i);
         QDomNodeList params = effect.elementsByTagName("parameter");
@@ -1069,7 +1120,8 @@ void ClipItem::checkEffectsKeyframesPos(const int previous, const int current, b
 }
 
 //virtual
-QVariant ClipItem::itemChange(GraphicsItemChange change, const QVariant &value) {
+QVariant ClipItem::itemChange(GraphicsItemChange change, const QVariant &value)
+{
     if (change == ItemPositionChange && scene()) {
         // calculate new position.
         //if (parentItem()) return pos();
@@ -1139,28 +1191,34 @@ QVariant ClipItem::itemChange(GraphicsItemChange change, const QVariant &value)
 /*void ClipItem::mouseMoveEvent(QGraphicsSceneMouseEvent * event) {
 }*/
 
-int ClipItem::effectsCounter() {
+int ClipItem::effectsCounter()
+{
     return effectsCount() + 1;
 }
 
-int ClipItem::effectsCount() {
+int ClipItem::effectsCount()
+{
     return m_effectList.size();
 }
 
-int ClipItem::hasEffect(const QString &tag, const QString &id) const {
+int ClipItem::hasEffect(const QString &tag, const QString &id) const
+{
     return m_effectList.hasEffect(tag, id);
 }
 
-QStringList ClipItem::effectNames() {
+QStringList ClipItem::effectNames()
+{
     return m_effectList.effectNames();
 }
 
-QDomElement ClipItem::effectAt(int ix) {
+QDomElement ClipItem::effectAt(int ix)
+{
     if (ix > m_effectList.count() - 1 || ix < 0) return QDomElement();
     return m_effectList.at(ix);
 }
 
-void ClipItem::setEffectAt(int ix, QDomElement effect) {
+void ClipItem::setEffectAt(int ix, QDomElement effect)
+{
     kDebug() << "CHange EFFECT AT: " << ix << ", CURR: " << m_effectList.at(ix).attribute("tag") << ", NEW: " << effect.attribute("tag");
     effect.setAttribute("kdenlive_ix", ix + 1);
     m_effectList.insert(ix, effect);
@@ -1176,7 +1234,8 @@ void ClipItem::setEffectAt(int ix, QDomElement effect) {
     }
 }
 
-EffectsParameterList ClipItem::addEffect(QDomElement effect, bool animate) {
+EffectsParameterList ClipItem::addEffect(QDomElement effect, bool animate)
+{
 
     bool needRepaint = false;
     /*QDomDocument doc;
@@ -1282,7 +1341,8 @@ EffectsParameterList ClipItem::addEffect(QDomElement effect, bool animate) {
     return parameters;
 }
 
-EffectsParameterList ClipItem::getEffectArgs(QDomElement effect) {
+EffectsParameterList ClipItem::getEffectArgs(QDomElement effect)
+{
     EffectsParameterList parameters;
     parameters.addParam("tag", effect.attribute("tag"));
     parameters.addParam("kdenlive_ix", effect.attribute("kdenlive_ix"));
@@ -1329,7 +1389,8 @@ EffectsParameterList ClipItem::getEffectArgs(QDomElement effect) {
     return parameters;
 }
 
-void ClipItem::deleteEffect(QString index) {
+void ClipItem::deleteEffect(QString index)
+{
     bool needRepaint = false;
     QString ix;
 
@@ -1357,35 +1418,42 @@ void ClipItem::deleteEffect(QString index) {
     flashClip();
 }
 
-double ClipItem::speed() const {
+double ClipItem::speed() const
+{
     return m_speed;
 }
 
-void ClipItem::setSpeed(const double speed) {
+void ClipItem::setSpeed(const double speed)
+{
     m_speed = speed;
     if (m_speed == 1.0) m_clipName = baseClip()->name();
     else m_clipName = baseClip()->name() + " - " + QString::number(speed * 100, 'f', 0) + '%';
     //update();
 }
 
-GenTime ClipItem::maxDuration() const {
+GenTime ClipItem::maxDuration() const
+{
     return m_maxDuration / m_speed;
 }
 
-GenTime ClipItem::cropStart() const {
+GenTime ClipItem::cropStart() const
+{
     return m_cropStart / m_speed;
 }
 
-GenTime ClipItem::cropDuration() const {
+GenTime ClipItem::cropDuration() const
+{
     return m_cropDuration / m_speed;
 }
 
-GenTime ClipItem::endPos() const {
+GenTime ClipItem::endPos() const
+{
     return m_startPos + cropDuration();
 }
 
 //virtual
-void ClipItem::dropEvent(QGraphicsSceneDragDropEvent * event) {
+void ClipItem::dropEvent(QGraphicsSceneDragDropEvent * event)
+{
     QString effects = QString(event->mimeData()->data("kdenlive/effectslist"));
     QDomDocument doc;
     doc.setContent(effects, true);
@@ -1395,16 +1463,19 @@ void ClipItem::dropEvent(QGraphicsSceneDragDropEvent * event) {
 }
 
 //virtual
-void ClipItem::dragEnterEvent(QGraphicsSceneDragDropEvent *event) {
+void ClipItem::dragEnterEvent(QGraphicsSceneDragDropEvent *event)
+{
     if (isItemLocked()) event->setAccepted(false);
     else event->setAccepted(event->mimeData()->hasFormat("kdenlive/effectslist"));
 }
 
-void ClipItem::dragLeaveEvent(QGraphicsSceneDragDropEvent *event) {
+void ClipItem::dragLeaveEvent(QGraphicsSceneDragDropEvent *event)
+{
     Q_UNUSED(event);
 }
 
-void ClipItem::addTransition(Transition* t) {
+void ClipItem::addTransition(Transition* t)
+{
     m_transitionsList.append(t);
     //CustomTrackView *view = (CustomTrackView *) scene()->views()[0];
     QDomDocument doc;
@@ -1412,19 +1483,23 @@ void ClipItem::addTransition(Transition* t) {
     //if (view) view->slotAddTransition(this, t->toXML() , t->startPos(), track());
 }
 
-void ClipItem::setVideoOnly(bool force) {
+void ClipItem::setVideoOnly(bool force)
+{
     m_videoOnly = force;
 }
 
-void ClipItem::setAudioOnly(bool force) {
+void ClipItem::setAudioOnly(bool force)
+{
     m_audioOnly = force;
 }
 
-bool ClipItem::isAudioOnly() const {
+bool ClipItem::isAudioOnly() const
+{
     return m_audioOnly;
 }
 
-bool ClipItem::isVideoOnly() const {
+bool ClipItem::isVideoOnly() const
+{
     return m_videoOnly;
 }
 
index f2d10f77f90dd024bdcbb626bb2b4e2f39a7d625..63acdc16ee01efb7bb0e71f15819b18fe7a12f66 100644 (file)
@@ -36,7 +36,8 @@ class DocClipBase;
 class Transition;
 
 
-class ClipItem : public AbstractClipItem {
+class ClipItem : public AbstractClipItem
+{
     Q_OBJECT
 
 public:
index 30e3a91c1fa1fa804f195ef572eb74878bfc9197..a5850f269b9714915516094878878c7b9f836db9 100644 (file)
 
 #include <QGraphicsItemGroup>
 
-ClipManager::ClipManager(KdenliveDoc *doc): m_doc(doc), m_audioThumbsEnabled(false), m_audioThumbsQueue(QList <QString> ()), m_generatingAudioId(QString()) {
+ClipManager::ClipManager(KdenliveDoc *doc): m_doc(doc), m_audioThumbsEnabled(false), m_audioThumbsQueue(QList <QString> ()), m_generatingAudioId(QString())
+{
     m_clipIdCounter = 1;
     m_folderIdCounter = 1;
 }
 
-ClipManager::~ClipManager() {
+ClipManager::~ClipManager()
+{
     qDeleteAll(m_clipList);
 }
 
-void ClipManager::clear() {
+void ClipManager::clear()
+{
     qDeleteAll(m_clipList);
     m_clipList.clear();
     m_clipIdCounter = 1;
@@ -52,7 +55,8 @@ void ClipManager::clear() {
     m_audioThumbsQueue.clear();
 }
 
-void ClipManager::checkAudioThumbs() {
+void ClipManager::checkAudioThumbs()
+{
     if (m_audioThumbsEnabled == KdenliveSettings::audiothumbnails()) return;
     m_audioThumbsEnabled = KdenliveSettings::audiothumbnails();
     for (int i = 0; i < m_clipList.count(); i++) {
@@ -67,7 +71,8 @@ void ClipManager::checkAudioThumbs() {
     }
 }
 
-void ClipManager::askForAudioThumb(const QString &id) {
+void ClipManager::askForAudioThumb(const QString &id)
+{
     DocClipBase *clip = getClipById(id);
     if (clip && KdenliveSettings::audiothumbnails()) {
         m_audioThumbsQueue.append(id);
@@ -75,7 +80,8 @@ void ClipManager::askForAudioThumb(const QString &id) {
     }
 }
 
-void ClipManager::startAudioThumbsGeneration() {
+void ClipManager::startAudioThumbsGeneration()
+{
     if (!KdenliveSettings::audiothumbnails()) {
         m_audioThumbsQueue.clear();
         m_generatingAudioId.clear();
@@ -91,7 +97,8 @@ void ClipManager::startAudioThumbsGeneration() {
     }
 }
 
-void ClipManager::endAudioThumbsGeneration(const QString &requestedId) {
+void ClipManager::endAudioThumbsGeneration(const QString &requestedId)
+{
     if (!KdenliveSettings::audiothumbnails()) {
         m_audioThumbsQueue.clear();
         m_generatingAudioId.clear();
@@ -106,19 +113,23 @@ void ClipManager::endAudioThumbsGeneration(const QString &requestedId) {
     }
 }
 
-void ClipManager::setThumbsProgress(const QString &message, int progress) {
+void ClipManager::setThumbsProgress(const QString &message, int progress)
+{
     m_doc->setThumbsProgress(message, progress);
 }
 
-QList <DocClipBase*> ClipManager::documentClipList() const {
+QList <DocClipBase*> ClipManager::documentClipList() const
+{
     return m_clipList;
 }
 
-QMap <QString, QString> ClipManager::documentFolderList() const {
+QMap <QString, QString> ClipManager::documentFolderList() const
+{
     return m_folderList;
 }
 
-void ClipManager::addClip(DocClipBase *clip) {
+void ClipManager::addClip(DocClipBase *clip)
+{
     m_clipList.append(clip);
     const QString id = clip->getId();
     if (id.toInt() >= m_clipIdCounter) m_clipIdCounter = id.toInt() + 1;
@@ -126,7 +137,8 @@ void ClipManager::addClip(DocClipBase *clip) {
     if (!gid.isEmpty() && gid.toInt() >= m_folderIdCounter) m_folderIdCounter = gid.toInt() + 1;
 }
 
-void ClipManager::slotDeleteClip(const QString &clipId) {
+void ClipManager::slotDeleteClip(const QString &clipId)
+{
     for (int i = 0; i < m_clipList.count(); i++) {
         if (m_clipList.at(i)->getId() == clipId) {
             AddClipCommand *command = new AddClipCommand(m_doc, m_clipList.at(i)->toXML(), clipId, false);
@@ -136,7 +148,8 @@ void ClipManager::slotDeleteClip(const QString &clipId) {
     }
 }
 
-void ClipManager::deleteClip(const QString &clipId) {
+void ClipManager::deleteClip(const QString &clipId)
+{
     for (int i = 0; i < m_clipList.count(); i++) {
         if (m_clipList.at(i)->getId() == clipId) {
             DocClipBase *clip = m_clipList.takeAt(i);
@@ -147,11 +160,13 @@ void ClipManager::deleteClip(const QString &clipId) {
     }
 }
 
-DocClipBase *ClipManager::getClipAt(int pos) {
+DocClipBase *ClipManager::getClipAt(int pos)
+{
     return m_clipList.at(pos);
 }
 
-DocClipBase *ClipManager::getClipById(QString clipId) {
+DocClipBase *ClipManager::getClipById(QString clipId)
+{
     //kDebug() << "++++  CLIP MAN, LOOKING FOR CLIP ID: " << clipId;
     clipId = clipId.section('_', 0, 0);
     for (int i = 0; i < m_clipList.count(); i++) {
@@ -163,7 +178,8 @@ DocClipBase *ClipManager::getClipById(QString clipId) {
     return NULL;
 }
 
-DocClipBase *ClipManager::getClipByResource(QString resource) {
+DocClipBase *ClipManager::getClipByResource(QString resource)
+{
     for (int i = 0; i < m_clipList.count(); i++) {
         if (m_clipList.at(i)->getProperty("resource") == resource) {
             return m_clipList.at(i);
@@ -172,7 +188,8 @@ DocClipBase *ClipManager::getClipByResource(QString resource) {
     return NULL;
 }
 
-void ClipManager::updatePreviewSettings() {
+void ClipManager::updatePreviewSettings()
+{
     for (int i = 0; i < m_clipList.count(); i++) {
         if (m_clipList.at(i)->clipType() == AV || m_clipList.at(i)->clipType() == VIDEO) {
             if (m_clipList.at(i)->producerProperty("meta.media.0.codec.name") && strcmp(m_clipList.at(i)->producerProperty("meta.media.0.codec.name"), "h264") == 0) {
@@ -188,7 +205,8 @@ void ClipManager::updatePreviewSettings() {
     }
 }
 
-void ClipManager::resetProducersList(QList <Mlt::Producer *> prods) {
+void ClipManager::resetProducersList(QList <Mlt::Producer *> prods)
+{
     for (int i = 0; i < m_clipList.count(); i++) {
         if (m_clipList.at(i)->numReferences() > 0) {
             m_clipList.at(i)->deleteProducers();
@@ -206,7 +224,8 @@ void ClipManager::resetProducersList(QList <Mlt::Producer *> prods) {
     }
 }
 
-void ClipManager::slotAddClipList(const KUrl::List urls, const QString group, const QString &groupId) {
+void ClipManager::slotAddClipList(const KUrl::List urls, const QString group, const QString &groupId)
+{
     QUndoCommand *addClips = new QUndoCommand();
     addClips->setText(i18n("Add clips"));
 
@@ -234,7 +253,8 @@ void ClipManager::slotAddClipList(const KUrl::List urls, const QString group, co
     m_doc->commandStack()->push(addClips);
 }
 
-void ClipManager::slotAddClipFile(const KUrl url, const QString group, const QString &groupId) {
+void ClipManager::slotAddClipFile(const KUrl url, const QString group, const QString &groupId)
+{
     kDebug() << "/////  CLIP MANAGER, ADDING CLIP: " << url;
     QDomDocument doc;
     QDomElement prod = doc.createElement("producer");
@@ -256,7 +276,8 @@ void ClipManager::slotAddClipFile(const KUrl url, const QString group, const QSt
     m_doc->commandStack()->push(command);
 }
 
-void ClipManager::slotAddColorClipFile(const QString name, const QString color, QString duration, const QString group, const QString &groupId) {
+void ClipManager::slotAddColorClipFile(const QString name, const QString color, QString duration, const QString group, const QString &groupId)
+{
     QDomDocument doc;
     QDomElement prod = doc.createElement("producer");
     doc.appendChild(prod);
@@ -276,7 +297,8 @@ void ClipManager::slotAddColorClipFile(const QString name, const QString color,
     m_doc->commandStack()->push(command);
 }
 
-void ClipManager::slotAddSlideshowClipFile(const QString name, const QString path, int count, const QString duration, const bool loop, const bool fade, const QString &luma_duration, const QString &luma_file, const int softness, QString group, const QString &groupId) {
+void ClipManager::slotAddSlideshowClipFile(const QString name, const QString path, int count, const QString duration, const bool loop, const bool fade, const QString &luma_duration, const QString &luma_file, const int softness, QString group, const QString &groupId)
+{
     QDomDocument doc;
     QDomElement prod = doc.createElement("producer");
     doc.appendChild(prod);
@@ -303,7 +325,8 @@ void ClipManager::slotAddSlideshowClipFile(const QString name, const QString pat
 
 
 
-void ClipManager::slotAddTextClipFile(const QString titleName, const QString imagePath, const QString xml, const QString group, const QString &groupId) {
+void ClipManager::slotAddTextClipFile(const QString titleName, const QString imagePath, const QString xml, const QString group, const QString &groupId)
+{
     QDomDocument doc;
     QDomElement prod = doc.createElement("producer");
     doc.appendChild(prod);
@@ -324,41 +347,50 @@ void ClipManager::slotAddTextClipFile(const QString titleName, const QString ima
     m_doc->commandStack()->push(command);
 }
 
-int ClipManager::getFreeClipId() {
+int ClipManager::getFreeClipId()
+{
     return m_clipIdCounter++;
 }
 
-int ClipManager::getFreeFolderId() {
+int ClipManager::getFreeFolderId()
+{
     return m_folderIdCounter++;
 }
 
-int ClipManager::lastClipId() const {
+int ClipManager::lastClipId() const
+{
     return m_clipIdCounter - 1;
 }
 
-QString ClipManager::projectFolder() const {
+QString ClipManager::projectFolder() const
+{
     return m_doc->projectFolder().path();
 }
 
-void ClipManager::addFolder(const QString &id, const QString &name) {
+void ClipManager::addFolder(const QString &id, const QString &name)
+{
     m_folderList.insert(id, name);
 }
 
-void ClipManager::deleteFolder(const QString &id) {
+void ClipManager::deleteFolder(const QString &id)
+{
     m_folderList.remove(id);
 }
 
-AbstractGroupItem *ClipManager::createGroup() {
+AbstractGroupItem *ClipManager::createGroup()
+{
     AbstractGroupItem *group = new AbstractGroupItem(m_doc->fps());
     m_groupsList.append(group);
     return group;
 }
 
-void ClipManager::removeGroup(AbstractGroupItem *group) {
+void ClipManager::removeGroup(AbstractGroupItem *group)
+{
     m_groupsList.removeAll(group);
 }
 
-QDomElement ClipManager::groupsXml() const {
+QDomElement ClipManager::groupsXml() const
+{
     QDomDocument doc;
     QDomElement groups = doc.createElement("groups");
     doc.appendChild(groups);
index a5c92231939fe779f40dbb7fa50277ca6be91521..ee0e91dc9404ed6c4e8ee2f6963b8e85d411bb8e 100644 (file)
@@ -40,11 +40,13 @@ class KdenliveDoc;
 class DocClipBase;
 class AbstractGroupItem;
 
-namespace Mlt {
+namespace Mlt
+{
 class Producer;
 };
 
-class ClipManager: public QObject {
+class ClipManager: public QObject
+{
 Q_OBJECT public:
 
     ClipManager(KdenliveDoc *doc);
index 923fdfb7037af70386914c863686692c99c2a2c8..bff6d90625406cbeb03ab9aff44038fed360f2c7 100644 (file)
@@ -43,7 +43,8 @@ static const int TYPE_PNG = 1;
 static const int TYPE_BMP = 2;
 static const int TYPE_GIF = 3;
 
-ClipProperties::ClipProperties(DocClipBase *clip, Timecode tc, double fps, QWidget * parent): QDialog(parent), m_tc(tc), m_clip(clip), m_fps(fps), m_clipNeedsRefresh(false), m_count(0) {
+ClipProperties::ClipProperties(DocClipBase *clip, Timecode tc, double fps, QWidget * parent): QDialog(parent), m_tc(tc), m_clip(clip), m_fps(fps), m_clipNeedsRefresh(false), m_count(0)
+{
     setFont(KGlobalSettings::toolBarFont());
     m_view.setupUi(this);
     KUrl url = m_clip->fileURL();
@@ -235,7 +236,8 @@ ClipProperties::ClipProperties(DocClipBase *clip, Timecode tc, double fps, QWidg
     adjustSize();
 }
 
-void ClipProperties::slotEnableLuma(int state) {
+void ClipProperties::slotEnableLuma(int state)
+{
     bool enable = false;
     if (state == Qt::Checked) enable = true;
     m_view.luma_duration->setEnabled(enable);
@@ -247,7 +249,8 @@ void ClipProperties::slotEnableLuma(int state) {
     m_view.luma_softness->setEnabled(m_view.label_softness->isEnabled());
 }
 
-void ClipProperties::slotEnableLumaFile(int state) {
+void ClipProperties::slotEnableLumaFile(int state)
+{
     bool enable = false;
     if (state == Qt::Checked) enable = true;
     m_view.luma_file->setEnabled(enable);
@@ -255,7 +258,8 @@ void ClipProperties::slotEnableLumaFile(int state) {
     m_view.label_softness->setEnabled(enable);
 }
 
-void ClipProperties::slotFillMarkersList() {
+void ClipProperties::slotFillMarkersList()
+{
     m_view.markers_list->clear();
     QList < CommentedTime > marks = m_clip->commentedSnapMarkers();
     for (uint count = 0; count < marks.count(); ++count) {
@@ -266,7 +270,8 @@ void ClipProperties::slotFillMarkersList() {
     }
 }
 
-void ClipProperties::slotAddMarker() {
+void ClipProperties::slotAddMarker()
+{
     CommentedTime marker(GenTime(), i18n("Marker"));
     MarkerDialog d(m_clip, marker, m_tc, i18n("Add Marker"), this);
     if (d.exec() == QDialog::Accepted) {
@@ -275,7 +280,8 @@ void ClipProperties::slotAddMarker() {
     QTimer::singleShot(500, this, SLOT(slotFillMarkersList()));
 }
 
-void ClipProperties::slotEditMarker() {
+void ClipProperties::slotEditMarker()
+{
     QList < CommentedTime > marks = m_clip->commentedSnapMarkers();
     int pos = m_view.markers_list->currentIndex().row();
     if (pos < 0 || pos > marks.count() - 1) return;
@@ -286,7 +292,8 @@ void ClipProperties::slotEditMarker() {
     QTimer::singleShot(500, this, SLOT(slotFillMarkersList()));
 }
 
-void ClipProperties::slotDeleteMarker() {
+void ClipProperties::slotDeleteMarker()
+{
     QList < CommentedTime > marks = m_clip->commentedSnapMarkers();
     int pos = m_view.markers_list->currentIndex().row();
     if (pos < 0 || pos > marks.count() - 1) return;
@@ -295,12 +302,14 @@ void ClipProperties::slotDeleteMarker() {
     QTimer::singleShot(500, this, SLOT(slotFillMarkersList()));
 }
 
-const QString &ClipProperties::clipId() const {
+const QString &ClipProperties::clipId() const
+{
     return m_clip->getId();
 }
 
 
-QMap <QString, QString> ClipProperties::properties() {
+QMap <QString, QString> ClipProperties::properties()
+{
     QMap <QString, QString> props;
     CLIPTYPE t = m_clip->clipType();
     QMap <QString, QString> old_props = m_clip->properties();
@@ -427,11 +436,13 @@ QMap <QString, QString> ClipProperties::properties() {
     return props;
 }
 
-bool ClipProperties::needsTimelineRefresh() const {
+bool ClipProperties::needsTimelineRefresh() const
+{
     return m_clipNeedsRefresh;
 }
 
-void ClipProperties::parseFolder() {
+void ClipProperties::parseFolder()
+{
 
     QDir dir(m_view.clip_path->text());
     QStringList filters;
@@ -469,7 +480,8 @@ void ClipProperties::parseFolder() {
     m_view.clip_thumb->setPixmap(pix);
 }
 
-void ClipProperties::slotCheckMaxLength() {
+void ClipProperties::slotCheckMaxLength()
+{
     int duration = m_tc.getFrameCount(m_view.clip_duration->text(), m_fps);
     if (duration > m_clip->maxDuration().frames(m_fps)) {
         m_view.clip_duration->setText(m_tc.getTimecode(m_clip->maxDuration(), m_fps));
index cae1652b5b3a68d8e656a5346d46e332235a17b8..8d7f8c13a0badf5be26eda7b26a7046716441aaf 100644 (file)
@@ -27,7 +27,8 @@
 #include "docclipbase.h"
 #include "ui_clipproperties_ui.h"
 
-class ClipProperties : public QDialog {
+class ClipProperties : public QDialog
+{
     Q_OBJECT
 
 public:
index be688609ea20ed14ab24c3dc40cb875a47fbbddf..1c89a8a373c2175dd4982fa3ef78934a149175f6 100644 (file)
@@ -25,7 +25,8 @@
 #include <QMenu>
 
 ComplexParameter::ComplexParameter(QWidget *parent)
-        : QWidget(parent) {
+        : QWidget(parent)
+{
     ui.setupUi(this);
     //ui.effectlist->horizontalHeader()->setVisible(false);
     //ui.effectlist->verticalHeader()->setVisible(false);
@@ -65,34 +66,40 @@ ComplexParameter::ComplexParameter(QWidget *parent)
 
 
 
-void ComplexParameter::slotSetMoveX() {
+void ComplexParameter::slotSetMoveX()
+{
     ui.kplotwidget->setMoveX(!ui.kplotwidget->isMoveX());
     updateButtonStatus();
 }
 
-void ComplexParameter::slotSetMoveY() {
+void ComplexParameter::slotSetMoveY()
+{
     ui.kplotwidget->setMoveY(!ui.kplotwidget->isMoveY());
     updateButtonStatus();
 }
 
-void ComplexParameter::slotSetNew() {
+void ComplexParameter::slotSetNew()
+{
     ui.kplotwidget->setNewPoints(!ui.kplotwidget->isNewPoints());
     updateButtonStatus();
 }
 
-void ComplexParameter::slotSetHelp() {
+void ComplexParameter::slotSetHelp()
+{
     ui.infoBox->setVisible(!ui.infoBox->isVisible());
     ui.buttonHelp->setDown(ui.infoBox->isVisible());
 }
 
-void ComplexParameter::slotShowInTimeline() {
+void ComplexParameter::slotShowInTimeline()
+{
 
     ui.kplotwidget->setMoveTimeLine(!ui.kplotwidget->isMoveTimeline());
     updateButtonStatus();
 
 }
 
-void ComplexParameter::updateButtonStatus() {
+void ComplexParameter::updateButtonStatus()
+{
     ui.buttonLeftRight->setDown(ui.kplotwidget->isMoveX());
     ui.buttonUpDown->setDown(ui.kplotwidget->isMoveY());
 
@@ -103,32 +110,38 @@ void ComplexParameter::updateButtonStatus() {
     ui.buttonNewPoints->setDown(ui.kplotwidget->isNewPoints());
 }
 
-void ComplexParameter::slotParameterChanged(const QString& text) {
+void ComplexParameter::slotParameterChanged(const QString& text)
+{
 
     //ui.buttonNewPoints->setEnabled(text!="all");
     ui.kplotwidget->replot(text);
     updateButtonStatus();
 }
 
-void ComplexParameter::setupParam(const QDomElement& d, const QString& paramName, int from, int to) {
+void ComplexParameter::setupParam(const QDomElement& d, const QString& paramName, int from, int to)
+{
     param = d;
     ui.kplotwidget->setPointLists(d, paramName, from, to);
 }
 
-void ComplexParameter::itemSelectionChanged() {
+void ComplexParameter::itemSelectionChanged()
+{
     //kDebug() << "drop";
 }
 
-void ComplexParameter::slotUpdateEffectParams(QDomElement e) {
+void ComplexParameter::slotUpdateEffectParams(QDomElement e)
+{
     param = e;
     emit parameterChanged();
 }
 
-QDomElement ComplexParameter::getParamDesc() {
+QDomElement ComplexParameter::getParamDesc()
+{
     return param;
 }
 
-void ComplexParameter::slotUpdateParameterList(QStringList l) {
+void ComplexParameter::slotUpdateParameterList(QStringList l)
+{
     kDebug() << l ;
     ui.parameterList->clear();
     ui.parameterList->addItem("all");
index a22a2527a17cf14291aae6e38fabd336d9c6aae4..fd1ab89aa14371f32a9c28f8c38751866bd79fc9 100644 (file)
@@ -25,7 +25,8 @@
 class EffectsList;
 class ClipItem;
 
-class ComplexParameter : public QWidget {
+class ComplexParameter : public QWidget
+{
     Q_OBJECT
 
 public:
index 68cdf01b3eb330000d98bd0950ff0d9133f3bf52..fad7268c699ff3dd933ca60d091c7a0c8f09f378 100644 (file)
@@ -53,7 +53,8 @@ static int bigMarkDistance;
 const int CustomRuler::comboScale[] = { 1, 2, 5, 10, 25, 50, 125, 250, 500, 725, 1500, 3000, 6000, 12000};
 
 CustomRuler::CustomRuler(Timecode tc, CustomTrackView *parent)
-        : QWidget(parent), m_timecode(tc), m_view(parent), m_duration(0), m_offset(0) {
+        : QWidget(parent), m_timecode(tc), m_view(parent), m_duration(0), m_offset(0)
+{
     setFont(KGlobalSettings::toolBarFont());
     m_scale = 3;
     m_bgColor = QColor(245, 245, 245);
@@ -76,7 +77,8 @@ CustomRuler::CustomRuler(Timecode tc, CustomTrackView *parent)
     setMinimumHeight(20);
 }
 
-void CustomRuler::setZone(QPoint p) {
+void CustomRuler::setZone(QPoint p)
+{
     int min = qMin(m_zoneStart, p.x());
     int max = qMax(m_zoneEnd, p.y());
     m_zoneStart = p.x();
@@ -85,7 +87,8 @@ void CustomRuler::setZone(QPoint p) {
 }
 
 // virtual
-void CustomRuler::mousePressEvent(QMouseEvent * event) {
+void CustomRuler::mousePressEvent(QMouseEvent * event)
+{
     if (event->button() == Qt::RightButton) {
         m_contextMenu->exec(event->globalPos());
         return;
@@ -103,7 +106,8 @@ void CustomRuler::mousePressEvent(QMouseEvent * event) {
 }
 
 // virtual
-void CustomRuler::mouseMoveEvent(QMouseEvent * event) {
+void CustomRuler::mouseMoveEvent(QMouseEvent * event)
+{
     if (event->buttons() == Qt::LeftButton) {
         int pos = (int)((event->x() + offset()) / m_factor);
         int zoneStart = m_zoneStart;
@@ -140,38 +144,45 @@ void CustomRuler::mouseMoveEvent(QMouseEvent * event) {
 
 
 // virtual
-void CustomRuler::wheelEvent(QWheelEvent * e) {
+void CustomRuler::wheelEvent(QWheelEvent * e)
+{
     int delta = 1;
     if (e->modifiers() == Qt::ControlModifier) delta = m_timecode.fps();
     if (e->delta() < 0) delta = 0 - delta;
     m_view->moveCursorPos(delta);
 }
 
-int CustomRuler::inPoint() const {
+int CustomRuler::inPoint() const
+{
     return m_zoneStart;
 }
 
-int CustomRuler::outPoint() const {
+int CustomRuler::outPoint() const
+{
     return m_zoneEnd;
 }
 
-void CustomRuler::slotMoveRuler(int newPos) {
+void CustomRuler::slotMoveRuler(int newPos)
+{
     m_offset = newPos;
     update();
 }
 
-int CustomRuler::offset() const {
+int CustomRuler::offset() const
+{
     return m_offset;
 }
 
-void CustomRuler::slotCursorMoved(int oldpos, int newpos) {
+void CustomRuler::slotCursorMoved(int oldpos, int newpos)
+{
     if (qAbs(oldpos - newpos) * m_factor > 40) {
         update(oldpos * m_factor - offset() - 6, 7, 17, 16);
         update(newpos * m_factor - offset() - 6, 7, 17, 16);
     } else update(qMin(oldpos, newpos) * m_factor - offset() - 6, 7, qAbs(oldpos - newpos) * m_factor + 17, 16);
 }
 
-void CustomRuler::setPixelPerMark(double rate) {
+void CustomRuler::setPixelPerMark(double rate)
+{
     int scale = comboScale[(int) rate];
     m_factor = 1.0 / (double) scale * FRAME_SIZE;
     m_scale = 1.0 / (double) scale;
@@ -213,14 +224,16 @@ void CustomRuler::setPixelPerMark(double rate) {
     update();
 }
 
-void CustomRuler::setDuration(int d) {
+void CustomRuler::setDuration(int d)
+{
     int oldduration = m_duration;
     m_duration = d;
     update(qMin(oldduration, m_duration) * m_factor - 1 - offset(), 0, qAbs(oldduration - m_duration) * m_factor + 2, height());
 }
 
 // virtual
-void CustomRuler::paintEvent(QPaintEvent *e) {
+void CustomRuler::paintEvent(QPaintEvent *e)
+{
     QStylePainter p(this);
     p.setClipRect(e->rect());
 
index 3073ae4041fdc0f988b33b126963b057875d7164..70daf09e1689125c0c4ffa02fd0f42d657c4ff65 100644 (file)
@@ -27,7 +27,8 @@
 
 enum RULER_MOVE { RULER_CURSOR = 0, RULER_START = 1, RULER_MIDDLE = 2, RULER_END = 3 };
 
-class CustomRuler : public QWidget {
+class CustomRuler : public QWidget
+{
     Q_OBJECT
 
 public:
index 9dedfa8ba8b8e859b278aea6da4a2912a2c1c49d..76ae1def2d61c30229b3d34fbbdfd3fd40d0094a 100644 (file)
 #include <KStandardDirs>
 
 CustomTrackScene::CustomTrackScene(KdenliveDoc *doc, QObject *parent)
-        : QGraphicsScene(parent), m_document(doc), m_scale(1.0) {
+        : QGraphicsScene(parent), m_document(doc), m_scale(1.0)
+{
     m_transitionPixmap = QPixmap(KStandardDirs::locate("appdata", "transition.png"));
 }
 
-CustomTrackScene::~CustomTrackScene() {
+CustomTrackScene::~CustomTrackScene()
+{
 }
 
-double CustomTrackScene::getSnapPointForPos(double pos, bool doSnap) {
+double CustomTrackScene::getSnapPointForPos(double pos, bool doSnap)
+{
     double maximumOffset;
     if (doSnap) {
         if (m_scale > 3) maximumOffset = 10 / m_scale;
@@ -45,11 +48,13 @@ double CustomTrackScene::getSnapPointForPos(double pos, bool doSnap) {
     return GenTime(pos, m_document->fps()).frames(m_document->fps());
 }
 
-void CustomTrackScene::setSnapList(QList <GenTime> snaps) {
+void CustomTrackScene::setSnapList(QList <GenTime> snaps)
+{
     m_snapPoints = snaps;
 }
 
-GenTime CustomTrackScene::previousSnapPoint(GenTime pos) {
+GenTime CustomTrackScene::previousSnapPoint(GenTime pos)
+{
     for (int i = 0; i < m_snapPoints.size(); ++i) {
         if (m_snapPoints.at(i) >= pos) {
             if (i == 0) i = 1;
@@ -59,7 +64,8 @@ GenTime CustomTrackScene::previousSnapPoint(GenTime pos) {
     return GenTime();
 }
 
-GenTime CustomTrackScene::nextSnapPoint(GenTime pos) {
+GenTime CustomTrackScene::nextSnapPoint(GenTime pos)
+{
     for (int i = 0; i < m_snapPoints.size(); ++i) {
         if (m_snapPoints.at(i) > pos) {
             return m_snapPoints.at(i);
@@ -68,15 +74,18 @@ GenTime CustomTrackScene::nextSnapPoint(GenTime pos) {
     return pos;
 }
 
-void CustomTrackScene::setScale(double scale) {
+void CustomTrackScene::setScale(double scale)
+{
     m_scale = scale;
 }
 
-double CustomTrackScene::scale() const {
+double CustomTrackScene::scale() const
+{
     return m_scale;
 }
 
-int CustomTrackScene::tracksCount() const {
+int CustomTrackScene::tracksCount() const
+{
     return m_document->tracksCount();
 }
 
index 92437cdbd64c223d0f091e7fe6a0c4781b9db013..822a0676f5ee9d177618b832fd4882a9f54b555a 100644 (file)
@@ -31,7 +31,8 @@ class KdenliveDoc;
 
 /** This class holds all properties that need to be used by clip items */
 
-class CustomTrackScene : public QGraphicsScene {
+class CustomTrackScene : public QGraphicsScene
+{
     Q_OBJECT
 
 public:
index 80f4c1e8dceb69b53736df5204a7c40e591d5a06..6c17d122990664186757c5bc79794c6590c45c04 100644 (file)
@@ -82,7 +82,8 @@
 // const int duration = animate ? 1500 : 1;
 
 CustomTrackView::CustomTrackView(KdenliveDoc *doc, CustomTrackScene* projectscene, QWidget *parent)
-        : QGraphicsView(projectscene, parent), m_scene(projectscene), m_cursorPos(0), m_cursorLine(NULL), m_operationMode(NONE), m_dragItem(NULL), m_visualTip(NULL), m_moveOpMode(NONE), m_animation(NULL), m_projectDuration(0), m_clickPoint(QPoint()), m_document(doc), m_autoScroll(KdenliveSettings::autoscroll()), m_tracksHeight(KdenliveSettings::trackheight()), m_tool(SELECTTOOL), m_dragGuide(NULL), m_findIndex(0), m_menuPosition(QPoint()), m_blockRefresh(false), m_selectionGroup(NULL), m_selectedTrack(0), m_copiedItems(QList<AbstractClipItem *> ()), m_scrollOffset(0), m_changeSpeedAction(NULL), m_pasteEffectsAction(NULL), m_ungroupAction(NULL), m_clipDrag(false) {
+        : QGraphicsView(projectscene, parent), m_scene(projectscene), m_cursorPos(0), m_cursorLine(NULL), m_operationMode(NONE), m_dragItem(NULL), m_visualTip(NULL), m_moveOpMode(NONE), m_animation(NULL), m_projectDuration(0), m_clickPoint(QPoint()), m_document(doc), m_autoScroll(KdenliveSettings::autoscroll()), m_tracksHeight(KdenliveSettings::trackheight()), m_tool(SELECTTOOL), m_dragGuide(NULL), m_findIndex(0), m_menuPosition(QPoint()), m_blockRefresh(false), m_selectionGroup(NULL), m_selectedTrack(0), m_copiedItems(QList<AbstractClipItem *> ()), m_scrollOffset(0), m_changeSpeedAction(NULL), m_pasteEffectsAction(NULL), m_ungroupAction(NULL), m_clipDrag(false)
+{
     if (doc) m_commandStack = doc->commandStack();
     else m_commandStack = NULL;
     setMouseTracking(true);
@@ -114,15 +115,18 @@ CustomTrackView::CustomTrackView(KdenliveDoc *doc, CustomTrackScene* projectscen
     m_scrollTimer.setSingleShot(true);
 }
 
-CustomTrackView::~CustomTrackView() {
+CustomTrackView::~CustomTrackView()
+{
     qDeleteAll(m_guides);
 }
 
-void CustomTrackView::setDocumentModified() {
+void CustomTrackView::setDocumentModified()
+{
     m_document->setModified(true);
 }
 
-void CustomTrackView::setContextMenu(QMenu *timeline, QMenu *clip, QMenu *transition) {
+void CustomTrackView::setContextMenu(QMenu *timeline, QMenu *clip, QMenu *transition)
+{
     m_timelineContextMenu = timeline;
     m_timelineContextClipMenu = clip;
     QList <QAction *> list = m_timelineContextClipMenu->actions();
@@ -142,7 +146,8 @@ void CustomTrackView::setContextMenu(QMenu *timeline, QMenu *clip, QMenu *transi
     }
 }
 
-void CustomTrackView::checkAutoScroll() {
+void CustomTrackView::checkAutoScroll()
+{
     m_autoScroll = KdenliveSettings::autoscroll();
 }
 
@@ -150,7 +155,8 @@ void CustomTrackView::checkAutoScroll() {
     return m_scene->m_tracksList;
 }*/
 
-void CustomTrackView::checkTrackHeight() {
+void CustomTrackView::checkTrackHeight()
+{
     if (m_tracksHeight == KdenliveSettings::trackheight()) return;
     m_tracksHeight = KdenliveSettings::trackheight();
     emit trackHeightChanged();
@@ -186,7 +192,8 @@ void CustomTrackView::checkTrackHeight() {
 }
 
 // virtual
-void CustomTrackView::resizeEvent(QResizeEvent * event) {
+void CustomTrackView::resizeEvent(QResizeEvent * event)
+{
     QGraphicsView::resizeEvent(event);
 }
 
@@ -199,7 +206,8 @@ void CustomTrackView::resizeEvent(QResizeEvent * event) {
  * opposite on up/forward.
  *
  * See also http://www.kdenlive.org/mantis/view.php?id=265 */
-void CustomTrackView::wheelEvent(QWheelEvent * e) {
+void CustomTrackView::wheelEvent(QWheelEvent * e)
+{
     if (e->modifiers() == Qt::ControlModifier) {
         if (e->delta() > 0) emit zoomIn();
         else emit zoomOut();
@@ -209,7 +217,8 @@ void CustomTrackView::wheelEvent(QWheelEvent * e) {
     }
 }
 
-int CustomTrackView::getPreviousVideoTrack(int track) {
+int CustomTrackView::getPreviousVideoTrack(int track)
+{
     track = m_document->tracksCount() - track - 1;
     track --;
     for (int i = track; i > -1; i--) {
@@ -219,7 +228,8 @@ int CustomTrackView::getPreviousVideoTrack(int track) {
 }
 
 
-void CustomTrackView::slotCheckMouseScrolling() {
+void CustomTrackView::slotCheckMouseScrolling()
+{
     if (m_scrollOffset == 0) {
         m_scrollTimer.stop();
         return;
@@ -228,7 +238,8 @@ void CustomTrackView::slotCheckMouseScrolling() {
     m_scrollTimer.start();
 }
 
-void CustomTrackView::slotCheckPositionScrolling() {
+void CustomTrackView::slotCheckPositionScrolling()
+{
     // If mouse is at a border of the view, scroll
     if (m_moveOpMode != SEEK) return;
     int pos = cursorPos();
@@ -247,7 +258,8 @@ void CustomTrackView::slotCheckPositionScrolling() {
 
 // virtual
 
-void CustomTrackView::mouseMoveEvent(QMouseEvent * event) {
+void CustomTrackView::mouseMoveEvent(QMouseEvent * event)
+{
     int pos = event->x();
     int mappedXPos = (int)(mapToScene(event->pos()).x() + 0.5);
     emit mousePosition(mappedXPos);
@@ -526,7 +538,8 @@ void CustomTrackView::mouseMoveEvent(QMouseEvent * event) {
 }
 
 // virtual
-void CustomTrackView::mousePressEvent(QMouseEvent * event) {
+void CustomTrackView::mousePressEvent(QMouseEvent * event)
+{
     kDebug() << "mousePressEvent STARTED";
     m_menuPosition = QPoint();
     m_blockRefresh = true;
@@ -810,7 +823,8 @@ void CustomTrackView::mousePressEvent(QMouseEvent * event) {
     //QGraphicsView::mousePressEvent(event);
 }
 
-void CustomTrackView::resetSelectionGroup(bool selectItems) {
+void CustomTrackView::resetSelectionGroup(bool selectItems)
+{
     if (m_selectionGroup) {
         // delete selection group
         bool snap = KdenliveSettings::snaptopoints();
@@ -834,7 +848,8 @@ void CustomTrackView::resetSelectionGroup(bool selectItems) {
     }
 }
 
-void CustomTrackView::groupSelectedItems(bool force, bool createNewGroup) {
+void CustomTrackView::groupSelectedItems(bool force, bool createNewGroup)
+{
     if (m_selectionGroup) {
         kDebug() << "///// ERROR, TRYING TO OVERRIDE EXISTING GROUP";
         return;
@@ -904,7 +919,8 @@ void CustomTrackView::groupSelectedItems(bool force, bool createNewGroup) {
     } else resetSelectionGroup();
 }
 
-void CustomTrackView::mouseDoubleClickEvent(QMouseEvent *event) {
+void CustomTrackView::mouseDoubleClickEvent(QMouseEvent *event)
+{
     kDebug() << "++++++++++++ DBL CLK";
     if (m_dragItem && m_dragItem->hasKeyFrames()) {
         if (m_moveOpMode == KEYFRAME) {
@@ -993,7 +1009,8 @@ void CustomTrackView::mouseDoubleClickEvent(QMouseEvent *event) {
 }
 
 
-void CustomTrackView::editKeyFrame(const GenTime pos, const int track, const int index, const QString keyframes) {
+void CustomTrackView::editKeyFrame(const GenTime pos, const int track, const int index, const QString keyframes)
+{
     ClipItem *clip = getClipItemAt((int)pos.frames(m_document->fps()), track);
     if (clip) {
         clip->setKeyframes(index, keyframes);
@@ -1002,7 +1019,8 @@ void CustomTrackView::editKeyFrame(const GenTime pos, const int track, const int
 }
 
 
-void CustomTrackView::displayContextMenu(QPoint pos, AbstractClipItem *clip, AbstractGroupItem *group) {
+void CustomTrackView::displayContextMenu(QPoint pos, AbstractClipItem *clip, AbstractGroupItem *group)
+{
     if (clip == NULL) m_timelineContextMenu->popup(pos);
     else if (group != NULL) {
         m_changeSpeedAction->setEnabled(false);
@@ -1020,11 +1038,13 @@ void CustomTrackView::displayContextMenu(QPoint pos, AbstractClipItem *clip, Abs
     }
 }
 
-void CustomTrackView::activateMonitor() {
+void CustomTrackView::activateMonitor()
+{
     emit activateDocumentMonitor();
 }
 
-void CustomTrackView::dragEnterEvent(QDragEnterEvent * event) {
+void CustomTrackView::dragEnterEvent(QDragEnterEvent * event)
+{
     if (event->mimeData()->hasFormat("kdenlive/clip")) {
         m_clipDrag = true;
         resetSelectionGroup();
@@ -1084,7 +1104,8 @@ void CustomTrackView::dragEnterEvent(QDragEnterEvent * event) {
 }
 
 
-bool CustomTrackView::insertPossible(AbstractGroupItem *group, const QPoint &pos) const {
+bool CustomTrackView::insertPossible(AbstractGroupItem *group, const QPoint &pos) const
+{
     QPolygonF path;
     QList<QGraphicsItem *> children = group->childItems();
     for (int i = 0; i < children.count(); i++) {
@@ -1114,7 +1135,8 @@ bool CustomTrackView::insertPossible(AbstractGroupItem *group, const QPoint &pos
 
 }
 
-void CustomTrackView::slotRefreshEffects(ClipItem *clip) {
+void CustomTrackView::slotRefreshEffects(ClipItem *clip)
+{
     int track = m_document->tracksCount() - clip->track();
     GenTime pos = clip->startPos();
     if (!m_document->renderer()->mltRemoveEffect(track, pos, "-1", false, false)) {
@@ -1129,7 +1151,8 @@ void CustomTrackView::slotRefreshEffects(ClipItem *clip) {
     m_document->renderer()->doRefresh();
 }
 
-void CustomTrackView::addEffect(int track, GenTime pos, QDomElement effect) {
+void CustomTrackView::addEffect(int track, GenTime pos, QDomElement effect)
+{
     ClipItem *clip = getClipItemAt((int)pos.frames(m_document->fps()) + 1, m_document->tracksCount() - track);
     if (clip) {
         if (!m_document->renderer()->mltAddEffect(track, pos, clip->addEffect(effect)))
@@ -1138,7 +1161,8 @@ void CustomTrackView::addEffect(int track, GenTime pos, QDomElement effect) {
     } else emit displayMessage(i18n("Cannot find clip to add effect"), ErrorMessage);
 }
 
-void CustomTrackView::deleteEffect(int track, GenTime pos, QDomElement effect) {
+void CustomTrackView::deleteEffect(int track, GenTime pos, QDomElement effect)
+{
     QString index = effect.attribute("kdenlive_ix");
     if (!m_document->renderer()->mltRemoveEffect(track, pos, index, true) && effect.attribute("disabled") != "1") {
         kDebug() << "// ERROR REMOV EFFECT: " << index << ", DISABLE: " << effect.attribute("disabled");
@@ -1152,7 +1176,8 @@ void CustomTrackView::deleteEffect(int track, GenTime pos, QDomElement effect) {
     }
 }
 
-void CustomTrackView::slotAddGroupEffect(QDomElement effect, AbstractGroupItem *group) {
+void CustomTrackView::slotAddGroupEffect(QDomElement effect, AbstractGroupItem *group)
+{
     QList<QGraphicsItem *> itemList = group->childItems();
     QUndoCommand *effectCommand = new QUndoCommand();
     QString effectName;
@@ -1187,7 +1212,8 @@ void CustomTrackView::slotAddGroupEffect(QDomElement effect, AbstractGroupItem *
     } else delete effectCommand;
 }
 
-void CustomTrackView::slotAddEffect(QDomElement effect, GenTime pos, int track) {
+void CustomTrackView::slotAddEffect(QDomElement effect, GenTime pos, int track)
+{
     QList<QGraphicsItem *> itemList;
     QUndoCommand *effectCommand = new QUndoCommand();
     QString effectName;
@@ -1229,13 +1255,15 @@ void CustomTrackView::slotAddEffect(QDomElement effect, GenTime pos, int track)
     } else delete effectCommand;
 }
 
-void CustomTrackView::slotDeleteEffect(ClipItem *clip, QDomElement effect) {
+void CustomTrackView::slotDeleteEffect(ClipItem *clip, QDomElement effect)
+{
     AddEffectCommand *command = new AddEffectCommand(this, m_document->tracksCount() - clip->track(), clip->startPos(), effect, false);
     m_commandStack->push(command);
     m_document->setModified(true);
 }
 
-void CustomTrackView::updateEffect(int track, GenTime pos, QDomElement effect, int ix, bool triggeredByUser) {
+void CustomTrackView::updateEffect(int track, GenTime pos, QDomElement effect, int ix, bool triggeredByUser)
+{
     ClipItem *clip = getClipItemAt((int)pos.frames(m_document->fps()) + 1, m_document->tracksCount() - track);
     if (clip) {
         EffectsParameterList effectParams = clip->getEffectArgs(effect);
@@ -1277,7 +1305,8 @@ void CustomTrackView::updateEffect(int track, GenTime pos, QDomElement effect, i
     m_document->setModified(true);
 }
 
-void CustomTrackView::moveEffect(int track, GenTime pos, int oldPos, int newPos) {
+void CustomTrackView::moveEffect(int track, GenTime pos, int oldPos, int newPos)
+{
     ClipItem *clip = getClipItemAt((int)pos.frames(m_document->fps()) + 1, m_document->tracksCount() - track);
     if (clip) {
         m_document->renderer()->mltMoveEffect(track, pos, oldPos, newPos);
@@ -1290,7 +1319,8 @@ void CustomTrackView::moveEffect(int track, GenTime pos, int oldPos, int newPos)
     m_document->setModified(true);
 }
 
-void CustomTrackView::slotChangeEffectState(ClipItem *clip, int effectPos, bool disable) {
+void CustomTrackView::slotChangeEffectState(ClipItem *clip, int effectPos, bool disable)
+{
     QDomElement effect = clip->effectAt(effectPos);
     QDomElement oldEffect = effect.cloneNode().toElement();
     effect.setAttribute("disabled", disable);
@@ -1299,18 +1329,21 @@ void CustomTrackView::slotChangeEffectState(ClipItem *clip, int effectPos, bool
     m_document->setModified(true);
 }
 
-void CustomTrackView::slotChangeEffectPosition(ClipItem *clip, int currentPos, int newPos) {
+void CustomTrackView::slotChangeEffectPosition(ClipItem *clip, int currentPos, int newPos)
+{
     MoveEffectCommand *command = new MoveEffectCommand(this, m_document->tracksCount() - clip->track(), clip->startPos(), currentPos, newPos, true);
     m_commandStack->push(command);
     m_document->setModified(true);
 }
 
-void CustomTrackView::slotUpdateClipEffect(ClipItem *clip, QDomElement oldeffect, QDomElement effect, int ix) {
+void CustomTrackView::slotUpdateClipEffect(ClipItem *clip, QDomElement oldeffect, QDomElement effect, int ix)
+{
     EditEffectCommand *command = new EditEffectCommand(this, m_document->tracksCount() - clip->track(), clip->startPos(), oldeffect, effect, ix, true);
     m_commandStack->push(command);
 }
 
-void CustomTrackView::cutClip(ItemInfo info, GenTime cutTime, bool cut) {
+void CustomTrackView::cutClip(ItemInfo info, GenTime cutTime, bool cut)
+{
     if (cut) {
         // cut clip
         ClipItem *item = getClipItemAt((int) info.startPos.frames(m_document->fps()) + 1, info.track);
@@ -1385,11 +1418,13 @@ void CustomTrackView::cutClip(ItemInfo info, GenTime cutTime, bool cut) {
     QTimer::singleShot(3000, this, SLOT(slotEnableRefresh()));
 }
 
-void CustomTrackView::slotEnableRefresh() {
+void CustomTrackView::slotEnableRefresh()
+{
     m_blockRefresh = false;
 }
 
-void CustomTrackView::slotAddTransitionToSelectedClips(QDomElement transition) {
+void CustomTrackView::slotAddTransitionToSelectedClips(QDomElement transition)
+{
     QList<QGraphicsItem *> itemList = scene()->selectedItems();
     if (itemList.count() == 1) {
         if (itemList.at(0)->type() == AVWIDGET) {
@@ -1476,7 +1511,8 @@ void CustomTrackView::slotAddTransitionToSelectedClips(QDomElement transition) {
         }
 }
 
-void CustomTrackView::slotAddTransition(ClipItem* /*clip*/, ItemInfo transitionInfo, int endTrack, QDomElement transition) {
+void CustomTrackView::slotAddTransition(ClipItem* /*clip*/, ItemInfo transitionInfo, int endTrack, QDomElement transition)
+{
     if (transitionInfo.startPos >= transitionInfo.endPos) {
         emit displayMessage(i18n("Invalid transition"), ErrorMessage);
         return;
@@ -1486,7 +1522,8 @@ void CustomTrackView::slotAddTransition(ClipItem* /*clip*/, ItemInfo transitionI
     m_document->setModified(true);
 }
 
-void CustomTrackView::addTransition(ItemInfo transitionInfo, int endTrack, QDomElement params) {
+void CustomTrackView::addTransition(ItemInfo transitionInfo, int endTrack, QDomElement params)
+{
     Transition *tr = new Transition(transitionInfo, endTrack, m_document->fps(), params, true);
     //kDebug() << "---- ADDING transition " << params.attribute("value");
     if (m_document->renderer()->mltAddTransition(tr->transitionTag(), endTrack, m_document->tracksCount() - transitionInfo.track, transitionInfo.startPos, transitionInfo.endPos, tr->toXML())) {
@@ -1498,7 +1535,8 @@ void CustomTrackView::addTransition(ItemInfo transitionInfo, int endTrack, QDomE
     }
 }
 
-void CustomTrackView::deleteTransition(ItemInfo transitionInfo, int endTrack, QDomElement /*params*/) {
+void CustomTrackView::deleteTransition(ItemInfo transitionInfo, int endTrack, QDomElement /*params*/)
+{
     Transition *item = getTransitionItemAt(transitionInfo.startPos, transitionInfo.track);
     if (!item) {
         emit displayMessage(i18n("Select clip to delete"), ErrorMessage);
@@ -1511,14 +1549,16 @@ void CustomTrackView::deleteTransition(ItemInfo transitionInfo, int endTrack, QD
     m_document->setModified(true);
 }
 
-void CustomTrackView::slotTransitionUpdated(Transition *tr, QDomElement old) {
+void CustomTrackView::slotTransitionUpdated(Transition *tr, QDomElement old)
+{
     kDebug() << "TRANS UPDATE, TRACKS: " << old.attribute("transition_btrack") << ", NEW: " << tr->toXML().attribute("transition_btrack");
     EditTransitionCommand *command = new EditTransitionCommand(this, tr->track(), tr->startPos(), old, tr->toXML(), false);
     m_commandStack->push(command);
     m_document->setModified(true);
 }
 
-void CustomTrackView::updateTransition(int track, GenTime pos, QDomElement oldTransition, QDomElement transition, bool updateTransitionWidget) {
+void CustomTrackView::updateTransition(int track, GenTime pos, QDomElement oldTransition, QDomElement transition, bool updateTransitionWidget)
+{
     Transition *item = getTransitionItemAt(pos, track);
     if (!item) {
         kWarning() << "Unable to find transition at pos :" << pos.frames(m_document->fps()) << ", ON track: " << track;
@@ -1531,7 +1571,8 @@ void CustomTrackView::updateTransition(int track, GenTime pos, QDomElement oldTr
     m_document->setModified(true);
 }
 
-void CustomTrackView::dragMoveEvent(QDragMoveEvent * event) {
+void CustomTrackView::dragMoveEvent(QDragMoveEvent * event)
+{
     event->setDropAction(Qt::IgnoreAction);
     const QPointF pos = mapToScene(event->pos());
     if (m_selectionGroup && m_clipDrag) {
@@ -1543,7 +1584,8 @@ void CustomTrackView::dragMoveEvent(QDragMoveEvent * event) {
     }
 }
 
-void CustomTrackView::dragLeaveEvent(QDragLeaveEvent * event) {
+void CustomTrackView::dragLeaveEvent(QDragLeaveEvent * event)
+{
     if (m_selectionGroup && m_clipDrag) {
         QList<QGraphicsItem *> items = m_selectionGroup->childItems();
         qDeleteAll(items);
@@ -1552,7 +1594,8 @@ void CustomTrackView::dragLeaveEvent(QDragLeaveEvent * event) {
     } else QGraphicsView::dragLeaveEvent(event);
 }
 
-void CustomTrackView::dropEvent(QDropEvent * event) {
+void CustomTrackView::dropEvent(QDropEvent * event)
+{
     if (m_selectionGroup && m_clipDrag) {
         QList<QGraphicsItem *> items = m_selectionGroup->childItems();
         resetSelectionGroup();
@@ -1594,7 +1637,8 @@ void CustomTrackView::dropEvent(QDropEvent * event) {
 }
 
 
-QStringList CustomTrackView::mimeTypes() const {
+QStringList CustomTrackView::mimeTypes() const
+{
     QStringList qstrList;
     // list of accepted mime types for drop
     qstrList.append("text/plain");
@@ -1603,12 +1647,14 @@ QStringList CustomTrackView::mimeTypes() const {
     return qstrList;
 }
 
-Qt::DropActions CustomTrackView::supportedDropActions() const {
+Qt::DropActions CustomTrackView::supportedDropActions() const
+{
     // returns what actions are supported when dropping
     return Qt::MoveAction;
 }
 
-void CustomTrackView::setDuration(int duration) {
+void CustomTrackView::setDuration(int duration)
+{
     int diff = qAbs(duration - sceneRect().width());
     if (diff * matrix().m11() > -50) {
         if (matrix().m11() < 0.4) setSceneRect(0, 0, (duration + 100 / matrix().m11()), sceneRect().height());
@@ -1617,11 +1663,13 @@ void CustomTrackView::setDuration(int duration) {
     m_projectDuration = duration;
 }
 
-int CustomTrackView::duration() const {
+int CustomTrackView::duration() const
+{
     return m_projectDuration;
 }
 
-void CustomTrackView::addTrack(TrackInfo type, int ix) {
+void CustomTrackView::addTrack(TrackInfo type, int ix)
+{
     if (ix == -1) m_document->insertTrack(ix, type);
     else {
         m_document->insertTrack(m_document->tracksCount() - ix, type);
@@ -1684,7 +1732,8 @@ void CustomTrackView::addTrack(TrackInfo type, int ix) {
     //setFixedHeight(50 * m_tracksCount);
 }
 
-void CustomTrackView::removeTrack(int ix) {
+void CustomTrackView::removeTrack(int ix)
+{
     // Delete track in MLT playlist
     m_document->renderer()->mltDeleteTrack(m_document->tracksCount() - ix);
     m_document->deleteTrack(m_document->tracksCount() - ix - 1);
@@ -1748,7 +1797,8 @@ void CustomTrackView::removeTrack(int ix) {
     viewport()->update();
 }
 
-void CustomTrackView::changeTrack(int ix, TrackInfo type) {
+void CustomTrackView::changeTrack(int ix, TrackInfo type)
+{
     int tracknumber = m_document->tracksCount() - ix;
     m_document->setTrackType(tracknumber - 1, type);
     m_document->renderer()->mltChangeTrackState(tracknumber, m_document->trackInfoAt(tracknumber - 1).isMute, m_document->trackInfoAt(tracknumber - 1).isBlind);
@@ -1757,7 +1807,8 @@ void CustomTrackView::changeTrack(int ix, TrackInfo type) {
 }
 
 
-void CustomTrackView::slotSwitchTrackAudio(int ix) {
+void CustomTrackView::slotSwitchTrackAudio(int ix)
+{
     /*for (int i = 0; i < m_document->tracksCount(); i++)
         kDebug() << "TRK " << i << " STATE: " << m_document->trackInfoAt(i).isMute << m_document->trackInfoAt(i).isBlind;*/
     int tracknumber = m_document->tracksCount() - ix;
@@ -1767,14 +1818,16 @@ void CustomTrackView::slotSwitchTrackAudio(int ix) {
     m_document->setModified(true);
 }
 
-void CustomTrackView::slotSwitchTrackLock(int ix) {
+void CustomTrackView::slotSwitchTrackLock(int ix)
+{
     int tracknumber = m_document->tracksCount() - ix - 1;
     LockTrackCommand *command = new LockTrackCommand(this, ix, !m_document->trackInfoAt(tracknumber).isLocked, true);
     m_commandStack->push(command);
 }
 
 
-void CustomTrackView::lockTrack(int ix, bool lock) {
+void CustomTrackView::lockTrack(int ix, bool lock)
+{
     int tracknumber = m_document->tracksCount() - ix - 1;
     m_document->switchTrackLock(tracknumber, lock);
     emit doTrackLock(ix, lock);
@@ -1793,14 +1846,16 @@ void CustomTrackView::lockTrack(int ix, bool lock) {
     m_document->setModified(true);
 }
 
-void CustomTrackView::slotSwitchTrackVideo(int ix) {
+void CustomTrackView::slotSwitchTrackVideo(int ix)
+{
     int tracknumber = m_document->tracksCount() - ix;
     m_document->switchTrackVideo(tracknumber - 1, !m_document->trackInfoAt(tracknumber - 1).isBlind);
     m_document->renderer()->mltChangeTrackState(tracknumber, m_document->trackInfoAt(tracknumber - 1).isMute, m_document->trackInfoAt(tracknumber - 1).isBlind);
     m_document->setModified(true);
 }
 
-void CustomTrackView::slotRemoveSpace() {
+void CustomTrackView::slotRemoveSpace()
+{
     GenTime pos;
     int track = 0;
     if (m_menuPosition.isNull()) {
@@ -1846,7 +1901,8 @@ void CustomTrackView::slotRemoveSpace() {
     m_commandStack->push(command);
 }
 
-void CustomTrackView::slotInsertSpace() {
+void CustomTrackView::slotInsertSpace()
+{
     GenTime pos;
     int track = 0;
     if (m_menuPosition.isNull()) {
@@ -1891,7 +1947,8 @@ void CustomTrackView::slotInsertSpace() {
     m_commandStack->push(command);
 }
 
-void CustomTrackView::insertSpace(QList<ItemInfo> clipsToMove, QList<ItemInfo> transToMove, int track, const GenTime duration, const GenTime offset) {
+void CustomTrackView::insertSpace(QList<ItemInfo> clipsToMove, QList<ItemInfo> transToMove, int track, const GenTime duration, const GenTime offset)
+{
     int diff = duration.frames(m_document->fps());
     resetSelectionGroup();
     m_selectionGroup = new AbstractGroupItem(m_document->fps());
@@ -1951,7 +2008,8 @@ void CustomTrackView::insertSpace(QList<ItemInfo> clipsToMove, QList<ItemInfo> t
     m_document->renderer()->mltInsertSpace(trackClipStartList, trackTransitionStartList, track, duration, offset);
 }
 
-void CustomTrackView::deleteClip(const QString &clipId) {
+void CustomTrackView::deleteClip(const QString &clipId)
+{
     resetSelectionGroup();
     QList<QGraphicsItem *> itemList = items();
     QUndoCommand *deleteCommand = new QUndoCommand();
@@ -1974,7 +2032,8 @@ void CustomTrackView::deleteClip(const QString &clipId) {
     else m_commandStack->push(deleteCommand);
 }
 
-void CustomTrackView::setCursorPos(int pos, bool seek) {
+void CustomTrackView::setCursorPos(int pos, bool seek)
+{
     emit cursorMoved((int)(m_cursorPos), (int)(pos));
     m_cursorPos = pos;
     m_cursorLine->setPos(pos, 0);
@@ -1982,15 +2041,18 @@ void CustomTrackView::setCursorPos(int pos, bool seek) {
     else if (m_autoScroll) checkScrolling();
 }
 
-void CustomTrackView::updateCursorPos() {
+void CustomTrackView::updateCursorPos()
+{
     m_cursorLine->setPos(m_cursorPos, 0);
 }
 
-int CustomTrackView::cursorPos() {
+int CustomTrackView::cursorPos()
+{
     return (int)(m_cursorPos);
 }
 
-void CustomTrackView::moveCursorPos(int delta) {
+void CustomTrackView::moveCursorPos(int delta)
+{
     if (m_cursorPos + delta < 0) delta = 0 - m_cursorPos;
     emit cursorMoved((int)(m_cursorPos), (int)((m_cursorPos + delta)));
     m_cursorPos += delta;
@@ -1998,20 +2060,23 @@ void CustomTrackView::moveCursorPos(int delta) {
     m_document->renderer()->seek(GenTime(m_cursorPos, m_document->fps()));
 }
 
-void CustomTrackView::initCursorPos(int pos) {
+void CustomTrackView::initCursorPos(int pos)
+{
     emit cursorMoved((int)(m_cursorPos), (int)(pos));
     m_cursorPos = pos;
     m_cursorLine->setPos(pos, 0);
     checkScrolling();
 }
 
-void CustomTrackView::checkScrolling() {
+void CustomTrackView::checkScrolling()
+{
     int vert = verticalScrollBar()->value();
     int hor = cursorPos();
     ensureVisible(hor, vert + 10, 2, 2, 50, 0);
 }
 
-void CustomTrackView::mouseReleaseEvent(QMouseEvent * event) {
+void CustomTrackView::mouseReleaseEvent(QMouseEvent * event)
+{
     if (m_moveOpMode == SEEK) m_moveOpMode = NONE;
     QGraphicsView::mouseReleaseEvent(event);
     if (m_scrollTimer.isActive()) m_scrollTimer.stop();
@@ -2514,7 +2579,8 @@ void CustomTrackView::mouseReleaseEvent(QMouseEvent * event) {
     m_operationMode = NONE;
 }
 
-void CustomTrackView::deleteClip(ItemInfo info) {
+void CustomTrackView::deleteClip(ItemInfo info)
+{
     ClipItem *item = getClipItemAt((int) info.startPos.frames(m_document->fps()) + 1, info.track);
 
     if (!item || m_document->renderer()->mltRemoveClip(m_document->tracksCount() - info.track, info.startPos) == false) {
@@ -2540,7 +2606,8 @@ void CustomTrackView::deleteClip(ItemInfo info) {
     m_document->renderer()->doRefresh();
 }
 
-void CustomTrackView::deleteSelectedClips() {
+void CustomTrackView::deleteSelectedClips()
+{
     resetSelectionGroup();
     QList<QGraphicsItem *> itemList = scene()->selectedItems();
     if (itemList.count() == 0) {
@@ -2594,7 +2661,8 @@ void CustomTrackView::deleteSelectedClips() {
     m_commandStack->push(deleteSelected);
 }
 
-void CustomTrackView::changeClipSpeed() {
+void CustomTrackView::changeClipSpeed()
+{
     QList<QGraphicsItem *> itemList = scene()->selectedItems();
     if (itemList.count() == 0) {
         emit displayMessage(i18n("Select clip to change speed"), ErrorMessage);
@@ -2622,7 +2690,8 @@ void CustomTrackView::changeClipSpeed() {
     else delete changeSelected;
 }
 
-void CustomTrackView::doChangeClipSpeed(ItemInfo info, const double speed, const double oldspeed, const QString &id) {
+void CustomTrackView::doChangeClipSpeed(ItemInfo info, const double speed, const double oldspeed, const QString &id)
+{
     DocClipBase *baseclip = m_document->clipManager()->getClipById(id);
     ClipItem *item = getClipItemAt((int) info.startPos.frames(m_document->fps()) + 1, info.track);
     if (!item) {
@@ -2641,7 +2710,8 @@ void CustomTrackView::doChangeClipSpeed(ItemInfo info, const double speed, const
     } else emit displayMessage(i18n("Invalid clip"), ErrorMessage);
 }
 
-void CustomTrackView::cutSelectedClips() {
+void CustomTrackView::cutSelectedClips()
+{
     QList<QGraphicsItem *> itemList = scene()->selectedItems();
     GenTime currentPos = GenTime(m_cursorPos, m_document->fps());
     for (int i = 0; i < itemList.count(); i++) {
@@ -2657,7 +2727,8 @@ void CustomTrackView::cutSelectedClips() {
     }
 }
 
-void CustomTrackView::groupClips(bool group) {
+void CustomTrackView::groupClips(bool group)
+{
     QList<QGraphicsItem *> itemList = scene()->selectedItems();
     QList <ItemInfo> clipInfos;
     QList <ItemInfo> transitionInfos;
@@ -2686,7 +2757,8 @@ void CustomTrackView::groupClips(bool group) {
     }
 }
 
-void CustomTrackView::doGroupClips(QList <ItemInfo> clipInfos, QList <ItemInfo> transitionInfos, bool group) {
+void CustomTrackView::doGroupClips(QList <ItemInfo> clipInfos, QList <ItemInfo> transitionInfos, bool group)
+{
     resetSelectionGroup();
     m_scene->clearSelection();
     if (!group) {
@@ -2732,7 +2804,8 @@ void CustomTrackView::doGroupClips(QList <ItemInfo> clipInfos, QList <ItemInfo>
     m_document->setModified(true);
 }
 
-void CustomTrackView::addClip(QDomElement xml, const QString &clipId, ItemInfo info, EffectsList effects) {
+void CustomTrackView::addClip(QDomElement xml, const QString &clipId, ItemInfo info, EffectsList effects)
+{
     DocClipBase *baseclip = m_document->clipManager()->getClipById(clipId);
     if (baseclip == NULL) {
         emit displayMessage(i18n("No clip copied"), ErrorMessage);
@@ -2773,7 +2846,8 @@ void CustomTrackView::addClip(QDomElement xml, const QString &clipId, ItemInfo i
     m_document->renderer()->doRefresh();
 }
 
-void CustomTrackView::slotUpdateClip(const QString &clipId) {
+void CustomTrackView::slotUpdateClip(const QString &clipId)
+{
     QList<QGraphicsItem *> list = scene()->items();
     ClipItem *clip = NULL;
     for (int i = 0; i < list.size(); ++i) {
@@ -2789,7 +2863,8 @@ void CustomTrackView::slotUpdateClip(const QString &clipId) {
     }
 }
 
-ClipItem *CustomTrackView::getClipItemAtEnd(GenTime pos, int track) {
+ClipItem *CustomTrackView::getClipItemAtEnd(GenTime pos, int track)
+{
     int framepos = (int)(pos.frames(m_document->fps()));
     QList<QGraphicsItem *> list = scene()->items(QPointF(framepos - 1, track * m_tracksHeight + m_tracksHeight / 2));
     ClipItem *clip = NULL;
@@ -2803,7 +2878,8 @@ ClipItem *CustomTrackView::getClipItemAtEnd(GenTime pos, int track) {
     return clip;
 }
 
-ClipItem *CustomTrackView::getClipItemAtStart(GenTime pos, int track) {
+ClipItem *CustomTrackView::getClipItemAtStart(GenTime pos, int track)
+{
     QList<QGraphicsItem *> list = scene()->items(QPointF(pos.frames(m_document->fps()), track * m_tracksHeight + m_tracksHeight / 2));
     ClipItem *clip = NULL;
     for (int i = 0; i < list.size(); i++) {
@@ -2816,7 +2892,8 @@ ClipItem *CustomTrackView::getClipItemAtStart(GenTime pos, int track) {
     return clip;
 }
 
-ClipItem *CustomTrackView::getClipItemAt(int pos, int track) {
+ClipItem *CustomTrackView::getClipItemAt(int pos, int track)
+{
     QList<QGraphicsItem *> list = scene()->items(QPointF(pos, track * m_tracksHeight + m_tracksHeight / 2));
     ClipItem *clip = NULL;
     for (int i = 0; i < list.size(); i++) {
@@ -2828,12 +2905,14 @@ ClipItem *CustomTrackView::getClipItemAt(int pos, int track) {
     return clip;
 }
 
-ClipItem *CustomTrackView::getClipItemAt(GenTime pos, int track) {
+ClipItem *CustomTrackView::getClipItemAt(GenTime pos, int track)
+{
     int framepos = (int)(pos.frames(m_document->fps()));
     return getClipItemAt(framepos, track);
 }
 
-Transition *CustomTrackView::getTransitionItemAt(int pos, int track) {
+Transition *CustomTrackView::getTransitionItemAt(int pos, int track)
+{
     QList<QGraphicsItem *> list = scene()->items(QPointF(pos, (track + 1) * m_tracksHeight));
     Transition *clip = NULL;
     for (int i = 0; i < list.size(); i++) {
@@ -2845,11 +2924,13 @@ Transition *CustomTrackView::getTransitionItemAt(int pos, int track) {
     return clip;
 }
 
-Transition *CustomTrackView::getTransitionItemAt(GenTime pos, int track) {
+Transition *CustomTrackView::getTransitionItemAt(GenTime pos, int track)
+{
     return getTransitionItemAt(pos.frames(m_document->fps()), track);
 }
 
-Transition *CustomTrackView::getTransitionItemAtEnd(GenTime pos, int track) {
+Transition *CustomTrackView::getTransitionItemAtEnd(GenTime pos, int track)
+{
     int framepos = (int)(pos.frames(m_document->fps()));
     QList<QGraphicsItem *> list = scene()->items(QPointF(framepos - 1, (track + 1) * m_tracksHeight));
     Transition *clip = NULL;
@@ -2863,7 +2944,8 @@ Transition *CustomTrackView::getTransitionItemAtEnd(GenTime pos, int track) {
     return clip;
 }
 
-Transition *CustomTrackView::getTransitionItemAtStart(GenTime pos, int track) {
+Transition *CustomTrackView::getTransitionItemAtStart(GenTime pos, int track)
+{
     QList<QGraphicsItem *> list = scene()->items(QPointF(pos.frames(m_document->fps()), (track + 1) * m_tracksHeight));
     Transition *clip = NULL;
     for (int i = 0; i < list.size(); ++i) {
@@ -2876,7 +2958,8 @@ Transition *CustomTrackView::getTransitionItemAtStart(GenTime pos, int track) {
     return clip;
 }
 
-void CustomTrackView::moveClip(const ItemInfo start, const ItemInfo end) {
+void CustomTrackView::moveClip(const ItemInfo start, const ItemInfo end)
+{
     if (m_selectionGroup) resetSelectionGroup(false);
     ClipItem *item = getClipItemAt((int) start.startPos.frames(m_document->fps()) + 1, start.track);
     if (!item) {
@@ -2921,7 +3004,8 @@ void CustomTrackView::moveClip(const ItemInfo start, const ItemInfo end) {
     kDebug() << " // MOVED CLIP TO: " << end.startPos.frames(25) << ", ITEM START: " << item->startPos().frames(25);
 }
 
-void CustomTrackView::moveGroup(QList <ItemInfo> startClip, QList <ItemInfo> startTransition, const GenTime offset, const int trackOffset, bool reverseMove) {
+void CustomTrackView::moveGroup(QList <ItemInfo> startClip, QList <ItemInfo> startTransition, const GenTime offset, const int trackOffset, bool reverseMove)
+{
     // Group Items
     kDebug() << "//GRP MOVE, REVERS:" << reverseMove;
     kDebug() << "// GROUP MOV; OFFSET: " << offset.frames(25) << ", TK OFF: " << trackOffset;
@@ -3023,7 +3107,8 @@ void CustomTrackView::moveGroup(QList <ItemInfo> startClip, QList <ItemInfo> sta
     }
 }
 
-void CustomTrackView::moveTransition(const ItemInfo start, const ItemInfo end) {
+void CustomTrackView::moveTransition(const ItemInfo start, const ItemInfo end)
+{
     Transition *item = getTransitionItemAt(start.startPos, start.track);
     if (!item) {
         emit displayMessage(i18n("Cannot move transition at time: %1 on track %2", m_document->timecode().getTimecodeFromFrames(start.startPos.frames(m_document->fps())), start.track), ErrorMessage);
@@ -3056,7 +3141,8 @@ void CustomTrackView::moveTransition(const ItemInfo start, const ItemInfo end) {
     if (m_dragItem && m_dragItem == item) emit transitionItemSelected(item);
 }
 
-void CustomTrackView::resizeClip(const ItemInfo start, const ItemInfo end) {
+void CustomTrackView::resizeClip(const ItemInfo start, const ItemInfo end)
+{
     bool resizeClipStart = true;
     if (start.startPos == end.startPos) resizeClipStart = false;
     /*if (resizeClipStart) offset = 1;
@@ -3105,7 +3191,8 @@ void CustomTrackView::resizeClip(const ItemInfo start, const ItemInfo end) {
     KdenliveSettings::setSnaptopoints(snap);
 }
 
-void CustomTrackView::updateClipFade(ClipItem * item, bool updateFadeOut) {
+void CustomTrackView::updateClipFade(ClipItem * item, bool updateFadeOut)
+{
     if (!updateFadeOut) {
         int end = item->fadeIn();
         if (end != 0) {
@@ -3187,11 +3274,13 @@ void CustomTrackView::updateClipFade(ClipItem * item, bool updateFadeOut) {
     }
 }
 
-double CustomTrackView::getSnapPointForPos(double pos) {
+double CustomTrackView::getSnapPointForPos(double pos)
+{
     return m_scene->getSnapPointForPos(pos, KdenliveSettings::snaptopoints());
 }
 
-void CustomTrackView::updateSnapPoints(AbstractClipItem *selected, QList <GenTime> offsetList, bool skipSelectedItems) {
+void CustomTrackView::updateSnapPoints(AbstractClipItem *selected, QList <GenTime> offsetList, bool skipSelectedItems)
+{
     QList <GenTime> snaps;
     if (selected && offsetList.isEmpty()) offsetList.append(selected->duration());
     QList<QGraphicsItem *> itemList = items();
@@ -3261,21 +3350,24 @@ void CustomTrackView::updateSnapPoints(AbstractClipItem *selected, QList <GenTim
     //    kDebug() << "SNAP POINT: " << m_snapPoints.at(i).frames(25);
 }
 
-void CustomTrackView::slotSeekToPreviousSnap() {
+void CustomTrackView::slotSeekToPreviousSnap()
+{
     updateSnapPoints(NULL);
     GenTime res = m_scene->previousSnapPoint(GenTime(m_cursorPos, m_document->fps()));
     setCursorPos((int) res.frames(m_document->fps()));
     checkScrolling();
 }
 
-void CustomTrackView::slotSeekToNextSnap() {
+void CustomTrackView::slotSeekToNextSnap()
+{
     updateSnapPoints(NULL);
     GenTime res = m_scene->nextSnapPoint(GenTime(m_cursorPos, m_document->fps()));
     setCursorPos((int) res.frames(m_document->fps()));
     checkScrolling();
 }
 
-void CustomTrackView::clipStart() {
+void CustomTrackView::clipStart()
+{
     ClipItem *item = getMainActiveClip();
     if (item != NULL) {
         setCursorPos((int) item->startPos().frames(m_document->fps()));
@@ -3283,7 +3375,8 @@ void CustomTrackView::clipStart() {
     }
 }
 
-void CustomTrackView::clipEnd() {
+void CustomTrackView::clipEnd()
+{
     ClipItem *item = getMainActiveClip();
     if (item != NULL) {
         setCursorPos((int) item->endPos().frames(m_document->fps()) - 1);
@@ -3291,18 +3384,21 @@ void CustomTrackView::clipEnd() {
     }
 }
 
-void CustomTrackView::slotAddClipMarker(const QString &id, GenTime t, QString c) {
+void CustomTrackView::slotAddClipMarker(const QString &id, GenTime t, QString c)
+{
     QString oldcomment = m_document->clipManager()->getClipById(id)->markerComment(t);
     AddMarkerCommand *command = new AddMarkerCommand(this, oldcomment, c, id, t, true);
     m_commandStack->push(command);
 }
 
-void CustomTrackView::slotDeleteClipMarker(const QString &comment, const QString &id, const GenTime &position) {
+void CustomTrackView::slotDeleteClipMarker(const QString &comment, const QString &id, const GenTime &position)
+{
     AddMarkerCommand *command = new AddMarkerCommand(this, comment, QString(), id, position, true);
     m_commandStack->push(command);
 }
 
-void CustomTrackView::slotDeleteAllClipMarkers(const QString &id) {
+void CustomTrackView::slotDeleteAllClipMarkers(const QString &id)
+{
     DocClipBase *base = m_document->clipManager()->getClipById(id);
     QList <CommentedTime> markers = base->commentedSnapMarkers();
 
@@ -3319,7 +3415,8 @@ void CustomTrackView::slotDeleteAllClipMarkers(const QString &id) {
     m_commandStack->push(deleteMarkers);
 }
 
-void CustomTrackView::addMarker(const QString &id, const GenTime &pos, const QString comment) {
+void CustomTrackView::addMarker(const QString &id, const GenTime &pos, const QString comment)
+{
     DocClipBase *base = m_document->clipManager()->getClipById(id);
     if (!comment.isEmpty()) base->addSnapMarker(pos, comment);
     else base->deleteSnapMarker(pos);
@@ -3327,11 +3424,13 @@ void CustomTrackView::addMarker(const QString &id, const GenTime &pos, const QSt
     viewport()->update();
 }
 
-bool sortGuidesList(const Guide *g1 , const Guide *g2) {
+bool sortGuidesList(const Guide *g1 , const Guide *g2)
+{
     return (*g1).position() < (*g2).position();
 }
 
-void CustomTrackView::editGuide(const GenTime oldPos, const GenTime pos, const QString &comment) {
+void CustomTrackView::editGuide(const GenTime oldPos, const GenTime pos, const QString &comment)
+{
     if (oldPos > GenTime() && pos > GenTime()) {
         // move guide
         for (int i = 0; i < m_guides.count(); i++) {
@@ -3359,7 +3458,8 @@ void CustomTrackView::editGuide(const GenTime oldPos, const GenTime pos, const Q
     m_document->syncGuides(m_guides);
 }
 
-bool CustomTrackView::addGuide(const GenTime pos, const QString &comment) {
+bool CustomTrackView::addGuide(const GenTime pos, const QString &comment)
+{
     for (int i = 0; i < m_guides.count(); i++) {
         if (m_guides.at(i)->position() == pos) {
             emit displayMessage(i18n("A guide already exists at position %1", m_document->timecode().getTimecodeFromFrames(pos.frames(m_document->fps()))), ErrorMessage);
@@ -3374,7 +3474,8 @@ bool CustomTrackView::addGuide(const GenTime pos, const QString &comment) {
     return true;
 }
 
-void CustomTrackView::slotAddGuide() {
+void CustomTrackView::slotAddGuide()
+{
     CommentedTime marker(GenTime(m_cursorPos, m_document->fps()), i18n("Guide"));
     MarkerDialog d(NULL, marker, m_document->timecode(), i18n("Add Guide"), this);
     if (d.exec() != QDialog::Accepted) return;
@@ -3384,7 +3485,8 @@ void CustomTrackView::slotAddGuide() {
     }
 }
 
-void CustomTrackView::slotEditGuide() {
+void CustomTrackView::slotEditGuide()
+{
     GenTime pos = GenTime(m_cursorPos, m_document->fps());
     bool found = false;
     for (int i = 0; i < m_guides.count(); i++) {
@@ -3397,7 +3499,8 @@ void CustomTrackView::slotEditGuide() {
     if (!found) emit displayMessage(i18n("No guide at cursor time"), ErrorMessage);
 }
 
-void CustomTrackView::slotEditGuide(CommentedTime guide) {
+void CustomTrackView::slotEditGuide(CommentedTime guide)
+{
     MarkerDialog d(NULL, guide, m_document->timecode(), i18n("Edit Guide"), this);
     if (d.exec() == QDialog::Accepted) {
         EditGuideCommand *command = new EditGuideCommand(this, guide.time(), guide.comment(), d.newMarker().time(), d.newMarker().comment(), true);
@@ -3406,7 +3509,8 @@ void CustomTrackView::slotEditGuide(CommentedTime guide) {
 }
 
 
-void CustomTrackView::slotDeleteGuide() {
+void CustomTrackView::slotDeleteGuide()
+{
     GenTime pos = GenTime(m_cursorPos, m_document->fps());
     bool found = false;
     for (int i = 0; i < m_guides.count(); i++) {
@@ -3420,7 +3524,8 @@ void CustomTrackView::slotDeleteGuide() {
     if (!found) emit displayMessage(i18n("No guide at cursor time"), ErrorMessage);
 }
 
-void CustomTrackView::slotDeleteAllGuides() {
+void CustomTrackView::slotDeleteAllGuides()
+{
     QUndoCommand *deleteAll = new QUndoCommand();
     deleteAll->setText("Delete all guides");
     for (int i = 0; i < m_guides.count(); i++) {
@@ -3429,11 +3534,13 @@ void CustomTrackView::slotDeleteAllGuides() {
     m_commandStack->push(deleteAll);
 }
 
-void CustomTrackView::setTool(PROJECTTOOL tool) {
+void CustomTrackView::setTool(PROJECTTOOL tool)
+{
     m_tool = tool;
 }
 
-void CustomTrackView::setScale(double scaleFactor) {
+void CustomTrackView::setScale(double scaleFactor)
+{
     QMatrix matrix;
     matrix = matrix.scale(scaleFactor, 1);
     m_scene->setScale(scaleFactor);
@@ -3460,7 +3567,8 @@ void CustomTrackView::setScale(double scaleFactor) {
     //verticalScrollBar()->setValue(vert);*/
 }
 
-void CustomTrackView::slotRefreshGuides() {
+void CustomTrackView::slotRefreshGuides()
+{
     if (KdenliveSettings::showmarkers()) {
         kDebug() << "// refresh GUIDES";
         for (int i = 0; i < m_guides.count(); i++) {
@@ -3469,7 +3577,8 @@ void CustomTrackView::slotRefreshGuides() {
     }
 }
 
-void CustomTrackView::drawBackground(QPainter * painter, const QRectF & rect) {
+void CustomTrackView::drawBackground(QPainter * painter, const QRectF & rect)
+{
     QColor base = palette().button().color();
     QRectF r = rect;
     r.setWidth(r.width() + 1);
@@ -3486,7 +3595,8 @@ void CustomTrackView::drawBackground(QPainter * painter, const QRectF & rect) {
         painter->fillRect(QRectF(r.left(), lowerLimit, r.width(), height() - lowerLimit), QBrush(base));
 }
 
-bool CustomTrackView::findString(const QString &text) {
+bool CustomTrackView::findString(const QString &text)
+{
     QString marker;
     for (int i = 0; i < m_searchPoints.size(); ++i) {
         marker = m_searchPoints.at(i).comment();
@@ -3502,7 +3612,8 @@ bool CustomTrackView::findString(const QString &text) {
     return false;
 }
 
-bool CustomTrackView::findNextString(const QString &text) {
+bool CustomTrackView::findNextString(const QString &text)
+{
     QString marker;
     for (int i = m_findIndex + 1; i < m_searchPoints.size(); ++i) {
         marker = m_searchPoints.at(i).comment();
@@ -3519,7 +3630,8 @@ bool CustomTrackView::findNextString(const QString &text) {
     return false;
 }
 
-void CustomTrackView::initSearchStrings() {
+void CustomTrackView::initSearchStrings()
+{
     m_searchPoints.clear();
     QList<QGraphicsItem *> itemList = items();
     for (int i = 0; i < itemList.count(); i++) {
@@ -3543,12 +3655,14 @@ void CustomTrackView::initSearchStrings() {
     qSort(m_searchPoints);
 }
 
-void CustomTrackView::clearSearchStrings() {
+void CustomTrackView::clearSearchStrings()
+{
     m_searchPoints.clear();
     m_findIndex = 0;
 }
 
-void CustomTrackView::copyClip() {
+void CustomTrackView::copyClip()
+{
     while (m_copiedItems.count() > 0) {
         delete m_copiedItems.takeFirst();
     }
@@ -3568,7 +3682,8 @@ void CustomTrackView::copyClip() {
     }
 }
 
-bool CustomTrackView::canBePastedTo(ItemInfo info, int type) const {
+bool CustomTrackView::canBePastedTo(ItemInfo info, int type) const
+{
     QRectF rect((double) info.startPos.frames(m_document->fps()), (double)(info.track * m_tracksHeight + 1), (double)(info.endPos - info.startPos).frames(m_document->fps()), (double)(m_tracksHeight - 1));
     QList<QGraphicsItem *> collisions = scene()->items(rect, Qt::IntersectsItemBoundingRect);
     for (int i = 0; i < collisions.count(); i++) {
@@ -3577,7 +3692,8 @@ bool CustomTrackView::canBePastedTo(ItemInfo info, int type) const {
     return true;
 }
 
-bool CustomTrackView::canBePasted(QList<AbstractClipItem *> items, GenTime offset, int trackOffset) const {
+bool CustomTrackView::canBePasted(QList<AbstractClipItem *> items, GenTime offset, int trackOffset) const
+{
     for (int i = 0; i < items.count(); i++) {
         ItemInfo info = items.at(i)->info();
         info.startPos += offset;
@@ -3588,7 +3704,8 @@ bool CustomTrackView::canBePasted(QList<AbstractClipItem *> items, GenTime offse
     return true;
 }
 
-bool CustomTrackView::canBeMoved(QList<AbstractClipItem *> items, GenTime offset, int trackOffset) const {
+bool CustomTrackView::canBeMoved(QList<AbstractClipItem *> items, GenTime offset, int trackOffset) const
+{
     QPainterPath movePath;
     movePath.moveTo(0, 0);
 
@@ -3614,7 +3731,8 @@ bool CustomTrackView::canBeMoved(QList<AbstractClipItem *> items, GenTime offset
     return true;
 }
 
-void CustomTrackView::pasteClip() {
+void CustomTrackView::pasteClip()
+{
     if (m_copiedItems.count() == 0) {
         emit displayMessage(i18n("No clip copied"), ErrorMessage);
         return;
@@ -3669,7 +3787,8 @@ void CustomTrackView::pasteClip() {
     m_commandStack->push(pasteClips);
 }
 
-void CustomTrackView::pasteClipEffects() {
+void CustomTrackView::pasteClipEffects()
+{
     if (m_copiedItems.count() != 1 || m_copiedItems.at(0)->type() != AVWIDGET) {
         emit displayMessage(i18n("You must copy exactly one clip before pasting effects"), ErrorMessage);
         return;
@@ -3693,7 +3812,8 @@ void CustomTrackView::pasteClipEffects() {
 }
 
 
-ClipItem *CustomTrackView::getClipUnderCursor() const {
+ClipItem *CustomTrackView::getClipUnderCursor() const
+{
     QRectF rect((double) m_cursorPos, 0.0, 1.0, (double)(m_tracksHeight * m_document->tracksCount()));
     QList<QGraphicsItem *> collisions = scene()->items(rect, Qt::IntersectsItemBoundingRect);
     for (int i = 0; i < collisions.count(); i++) {
@@ -3704,7 +3824,8 @@ ClipItem *CustomTrackView::getClipUnderCursor() const {
     return NULL;
 }
 
-ClipItem *CustomTrackView::getMainActiveClip() const {
+ClipItem *CustomTrackView::getMainActiveClip() const
+{
     QList<QGraphicsItem *> clips = scene()->selectedItems();
     if (clips.isEmpty()) {
         return getClipUnderCursor();
@@ -3720,7 +3841,8 @@ ClipItem *CustomTrackView::getMainActiveClip() const {
     return NULL;
 }
 
-ClipItem *CustomTrackView::getActiveClipUnderCursor(bool allowOutsideCursor) const {
+ClipItem *CustomTrackView::getActiveClipUnderCursor(bool allowOutsideCursor) const
+{
     QList<QGraphicsItem *> clips = scene()->selectedItems();
     if (clips.isEmpty()) {
         return getClipUnderCursor();
@@ -3743,7 +3865,8 @@ ClipItem *CustomTrackView::getActiveClipUnderCursor(bool allowOutsideCursor) con
     return NULL;
 }
 
-void CustomTrackView::setInPoint() {
+void CustomTrackView::setInPoint()
+{
     ClipItem *clip = getActiveClipUnderCursor(true);
     if (clip == NULL) {
         emit displayMessage(i18n("You must select one clip for this action"), ErrorMessage);
@@ -3767,7 +3890,8 @@ void CustomTrackView::setInPoint() {
     m_commandStack->push(command);
 }
 
-void CustomTrackView::setOutPoint() {
+void CustomTrackView::setOutPoint()
+{
     ClipItem *clip = getActiveClipUnderCursor(true);
     if (clip == NULL) {
         emit displayMessage(i18n("You must select one clip for this action"), ErrorMessage);
@@ -3794,7 +3918,8 @@ void CustomTrackView::setOutPoint() {
     m_commandStack->push(command);
 }
 
-void CustomTrackView::slotUpdateAllThumbs() {
+void CustomTrackView::slotUpdateAllThumbs()
+{
     QList<QGraphicsItem *> itemList = items();
     //if (itemList.isEmpty()) return;
     ClipItem *item;
@@ -3833,7 +3958,8 @@ void CustomTrackView::slotUpdateAllThumbs() {
     viewport()->update();
 }
 
-void CustomTrackView::saveThumbnails() {
+void CustomTrackView::saveThumbnails()
+{
     QList<QGraphicsItem *> itemList = items();
     ClipItem *item;
     QString thumbBase = m_document->projectFolder().path() + "/thumbs/";
@@ -3868,7 +3994,8 @@ void CustomTrackView::saveThumbnails() {
 }
 
 
-void CustomTrackView::slotInsertTrack(int ix) {
+void CustomTrackView::slotInsertTrack(int ix)
+{
     kDebug() << "// INSERTING TRK: " << ix;
     QDialog d(parentWidget());
     Ui::AddTrack_UI view;
@@ -3900,7 +4027,8 @@ void CustomTrackView::slotInsertTrack(int ix) {
     }
 }
 
-void CustomTrackView::slotDeleteTrack(int ix) {
+void CustomTrackView::slotDeleteTrack(int ix)
+{
     bool ok;
     ix = QInputDialog::getInteger(this, i18n("Remove Track"), i18n("Track"), ix, 0, m_document->tracksCount() - 1, 1, &ok);
     if (ok) {
@@ -3912,7 +4040,8 @@ void CustomTrackView::slotDeleteTrack(int ix) {
     }
 }
 
-void CustomTrackView::slotChangeTrack(int ix) {
+void CustomTrackView::slotChangeTrack(int ix)
+{
     QDialog d(parentWidget());
     Ui::AddTrack_UI view;
     view.setupUi(&d);
@@ -3941,7 +4070,8 @@ void CustomTrackView::slotChangeTrack(int ix) {
 }
 
 
-void CustomTrackView::deleteTimelineTrack(int ix, TrackInfo trackinfo) {
+void CustomTrackView::deleteTimelineTrack(int ix, TrackInfo trackinfo)
+{
     double startY = ix * m_tracksHeight + 1 + m_tracksHeight / 2;
     QRectF r(0, startY, sceneRect().width(), m_tracksHeight / 2 - 1);
     QList<QGraphicsItem *> selection = m_scene->items(r);
@@ -3969,13 +4099,15 @@ void CustomTrackView::deleteTimelineTrack(int ix, TrackInfo trackinfo) {
     m_commandStack->push(deleteTrack);
 }
 
-void CustomTrackView::changeTimelineTrack(int ix, TrackInfo trackinfo) {
+void CustomTrackView::changeTimelineTrack(int ix, TrackInfo trackinfo)
+{
     TrackInfo oldinfo = m_document->trackInfoAt(m_document->tracksCount() - ix - 1);
     ChangeTrackCommand *changeTrack = new ChangeTrackCommand(this, ix, oldinfo, trackinfo, true);
     m_commandStack->push(changeTrack);
 }
 
-void CustomTrackView::autoTransition() {
+void CustomTrackView::autoTransition()
+{
     QList<QGraphicsItem *> itemList = scene()->selectedItems();
     if (itemList.count() != 1 || itemList.at(0)->type() != TRANSITIONWIDGET) {
         emit displayMessage(i18n("You must select one transition for this action"), ErrorMessage);
@@ -3988,7 +4120,8 @@ void CustomTrackView::autoTransition() {
 }
 
 
-QStringList CustomTrackView::getLadspaParams(QDomElement effect) const {
+QStringList CustomTrackView::getLadspaParams(QDomElement effect) const
+{
     QStringList result;
     QDomNodeList params = effect.elementsByTagName("parameter");
     for (int i = 0; i < params.count(); i++) {
@@ -4005,7 +4138,8 @@ QStringList CustomTrackView::getLadspaParams(QDomElement effect) const {
     return result;
 }
 
-void CustomTrackView::clipNameChanged(const QString id, const QString name) {
+void CustomTrackView::clipNameChanged(const QString id, const QString name)
+{
     QList<QGraphicsItem *> list = scene()->items();
     ClipItem *clip = NULL;
     for (int i = 0; i < list.size(); ++i) {
@@ -4019,7 +4153,8 @@ void CustomTrackView::clipNameChanged(const QString id, const QString name) {
     viewport()->update();
 }
 
-void CustomTrackView::getClipAvailableSpace(AbstractClipItem *item, GenTime &minimum, GenTime &maximum) {
+void CustomTrackView::getClipAvailableSpace(AbstractClipItem *item, GenTime &minimum, GenTime &maximum)
+{
     minimum = GenTime();
     maximum = GenTime();
     QList<QGraphicsItem *> selection;
@@ -4034,7 +4169,8 @@ void CustomTrackView::getClipAvailableSpace(AbstractClipItem *item, GenTime &min
     }
 }
 
-void CustomTrackView::getTransitionAvailableSpace(AbstractClipItem *item, GenTime &minimum, GenTime &maximum) {
+void CustomTrackView::getTransitionAvailableSpace(AbstractClipItem *item, GenTime &minimum, GenTime &maximum)
+{
     minimum = GenTime();
     maximum = GenTime();
     QList<QGraphicsItem *> selection;
@@ -4050,7 +4186,8 @@ void CustomTrackView::getTransitionAvailableSpace(AbstractClipItem *item, GenTim
 }
 
 
-void CustomTrackView::loadGroups(const QDomNodeList groups) {
+void CustomTrackView::loadGroups(const QDomNodeList groups)
+{
     for (int i = 0; i < groups.count(); i++) {
         QDomNodeList children = groups.at(i).childNodes();
         scene()->clearSelection();
@@ -4071,7 +4208,8 @@ void CustomTrackView::loadGroups(const QDomNodeList groups) {
     }
 }
 
-void CustomTrackView::splitAudio() {
+void CustomTrackView::splitAudio()
+{
     resetSelectionGroup();
     QList<QGraphicsItem *> selection = scene()->selectedItems();
     if (selection.isEmpty()) {
@@ -4095,7 +4233,8 @@ void CustomTrackView::splitAudio() {
     m_commandStack->push(splitCommand);
 }
 
-void CustomTrackView::doSplitAudio(const GenTime &pos, int track, bool split) {
+void CustomTrackView::doSplitAudio(const GenTime &pos, int track, bool split)
+{
     ClipItem *clip = getClipItemAt(pos, track);
     if (clip == NULL) {
         kDebug() << "// Cannot find clip to split!!!";
@@ -4163,7 +4302,8 @@ void CustomTrackView::doSplitAudio(const GenTime &pos, int track, bool split) {
     }
 }
 
-void CustomTrackView::videoOnly() {
+void CustomTrackView::videoOnly()
+{
     resetSelectionGroup();
     QList<QGraphicsItem *> selection = scene()->selectedItems();
     if (selection.isEmpty()) {
@@ -4187,7 +4327,8 @@ void CustomTrackView::videoOnly() {
     m_commandStack->push(videoCommand);
 }
 
-void CustomTrackView::audioOnly() {
+void CustomTrackView::audioOnly()
+{
     resetSelectionGroup();
     QList<QGraphicsItem *> selection = scene()->selectedItems();
     if (selection.isEmpty()) {
@@ -4211,7 +4352,8 @@ void CustomTrackView::audioOnly() {
     m_commandStack->push(videoCommand);
 }
 
-void CustomTrackView::doChangeClipType(const GenTime &pos, int track, bool videoOnly, bool audioOnly) {
+void CustomTrackView::doChangeClipType(const GenTime &pos, int track, bool videoOnly, bool audioOnly)
+{
     ClipItem *clip = getClipItemAt(pos, track);
     if (clip == NULL) {
         kDebug() << "// Cannot find clip to split!!!";
index 5f44deec8ad0490167cc77eac9d87744dc577a57..58a48c6589a938af8aec49e11f3ef51cff128bc3 100644 (file)
@@ -38,7 +38,8 @@ class AbstractGroupItem;
 class Transition;
 class CustomTrackScene;
 
-class CustomTrackView : public QGraphicsView {
+class CustomTrackView : public QGraphicsView
+{
     Q_OBJECT
 
 public:
index b18502a9fed812e2096200d358a47c6955d6e9bc..660c3ab7538ce452ec80e67c5820b1a07881d47c 100644 (file)
@@ -81,7 +81,8 @@ struct MltVideoProfile {
 };
 
 
-class EffectParameter {
+class EffectParameter
+{
 public:
     EffectParameter(const QString name, const QString value): m_name(name), m_value(value) {}
     QString name()   const          {
@@ -102,7 +103,8 @@ private:
 /** Use our own list for effect parameters so that they are not sorted in any ways, because
     some effects like sox need a precise order
 */
-class EffectsParameterList: public QList < EffectParameter > {
+class EffectsParameterList: public QList < EffectParameter >
+{
 public:
     EffectsParameterList(): QList < EffectParameter >() {}
     bool hasParam(const QString name) const {
@@ -129,7 +131,8 @@ public:
     }
 };
 
-class CommentedTime {
+class CommentedTime
+{
 public:
     CommentedTime(): t(GenTime(0)) {}
     CommentedTime(const GenTime time, QString comment)
index 4ebed002dc2f548f3d8669998e768c6ab40d97f6..5d8521e4859be90f5dc2fdb4ad3880211354e0b7 100644 (file)
@@ -34,7 +34,8 @@
 #include <QCryptographicHash>
 
 DocClipBase::DocClipBase(ClipManager *clipManager, QDomElement xml, const QString &id):
-        m_id(id), m_description(QString()), m_refcount(0), m_audioThumbCreated(false), m_duration(GenTime()), m_thumbProd(NULL), m_audioTimer(NULL), m_properties(QMap <QString, QString> ()), audioFrameChache(QMap<int, QMap<int, QByteArray> > ()), m_baseTrackProducers(QList <Mlt::Producer *>()), m_snapMarkers(QList < CommentedTime > ()), m_videoOnlyProducer(NULL), m_audioTrackProducers(QList <Mlt::Producer *>())  {
+        m_id(id), m_description(QString()), m_refcount(0), m_audioThumbCreated(false), m_duration(GenTime()), m_thumbProd(NULL), m_audioTimer(NULL), m_properties(QMap <QString, QString> ()), audioFrameChache(QMap<int, QMap<int, QByteArray> > ()), m_baseTrackProducers(QList <Mlt::Producer *>()), m_snapMarkers(QList < CommentedTime > ()), m_videoOnlyProducer(NULL), m_audioTrackProducers(QList <Mlt::Producer *>())
+{
     int type = xml.attribute("type").toInt();
     m_clipType = (CLIPTYPE) type;
 
@@ -75,7 +76,8 @@ DocClipBase::DocClipBase(ClipManager *clipManager, QDomElement xml, const QStrin
     return *this;
 }*/
 
-DocClipBase::~DocClipBase() {
+DocClipBase::~DocClipBase()
+{
     if (m_thumbProd) {
         delete m_thumbProd;
     }
@@ -87,30 +89,35 @@ DocClipBase::~DocClipBase() {
     m_baseTrackProducers.clear();
 }
 
-void DocClipBase::setZone(QPoint zone) {
+void DocClipBase::setZone(QPoint zone)
+{
     m_properties.insert("zone_in", QString::number(zone.x()));
     m_properties.insert("zone_out", QString::number(zone.y()));
 }
 
-QPoint DocClipBase::zone() const {
+QPoint DocClipBase::zone() const
+{
     QPoint zone;
     zone.setX(m_properties.value("zone_in").toInt());
     zone.setY(m_properties.value("zone_out", "50").toInt());
     return zone;
 }
 
-void DocClipBase::slotCreateAudioTimer() {
+void DocClipBase::slotCreateAudioTimer()
+{
     connect(m_thumbProd, SIGNAL(audioThumbReady(QMap <int, QMap <int, QByteArray> >)), this , SLOT(updateAudioThumbnail(QMap <int, QMap <int, QByteArray> >)));
     connect(this, SIGNAL(getAudioThumbs()), this , SLOT(slotGetAudioThumbs()));
     m_audioTimer = new QTimer(this);
     connect(m_audioTimer, SIGNAL(timeout()), this, SLOT(slotGetAudioThumbs()));
 }
 
-void DocClipBase::askForAudioThumbs() {
+void DocClipBase::askForAudioThumbs()
+{
     if (m_thumbProd) m_thumbProd->askForAudioThumbs(getId());
 }
 
-void DocClipBase::slotClearAudioCache() {
+void DocClipBase::slotClearAudioCache()
+{
     if (m_thumbProd) m_thumbProd->stopAudioThumbs();
     if (m_audioTimer != NULL) m_audioTimer->stop();
     audioFrameChache.clear();
@@ -121,32 +128,39 @@ void DocClipBase::slotClearAudioCache() {
     if (m_thumbProd) m_thumbProd->getMainThumb(m_properties.value("thumbnail").toInt());
 }*/
 
-KThumb *DocClipBase::thumbProducer() {
+KThumb *DocClipBase::thumbProducer()
+{
     return m_thumbProd;
 }
 
-bool DocClipBase::audioThumbCreated() const {
+bool DocClipBase::audioThumbCreated() const
+{
     return m_audioThumbCreated;
 }
 
-const QString DocClipBase::name() const {
+const QString DocClipBase::name() const
+{
 
     return m_properties.value("name");
 }
 
-const QString &DocClipBase::getId() const {
+const QString &DocClipBase::getId() const
+{
     return m_id;
 }
 
-void DocClipBase::setId(const QString &newId) {
+void DocClipBase::setId(const QString &newId)
+{
     m_id = newId;
 }
 
-const CLIPTYPE & DocClipBase::clipType() const {
+const CLIPTYPE & DocClipBase::clipType() const
+{
     return m_clipType;
 }
 
-void DocClipBase::setClipType(CLIPTYPE type) {
+void DocClipBase::setClipType(CLIPTYPE type)
+{
     m_clipType = type;
 
     m_properties.insert("type", QString::number((int) type));
@@ -154,42 +168,51 @@ void DocClipBase::setClipType(CLIPTYPE type) {
         slotCreateAudioTimer();
 }
 
-KUrl DocClipBase::fileURL() const {
+KUrl DocClipBase::fileURL() const
+{
     QString res = m_properties.value("resource");
     if (m_clipType != COLOR && !res.isEmpty()) return KUrl(res);
     return KUrl();
 }
 
-void DocClipBase::setClipThumbFrame(const uint &ix) {
+void DocClipBase::setClipThumbFrame(const uint &ix)
+{
     m_properties.insert("thumbnail", QString::number((int) ix));
 }
 
-uint DocClipBase::getClipThumbFrame() const {
+uint DocClipBase::getClipThumbFrame() const
+{
     return (uint) m_properties.value("thumbnail").toInt();
 }
 
-const QString DocClipBase::description() const {
+const QString DocClipBase::description() const
+{
     return m_properties.value("description");
 }
 
-bool DocClipBase::isTransparent() const {
+bool DocClipBase::isTransparent() const
+{
     return (m_properties.value("transparency") == "1");
 }
 
-const QString DocClipBase::getProperty(const QString prop) const {
+const QString DocClipBase::getProperty(const QString prop) const
+{
     return m_properties.value(prop);
 }
 
-void DocClipBase::setDuration(GenTime dur) {
+void DocClipBase::setDuration(GenTime dur)
+{
     m_duration = dur;
     m_properties.insert("duration", QString::number((int) dur.frames(KdenliveSettings::project_fps())));
 }
 
-const GenTime &DocClipBase::duration() const {
+const GenTime &DocClipBase::duration() const
+{
     return m_duration;
 }
 
-const GenTime DocClipBase::maxDuration() const {
+const GenTime DocClipBase::maxDuration() const
+{
     if (m_clipType == COLOR || m_clipType == IMAGE || m_clipType == TEXT || (m_clipType == SLIDESHOW &&  m_properties.value("loop") == "1")) {
         const GenTime dur(15000, KdenliveSettings::project_fps());
         return dur;
@@ -197,13 +220,15 @@ const GenTime DocClipBase::maxDuration() const {
     return m_duration;
 }
 
-bool DocClipBase::hasFileSize() const {
+bool DocClipBase::hasFileSize() const
+{
     return true;
 }
 
 
 // virtual
-QDomElement DocClipBase::toXML() const {
+QDomElement DocClipBase::toXML() const
+{
     QDomDocument doc;
     QDomElement clip = doc.createElement("producer");
 
@@ -218,27 +243,32 @@ QDomElement DocClipBase::toXML() const {
 }
 
 
-void DocClipBase::setAudioThumbCreated(bool isDone) {
+void DocClipBase::setAudioThumbCreated(bool isDone)
+{
     m_audioThumbCreated = isDone;
 }
 
 
-void DocClipBase::setThumbnail(const QPixmap & pixmap) {
+void DocClipBase::setThumbnail(const QPixmap & pixmap)
+{
     m_thumbnail = pixmap;
 }
 
-const QPixmap & DocClipBase::thumbnail() const {
+const QPixmap & DocClipBase::thumbnail() const
+{
     return m_thumbnail;
 }
 
-void DocClipBase::updateAudioThumbnail(QMap<int, QMap<int, QByteArray> > data) {
+void DocClipBase::updateAudioThumbnail(QMap<int, QMap<int, QByteArray> > data)
+{
     //kDebug() << "CLIPBASE RECIEDVED AUDIO DATA*********************************************";
     audioFrameChache = data;
     m_audioThumbCreated = true;
     emit gotAudioData();
 }
 
-QList < GenTime > DocClipBase::snapMarkers() const {
+QList < GenTime > DocClipBase::snapMarkers() const
+{
     QList < GenTime > markers;
 
     for (uint count = 0; count < m_snapMarkers.count(); ++count) {
@@ -248,15 +278,18 @@ QList < GenTime > DocClipBase::snapMarkers() const {
     return markers;
 }
 
-QList < CommentedTime > DocClipBase::commentedSnapMarkers() const {
+QList < CommentedTime > DocClipBase::commentedSnapMarkers() const
+{
     return m_snapMarkers;
 }
 
-void DocClipBase::setSnapMarkers(QList < CommentedTime > markers) {
+void DocClipBase::setSnapMarkers(QList < CommentedTime > markers)
+{
     m_snapMarkers = markers;
 }
 
-void DocClipBase::addSnapMarker(const GenTime & time, QString comment) {
+void DocClipBase::addSnapMarker(const GenTime & time, QString comment)
+{
     QList < CommentedTime >::Iterator it = m_snapMarkers.begin();
     for (it = m_snapMarkers.begin(); it != m_snapMarkers.end(); ++it) {
         if ((*it).time() >= time)
@@ -273,7 +306,8 @@ void DocClipBase::addSnapMarker(const GenTime & time, QString comment) {
 
 }
 
-void DocClipBase::editSnapMarker(const GenTime & time, QString comment) {
+void DocClipBase::editSnapMarker(const GenTime & time, QString comment)
+{
     QList < CommentedTime >::Iterator it;
     for (it = m_snapMarkers.begin(); it != m_snapMarkers.end(); ++it) {
         if ((*it).time() == time)
@@ -286,7 +320,8 @@ void DocClipBase::editSnapMarker(const GenTime & time, QString comment) {
     }
 }
 
-QString DocClipBase::deleteSnapMarker(const GenTime & time) {
+QString DocClipBase::deleteSnapMarker(const GenTime & time)
+{
     QString result = i18n("Marker");
     QList < CommentedTime >::Iterator itt = m_snapMarkers.begin();
 
@@ -304,7 +339,8 @@ QString DocClipBase::deleteSnapMarker(const GenTime & time) {
 }
 
 
-GenTime DocClipBase::hasSnapMarkers(const GenTime & time) {
+GenTime DocClipBase::hasSnapMarkers(const GenTime & time)
+{
     QList < CommentedTime >::Iterator itt = m_snapMarkers.begin();
 
     while (itt != m_snapMarkers.end()) {
@@ -316,7 +352,8 @@ GenTime DocClipBase::hasSnapMarkers(const GenTime & time) {
     return GenTime(0.0);
 }
 
-GenTime DocClipBase::findPreviousSnapMarker(const GenTime & currTime) {
+GenTime DocClipBase::findPreviousSnapMarker(const GenTime & currTime)
+{
     int it;
     for (it = 0; it < m_snapMarkers.count(); it++) {
         if (m_snapMarkers[it].time() >= currTime)
@@ -328,7 +365,8 @@ GenTime DocClipBase::findPreviousSnapMarker(const GenTime & currTime) {
     else return m_snapMarkers[it-1].time();
 }
 
-GenTime DocClipBase::findNextSnapMarker(const GenTime & currTime) {
+GenTime DocClipBase::findNextSnapMarker(const GenTime & currTime)
+{
     int it;
     for (it = 0; it < m_snapMarkers.count(); it++) {
         if (m_snapMarkers[it].time() > currTime)
@@ -338,7 +376,8 @@ GenTime DocClipBase::findNextSnapMarker(const GenTime & currTime) {
     return duration();
 }
 
-QString DocClipBase::markerComment(GenTime t) {
+QString DocClipBase::markerComment(GenTime t)
+{
     QList < CommentedTime >::Iterator itt = m_snapMarkers.begin();
 
     while (itt != m_snapMarkers.end()) {
@@ -349,13 +388,15 @@ QString DocClipBase::markerComment(GenTime t) {
     return QString();
 }
 
-void DocClipBase::deleteProducers() {
+void DocClipBase::deleteProducers()
+{
     qDeleteAll(m_baseTrackProducers);
     m_baseTrackProducers.clear();
     if (m_thumbProd) m_thumbProd->clearProducer();
 }
 
-void DocClipBase::setProducer(Mlt::Producer *producer) {
+void DocClipBase::setProducer(Mlt::Producer *producer)
+{
     if (producer == NULL) return;
     QString id = producer->get("id");
     if (id.contains('_')) {
@@ -391,7 +432,8 @@ void DocClipBase::setProducer(Mlt::Producer *producer) {
     if (m_thumbProd && !m_thumbProd->hasProducer()) m_thumbProd->setProducer(producer);
 }
 
-Mlt::Producer *DocClipBase::audioProducer(int track) {
+Mlt::Producer *DocClipBase::audioProducer(int track)
+{
     if (m_audioTrackProducers.count() <= track) {
         while (m_audioTrackProducers.count() - 1 < track) {
             m_audioTrackProducers.append(NULL);
@@ -411,7 +453,8 @@ Mlt::Producer *DocClipBase::audioProducer(int track) {
     return m_audioTrackProducers.at(track);
 }
 
-Mlt::Producer *DocClipBase::videoProducer() {
+Mlt::Producer *DocClipBase::videoProducer()
+{
     if (m_videoOnlyProducer == NULL) {
         int i;
         for (i = 0; i < m_baseTrackProducers.count(); i++)
@@ -429,7 +472,8 @@ Mlt::Producer *DocClipBase::videoProducer() {
     return m_videoOnlyProducer;
 }
 
-Mlt::Producer *DocClipBase::producer(int track) {
+Mlt::Producer *DocClipBase::producer(int track)
+{
     /*for (int i = 0; i < m_baseTrackProducers.count(); i++) {
         if (m_baseTrackProducers.at(i)) kDebug() << "// PROD: " << i << ", ID: " << m_baseTrackProducers.at(i)->get("id");
     }*/
@@ -467,21 +511,24 @@ Mlt::Producer *DocClipBase::producer(int track) {
     return m_baseTrackProducers.at(track);
 }
 
-void DocClipBase::setProducerProperty(const char *name, int data) {
+void DocClipBase::setProducerProperty(const char *name, int data)
+{
     for (int i = 0; i < m_baseTrackProducers.count(); i++) {
         if (m_baseTrackProducers.at(i) != NULL)
             m_baseTrackProducers[i]->set(name, data);
     }
 }
 
-void DocClipBase::setProducerProperty(const char *name, const char *data) {
+void DocClipBase::setProducerProperty(const char *name, const char *data)
+{
     for (int i = 0; i < m_baseTrackProducers.count(); i++) {
         if (m_baseTrackProducers.at(i) != NULL)
             m_baseTrackProducers[i]->set(name, data);
     }
 }
 
-const char *DocClipBase::producerProperty(const char *name) const {
+const char *DocClipBase::producerProperty(const char *name) const
+{
     for (int i = 0; i < m_baseTrackProducers.count(); i++) {
         if (m_baseTrackProducers.at(i) != NULL) {
             return m_baseTrackProducers.at(i)->get(name);
@@ -491,7 +538,8 @@ const char *DocClipBase::producerProperty(const char *name) const {
 }
 
 
-void DocClipBase::slotRefreshProducer() {
+void DocClipBase::slotRefreshProducer()
+{
     if (m_baseTrackProducers.count() == 0) return;
     kDebug() << "////////////   REFRESH CLIP !!!!!!!!!!!!!!!!";
     if (m_clipType == SLIDESHOW) {
@@ -558,7 +606,8 @@ void DocClipBase::slotRefreshProducer() {
     }
 }
 
-void DocClipBase::setProperties(QMap <QString, QString> properties) {
+void DocClipBase::setProperties(QMap <QString, QString> properties)
+{
     // changing clip type is not allowed
     properties.remove("type");
     QMapIterator<QString, QString> i(properties);
@@ -573,19 +622,23 @@ void DocClipBase::setProperties(QMap <QString, QString> properties) {
     if (refreshProducer) slotRefreshProducer();
 }
 
-void DocClipBase::setMetadata(QMap <QString, QString> properties) {
+void DocClipBase::setMetadata(QMap <QString, QString> properties)
+{
     m_metadata = properties;
 }
 
-QMap <QString, QString> DocClipBase::metadata() const {
+QMap <QString, QString> DocClipBase::metadata() const
+{
     return m_metadata;
 }
 
-void DocClipBase::clearProperty(const QString &key) {
+void DocClipBase::clearProperty(const QString &key)
+{
     m_properties.remove(key);
 }
 
-void DocClipBase::getFileHash(const QString url) {
+void DocClipBase::getFileHash(const QString url)
+{
     if (m_clipType == SLIDESHOW) return;
     QFile file(url);
     if (file.open(QIODevice::ReadOnly)) { // write size and hash only if resource points to a file
@@ -610,7 +663,8 @@ void DocClipBase::getFileHash(const QString url) {
     }
 }
 
-QString DocClipBase::getClipHash() const {
+QString DocClipBase::getClipHash() const
+{
     QString hash;
     if (m_clipType == SLIDESHOW) hash = QCryptographicHash::hash(m_properties.value("resource").toAscii().data(), QCryptographicHash::Md5).toHex();
     else if (m_clipType == COLOR) hash = QCryptographicHash::hash(m_properties.value("colour").toAscii().data(), QCryptographicHash::Md5).toHex();
@@ -618,11 +672,13 @@ QString DocClipBase::getClipHash() const {
     return hash;
 }
 
-void DocClipBase::refreshThumbUrl() {
+void DocClipBase::refreshThumbUrl()
+{
     if (m_thumbProd) m_thumbProd->updateThumbUrl(m_properties.value("file_hash"));
 }
 
-void DocClipBase::setProperty(const QString &key, const QString &value) {
+void DocClipBase::setProperty(const QString &key, const QString &value)
+{
     m_properties.insert(key, value);
     if (key == "resource") {
         getFileHash(value);
@@ -658,11 +714,13 @@ void DocClipBase::setProperty(const QString &key, const QString &value) {
     }
 }
 
-QMap <QString, QString> DocClipBase::properties() const {
+QMap <QString, QString> DocClipBase::properties() const
+{
     return m_properties;
 }
 
-bool DocClipBase::slotGetAudioThumbs() {
+bool DocClipBase::slotGetAudioThumbs()
+{
     if (m_thumbProd == NULL) return false;
     if (!KdenliveSettings::audiothumbnails()) {
         if (m_audioTimer != NULL) m_audioTimer->stop();
index 063731e0fced5104605ae3f66ee8167d81d4ddd1..2f52b72547f976d18f385cac2e8471f25000b29a 100644 (file)
@@ -42,12 +42,14 @@ class KdenliveDoc;
 class KThumb;
 class ClipManager;
 
-namespace Mlt {
+namespace Mlt
+{
 class Producer;
 };
 
 
-class DocClipBase: public QObject {
+class DocClipBase: public QObject
+{
 Q_OBJECT public:
     /** this enum determines the types of "feed" available within this clip. types must be non-exclusive
      * - e.g. if you can have audio and video separately, it should be possible to combin the two, as is
index d1dd4b1a0aed04b0c36a440abc67b6d894990d73..162f0196cf0efbd84d3edad2a7b2bb1e52b75e5e 100644 (file)
@@ -35,7 +35,8 @@
 #include <QDomDocument>
 
 
-DvdWizard::DvdWizard(const QString &url, const QString &profile, QWidget *parent): QWizard(parent), m_profile(profile), m_dvdauthor(NULL), m_mkiso(NULL) {
+DvdWizard::DvdWizard(const QString &url, const QString &profile, QWidget *parent): QWizard(parent), m_profile(profile), m_dvdauthor(NULL), m_mkiso(NULL)
+{
     //setPixmap(QWizard::WatermarkPixmap, QPixmap(KStandardDirs::locate("appdata", "banner.png")));
     setAttribute(Qt::WA_DeleteOnClose);
     m_pageVob = new DvdWizardVob(this);
@@ -69,7 +70,8 @@ DvdWizard::DvdWizard(const QString &url, const QString &profile, QWidget *parent
 //    connect(m_standard.button_all, SIGNAL(toggled(bool)), this, SLOT(slotCheckStandard()));
 }
 
-DvdWizard::~DvdWizard() {
+DvdWizard::~DvdWizard()
+{
     // m_menuFile.remove();
     if (m_dvdauthor) {
         m_dvdauthor->close();
@@ -82,7 +84,8 @@ DvdWizard::~DvdWizard() {
 }
 
 
-void DvdWizard::slotPageChanged(int page) {
+void DvdWizard::slotPageChanged(int page)
+{
     kDebug() << "// PAGE CHGD: " << page;
     if (page == 1) {
         m_pageMenu->setTargets(m_pageVob->selectedUrls());
@@ -109,7 +112,8 @@ void DvdWizard::slotPageChanged(int page) {
 
 
 
-void DvdWizard::generateDvd() {
+void DvdWizard::generateDvd()
+{
     KTemporaryFile temp1;
     temp1.setSuffix(".png");
     //temp1.setAutoRemove(false);
@@ -417,7 +421,8 @@ void DvdWizard::generateDvd() {
 
 }
 
-void DvdWizard::slotRenderFinished(int /*exitCode*/, QProcess::ExitStatus status) {
+void DvdWizard::slotRenderFinished(int /*exitCode*/, QProcess::ExitStatus status)
+{
     QListWidgetItem *authitem =  m_status.job_progress->item(3);
     if (status == QProcess::CrashExit) {
         QByteArray result = m_dvdauthor->readAllStandardError();
@@ -464,7 +469,8 @@ void DvdWizard::slotRenderFinished(int /*exitCode*/, QProcess::ExitStatus status
 
 }
 
-void DvdWizard::slotIsoFinished(int /*exitCode*/, QProcess::ExitStatus status) {
+void DvdWizard::slotIsoFinished(int /*exitCode*/, QProcess::ExitStatus status)
+{
     QListWidgetItem *isoitem =  m_status.job_progress->item(4);
     if (status == QProcess::CrashExit) {
         QByteArray result = m_mkiso->readAllStandardError();
@@ -505,7 +511,8 @@ void DvdWizard::slotIsoFinished(int /*exitCode*/, QProcess::ExitStatus status) {
 }
 
 
-void DvdWizard::cleanup() {
+void DvdWizard::cleanup()
+{
     m_authorFile.remove();
     m_menuFile.remove();
     KIO::NetAccess::del(KUrl(m_iso.tmp_folder->url().path() + "/DVD"), this);
index 7a006904cf48e1ed5b2d64aec50f08494d1ce344..787c1a6e59f1672075be74eea049473c9a80199d 100644 (file)
@@ -36,7 +36,8 @@
 #include "ui_dvdwizardiso_ui.h"
 #include "ui_dvdwizardstatus_ui.h"
 
-class DvdWizard : public QWizard {
+class DvdWizard : public QWizard
+{
     Q_OBJECT
 public:
     explicit DvdWizard(const QString &url = QString(), const QString &profile = "dv_pal", QWidget * parent = 0);
index 5278b0b84256e5e81904d95bfcdba58886ca6e1b..8e99cdfd1d456c0f5b01a22a2d366112e4913bc3 100644 (file)
@@ -22,7 +22,8 @@
 #include <KDebug>
 
 
-DvdWizardMenu::DvdWizardMenu(const QString &profile, QWidget *parent): QWizardPage(parent) {
+DvdWizardMenu::DvdWizardMenu(const QString &profile, QWidget *parent): QWizardPage(parent)
+{
     m_view.setupUi(this);
     m_view.play_text->setText(i18n("Play"));
     m_scene = new DvdScene(this);
@@ -110,7 +111,8 @@ DvdWizardMenu::DvdWizardMenu(const QString &profile, QWidget *parent): QWizardPa
 
 }
 
-DvdWizardMenu::~DvdWizardMenu() {
+DvdWizardMenu::~DvdWizardMenu()
+{
     delete m_color;
     delete m_safeRect;
     delete m_background;
@@ -119,7 +121,8 @@ DvdWizardMenu::~DvdWizardMenu() {
 
 // virtual
 
-bool DvdWizardMenu::isComplete() const {
+bool DvdWizardMenu::isComplete() const
+{
     if (!m_view.create_menu->isChecked()) return true;
     QList <int> targets;
     QList<QGraphicsItem *> list = m_scene->items();
@@ -157,7 +160,8 @@ bool DvdWizardMenu::isComplete() const {
     return true;
 }
 
-void DvdWizardMenu::setButtonTarget(int ix) {
+void DvdWizardMenu::setButtonTarget(int ix)
+{
     QList<QGraphicsItem *> list = m_scene->selectedItems();
     for (int i = 0; i < list.count(); i++) {
         if (list.at(i)->type() == QGraphicsItem::UserType + 1) {
@@ -169,7 +173,8 @@ void DvdWizardMenu::setButtonTarget(int ix) {
     emit completeChanged();
 }
 
-void DvdWizardMenu::buttonChanged() {
+void DvdWizardMenu::buttonChanged()
+{
     QList<QGraphicsItem *> list = m_scene->selectedItems();
     bool foundButton = false;
     for (int i = 0; i < list.count(); i++) {
@@ -196,7 +201,8 @@ void DvdWizardMenu::buttonChanged() {
     if (!foundButton) m_view.tabWidget->widget(0)->setEnabled(false);
 }
 
-void DvdWizardMenu::addButton() {
+void DvdWizardMenu::addButton()
+{
     m_scene->clearSelection();
     DvdButton *button = new DvdButton(m_view.play_text->text());
     QFont font = m_view.font_family->currentFont();
@@ -212,7 +218,8 @@ void DvdWizardMenu::addButton() {
     button->setSelected(true);
 }
 
-void DvdWizardMenu::deleteButton() {
+void DvdWizardMenu::deleteButton()
+{
     QList<QGraphicsItem *> list = m_scene->selectedItems();
     for (int i = 0; i < list.count(); i++) {
         if (list.at(i)->type() == QGraphicsItem::UserType + 1) {
@@ -222,7 +229,8 @@ void DvdWizardMenu::deleteButton() {
     }
 }
 
-void DvdWizardMenu::changeProfile(int ix) {
+void DvdWizardMenu::changeProfile(int ix)
+{
     switch (ix) {
     case 1:
         m_width = 720;
@@ -239,7 +247,8 @@ void DvdWizardMenu::changeProfile(int ix) {
     }
 }
 
-void DvdWizardMenu::updatePreview() {
+void DvdWizardMenu::updatePreview()
+{
     m_scene->setProfile(m_width, m_height);
     QMatrix matrix;
     matrix.scale(0.5, 0.5);
@@ -253,7 +262,8 @@ void DvdWizardMenu::updatePreview() {
     m_safeRect->setRect(safeW, safeH, m_width - 2 * safeW, m_height - 2 * safeH);
 }
 
-void DvdWizardMenu::setTargets(QStringList /*list*/) {
+void DvdWizardMenu::setTargets(QStringList /*list*/)
+{
     m_targets = QStringList() << i18n("Play All");
     // TODO: re-enable different targets
     /*
@@ -264,7 +274,8 @@ void DvdWizardMenu::setTargets(QStringList /*list*/) {
     m_view.target_list->addItems(m_targets);
 }
 
-void DvdWizardMenu::checkBackgroundType(int ix) {
+void DvdWizardMenu::checkBackgroundType(int ix)
+{
     if (ix == 0) {
         m_view.background_color->setVisible(true);
         m_view.background_image->setVisible(false);
@@ -282,11 +293,13 @@ void DvdWizardMenu::checkBackgroundType(int ix) {
     }
 }
 
-void DvdWizardMenu::buildColor() {
+void DvdWizardMenu::buildColor()
+{
     m_color->setBrush(m_view.background_color->color());
 }
 
-void DvdWizardMenu::buildImage() {
+void DvdWizardMenu::buildImage()
+{
     emit completeChanged();
     if (m_view.background_image->url().isEmpty()) {
         m_scene->removeItem(m_background);
@@ -302,7 +315,8 @@ void DvdWizardMenu::buildImage() {
     if (m_view.background_list->currentIndex() == 1) m_scene->addItem(m_background);
 }
 
-void DvdWizardMenu::checkBackground() {
+void DvdWizardMenu::checkBackground()
+{
     if (m_view.background_list->currentIndex() != 1) {
         m_scene->removeItem(m_background);
     } else {
@@ -310,7 +324,8 @@ void DvdWizardMenu::checkBackground() {
     }
 }
 
-void DvdWizardMenu::buildButton() {
+void DvdWizardMenu::buildButton()
+{
     DvdButton *button = NULL;
     QList<QGraphicsItem *> list = m_scene->selectedItems();
     for (int i = 0; i < list.count(); i++) {
@@ -328,12 +343,14 @@ void DvdWizardMenu::buildButton() {
     button->setDefaultTextColor(m_view.text_color->color());
 }
 
-void DvdWizardMenu::updateColor() {
+void DvdWizardMenu::updateColor()
+{
     updateColor(m_view.text_color->color());
     m_view.menu_preview->viewport()->update();
 }
 
-void DvdWizardMenu::updateColor(QColor c) {
+void DvdWizardMenu::updateColor(QColor c)
+{
     DvdButton *button = NULL;
     QList<QGraphicsItem *> list = m_scene->items();
     for (int i = 0; i < list.count(); i++) {
@@ -345,7 +362,8 @@ void DvdWizardMenu::updateColor(QColor c) {
 }
 
 
-void DvdWizardMenu::createButtonImages(const QString &img1, const QString &img2, const QString &img3) {
+void DvdWizardMenu::createButtonImages(const QString &img1, const QString &img2, const QString &img3)
+{
     if (m_view.create_menu->isChecked()) {
         m_scene->clearSelection();
         QImage img(m_width, m_height, QImage::Format_ARGB32);
@@ -392,7 +410,8 @@ void DvdWizardMenu::createButtonImages(const QString &img1, const QString &img2,
 }
 
 
-void DvdWizardMenu::createBackgroundImage(const QString &img1) {
+void DvdWizardMenu::createBackgroundImage(const QString &img1)
+{
     QImage img;
     if (m_view.background_list->currentIndex() == 0) {
         // color background
@@ -414,20 +433,24 @@ void DvdWizardMenu::createBackgroundImage(const QString &img1) {
     img.save(img1);
 }
 
-bool DvdWizardMenu::createMenu() const {
+bool DvdWizardMenu::createMenu() const
+{
     return m_view.create_menu->isChecked();
 }
 
-bool DvdWizardMenu::menuMovie() const {
+bool DvdWizardMenu::menuMovie() const
+{
     return m_view.background_list->currentIndex() == 2;
 }
 
-QString DvdWizardMenu::menuMoviePath() const {
+QString DvdWizardMenu::menuMoviePath() const
+{
     return m_view.background_image->url().path();
 }
 
 
-QMap <int, QRect> DvdWizardMenu::buttonsInfo() {
+QMap <int, QRect> DvdWizardMenu::buttonsInfo()
+{
     QMap <int, QRect> info;
     QList<QGraphicsItem *> list = m_scene->items();
     for (int i = 0; i < list.count(); i++) {
@@ -443,6 +466,7 @@ QMap <int, QRect> DvdWizardMenu::buttonsInfo() {
     return info;
 }
 
-bool DvdWizardMenu::isPalMenu() const {
+bool DvdWizardMenu::isPalMenu() const
+{
     return m_isPal;
 }
index 5792e92a98ced3ddba8812a0fead6659411bae04..44cd8f84f530c3d490ed13d94014c8d81afdfe27 100644 (file)
@@ -31,7 +31,8 @@
 
 #include "ui_dvdwizardmenu_ui.h"
 
-class DvdScene : public QGraphicsScene {
+class DvdScene : public QGraphicsScene
+{
 
 public:
     DvdScene(QObject * parent = 0): QGraphicsScene(parent) {}
@@ -51,7 +52,8 @@ private:
     int m_height;
 };
 
-class DvdButton : public QGraphicsTextItem {
+class DvdButton : public QGraphicsTextItem
+{
 
 public:
     DvdButton(const QString & text): QGraphicsTextItem(text), m_target(0) {}
@@ -99,7 +101,8 @@ protected:
 };
 
 
-class DvdWizardMenu : public QWizardPage {
+class DvdWizardMenu : public QWizardPage
+{
     Q_OBJECT
 
 public:
index cb66953e938f1d467db7dd8dc1f72572d468c910..9356f0182638f05dd6d8845b6e7b732984af02b1 100644 (file)
@@ -26,7 +26,8 @@
 
 #include <QHBoxLayout>
 
-DvdWizardVob::DvdWizardVob(QWidget *parent): QWizardPage(parent) {
+DvdWizardVob::DvdWizardVob(QWidget *parent): QWizardPage(parent)
+{
     m_view.setupUi(this);
     m_view.intro_vob->setEnabled(false);
     m_view.vob_1->setFilter("video/mpeg");
@@ -48,7 +49,8 @@ DvdWizardVob::DvdWizardVob(QWidget *parent): QWizardPage(parent) {
 #endif
 }
 
-DvdWizardVob::~DvdWizardVob() {
+DvdWizardVob::~DvdWizardVob()
+{
     QList<KUrlRequester *> allUrls = m_view.vob_list->findChildren<KUrlRequester *>();
     qDeleteAll(allUrls);
 #if KDE_IS_VERSION(4,2,0)
@@ -58,18 +60,21 @@ DvdWizardVob::~DvdWizardVob() {
 
 // virtual
 
-bool DvdWizardVob::isComplete() const {
+bool DvdWizardVob::isComplete() const
+{
     if (!m_view.error_message->text().isEmpty()) return false;
     if (m_view.vob_1->url().path().isEmpty()) return false;
     if (QFile::exists(m_view.vob_1->url().path())) return true;
     return false;
 }
 
-void DvdWizardVob::setUrl(const QString &url) {
+void DvdWizardVob::setUrl(const QString &url)
+{
     m_view.vob_1->setPath(url);
 }
 
-QStringList DvdWizardVob::selectedUrls() const {
+QStringList DvdWizardVob::selectedUrls() const
+{
     QStringList result;
     QList<KUrlRequester *> allUrls = m_view.vob_list->findChildren<KUrlRequester *>();
     for (int i = 0; i < allUrls.count(); i++) {
@@ -80,12 +85,14 @@ QStringList DvdWizardVob::selectedUrls() const {
     return result;
 }
 
-QString DvdWizardVob::introMovie() const {
+QString DvdWizardVob::introMovie() const
+{
     if (!m_view.use_intro->isChecked()) return QString();
     return m_view.intro_vob->url().path();
 }
 
-void DvdWizardVob::slotCheckVobList(const QString &text) {
+void DvdWizardVob::slotCheckVobList(const QString &text)
+{
     emit completeChanged();
     QList<KUrlRequester *> allUrls = m_view.vob_list->findChildren<KUrlRequester *>();
     int count = allUrls.count();
index 448829be3431f6237fbf8f43e3cd2566a78a43e2..5544133c3ae0851593b2173f9b21efe58840b69c 100644 (file)
@@ -31,7 +31,8 @@
 
 #include <QWizardPage>
 
-class DvdWizardVob : public QWizardPage {
+class DvdWizardVob : public QWizardPage
+{
     Q_OBJECT
 
 public:
index 90b27cdfb533a618b3f3cf1010da643d5abe4278..bef3b9c660cce6d122f7776e20fae0ccc38b6edb 100644 (file)
 
 #include <KLocale>
 
-EditClipCommand::EditClipCommand(ProjectList *list, const QString &id, QMap <QString, QString> oldparams, QMap <QString, QString> newparams, bool doIt, QUndoCommand * parent) : QUndoCommand(parent), m_list(list), m_id(id), m_oldparams(oldparams), m_newparams(newparams), m_doIt(doIt) {
+EditClipCommand::EditClipCommand(ProjectList *list, const QString &id, QMap <QString, QString> oldparams, QMap <QString, QString> newparams, bool doIt, QUndoCommand * parent) : QUndoCommand(parent), m_list(list), m_id(id), m_oldparams(oldparams), m_newparams(newparams), m_doIt(doIt)
+{
     setText(i18n("Edit clip"));
 }
 
 
 // virtual
-void EditClipCommand::undo() {
+void EditClipCommand::undo()
+{
     kDebug() << "----  undoing action";
     m_list->slotUpdateClipProperties(m_id, m_oldparams);
 }
 // virtual
-void EditClipCommand::redo() {
+void EditClipCommand::redo()
+{
     kDebug() << "----  redoing action";
     if (m_doIt) m_list->slotUpdateClipProperties(m_id, m_newparams);
     m_doIt = true;
index 8821c7f7b355627f4af7eb49e25aae69543a346d..1f3afed38fe41e6300ef91d1500eac302952df2a 100644 (file)
@@ -27,7 +27,8 @@
 
 class ProjectList;
 
-class EditClipCommand : public QUndoCommand {
+class EditClipCommand : public QUndoCommand
+{
 public:
     EditClipCommand(ProjectList *list, const QString &id, QMap <QString, QString> oldparams, QMap <QString, QString> newparams, bool doIt, QUndoCommand * parent = 0);
 
index 909ace148c1e8dd5b8bc76be99ea321815896341..22817750a81a5e94a6ef59540199af1a4e18d216 100644 (file)
@@ -24,7 +24,8 @@
 #include <KLocale>
 
 EditEffectCommand::EditEffectCommand(CustomTrackView *view, const int track, GenTime pos, QDomElement oldeffect, QDomElement effect, int stackPos, bool doIt)
-        : m_view(view), m_track(track), m_pos(pos), m_oldeffect(oldeffect), m_stackPos(stackPos), m_doIt(doIt) {
+        : m_view(view), m_track(track), m_pos(pos), m_oldeffect(oldeffect), m_stackPos(stackPos), m_doIt(doIt)
+{
     m_effect = effect.cloneNode().toElement();
     QString effectName;
     QDomNode namenode = effect.elementsByTagName("name").item(0);
@@ -34,12 +35,14 @@ EditEffectCommand::EditEffectCommand(CustomTrackView *view, const int track, Gen
 }
 
 // virtual
-int EditEffectCommand::id() const {
+int EditEffectCommand::id() const
+{
     return 1;
 }
 
 // virtual
-bool EditEffectCommand::mergeWith(const QUndoCommand * other) {
+bool EditEffectCommand::mergeWith(const QUndoCommand * other)
+{
     if (other->id() != id()) return false;
     if (m_track != static_cast<const EditEffectCommand*>(other)->m_track) return false;
     if (m_pos != static_cast<const EditEffectCommand*>(other)->m_pos) return false;
@@ -48,12 +51,14 @@ bool EditEffectCommand::mergeWith(const QUndoCommand * other) {
 }
 
 // virtual
-void EditEffectCommand::undo() {
+void EditEffectCommand::undo()
+{
     kDebug() << "----  undoing action";
     m_view->updateEffect(m_track, m_pos, m_oldeffect, m_stackPos, false);
 }
 // virtual
-void EditEffectCommand::redo() {
+void EditEffectCommand::redo()
+{
     kDebug() << "----  redoing action";
     m_view->updateEffect(m_track, m_pos, m_effect, m_stackPos, m_doIt);
     m_doIt = false;
index d474d8b7b8df2bea078c3c948276a91dd538b08a..362110d610a28d77ba2a33a0316bbce2ff427cae 100644 (file)
@@ -28,7 +28,8 @@
 
 class CustomTrackView;
 
-class EditEffectCommand : public QUndoCommand {
+class EditEffectCommand : public QUndoCommand
+{
 public:
     EditEffectCommand(CustomTrackView *view, const int track, GenTime pos, QDomElement oldeffect, QDomElement effect, int stackPos, bool doIt);
 
index 93183c6f1ba49ba8b641fe8dea2f6f2728b2e97b..974c2514e1f7d6b58871602db8bbe8bc77933f19 100644 (file)
 
 #include <KLocale>
 
-EditFolderCommand::EditFolderCommand(ProjectList *view, const QString newfolderName, const QString oldfolderName, const QString &clipId, bool doIt, QUndoCommand *parent) : QUndoCommand(parent), m_view(view), m_name(newfolderName), m_oldname(oldfolderName), m_id(clipId), m_doIt(doIt) {
+EditFolderCommand::EditFolderCommand(ProjectList *view, const QString newfolderName, const QString oldfolderName, const QString &clipId, bool doIt, QUndoCommand *parent) : QUndoCommand(parent), m_view(view), m_name(newfolderName), m_oldname(oldfolderName), m_id(clipId), m_doIt(doIt)
+{
     setText(i18n("Rename folder"));
 }
 
 // virtual
-void EditFolderCommand::undo() {
+void EditFolderCommand::undo()
+{
     m_view->slotAddFolder(m_oldname, m_id, false, true);
 }
 // virtual
-void EditFolderCommand::redo() {
+void EditFolderCommand::redo()
+{
     if (m_doIt) m_view->slotAddFolder(m_name, m_id, false, true);
     m_doIt = true;
 }
index 17889558f2437aebbf7cebf4e9637098f4eb7fbc..96e9a3f1f776d0dfe010d54f832cddc6bd0dda34 100644 (file)
@@ -25,7 +25,8 @@
 
 class ProjectList;
 
-class EditFolderCommand : public QUndoCommand {
+class EditFolderCommand : public QUndoCommand
+{
 public:
     EditFolderCommand(ProjectList *view, const QString newfolderName, const QString oldfolderName, const QString &clipId, bool doIt, QUndoCommand *parent = 0);
 
index 582b76b4c682c84a5634ead1889381145514eb74..0b476569c49323d12aa62171e3032808e530b59a 100644 (file)
@@ -21,7 +21,8 @@
 
 #include <KLocale>
 
-EditGuideCommand::EditGuideCommand(CustomTrackView *view, const GenTime oldPos, const QString &oldcomment, const GenTime pos, const QString &comment, bool doIt, QUndoCommand * parent) : QUndoCommand(parent), m_view(view), m_oldPos(oldPos), m_oldcomment(oldcomment), m_pos(pos), m_comment(comment), m_doIt(doIt) {
+EditGuideCommand::EditGuideCommand(CustomTrackView *view, const GenTime oldPos, const QString &oldcomment, const GenTime pos, const QString &comment, bool doIt, QUndoCommand * parent) : QUndoCommand(parent), m_view(view), m_oldPos(oldPos), m_oldcomment(oldcomment), m_pos(pos), m_comment(comment), m_doIt(doIt)
+{
     if (m_oldcomment.isEmpty()) setText(i18n("Add guide"));
     else if (m_oldPos == m_pos) setText(i18n("Edit guide"));
     else if (m_pos <= GenTime()) setText(i18n("Delete guide"));
@@ -30,11 +31,13 @@ EditGuideCommand::EditGuideCommand(CustomTrackView *view, const GenTime oldPos,
 
 
 // virtual
-void EditGuideCommand::undo() {
+void EditGuideCommand::undo()
+{
     m_view->editGuide(m_pos, m_oldPos, m_oldcomment);
 }
 // virtual
-void EditGuideCommand::redo() {
+void EditGuideCommand::redo()
+{
     if (m_doIt) {
         m_view->editGuide(m_oldPos, m_pos, m_comment);
     }
index 327ffe28918e4488b7e6e8a6ff52173f6bf157ca..b271220c15e423d5f065b97a6bc403f6840bb344 100644 (file)
@@ -29,7 +29,8 @@
 class CustomTrackView;
 
 
-class EditGuideCommand : public QUndoCommand {
+class EditGuideCommand : public QUndoCommand
+{
 public:
     EditGuideCommand(CustomTrackView *view, const GenTime oldPos, const QString &oldcomment, const GenTime pos, const QString &comment, bool doIt, QUndoCommand * parent = 0);
     virtual void undo();
index ab8ab5fd66205c4e1a6552818e01ed947e60f2d1..920285252f7579eaff5edb0467814bb082094745 100644 (file)
@@ -21,7 +21,8 @@
 
 #include <KLocale>
 
-EditKeyFrameCommand::EditKeyFrameCommand(CustomTrackView *view, const int track, GenTime pos, const int effectIndex, const QString& oldkeyframes, const QString& newkeyframes, bool doIt) : m_view(view), m_track(track), m_pos(pos), m_index(effectIndex), m_oldkfr(oldkeyframes), m_newkfr(newkeyframes), m_doIt(doIt) {
+EditKeyFrameCommand::EditKeyFrameCommand(CustomTrackView *view, const int track, GenTime pos, const int effectIndex, const QString& oldkeyframes, const QString& newkeyframes, bool doIt) : m_view(view), m_track(track), m_pos(pos), m_index(effectIndex), m_oldkfr(oldkeyframes), m_newkfr(newkeyframes), m_doIt(doIt)
+{
     int prev = m_oldkfr.split(';', QString::SkipEmptyParts).count();
     int next = m_newkfr.split(';', QString::SkipEmptyParts).count();
     if (prev == next) setText(i18n("Edit keyframe"));
@@ -32,11 +33,13 @@ EditKeyFrameCommand::EditKeyFrameCommand(CustomTrackView *view, const int track,
 
 
 // virtual
-void EditKeyFrameCommand::undo() {
+void EditKeyFrameCommand::undo()
+{
     m_view->editKeyFrame(m_pos, m_track, m_index, m_oldkfr);
 }
 // virtual
-void EditKeyFrameCommand::redo() {
+void EditKeyFrameCommand::redo()
+{
     if (m_doIt) {
         m_view->editKeyFrame(m_pos, m_track, m_index, m_newkfr);
     }
index 9c591e023cf97348538553a5c429b9212e92f666..e35603fa957a0b2b9fd4486c2a94ca7d2ff7240e 100644 (file)
@@ -29,7 +29,8 @@
 class CustomTrackView;
 
 
-class EditKeyFrameCommand : public QUndoCommand {
+class EditKeyFrameCommand : public QUndoCommand
+{
 public:
     EditKeyFrameCommand(CustomTrackView *view, const int track, GenTime pos, const int effectIndex, const QString& oldkeyframes, const QString& newkeyframes, bool doIt);
     virtual void undo();
index 66e19b53e6207a3beaf6c4da4a46c3c41d94079d..93ffbfd4deef57d4abf5b4998b1f6968a44f8a82 100644 (file)
@@ -21,7 +21,8 @@
 #include <KLocale>
 
 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) {
+        : m_view(view), m_track(track), m_pos(pos), m_oldeffect(oldeffect), m_doIt(doIt)
+{
     m_effect = effect.cloneNode().toElement();
     QString effectName;
     QDomNode namenode = effect.elementsByTagName("name").item(0);
@@ -31,12 +32,14 @@ EditTransitionCommand::EditTransitionCommand(CustomTrackView *view, const int tr
 }
 
 // virtual
-int EditTransitionCommand::id() const {
+int EditTransitionCommand::id() const
+{
     return 2;
 }
 
 // virtual
-bool EditTransitionCommand::mergeWith(const QUndoCommand * other) {
+bool EditTransitionCommand::mergeWith(const QUndoCommand * other)
+{
     if (other->id() != id()) return false;
     if (m_track != static_cast<const EditTransitionCommand*>(other)->m_track) return false;
     if (m_pos != static_cast<const EditTransitionCommand*>(other)->m_pos) return false;
@@ -45,11 +48,13 @@ bool EditTransitionCommand::mergeWith(const QUndoCommand * other) {
 }
 
 // virtual
-void EditTransitionCommand::undo() {
+void EditTransitionCommand::undo()
+{
     m_view->updateTransition(m_track, m_pos, m_effect, m_oldeffect, m_doIt);
 }
 // virtual
-void EditTransitionCommand::redo() {
+void EditTransitionCommand::redo()
+{
     m_view->updateTransition(m_track, m_pos, m_oldeffect, m_effect, m_doIt);
     m_doIt = true;
 }
index 9a12d5b19f1501197cf7a0e86afb962537774bcb..cd517c20b611946f2861c18e0ceff97fe11ca615 100644 (file)
@@ -25,7 +25,8 @@
 
 class CustomTrackView;
 
-class EditTransitionCommand : public QUndoCommand {
+class EditTransitionCommand : public QUndoCommand
+{
 public:
     EditTransitionCommand(CustomTrackView *view, const int track, GenTime pos, QDomElement oldeffect, QDomElement effect, bool doIt);
 
index ecacc1bb9e32173bd6c5c2a1aeab9dd09ee25f27..257845fe574cc7e6c4a7625fb9b5021758458ba4 100644 (file)
 
 
 EffectsList::EffectsList():
-        QList < QDomElement > () {
+        QList < QDomElement > ()
+{
 }
 
-EffectsList::~EffectsList() {
+EffectsList::~EffectsList()
+{
 }
 
-QDomElement EffectsList::getEffectByName(const QString & name) const {
+QDomElement EffectsList::getEffectByName(const QString & name) const
+{
     QString effectName;
     for (int i = 0; i < size(); ++i) {
         QDomElement effect =  at(i);
@@ -49,7 +52,8 @@ QDomElement EffectsList::getEffectByName(const QString & name) const {
     return QDomElement();
 }
 
-QDomElement EffectsList::getEffectByTag(const QString & tag, const QString & id) const {
+QDomElement EffectsList::getEffectByTag(const QString & tag, const QString & id) const
+{
 
     if (!id.isEmpty()) for (int i = 0; i < size(); ++i) {
             QDomElement effect =  at(i);
@@ -81,7 +85,8 @@ QDomElement EffectsList::getEffectByTag(const QString & tag, const QString & id)
     return QDomElement();
 }
 
-int EffectsList::hasEffect(const QString & tag, const QString & id) const {
+int EffectsList::hasEffect(const QString & tag, const QString & id) const
+{
     for (int i = 0; i < size(); ++i) {
         QDomElement effect =  at(i);
         if (!id.isEmpty()) {
@@ -91,7 +96,8 @@ int EffectsList::hasEffect(const QString & tag, const QString & id) const {
     return -1;
 }
 
-QStringList EffectsList::effectIdInfo(const int ix) const {
+QStringList EffectsList::effectIdInfo(const int ix) const
+{
     QStringList info;
     QDomElement effect =  at(ix);
     QDomNode namenode = effect.elementsByTagName("name").item(0);
@@ -99,7 +105,8 @@ QStringList EffectsList::effectIdInfo(const int ix) const {
     return info;
 }
 
-QStringList EffectsList::effectNames() {
+QStringList EffectsList::effectNames()
+{
     QStringList list;
     for (int i = 0; i < size(); ++i) {
         QDomElement effect =  at(i);
@@ -109,7 +116,8 @@ QStringList EffectsList::effectNames() {
     return list;
 }
 
-QString EffectsList::getInfo(const QString & tag, const QString & id) const {
+QString EffectsList::getInfo(const QString & tag, const QString & id) const
+{
     QString info;
     QDomElement effect = getEffectByTag(tag, id);
     QDomNode namenode = effect.elementsByTagName("description").item(0);
@@ -119,7 +127,8 @@ QString EffectsList::getInfo(const QString & tag, const QString & id) const {
     return info;
 }
 
-QString EffectsList::getInfoFromIndex(const int ix) const {
+QString EffectsList::getInfoFromIndex(const int ix) const
+{
     QString info;
     QDomElement effect = at(ix);
     QDomNode namenode = effect.elementsByTagName("description").item(0);
@@ -129,7 +138,8 @@ QString EffectsList::getInfoFromIndex(const int ix) const {
     return info;
 }
 
-bool EffectsList::hasKeyFrames(QDomElement effect) {
+bool EffectsList::hasKeyFrames(QDomElement effect)
+{
     QDomNodeList params = effect.elementsByTagName("parameter");
     for (int i = 0; i < params.count(); i++) {
         QDomElement e = params.item(i).toElement();
@@ -138,7 +148,8 @@ bool EffectsList::hasKeyFrames(QDomElement effect) {
     return false;
 }
 
-EffectsList EffectsList::clone() const {
+EffectsList EffectsList::clone() const
+{
     EffectsList list;
     for (int i = 0; i < size(); ++i) {
         list.append(at(i).cloneNode().toElement());
@@ -147,7 +158,8 @@ EffectsList EffectsList::clone() const {
 }
 
 // static
-void EffectsList::setParameter(QDomElement effect, const QString &name, const QString &value) {
+void EffectsList::setParameter(QDomElement effect, const QString &name, const QString &value)
+{
     QDomNodeList params = effect.elementsByTagName("parameter");
     for (int i = 0; i < params.count(); i++) {
         QDomElement e = params.item(i).toElement();
@@ -159,7 +171,8 @@ void EffectsList::setParameter(QDomElement effect, const QString &name, const QS
 }
 
 // static
-QString EffectsList::parameter(QDomElement effect, const QString &name) {
+QString EffectsList::parameter(QDomElement effect, const QString &name)
+{
     QDomNodeList params = effect.elementsByTagName("parameter");
     for (int i = 0; i < params.count(); i++) {
         QDomElement e = params.item(i).toElement();
index 510c297a9303cb97e9bdbee1fdd890da97b81437..47ecae1eda17cda1584c8e96bacd5607b76ce7be 100644 (file)
@@ -28,7 +28,8 @@
   */
 
 
-class EffectsList: public QList < QDomElement > {
+class EffectsList: public QList < QDomElement >
+{
 public:
     EffectsList();
     ~EffectsList();
index bd839e7013c0441c05f37a126fc3a7a0e47e6eab..4cd5a22721adc64f4f5d95d4fd223d9ffc3d22ab 100644 (file)
@@ -31,7 +31,8 @@
 #include <QDir>
 
 EffectsListView::EffectsListView(QWidget *parent)
-        : QWidget(parent) {
+        : QWidget(parent)
+{
     ui.setupUi(this);
 
     QMenu *menu = new QMenu(this);
@@ -56,7 +57,8 @@ EffectsListView::EffectsListView(QWidget *parent)
 }
 
 
-void EffectsListView::filterList(int pos) {
+void EffectsListView::filterList(int pos)
+{
     QListWidgetItem *item;
     for (int i = 0; i < m_effectsList->count(); i++) {
         item = m_effectsList->item(i);
@@ -74,7 +76,8 @@ void EffectsListView::filterList(int pos) {
     }
 }
 
-void EffectsListView::showInfoPanel() {
+void EffectsListView::showInfoPanel()
+{
     if (ui.infopanel->isVisible()) {
         ui.infopanel->setVisible(false);
         ui.buttonInfo->setDown(false);
@@ -86,24 +89,29 @@ void EffectsListView::showInfoPanel() {
     }
 }
 
-void EffectsListView::slotEffectSelected() {
+void EffectsListView::slotEffectSelected()
+{
     QDomElement effect = m_effectsList->currentEffect().cloneNode().toElement();
     if (!effect.isNull()) emit addEffect(effect);
 }
 
-void EffectsListView::slotUpdateInfo() {
+void EffectsListView::slotUpdateInfo()
+{
     ui.infopanel->setText(m_effectsList->currentInfo());
 }
 
-KListWidget *EffectsListView::listView() {
+KListWidget *EffectsListView::listView()
+{
     return m_effectsList;
 }
 
-void EffectsListView::reloadEffectList() {
+void EffectsListView::reloadEffectList()
+{
     m_effectsList->initList();
 }
 
-void EffectsListView::slotRemoveEffect() {
+void EffectsListView::slotRemoveEffect()
+{
     QListWidgetItem *item = m_effectsList->currentItem();
     QString effectId = item->text();
     QString path = KStandardDirs::locateLocal("appdata", "effects/", true);
index 72c95cc08e75b98de909cdb5c1ad457a52ba4e69..303ae586682fdb71d83e328472f0ad2b4eadba39 100644 (file)
@@ -31,7 +31,8 @@ class EffectsList;
 class EffectsListWidget;
 class KListWidget;
 
-class EffectsListView : public QWidget {
+class EffectsListView : public QWidget
+{
     Q_OBJECT
 
 public:
index 94f840957be39afcc8f6ee8602233daca4ed8bf6..1f99f92465e2dbda628185f3ee7c0da82968bd7e 100644 (file)
@@ -37,7 +37,8 @@ const int TypeRole = Qt::UserRole;
 const int IdRole = TypeRole + 1;
 
 EffectsListWidget::EffectsListWidget(QMenu *menu, QWidget *parent)
-        : KListWidget(parent), m_menu(menu) {
+        : KListWidget(parent), m_menu(menu)
+{
     //setSelectionMode(QAbstractItemView::ExtendedSelection);
     //setDragDropMode(QAbstractItemView::DragDrop);
     setDropIndicatorShown(true);
@@ -48,10 +49,12 @@ EffectsListWidget::EffectsListWidget(QMenu *menu, QWidget *parent)
     initList();
 }
 
-EffectsListWidget::~EffectsListWidget() {
+EffectsListWidget::~EffectsListWidget()
+{
 }
 
-void EffectsListWidget::initList() {
+void EffectsListWidget::initList()
+{
     clear();
     QListWidgetItem *item;
     QString effectName;
@@ -89,11 +92,13 @@ void EffectsListWidget::initList() {
     }
 }
 
-QDomElement EffectsListWidget::currentEffect() {
+QDomElement EffectsListWidget::currentEffect()
+{
     return itemEffect(currentItem());
 }
 
-QDomElement EffectsListWidget::itemEffect(QListWidgetItem *item) {
+QDomElement EffectsListWidget::itemEffect(QListWidgetItem *item)
+{
     QDomElement effect;
     if (!item) return effect;
     QStringList effectInfo = item->data(IdRole).toStringList();
@@ -113,7 +118,8 @@ QDomElement EffectsListWidget::itemEffect(QListWidgetItem *item) {
 }
 
 
-QString EffectsListWidget::currentInfo() {
+QString EffectsListWidget::currentInfo()
+{
     QListWidgetItem *item = currentItem();
     if (!item) return QString();
     QString info;
@@ -133,7 +139,8 @@ QString EffectsListWidget::currentInfo() {
 }
 
 // virtual
-void EffectsListWidget::mousePressEvent(QMouseEvent *event) {
+void EffectsListWidget::mousePressEvent(QMouseEvent *event)
+{
     if (event->button() == Qt::LeftButton) {
         m_DragStartPosition = event->pos();
         m_dragStarted = true;
@@ -142,7 +149,8 @@ void EffectsListWidget::mousePressEvent(QMouseEvent *event) {
 }
 
 // virtual
-void EffectsListWidget::mouseMoveEvent(QMouseEvent *event) {
+void EffectsListWidget::mouseMoveEvent(QMouseEvent *event)
+{
     if (!m_dragStarted) return;
     if ((event->pos() - m_DragStartPosition).manhattanLength()
             < QApplication::startDragDistance())
@@ -172,7 +180,8 @@ void EffectsListWidget::mouseMoveEvent(QMouseEvent *event) {
     }
 }
 
-void EffectsListWidget::dragMoveEvent(QDragMoveEvent * event) {
+void EffectsListWidget::dragMoveEvent(QDragMoveEvent * event)
+{
     event->setDropAction(Qt::IgnoreAction);
     //if (item) {
     event->setDropAction(Qt::MoveAction);
@@ -183,7 +192,8 @@ void EffectsListWidget::dragMoveEvent(QDragMoveEvent * event) {
 }
 
 //virtual
-void EffectsListWidget::contextMenuEvent(QContextMenuEvent * event) {
+void EffectsListWidget::contextMenuEvent(QContextMenuEvent * event)
+{
     QListWidgetItem *item = itemAt(event->pos());
     if (item && item->data(TypeRole).toInt() == EFFECT_CUSTOM) m_menu->popup(event->globalPos());
 }
index 127e734690f176e575fe20ef028d5feae1081495..4a08845b8c69932d9508b0132aaa4b3ea746f33c 100644 (file)
@@ -26,7 +26,8 @@
 
 class EffectsList;
 
-class EffectsListWidget : public KListWidget {
+class EffectsListWidget : public KListWidget
+{
     Q_OBJECT
 
 public:
index 7196cd1d12f135cf35674f4dd0c199666ff10e20..29d737e7b07cda59a9b7bb87ee47bbf3583f3653 100644 (file)
@@ -38,7 +38,8 @@
 
 QMap<QString, QImage> EffectStackEdit::iconCache;
 
-EffectStackEdit::EffectStackEdit(QWidget *parent): QWidget(parent), m_in(0), m_out(0) {
+EffectStackEdit::EffectStackEdit(QWidget *parent): QWidget(parent), m_in(0), m_out(0)
+{
     setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding));
     QVBoxLayout *vbox1 = new QVBoxLayout(parent);
     vbox1->setContentsMargins(0, 0, 0, 0);
@@ -61,20 +62,24 @@ EffectStackEdit::EffectStackEdit(QWidget *parent): QWidget(parent), m_in(0), m_o
 
 }
 
-EffectStackEdit::~EffectStackEdit() {
+EffectStackEdit::~EffectStackEdit()
+{
     iconCache.clear();
 }
 
-void EffectStackEdit::updateProjectFormat(MltVideoProfile profile, Timecode t) {
+void EffectStackEdit::updateProjectFormat(MltVideoProfile profile, Timecode t)
+{
     m_profile = profile;
     m_timecode = t;
 }
 
-void EffectStackEdit::updateParameter(const QString &name, const QString &value) {
+void EffectStackEdit::updateParameter(const QString &name, const QString &value)
+{
     params.setAttribute(name, value);
 }
 
-void EffectStackEdit::transferParamDesc(const QDomElement& d, int in, int out) {
+void EffectStackEdit::transferParamDesc(const QDomElement& d, int in, int out)
+{
     kDebug() << "in";
     params = d;
     m_in = in;
@@ -273,11 +278,13 @@ void EffectStackEdit::transferParamDesc(const QDomElement& d, int in, int out) {
     vbox->addStretch();
 }
 
-void EffectStackEdit::slotSeekToPos(int pos) {
+void EffectStackEdit::slotSeekToPos(int pos)
+{
     emit seekTimeline(m_in + pos);
 }
 
-wipeInfo EffectStackEdit::getWipeInfo(QString value) {
+wipeInfo EffectStackEdit::getWipeInfo(QString value)
+{
     wipeInfo info;
     QString start = value.section(';', 0, 0);
     QString end = value.section(';', 1, 1).section('=', 1, 1);
@@ -299,7 +306,8 @@ wipeInfo EffectStackEdit::getWipeInfo(QString value) {
     return info;
 }
 
-QString EffectStackEdit::getWipeString(wipeInfo info) {
+QString EffectStackEdit::getWipeString(wipeInfo info)
+{
 
     QString start;
     QString end;
@@ -343,7 +351,8 @@ QString EffectStackEdit::getWipeString(wipeInfo info) {
     return QString(start + ";-1=" + end);
 }
 
-void EffectStackEdit::collectAllParameters() {
+void EffectStackEdit::collectAllParameters()
+{
     QDomElement oldparam = params.cloneNode().toElement();
     QDomNodeList namenode = params.elementsByTagName("parameter");
 
@@ -416,7 +425,8 @@ void EffectStackEdit::collectAllParameters() {
     emit parameterChanged(oldparam, params);
 }
 
-void EffectStackEdit::createSliderItem(const QString& name, int val , int min, int max) {
+void EffectStackEdit::createSliderItem(const QString& name, int val , int min, int max)
+{
     QWidget* toFillin = new QWidget;
     Ui::Constval_UI *ctval = new Ui::Constval_UI;
     ctval->setupUi(toFillin);
@@ -435,11 +445,13 @@ void EffectStackEdit::createSliderItem(const QString& name, int val , int min, i
     vbox->addWidget(toFillin);
 }
 
-void EffectStackEdit::slotSliderMoved(int) {
+void EffectStackEdit::slotSliderMoved(int)
+{
     collectAllParameters();
 }
 
-void EffectStackEdit::clearAllItems() {
+void EffectStackEdit::clearAllItems()
+{
     qDeleteAll(items);
     foreach(void *p, uiItems) {
         delete p;
index ab54990324c39f286ac4d1abdcd4c766e97b27de..97e0378861a68f66ee349ca6214841e1befceb0c 100644 (file)
@@ -38,7 +38,8 @@ struct wipeInfo {
 
 class QFrame;
 
-class EffectStackEdit : public QWidget {
+class EffectStackEdit : public QWidget
+{
     Q_OBJECT
 public:
     EffectStackEdit(QWidget *parent);
index f28ee882f96795f676667055d9b50e950a82e653..af4e3372eacbec432607ddc45a7a0b46d226457a 100644 (file)
@@ -34,7 +34,8 @@
 
 
 EffectStackView::EffectStackView(QWidget *parent)
-        : QWidget(parent) {
+        : QWidget(parent)
+{
     ui.setupUi(this);
     effectedit = new EffectStackEdit(ui.frame);
     //ui.effectlist->horizontalHeader()->setVisible(false);
@@ -74,15 +75,18 @@ EffectStackView::EffectStackView(QWidget *parent)
     setEnabled(false);
 }
 
-void EffectStackView::setMenu(QMenu *menu) {
+void EffectStackView::setMenu(QMenu *menu)
+{
     ui.buttonNew->setMenu(menu);
 }
 
-void EffectStackView::updateProjectFormat(MltVideoProfile profile, Timecode t) {
+void EffectStackView::updateProjectFormat(MltVideoProfile profile, Timecode t)
+{
     effectedit->updateProjectFormat(profile, t);
 }
 
-void EffectStackView::slotSaveEffect() {
+void EffectStackView::slotSaveEffect()
+{
     QString name = QInputDialog::getText(this, i18n("Save Effect"), i18n("Name for saved effect: "));
     if (name.isEmpty()) return;
     QString path = KStandardDirs::locateLocal("appdata", "effects/", true);
@@ -117,12 +121,14 @@ void EffectStackView::slotSaveEffect() {
     emit reloadEffects();
 }
 
-void EffectStackView::slotUpdateEffectParams(const QDomElement& old, const QDomElement& e) {
+void EffectStackView::slotUpdateEffectParams(const QDomElement& old, const QDomElement& e)
+{
     if (clipref)
         emit updateClipEffect(clipref, old, e, ui.effectlist->currentRow());
 }
 
-void EffectStackView::slotClipItemSelected(ClipItem* c, int ix) {
+void EffectStackView::slotClipItemSelected(ClipItem* c, int ix)
+{
     if (c && c == clipref) {
         if (ix == -1) ix = ui.effectlist->currentRow();
     } else {
@@ -140,7 +146,8 @@ void EffectStackView::slotClipItemSelected(ClipItem* c, int ix) {
     setupListView(ix);
 }
 
-void EffectStackView::slotItemChanged(QListWidgetItem *item) {
+void EffectStackView::slotItemChanged(QListWidgetItem *item)
+{
     bool disable = true;
     if (item->checkState() == Qt::Checked) disable = false;
     ui.buttonReset->setEnabled(!disable);
@@ -151,7 +158,8 @@ void EffectStackView::slotItemChanged(QListWidgetItem *item) {
 }
 
 
-void EffectStackView::setupListView(int ix) {
+void EffectStackView::setupListView(int ix)
+{
     ui.effectlist->clear();
 
     // Issue 238: Add icons for effect type in effectstack.
@@ -198,7 +206,8 @@ void EffectStackView::setupListView(int ix) {
     }
 }
 
-void EffectStackView::slotItemSelectionChanged() {
+void EffectStackView::slotItemSelectionChanged()
+{
     bool hasItem = ui.effectlist->currentItem();
     int activeRow = ui.effectlist->currentRow();
     bool isChecked = false;
@@ -214,26 +223,30 @@ void EffectStackView::slotItemSelectionChanged() {
     ui.buttonDown->setEnabled((activeRow < ui.effectlist->count() - 1) && hasItem);
 }
 
-void EffectStackView::slotItemUp() {
+void EffectStackView::slotItemUp()
+{
     int activeRow = ui.effectlist->currentRow();
     if (activeRow <= 0) return;
     emit changeEffectPosition(clipref, activeRow + 1, activeRow);
 }
 
-void EffectStackView::slotItemDown() {
+void EffectStackView::slotItemDown()
+{
     int activeRow = ui.effectlist->currentRow();
     if (activeRow >= ui.effectlist->count() - 1) return;
     emit changeEffectPosition(clipref, activeRow + 1, activeRow + 2);
 }
 
-void EffectStackView::slotItemDel() {
+void EffectStackView::slotItemDel()
+{
     int activeRow = ui.effectlist->currentRow();
     if (activeRow >= 0) {
         emit removeEffect(clipref, clipref->effectAt(activeRow));
     }
 }
 
-void EffectStackView::slotResetEffect() {
+void EffectStackView::slotResetEffect()
+{
     int activeRow = ui.effectlist->currentRow();
     if (activeRow < 0) return;
     QDomElement old = clipref->effectAt(activeRow).cloneNode().toElement();
@@ -254,12 +267,14 @@ void EffectStackView::slotResetEffect() {
 }
 
 
-void EffectStackView::raiseWindow(QWidget* dock) {
+void EffectStackView::raiseWindow(QWidget* dock)
+{
     if (clipref && dock)
         dock->raise();
 }
 
-void EffectStackView::clear() {
+void EffectStackView::clear()
+{
     ui.effectlist->clear();
     ui.buttonDel->setEnabled(false);
     ui.buttonSave->setEnabled(false);
index 5b11665606113b7fbaebaf9cc63478a724b62f6e..f4f8bfc0e7ad791566df6b08206d9457fb3e510b 100644 (file)
@@ -25,7 +25,8 @@ class EffectsList;
 class ClipItem;
 class MltVideoProfile;
 
-class EffectStackView : public QWidget {
+class EffectStackView : public QWidget
+{
     Q_OBJECT
 
 public:
index 4609a2c27b67eb9ec69e24717764478915c158c9..db7d9eb4be022743c95327c038c7318d8b7bc4bd 100644 (file)
@@ -22,7 +22,8 @@
 
 #include "gentime.h"
 
-class ProgressEvent : public QEvent {
+class ProgressEvent : public QEvent
+{
 public:
     ProgressEvent(int value, QEvent::Type eventType)
             : QEvent(eventType), m_val(value) {};
index 435cd7779f0c2107ddb5d62b2a607d79c38262f6..760d988885f0dc74b0b95e574fbfadbe861f3aef 100644 (file)
 double GenTime::s_delta = 0.00001;
 
 /** Creates a time object, with a time of 0 seconds. */
-GenTime::GenTime() {
+GenTime::GenTime()
+{
     m_time = 0.0;
 }
 
 /** Creates a time object, with time given in seconds. */
-GenTime::GenTime(double seconds) {
+GenTime::GenTime(double seconds)
+{
     m_time = seconds;
 }
 
 /** Creates a time object, by passing number of frames and how many frames per second */
-GenTime::GenTime(int frames, double framesPerSecond) {
+GenTime::GenTime(int frames, double framesPerSecond)
+{
     m_time = (double) frames / framesPerSecond;
 }
 
 /** Returns the time, in milliseconds */
-double GenTime::ms() const {
+double GenTime::ms() const
+{
     return m_time * 1000;
 }
 
 /** Returns the time in frames, after being given the number of frames per second */
-double GenTime::frames(double framesPerSecond) const {
+double GenTime::frames(double framesPerSecond) const
+{
     return floor(m_time * framesPerSecond + 0.5);
 }
 
-GenTime::~GenTime() {
+GenTime::~GenTime()
+{
 }
index 1c6ff00626b9f4151f8cb89601be1166e31b1a8f..6a4354b411115e463f2655be0ac5edd437abcc29 100644 (file)
@@ -24,7 +24,8 @@
   *@author Jason Wood
   */
 
-class GenTime {
+class GenTime
+{
 public:
     /** Creates a time object, with a time of 0 seconds. */
     GenTime();
index 62584209f6b4f1130d83eb77df2939a07cfb4c34..24df95032d5cb7e84b9cfee374054dc794a4e23e 100644 (file)
@@ -27,7 +27,8 @@
 #include <QMenu>
 
 
-Geometryval::Geometryval(const MltVideoProfile profile, QWidget* parent): QWidget(parent), m_profile(profile), m_geom(NULL), m_path(NULL), paramRect(NULL), m_fixedMode(false) {
+Geometryval::Geometryval(const MltVideoProfile profile, QWidget* parent): QWidget(parent), m_profile(profile), m_geom(NULL), m_path(NULL), paramRect(NULL), m_fixedMode(false)
+{
     ui.setupUi(this);
     QVBoxLayout* vbox = new QVBoxLayout(ui.widget);
     QGraphicsView *view = new QGraphicsView(this);
@@ -102,7 +103,8 @@ Geometryval::Geometryval(const MltVideoProfile profile, QWidget* parent): QWidge
     connect(scene, SIGNAL(actionFinished()), this, SLOT(slotUpdateTransitionProperties()));
 }
 
-void Geometryval::slotAlignCenter() {
+void Geometryval::slotAlignCenter()
+{
     int pos = ui.spinPos->value();
     Mlt::GeometryItem item;
     int error = m_geom->fetch(&item, pos);
@@ -114,7 +116,8 @@ void Geometryval::slotAlignCenter() {
     slotUpdateTransitionProperties();
 }
 
-void Geometryval::slotAlignHCenter() {
+void Geometryval::slotAlignHCenter()
+{
     int pos = ui.spinPos->value();
     Mlt::GeometryItem item;
     int error = m_geom->fetch(&item, pos);
@@ -126,7 +129,8 @@ void Geometryval::slotAlignHCenter() {
     slotUpdateTransitionProperties();
 }
 
-void Geometryval::slotAlignVCenter() {
+void Geometryval::slotAlignVCenter()
+{
     int pos = ui.spinPos->value();
     Mlt::GeometryItem item;
     int error = m_geom->fetch(&item, pos);
@@ -138,7 +142,8 @@ void Geometryval::slotAlignVCenter() {
     slotUpdateTransitionProperties();
 }
 
-void Geometryval::slotAlignTop() {
+void Geometryval::slotAlignTop()
+{
     int pos = ui.spinPos->value();
     Mlt::GeometryItem item;
     int error = m_geom->fetch(&item, pos);
@@ -150,7 +155,8 @@ void Geometryval::slotAlignTop() {
     slotUpdateTransitionProperties();
 }
 
-void Geometryval::slotAlignBottom() {
+void Geometryval::slotAlignBottom()
+{
     int pos = ui.spinPos->value();
     Mlt::GeometryItem item;
     int error = m_geom->fetch(&item, pos);
@@ -162,7 +168,8 @@ void Geometryval::slotAlignBottom() {
     slotUpdateTransitionProperties();
 }
 
-void Geometryval::slotAlignLeft() {
+void Geometryval::slotAlignLeft()
+{
     int pos = ui.spinPos->value();
     Mlt::GeometryItem item;
     int error = m_geom->fetch(&item, pos);
@@ -174,7 +181,8 @@ void Geometryval::slotAlignLeft() {
     slotUpdateTransitionProperties();
 }
 
-void Geometryval::slotAlignRight() {
+void Geometryval::slotAlignRight()
+{
     int pos = ui.spinPos->value();
     Mlt::GeometryItem item;
     int error = m_geom->fetch(&item, pos);
@@ -186,7 +194,8 @@ void Geometryval::slotAlignRight() {
     slotUpdateTransitionProperties();
 }
 
-void Geometryval::slotResize50() {
+void Geometryval::slotResize50()
+{
     int pos = ui.spinPos->value();
     Mlt::GeometryItem item;
     int error = m_geom->fetch(&item, pos);
@@ -198,7 +207,8 @@ void Geometryval::slotResize50() {
     slotUpdateTransitionProperties();
 }
 
-void Geometryval::slotResize100() {
+void Geometryval::slotResize100()
+{
     int pos = ui.spinPos->value();
     Mlt::GeometryItem item;
     int error = m_geom->fetch(&item, pos);
@@ -210,7 +220,8 @@ void Geometryval::slotResize100() {
     slotUpdateTransitionProperties();
 }
 
-void Geometryval::slotResize200() {
+void Geometryval::slotResize200()
+{
     int pos = ui.spinPos->value();
     Mlt::GeometryItem item;
     int error = m_geom->fetch(&item, pos);
@@ -222,7 +233,8 @@ void Geometryval::slotResize200() {
     slotUpdateTransitionProperties();
 }
 
-void Geometryval::slotTransparencyChanged(int transp) {
+void Geometryval::slotTransparencyChanged(int transp)
+{
     int pos = ui.spinPos->value();
     Mlt::GeometryItem item;
     int error = m_geom->fetch(&item, pos);
@@ -236,11 +248,13 @@ void Geometryval::slotTransparencyChanged(int transp) {
     emit parameterChanged();
 }
 
-void Geometryval::slotSyncCursor() {
+void Geometryval::slotSyncCursor()
+{
     KdenliveSettings::setTransitionfollowcursor(m_syncAction->isChecked());
 }
 
-void Geometryval::slotPositionChanged(int pos, bool seek) {
+void Geometryval::slotPositionChanged(int pos, bool seek)
+{
     if (seek && KdenliveSettings::transitionfollowcursor()) emit seekToPos(pos);
     ui.spinPos->setValue(pos);
     m_helper->setValue(pos);
@@ -268,7 +282,8 @@ void Geometryval::slotPositionChanged(int pos, bool seek) {
     paramRect->setBrush(QColor(255, 0, 0, item.mix()));
 }
 
-void Geometryval::slotDeleteFrame() {
+void Geometryval::slotDeleteFrame()
+{
     // check there is more than one keyframe
     Mlt::GeometryItem item;
     const int pos = ui.spinPos->value();
@@ -291,7 +306,8 @@ void Geometryval::slotDeleteFrame() {
     emit parameterChanged();
 }
 
-void Geometryval::slotAddFrame() {
+void Geometryval::slotAddFrame()
+{
     int pos = ui.spinPos->value();
     Mlt::GeometryItem item;
     item.frame(pos);
@@ -311,7 +327,8 @@ void Geometryval::slotAddFrame() {
     emit parameterChanged();
 }
 
-void Geometryval::slotNextFrame() {
+void Geometryval::slotNextFrame()
+{
     Mlt::GeometryItem item;
     int error = m_geom->next_key(&item, m_helper->value() + 1);
     kDebug() << "// SEEK TO NEXT KFR: " << error;
@@ -324,7 +341,8 @@ void Geometryval::slotNextFrame() {
     ui.spinPos->setValue(pos);
 }
 
-void Geometryval::slotPreviousFrame() {
+void Geometryval::slotPreviousFrame()
+{
     Mlt::GeometryItem item;
     int error = m_geom->prev_key(&item, m_helper->value() - 1);
     kDebug() << "// SEEK TO NEXT KFR: " << error;
@@ -334,13 +352,15 @@ void Geometryval::slotPreviousFrame() {
 }
 
 
-QDomElement Geometryval::getParamDesc() {
+QDomElement Geometryval::getParamDesc()
+{
     param.setAttribute("value", m_geom->serialise());
     kDebug() << " / / UPDATING TRANSITION VALUE: " << param.attribute("value");
     return param;
 }
 
-void Geometryval::setupParam(const QDomElement& par, int minFrame, int maxFrame) {
+void Geometryval::setupParam(const QDomElement& par, int minFrame, int maxFrame)
+{
     param = par;
     QString val = par.attribute("value");
     if (par.attribute("fixed") == "1") {
@@ -392,7 +412,8 @@ void Geometryval::setupParam(const QDomElement& par, int minFrame, int maxFrame)
     connect(ui.spinTransp, SIGNAL(valueChanged(int)), this , SLOT(slotTransparencyChanged(int)));
 }
 
-void Geometryval::updateTransitionPath() {
+void Geometryval::updateTransitionPath()
+{
     if (m_fixedMode) return;
     Mlt::GeometryItem item;
     int pos = 0;
@@ -412,7 +433,8 @@ void Geometryval::updateTransitionPath() {
     m_path->setPath(path);
 }
 
-void Geometryval::slotUpdateTransitionProperties() {
+void Geometryval::slotUpdateTransitionProperties()
+{
     int pos = ui.spinPos->value();
     Mlt::GeometryItem item;
     int error = m_geom->next_key(&item, pos);
index aae18c52131d6adecd0d07cffecaf56046ebf102..cb7d98462aed67fa032d081cad41e7c56e49a3d3 100644 (file)
@@ -35,7 +35,8 @@ class QGraphicsRectItem;
 class QMouseEvent;
 
 
-class Geometryval : public QWidget {
+class Geometryval : public QWidget
+{
     Q_OBJECT
 public:
     explicit Geometryval(const MltVideoProfile profile, QWidget* parent = 0);
index 78e7e8548d8f8a27c4fb2930cf71c177e4ac2cd4..b63ace1ce420dabd7e5dfccea38fb25652e56cf1 100644 (file)
 #include <QTextBlock>
 
 
-GraphicsSceneRectMove::GraphicsSceneRectMove(QObject *parent): QGraphicsScene(parent), m_selectedItem(NULL), resizeMode(NoResize), m_tool(TITLE_RECTANGLE) {
+GraphicsSceneRectMove::GraphicsSceneRectMove(QObject *parent): QGraphicsScene(parent), m_selectedItem(NULL), resizeMode(NoResize), m_tool(TITLE_RECTANGLE)
+{
     //grabMouse();
     zoom = 1.0;
     setBackgroundBrush(QBrush(Qt::transparent));
 }
 
-void GraphicsSceneRectMove::setSelectedItem(QGraphicsItem *item) {
+void GraphicsSceneRectMove::setSelectedItem(QGraphicsItem *item)
+{
     clearSelection();
     m_selectedItem = item;
     item->setSelected(true);
     update();
 }
 
-TITLETOOL GraphicsSceneRectMove::tool() {
+TITLETOOL GraphicsSceneRectMove::tool()
+{
     return m_tool;
 }
 
-void GraphicsSceneRectMove::setTool(TITLETOOL tool) {
+void GraphicsSceneRectMove::setTool(TITLETOOL tool)
+{
     m_tool = tool;
     switch (m_tool) {
     case TITLE_RECTANGLE:
@@ -65,7 +69,8 @@ void GraphicsSceneRectMove::setTool(TITLETOOL tool) {
 }
 
 //virtual
-void GraphicsSceneRectMove::keyPressEvent(QKeyEvent * keyEvent) {
+void GraphicsSceneRectMove::keyPressEvent(QKeyEvent * keyEvent)
+{
     if (m_selectedItem == NULL) {
         QGraphicsScene::keyPressEvent(keyEvent);
         return;
@@ -109,7 +114,8 @@ void GraphicsSceneRectMove::keyPressEvent(QKeyEvent * keyEvent) {
 }
 
 //virtual
-void GraphicsSceneRectMove::mouseDoubleClickEvent(QGraphicsSceneMouseEvent* e) {
+void GraphicsSceneRectMove::mouseDoubleClickEvent(QGraphicsSceneMouseEvent* e)
+{
     QPointF p = e->scenePos();
     p += QPoint(-2, -2);
     resizeMode = NoResize;
@@ -125,13 +131,15 @@ void GraphicsSceneRectMove::mouseDoubleClickEvent(QGraphicsSceneMouseEvent* e) {
     QGraphicsScene::mouseDoubleClickEvent(e);
 }
 
-void GraphicsSceneRectMove::mouseReleaseEvent(QGraphicsSceneMouseEvent *e) {
+void GraphicsSceneRectMove::mouseReleaseEvent(QGraphicsSceneMouseEvent *e)
+{
     if (m_tool == TITLE_RECTANGLE && m_selectedItem) setSelectedItem(m_selectedItem);
     QGraphicsScene::mouseReleaseEvent(e);
     emit actionFinished();
 }
 
-void GraphicsSceneRectMove::mousePressEvent(QGraphicsSceneMouseEvent* e) {
+void GraphicsSceneRectMove::mousePressEvent(QGraphicsSceneMouseEvent* e)
+{
     m_clickPoint = e->screenPos();
     QPointF p = e->scenePos();
     p += QPoint(-2, -2);
@@ -222,7 +230,8 @@ void GraphicsSceneRectMove::mousePressEvent(QGraphicsSceneMouseEvent* e) {
 
 }
 
-void GraphicsSceneRectMove::clearTextSelection() {
+void GraphicsSceneRectMove::clearTextSelection()
+{
     if (m_selectedItem && m_selectedItem->type() == 8) {
         // disable text editing
         QGraphicsTextItem *t = static_cast<QGraphicsTextItem *>(m_selectedItem);
@@ -236,7 +245,8 @@ void GraphicsSceneRectMove::clearTextSelection() {
 }
 
 //virtual
-void GraphicsSceneRectMove::mouseMoveEvent(QGraphicsSceneMouseEvent* e) {
+void GraphicsSceneRectMove::mouseMoveEvent(QGraphicsSceneMouseEvent* e)
+{
     if ((e->screenPos() - m_clickPoint).manhattanLength() < QApplication::startDragDistance()) {
         e->accept();
         return;
@@ -362,7 +372,8 @@ void GraphicsSceneRectMove::mouseMoveEvent(QGraphicsSceneMouseEvent* e) {
     }
 }
 
-void GraphicsSceneRectMove::wheelEvent(QGraphicsSceneWheelEvent * wheelEvent) {
+void GraphicsSceneRectMove::wheelEvent(QGraphicsSceneWheelEvent * wheelEvent)
+{
     QList<QGraphicsView*> viewlist = views();
     //kDebug() << wheelEvent->delta() << " " << zoom;
     if (viewlist.size() > 0) {
@@ -371,7 +382,8 @@ void GraphicsSceneRectMove::wheelEvent(QGraphicsSceneWheelEvent * wheelEvent) {
     }
 }
 
-void GraphicsSceneRectMove::setScale(double s) {
+void GraphicsSceneRectMove::setScale(double s)
+{
     if (zoom < 1.0 / 7.0 && s < 1.0) return;
     else if (zoom > 10.0 / 7.9 && s > 1.0) return;
     QList<QGraphicsView*> viewlist = views();
@@ -382,7 +394,8 @@ void GraphicsSceneRectMove::setScale(double s) {
     //kDebug()<<"//////////  ZOOM: "<<zoom;
 }
 
-void GraphicsSceneRectMove::setZoom(double s) {
+void GraphicsSceneRectMove::setZoom(double s)
+{
     QList<QGraphicsView*> viewlist = views();
     if (viewlist.size() > 0) {
         viewlist[0]->resetTransform();
@@ -393,7 +406,8 @@ void GraphicsSceneRectMove::setZoom(double s) {
     //kDebug()<<"//////////  ZOOM: "<<zoom;
 }
 
-void GraphicsSceneRectMove::setCursor(QCursor c) {
+void GraphicsSceneRectMove::setCursor(QCursor c)
+{
     const QList<QGraphicsView*> l = views();
     foreach(QGraphicsView* v, l) {
         v->setCursor(c);
index c6021122e8cb21a9440da58d5591dc60517dd33f..0702446e700c8d79fcb23cdf8b640bc581e9542a 100644 (file)
@@ -26,7 +26,8 @@
 enum resizeModes {NoResize, TopLeft, BottomLeft, TopRight, BottomRight, Left, Right, Up, Down};
 enum TITLETOOL { TITLE_SELECT = 0, TITLE_RECTANGLE = 1, TITLE_TEXT = 2, TITLE_IMAGE = 3 };
 
-class GraphicsSceneRectMove: public QGraphicsScene {
+class GraphicsSceneRectMove: public QGraphicsScene
+{
     Q_OBJECT
 public:
     GraphicsSceneRectMove(QObject* parent = 0);
index 3156855115f247409db16e76402ef16dfb18c250..66e565d554104a4d40d63fe615597691d23b345f 100644 (file)
 
 #include <KLocale>
 
-GroupClipsCommand::GroupClipsCommand(CustomTrackView *view, const QList <ItemInfo> clipInfos, const QList <ItemInfo> transitionInfos, bool group, bool doIt, QUndoCommand * parent) : QUndoCommand(parent), m_view(view), m_clips(clipInfos), m_transitions(transitionInfos), m_group(group), m_doIt(doIt) {
+GroupClipsCommand::GroupClipsCommand(CustomTrackView *view, const QList <ItemInfo> clipInfos, const QList <ItemInfo> transitionInfos, bool group, bool doIt, QUndoCommand * parent) : QUndoCommand(parent), m_view(view), m_clips(clipInfos), m_transitions(transitionInfos), m_group(group), m_doIt(doIt)
+{
     if (m_group) setText(i18n("Group clips"));
     else setText(i18n("Ungroup clips"));
 }
 
 
 // virtual
-void GroupClipsCommand::undo() {
+void GroupClipsCommand::undo()
+{
 // kDebug()<<"----  undoing action";
     m_doIt = true;
     m_view->doGroupClips(m_clips, m_transitions, !m_group);
 }
 // virtual
-void GroupClipsCommand::redo() {
+void GroupClipsCommand::redo()
+{
     kDebug() << "----  redoing action";
     if (m_doIt)
         m_view->doGroupClips(m_clips, m_transitions, m_group);
index 71609c92f1316b7a0e3472e12213fb383ed2730e..5595a9b541296b56f6519f01f529734539d50235 100644 (file)
@@ -31,7 +31,8 @@
 class GenTime;
 class CustomTrackView;
 
-class GroupClipsCommand : public QUndoCommand {
+class GroupClipsCommand : public QUndoCommand
+{
 public:
     GroupClipsCommand(CustomTrackView *view, const QList <ItemInfo> clipInfos, const QList <ItemInfo> transitionInfos, bool group, bool doIt, QUndoCommand * parent = 0);
     virtual void undo();
index 79b62045c2d35b82c7fee17ce4489bafa9266024..80ade91236291d912fcf14e9eb545a6e74043f94 100644 (file)
@@ -28,7 +28,8 @@
 #include <QBrush>
 
 Guide::Guide(CustomTrackView *view, GenTime pos, QString label, double fps, double height)
-        : QGraphicsLineItem(), m_view(view), m_position(pos), m_label(label), m_fps(fps) {
+        : QGraphicsLineItem(), m_view(view), m_position(pos), m_label(label), m_fps(fps)
+{
     setFlags(QGraphicsItem::ItemIsMovable);
     setToolTip(label);
     setLine(0, 0, 0, height);
@@ -41,19 +42,23 @@ Guide::Guide(CustomTrackView *view, GenTime pos, QString label, double fps, doub
     prepareGeometryChange();
 }
 
-QString Guide::label() const {
+QString Guide::label() const
+{
     return m_label;
 }
 
-GenTime Guide::position() const {
+GenTime Guide::position() const
+{
     return m_position;
 }
 
-CommentedTime Guide::info() const {
+CommentedTime Guide::info() const
+{
     return CommentedTime(m_position, m_label);
 }
 
-void Guide::updateGuide(const GenTime newPos, const QString &comment) {
+void Guide::updateGuide(const GenTime newPos, const QString &comment)
+{
     m_position = newPos;
     setPos(m_position.frames(m_fps), 0);
     if (!comment.isEmpty()) {
@@ -66,22 +71,26 @@ void Guide::updateGuide(const GenTime newPos, const QString &comment) {
 }
 
 //virtual
-int Guide::type() const {
+int Guide::type() const
+{
     return GUIDEITEM;
 }
 
 //virtual
-void Guide::hoverEnterEvent(QGraphicsSceneHoverEvent *) {
+void Guide::hoverEnterEvent(QGraphicsSceneHoverEvent *)
+{
     setPen(QPen(QBrush(QColor(200, 0, 0, 180)), 2));
 }
 
 //virtual
-void Guide::hoverLeaveEvent(QGraphicsSceneHoverEvent *) {
+void Guide::hoverLeaveEvent(QGraphicsSceneHoverEvent *)
+{
     setPen(QPen(QBrush(QColor(0, 0, 200, 180)), 2));
 }
 
 //virtual
-QVariant Guide::itemChange(GraphicsItemChange change, const QVariant &value) {
+QVariant Guide::itemChange(GraphicsItemChange change, const QVariant &value)
+{
     if (change == ItemPositionChange && scene()) {
         // value is the new position.
         QPointF newPos = value.toPointF();
@@ -93,7 +102,8 @@ QVariant Guide::itemChange(GraphicsItemChange change, const QVariant &value) {
 }
 
 // virtual
-QRectF Guide::boundingRect() const {
+QRectF Guide::boundingRect() const
+{
     if (KdenliveSettings::showmarkers()) {
         QRectF rect = QGraphicsLineItem::boundingRect();
         rect.setLeft(line().x1());
@@ -103,7 +113,8 @@ QRectF Guide::boundingRect() const {
 }
 
 // virtual
-void Guide::paint(QPainter *painter, const QStyleOptionGraphicsItem */*option*/, QWidget */*w*/) {
+void Guide::paint(QPainter *painter, const QStyleOptionGraphicsItem */*option*/, QWidget */*w*/)
+{
     painter->setMatrixEnabled(false);
     QLineF guideline = painter->matrix().map(line());
     painter->setPen(pen());
index b11693146b40e2fb7fe82050c0ddd6e2ccf209cb..e777e00194e09f16b448182761285e23eb756e3a 100644 (file)
@@ -29,7 +29,8 @@
 
 class CustomTrackView;
 
-class Guide : public QGraphicsLineItem {
+class Guide : public QGraphicsLineItem
+{
 
 public:
     Guide(CustomTrackView *view, GenTime pos, QString label, double fps, double height);
index 0b2f8b8f9994449b7a3e58257cb565d28dae1b52..6472c1b3986749f47e8041d7a6c7914aa3a09a10 100644 (file)
@@ -31,7 +31,8 @@
 #include <QAction>
 
 HeaderTrack::HeaderTrack(int index, TrackInfo info, QWidget *parent)
-        : QWidget(parent), m_index(index), m_type(info.type) {
+        : QWidget(parent), m_index(index), m_type(info.type)
+{
     setFixedHeight(KdenliveSettings::trackheight());
     view.setupUi(this);
     view.track_number->setText(QString::number(m_index));
@@ -75,11 +76,13 @@ HeaderTrack::HeaderTrack(int index, TrackInfo info, QWidget *parent)
     connect(changeAction, SIGNAL(triggered()), this, SLOT(slotChangeTrack()));
 }
 
-HeaderTrack::~HeaderTrack() {
+HeaderTrack::~HeaderTrack()
+{
     if (m_contextMenu) delete m_contextMenu;
 }
 
-void HeaderTrack::switchVideo() {
+void HeaderTrack::switchVideo()
+{
     if (view.buttonVideo->isChecked()) {
         view.buttonVideo->setIcon(KIcon("kdenlive-show-video"));
     } else {
@@ -88,7 +91,8 @@ void HeaderTrack::switchVideo() {
     emit switchTrackVideo(m_index);
 }
 
-void HeaderTrack::switchAudio() {
+void HeaderTrack::switchAudio()
+{
     if (view.buttonAudio->isChecked()) {
         view.buttonAudio->setIcon(KIcon("kdenlive-show-audio"));
     } else {
@@ -97,7 +101,8 @@ void HeaderTrack::switchAudio() {
     emit switchTrackAudio(m_index);
 }
 
-void HeaderTrack::switchLock(bool emitSignal) {
+void HeaderTrack::switchLock(bool emitSignal)
+{
     if (view.buttonLock->isChecked()) {
         view.buttonLock->setIcon(KIcon("kdenlive-lock"));
     } else {
@@ -107,25 +112,30 @@ void HeaderTrack::switchLock(bool emitSignal) {
 }
 
 
-void HeaderTrack::setLock(bool lock) {
+void HeaderTrack::setLock(bool lock)
+{
     view.buttonLock->setChecked(lock);
     switchLock(false);
 }
 
-void HeaderTrack::slotDeleteTrack() {
+void HeaderTrack::slotDeleteTrack()
+{
     emit deleteTrack(m_index);
 }
 
-void HeaderTrack::slotAddTrack() {
+void HeaderTrack::slotAddTrack()
+{
     emit insertTrack(m_index);
 }
 
-void HeaderTrack::slotChangeTrack() {
+void HeaderTrack::slotChangeTrack()
+{
     emit changeTrack(m_index);
 }
 
 // virtual
-void HeaderTrack::contextMenuEvent(QContextMenuEvent * event) {
+void HeaderTrack::contextMenuEvent(QContextMenuEvent * event)
+{
     m_contextMenu->popup(event->globalPos());
 }
 
index 4950051efca68b1e14e9db6625f366569c053497..2e1fd4538b6500308ef1617b4c316504b4b4fdaf 100644 (file)
@@ -26,7 +26,8 @@
 #include "definitions.h"
 #include "ui_trackheader_ui.h"
 
-class HeaderTrack : public QWidget {
+class HeaderTrack : public QWidget
+{
     Q_OBJECT
 
 public:
index f4d798d18777e1a1004bbbe0bdafe4bb03a8117f..3e4c6557dabddd6a91c96f751034a30690b85799 100644 (file)
 #include <QDir>
 #include <QIcon>
 
-initEffectsThumbnailer::initEffectsThumbnailer() {
+initEffectsThumbnailer::initEffectsThumbnailer()
+{
 
 }
 
-void initEffectsThumbnailer::prepareThumbnailsCall(const QStringList& list) {
+void initEffectsThumbnailer::prepareThumbnailsCall(const QStringList& list)
+{
     m_list = list;
     start();
     kDebug() << "done";
 }
 
-void initEffectsThumbnailer::run() {
+void initEffectsThumbnailer::run()
+{
     foreach(const QString &entry, m_list) {
         kDebug() << entry;
         if (!entry.isEmpty() && (entry.endsWith(".png") || entry.endsWith(".pgm"))) {
@@ -58,16 +61,19 @@ void initEffectsThumbnailer::run() {
 
 initEffectsThumbnailer initEffects::thumbnailer;
 
-initEffects::initEffects() {
+initEffects::initEffects()
+{
 
 }
 
-initEffects::~initEffects() {
+initEffects::~initEffects()
+{
 }
 
 
 // static
-void initEffects::refreshLumas() {
+void initEffects::refreshLumas()
+{
 
     // Check for Kdenlive installed luma files, add empty string at start for no luma
     QStringList imagenamelist = QStringList() << i18n("None");
@@ -108,7 +114,8 @@ void initEffects::refreshLumas() {
 }
 
 //static
-Mlt::Repository *initEffects::parseEffectFiles() {
+Mlt::Repository *initEffects::parseEffectFiles()
+{
     QStringList::Iterator more;
     QStringList::Iterator it;
     QStringList fileList;
@@ -216,7 +223,8 @@ Mlt::Repository *initEffects::parseEffectFiles() {
 }
 
 // static
-void initEffects::parseCustomEffectsFile() {
+void initEffects::parseCustomEffectsFile()
+{
     MainWindow::customEffects.clear();
     QString path = KStandardDirs::locateLocal("appdata", "effects/", true);
     QDir directory = QDir(path);
@@ -241,7 +249,8 @@ void initEffects::parseCustomEffectsFile() {
 }
 
 // static
-void initEffects::parseEffectFile(EffectsList *customEffectList, EffectsList *audioEffectList, EffectsList *videoEffectList, QString name, QStringList filtersList, QStringList producersList) {
+void initEffects::parseEffectFile(EffectsList *customEffectList, EffectsList *audioEffectList, EffectsList *videoEffectList, QString name, QStringList filtersList, QStringList producersList)
+{
     QDomDocument doc;
     QFile file(name);
     doc.setContent(&file, false);
@@ -351,7 +360,8 @@ void initEffects::parseEffectFile(EffectsList *customEffectList, EffectsList *au
 }
 
 //static
-const char* initEffects::ladspaEffectString(int ladspaId, QStringList params) {
+const char* initEffects::ladspaEffectString(int ladspaId, QStringList params)
+{
     if (ladspaId == 1433)  //Pitch
         return ladspaPitchEffectString(params);
     else if (ladspaId == 1216)  //Room Reverb
@@ -367,7 +377,8 @@ const char* initEffects::ladspaEffectString(int ladspaId, QStringList params) {
 }
 
 //static
-void initEffects::ladspaEffectFile(const QString & fname, int ladspaId, QStringList params) {
+void initEffects::ladspaEffectFile(const QString & fname, int ladspaId, QStringList params)
+{
     const char *filterString;
     switch (ladspaId) {
     case 1433: //Pitch
@@ -418,7 +429,8 @@ void initEffects::ladspaEffectFile(const QString & fname, int ladspaId, QStringL
 const QString jackString = "<?xml version=\"1.0\"?><!DOCTYPE jackrack SYSTEM \"http://purge.bash.sh/~rah/jack_rack_1.2.dtd\"><jackrack><channels>2</channels><samplerate>48000</samplerate><plugin><id>";
 
 
-const char* initEffects::ladspaDeclipEffectString(QStringList) {
+const char* initEffects::ladspaDeclipEffectString(QStringList)
+{
     return qstrdup(QString(jackString + "1195</id><enabled>true</enabled><wet_dry_enabled>false</wet_dry_enabled><wet_dry_locked>true</wet_dry_locked><wet_dry_values><value>1.000000</value><value>1.000000</value></wet_dry_values><lockall>true</lockall></plugin></jackrack>").toUtf8());
 }
 
@@ -428,44 +440,54 @@ const char* initEffects::ladspaVocoderEffectString(QStringList params)
  return qstrdup( QString(jackString + "1441</id><enabled>true</enabled><wet_dry_enabled>false</wet_dry_enabled><wet_dry_locked>true</wet_dry_locked><wet_dry_values><value>1.000000</value><value>1.000000</value></wet_dry_values><lockall>true</lockall><controlrow><lock>true</lock><value>0.000000</value><value>0.000000</value></controlrow><controlrow><lock>true</lock><value>%1</value><value>%1</value></controlrow><controlrow><lock>true</lock><value>%1</value><value>%1</value></controlrow><controlrow><lock>true</lock><value>%1</value><value>%1</value></controlrow><controlrow><lock>true</lock><value>%1</value><value>%1</value></controlrow><controlrow><lock>true</lock><value>%2</value><value>%2</value></controlrow><controlrow><lock>true</lock><value>%2</value><value>%2</value></controlrow><controlrow><lock>true</lock><value>%2</value><value>%2</value></controlrow><controlrow><lock>true</lock><value>%2</value><value>%2</value></controlrow><controlrow><lock>true</lock><value>%3</value><value>%3</value></controlrow><controlrow><lock>true</lock><value>%3</value><value>%3</value></controlrow><controlrow><lock>true</lock><value>%3</value><value>%3</value></controlrow><controlrow><lock>true</lock><value>%3</value><value>%3</value></controlrow><controlrow><lock>true</lock><value>%4</value><value>%4</value></controlrow><controlrow><lock>true</lock><value>%4</value><value>%4</value></controlrow><controlrow><lock>true</lock><value>%4</value><value>%4</value></controlrow><controlrow><lock>true</lock><value>%4</value><value>%4</value></controlrow></plugin></jackrack>").arg(params[0]).arg(params[1]).arg(params[2]).arg(params[3]));
 }*/
 
-const char* initEffects::ladspaVinylEffectString(QStringList params) {
+const char* initEffects::ladspaVinylEffectString(QStringList params)
+{
     return qstrdup(QString(jackString + "1905</id><enabled>true</enabled><wet_dry_enabled>false</wet_dry_enabled><wet_dry_locked>true</wet_dry_locked><wet_dry_values><value>1.000000</value><value>1.000000</value></wet_dry_values><controlrow><value>%1</value></controlrow><controlrow><value>%2</value></controlrow><controlrow><value>%3</value></controlrow><controlrow><value>%4</value></controlrow><controlrow><value>%5</value></controlrow></plugin></jackrack>").arg(params[0]).arg(params[1]).arg(params[2]).arg(params[3]).arg(params[4]).toUtf8());
 }
 
-const char* initEffects::ladspaPitchEffectString(QStringList params) {
+const char* initEffects::ladspaPitchEffectString(QStringList params)
+{
     return qstrdup(QString(jackString + "1433</id><enabled>true</enabled><wet_dry_enabled>false</wet_dry_enabled><wet_dry_locked>true</wet_dry_locked><wet_dry_values><value>1.0</value><value>1.0</value></wet_dry_values><lockall>true</lockall><controlrow><lock>true</lock><value>%1</value><value>%1</value></controlrow><controlrow><lock>true</lock><value>4.000000</value><value>4.000000</value></controlrow></plugin></jackrack>").arg(params[0]).toUtf8());
 }
 
-const char* initEffects::ladspaRoomReverbEffectString(QStringList params) {
+const char* initEffects::ladspaRoomReverbEffectString(QStringList params)
+{
     return qstrdup(QString(jackString + "1216</id><enabled>true</enabled><wet_dry_enabled>false</wet_dry_enabled><wet_dry_locked>true</wet_dry_locked><wet_dry_values><value>1.000000</value><value>1.000000</value></wet_dry_values><lockall>true</lockall><controlrow><lock>true</lock><value>%1</value><value>%1</value></controlrow><controlrow><lock>true</lock><value>%2</value><value>%2</value></controlrow><controlrow><lock>true</lock><value>%3</value><value>%3</value></controlrow><controlrow><lock>true</lock><value>0.750000</value><value>0.750000</value></controlrow><controlrow><lock>true</lock><value>-70.000000</value><value>-70.000000</value></controlrow><controlrow><lock>true</lock><value>0.000000</value><value>0.000000</value></controlrow><controlrow><lock>true</lock><value>-17.500000</value><value>-17.500000</value></controlrow></plugin></jackrack>").arg(params[0]).arg(params[1]).arg(params[2]).toUtf8());
 }
 
-const char* initEffects::ladspaReverbEffectString(QStringList params) {
+const char* initEffects::ladspaReverbEffectString(QStringList params)
+{
     return qstrdup(QString(jackString + "1423</id><enabled>true</enabled>  <wet_dry_enabled>false</wet_dry_enabled><wet_dry_locked>true</wet_dry_locked>    <wet_dry_values><value>1.000000</value><value>1.000000</value></wet_dry_values>    <lockall>true</lockall><controlrow><lock>true</lock><value>%1</value>      <value>%1</value></controlrow><controlrow><lock>true</lock><value>%2</value><value>%2</value></controlrow><controlrow><lock>true</lock><value>0.250000</value><value>0.250000</value></controlrow></plugin></jackrack>").arg(params[0]).arg(params[1]).toUtf8());
 }
 
-const char* initEffects::ladspaEqualizerEffectString(QStringList params) {
+const char* initEffects::ladspaEqualizerEffectString(QStringList params)
+{
     return qstrdup(QString(jackString + "1901</id><enabled>true</enabled>    <wet_dry_enabled>false</wet_dry_enabled><wet_dry_locked>true</wet_dry_locked>    <wet_dry_values><value>1.000000</value><value>1.000000</value></wet_dry_values><controlrow><value>%1</value></controlrow><controlrow><value>%2</value></controlrow>    <controlrow><value>%3</value></controlrow></plugin></jackrack>").arg(params[0]).arg(params[1]).arg(params[2]).toUtf8());
 }
 
-const char* initEffects::ladspaLimiterEffectString(QStringList params) {
+const char* initEffects::ladspaLimiterEffectString(QStringList params)
+{
     return qstrdup(QString(jackString + "1913</id><enabled>true</enabled><wet_dry_enabled>false</wet_dry_enabled><wet_dry_locked>true</wet_dry_locked><wet_dry_values><value>1.000000</value><value>1.000000</value></wet_dry_values><controlrow><value>%1</value></controlrow><controlrow><value>%2</value></controlrow><controlrow><value>%3</value></controlrow></plugin></jackrack>").arg(params[0]).arg(params[1]).arg(params[2]).toUtf8());
 }
 
-const char* initEffects::ladspaPitchShifterEffectString(QStringList params) {
+const char* initEffects::ladspaPitchShifterEffectString(QStringList params)
+{
     return qstrdup(QString(jackString + "1193</id><enabled>true</enabled><wet_dry_enabled>false</wet_dry_enabled><wet_dry_locked>true</wet_dry_locked><wet_dry_values><value>1.000000</value><value>1.000000</value></wet_dry_values><lockall>true</lockall><controlrow><lock>true</lock><value>%1</value><value>%1</value></controlrow></plugin></jackrack>").arg(params[0]).toUtf8());
 }
 
-const char* initEffects::ladspaRateScalerEffectString(QStringList params) {
+const char* initEffects::ladspaRateScalerEffectString(QStringList params)
+{
     return qstrdup(QString(jackString + "1417</id><enabled>true</enabled><wet_dry_enabled>false</wet_dry_enabled><wet_dry_locked>true</wet_dry_locked><wet_dry_values><value>1.000000</value><value>1.000000</value></wet_dry_values><lockall>true</lockall><controlrow><lock>true</lock><value>%1</value><value>%1</value></controlrow></plugin></jackrack>").arg(params[0]).toUtf8());
 }
 
-const char* initEffects::ladspaPhaserEffectString(QStringList params) {
+const char* initEffects::ladspaPhaserEffectString(QStringList params)
+{
     return qstrdup(QString(jackString + "1217</id><enabled>true</enabled><wet_dry_enabled>false</wet_dry_enabled><wet_dry_locked>true</wet_dry_locked><wet_dry_values><value>1.000000</value><value>1.000000</value></wet_dry_values><lockall>true</lockall><controlrow><lock>true</lock><value>%1</value><value>%1</value></controlrow><controlrow><lock>true</lock><value>%2</value><value>%2</value></controlrow><controlrow><lock>true</lock><value>%3</value><value>%3</value></controlrow><controlrow><lock>true</lock><value>%4</value><value>%4</value></controlrow></plugin></jackrack>").arg(params[0]).arg(params[1]).arg(params[2]).arg(params[3]).toUtf8());
 }
 
 
-QDomDocument initEffects::createDescriptionFromMlt(Mlt::Repository* repository, const QString& /*type*/, const QString& filtername) {
+QDomDocument initEffects::createDescriptionFromMlt(Mlt::Repository* repository, const QString& /*type*/, const QString& filtername)
+{
 
     QDomDocument ret;
     Mlt::Properties *metadata = repository->metadata(filter_type, filtername.toAscii().data());
@@ -541,7 +563,8 @@ QDomDocument initEffects::createDescriptionFromMlt(Mlt::Repository* repository,
     return ret;
 }
 
-void initEffects::fillTransitionsList(Mlt::Repository * repository, EffectsList* transitions, QStringList names) {
+void initEffects::fillTransitionsList(Mlt::Repository * repository, EffectsList* transitions, QStringList names)
+{
     // remove transitions that are not implemented
     int pos = names.indexOf("mix");
     if (pos != -1) names.takeAt(pos);
@@ -723,7 +746,8 @@ void initEffects::fillTransitionsList(Mlt::Repository * repository, EffectsList*
     transitions->append(ret2.documentElement());*/
 }
 
-QDomElement initEffects::quickParameterFill(QDomDocument & doc, QString name, QString tag, QString type, QString def, QString min, QString max, QString list, QString listdisplaynames, QString factor, QString namedesc, QString format) {
+QDomElement initEffects::quickParameterFill(QDomDocument & doc, QString name, QString tag, QString type, QString def, QString min, QString max, QString list, QString listdisplaynames, QString factor, QString namedesc, QString format)
+{
     QDomElement parameter = doc.createElement("parameter");
     parameter.setAttribute("tag", tag);
     parameter.setAttribute("default", def);
index 166336ddbc2d46b5a44718d2b105cfcb7da46eb6..d3308f29d8e4de88c8a68bd7eaf7a3628c9f631f 100644 (file)
@@ -30,7 +30,8 @@
 
 class EffectsList;
 
-class initEffectsThumbnailer : public QThread {
+class initEffectsThumbnailer : public QThread
+{
     Q_OBJECT
 public:
     initEffectsThumbnailer();
@@ -41,7 +42,8 @@ private :
 
 };
 
-class initEffects : public QObject {
+class initEffects : public QObject
+{
     Q_OBJECT
 public:
     initEffects();
index 1a6cc43fdac23b7f79ceb6b87eec7f7b2d6c2844..972df988e325d05d71fe6fd236ac46b259c5d7ff 100644 (file)
 #include <KLocale>
 
 InsertSpaceCommand::InsertSpaceCommand(CustomTrackView *view, QList<ItemInfo> clipsToMove, QList<ItemInfo> transToMove, int track, const GenTime &duration, bool doIt, QUndoCommand * parent)
-        : QUndoCommand(parent), m_view(view), m_clipsToMove(clipsToMove), m_transToMove(transToMove), m_track(track), m_duration(duration), m_doIt(doIt) {
+        : QUndoCommand(parent), m_view(view), m_clipsToMove(clipsToMove), m_transToMove(transToMove), m_track(track), m_duration(duration), m_doIt(doIt)
+{
     if (duration > GenTime()) setText(i18n("Insert space"));
     else setText(i18n("Remove space"));
 }
 
 // virtual
-void InsertSpaceCommand::undo() {
+void InsertSpaceCommand::undo()
+{
     // kDebug()<<"----  undoing action";
     m_view->insertSpace(m_clipsToMove, m_transToMove, m_track, GenTime() - m_duration, m_duration);
 }
 // virtual
-void InsertSpaceCommand::redo() {
+void InsertSpaceCommand::redo()
+{
     // kDebug() << "----  redoing action cut: " << m_cutTime.frames(25);
     if (m_doIt) {
         m_view->insertSpace(m_clipsToMove, m_transToMove, m_track, m_duration, GenTime());
index aa56e5c3765753aa6e9509525218a89588ec7906..39b8d4c07334f31e20e8a079b6698f3b5bd98ea0 100644 (file)
@@ -29,7 +29,8 @@
 
 class CustomTrackView;
 
-class InsertSpaceCommand : public QUndoCommand {
+class InsertSpaceCommand : public QUndoCommand
+{
 public:
     InsertSpaceCommand(CustomTrackView *view, QList<ItemInfo> clipsToMove, QList<ItemInfo> transToMove, int track, const GenTime &duration, bool doIt, QUndoCommand * parent = 0);
     virtual void undo();
index 4ac905bef2b8769958f7c51c803a86cce3ebb238..e5be85da1eb80a8e11ece8e2166fe701ed69e067 100644 (file)
@@ -24,7 +24,8 @@
 #include <QUrl>
 #include <QtPlugin>
 
-class ClipGenerator {
+class ClipGenerator
+{
 public:
     virtual ~ClipGenerator() {}
 
index 152b00fbad3ac1317f266c42ac27620e5b4818eb..1a14e3ff0f2fdfba89ff947a00eaffa98417c963 100644 (file)
@@ -68,7 +68,8 @@
 #define JOG_STOP 10009
 
 
-void ShuttleThread::init(QObject *parent, QString device) {
+void ShuttleThread::init(QObject *parent, QString device)
+{
     m_parent = parent;
     m_device = device;
     stop_me = false;
@@ -77,11 +78,13 @@ void ShuttleThread::init(QObject *parent, QString device) {
     jogvalue = 0xffff;
 }
 
-bool ShuttleThread::isWorking() {
+bool ShuttleThread::isWorking()
+{
     return m_isWorking;
 }
 
-void ShuttleThread::run() {
+void ShuttleThread::run()
+{
     kDebug() << "-------  STARTING SHUTTLE: " << m_device;
 
     const int fd = KDE_open((char *) m_device.toUtf8().data(), O_RDONLY);
@@ -106,7 +109,8 @@ void ShuttleThread::run() {
 
 }
 
-void ShuttleThread::handle_event(EV ev) {
+void ShuttleThread::handle_event(EV ev)
+{
     switch (ev.type) {
     case KEY :
         key(ev.code, ev.value);
@@ -117,7 +121,8 @@ void ShuttleThread::handle_event(EV ev) {
     }
 }
 
-void ShuttleThread::key(unsigned short code, unsigned int value) {
+void ShuttleThread::key(unsigned short code, unsigned int value)
+{
     if (value == 0) {
         // Button release (ignored)
         return;
@@ -134,7 +139,8 @@ void ShuttleThread::key(unsigned short code, unsigned int value) {
 
 }
 
-void ShuttleThread::shuttle(int value) {
+void ShuttleThread::shuttle(int value)
+{
     //gettimeofday( &last_shuttle, 0 );
     //need_synthetic_shuttle = value != 0;
 
@@ -175,7 +181,8 @@ void ShuttleThread::shuttle(int value) {
 
 }
 
-void ShuttleThread::jog(unsigned int value) {
+void ShuttleThread::jog(unsigned int value)
+{
     // We should generate a synthetic event for the shuttle going
     // to the home position if we have not seen one recently
     //check_synthetic();
@@ -190,7 +197,8 @@ void ShuttleThread::jog(unsigned int value) {
 }
 
 
-void ShuttleThread::jogshuttle(unsigned short code, unsigned int value) {
+void ShuttleThread::jogshuttle(unsigned short code, unsigned int value)
+{
     switch (code) {
     case JOG :
         jog(value);
@@ -202,25 +210,30 @@ void ShuttleThread::jogshuttle(unsigned short code, unsigned int value) {
 }
 
 
-JogShuttle::JogShuttle(QString device, QObject *parent): QObject(parent) {
+JogShuttle::JogShuttle(QString device, QObject *parent): QObject(parent)
+{
     initDevice(device);
 }
 
-JogShuttle::~JogShuttle() {
+JogShuttle::~JogShuttle()
+{
     if (m_shuttleProcess.isRunning()) m_shuttleProcess.exit();
 }
 
-void JogShuttle::initDevice(QString device) {
+void JogShuttle::initDevice(QString device)
+{
     if (m_shuttleProcess.isRunning()) return;
     m_shuttleProcess.init(this, device);
     m_shuttleProcess.start(QThread::LowestPriority);
 }
 
-void JogShuttle::stopDevice() {
+void JogShuttle::stopDevice()
+{
     if (m_shuttleProcess.isRunning()) m_shuttleProcess.stop_me = true;
 }
 
-void JogShuttle::customEvent(QEvent* e) {
+void JogShuttle::customEvent(QEvent* e)
+{
     switch (e->type()) {
     case JOG_BACK1:
         emit rewind1();
index e7c0e2097dfaeac434cf23df465bc5134636fffd..5e9e269ecf8e4649742b6fc7da9222096a145184 100644 (file)
@@ -29,7 +29,8 @@
 
 typedef struct input_event EV;
 
-class ShuttleThread : public QThread {
+class ShuttleThread : public QThread
+{
 
 public:
     virtual void run();
@@ -51,7 +52,8 @@ private:
 };
 
 
-class JogShuttle: public QObject {
+class JogShuttle: public QObject
+{
 Q_OBJECT public:
     explicit JogShuttle(QString device, QObject * parent = 0);
     ~JogShuttle();
index 382d92236d14cb131282b435b35258269547fe6c..a161ee9c8ec92e7de20441b230a51376840b6795 100644 (file)
@@ -42,7 +42,8 @@
 #include <mlt++/Mlt.h>
 
 
-KdenliveDoc::KdenliveDoc(const KUrl &url, const KUrl &projectFolder, QUndoGroup *undoGroup, const QString &profileName, const QPoint tracks, Render *render, MainWindow *parent): QObject(parent), m_render(render), m_url(url), m_projectFolder(projectFolder), m_commandStack(new QUndoStack(undoGroup)), m_modified(false), m_documentLoadingProgress(0), m_documentLoadingStep(0.0), m_startPos(0), m_zoom(7), m_autosave(NULL), m_zoneStart(0), m_zoneEnd(100), m_abortLoading(false) {
+KdenliveDoc::KdenliveDoc(const KUrl &url, const KUrl &projectFolder, QUndoGroup *undoGroup, const QString &profileName, const QPoint tracks, Render *render, MainWindow *parent): QObject(parent), m_render(render), m_url(url), m_projectFolder(projectFolder), m_commandStack(new QUndoStack(undoGroup)), m_modified(false), m_documentLoadingProgress(0), m_documentLoadingStep(0.0), m_startPos(0), m_zoom(7), m_autosave(NULL), m_zoneStart(0), m_zoneEnd(100), m_abortLoading(false)
+{
     m_clipManager = new ClipManager(this);
     m_autoSaveTimer = new QTimer(this);
     m_autoSaveTimer->setSingleShot(true);
@@ -212,7 +213,8 @@ KdenliveDoc::KdenliveDoc(const KUrl &url, const KUrl &projectFolder, QUndoGroup
 
 }
 
-KdenliveDoc::~KdenliveDoc() {
+KdenliveDoc::~KdenliveDoc()
+{
     delete m_commandStack;
     delete m_clipManager;
     delete m_autoSaveTimer;
@@ -222,12 +224,14 @@ KdenliveDoc::~KdenliveDoc() {
     }
 }
 
-void KdenliveDoc::setSceneList() {
+void KdenliveDoc::setSceneList()
+{
     m_render->setSceneList(m_document.toString(), m_startPos);
     checkProjectClips();
 }
 
-QDomDocument KdenliveDoc::createEmptyDocument(const int videotracks, const int audiotracks) {
+QDomDocument KdenliveDoc::createEmptyDocument(const int videotracks, const int audiotracks)
+{
     // Creating new document
     QDomDocument doc;
     QDomElement westley = doc.createElement("westley");
@@ -324,7 +328,8 @@ QDomDocument KdenliveDoc::createEmptyDocument(const int videotracks, const int a
 }
 
 
-void KdenliveDoc::syncGuides(QList <Guide *> guides) {
+void KdenliveDoc::syncGuides(QList <Guide *> guides)
+{
     m_guidesXml.clear();
     QDomElement guideNode = m_guidesXml.createElement("guides");
     m_guidesXml.appendChild(guideNode);
@@ -339,11 +344,13 @@ void KdenliveDoc::syncGuides(QList <Guide *> guides) {
     emit guidesUpdated();
 }
 
-QDomElement KdenliveDoc::guidesXml() const {
+QDomElement KdenliveDoc::guidesXml() const
+{
     return m_guidesXml.documentElement();
 }
 
-void KdenliveDoc::slotAutoSave() {
+void KdenliveDoc::slotAutoSave()
+{
     if (m_render && m_autosave) {
         if (!m_autosave->isOpen() && !m_autosave->open(QIODevice::ReadWrite)) {
             // show error: could not open the autosave file
@@ -362,15 +369,18 @@ void KdenliveDoc::slotAutoSave() {
     }
 }
 
-void KdenliveDoc::setZoom(int factor) {
+void KdenliveDoc::setZoom(int factor)
+{
     m_zoom = factor;
 }
 
-int KdenliveDoc::zoom() const {
+int KdenliveDoc::zoom() const
+{
     return m_zoom;
 }
 
-bool KdenliveDoc::convertDocument(double version) {
+bool KdenliveDoc::convertDocument(double version)
+{
     kDebug() << "Opening a document with version " << version;
     const double current_version = 0.82;
 
@@ -912,22 +922,26 @@ bool KdenliveDoc::convertDocument(double version) {
     return true;
 }
 
-QString KdenliveDoc::colorToString(const QColor& c) {
+QString KdenliveDoc::colorToString(const QColor& c)
+{
     QString ret = "%1,%2,%3,%4";
     ret = ret.arg(c.red()).arg(c.green()).arg(c.blue()).arg(c.alpha());
     return ret;
 }
 
-void KdenliveDoc::setZone(int start, int end) {
+void KdenliveDoc::setZone(int start, int end)
+{
     m_zoneStart = start;
     m_zoneEnd = end;
 }
 
-QPoint KdenliveDoc::zone() const {
+QPoint KdenliveDoc::zone() const
+{
     return QPoint(m_zoneStart, m_zoneEnd);
 }
 
-bool KdenliveDoc::saveSceneList(const QString &path, const QString &scene) {
+bool KdenliveDoc::saveSceneList(const QString &path, const QString &scene)
+{
     QDomDocument sceneList;
     sceneList.setContent(scene, true);
     QDomNode wes = sceneList.elementsByTagName("westley").at(0);
@@ -1011,16 +1025,19 @@ bool KdenliveDoc::saveSceneList(const QString &path, const QString &scene) {
     return true;
 }
 
-ClipManager *KdenliveDoc::clipManager() {
+ClipManager *KdenliveDoc::clipManager()
+{
     return m_clipManager;
 }
 
-KUrl KdenliveDoc::projectFolder() const {
+KUrl KdenliveDoc::projectFolder() const
+{
     //if (m_projectFolder.isEmpty()) return KUrl(KStandardDirs::locateLocal("appdata", "/projects/"));
     return m_projectFolder;
 }
 
-void KdenliveDoc::setProjectFolder(KUrl url) {
+void KdenliveDoc::setProjectFolder(KUrl url)
+{
     if (url == m_projectFolder) return;
     setModified(true);
     KStandardDirs::makeDir(url.path());
@@ -1030,7 +1047,8 @@ void KdenliveDoc::setProjectFolder(KUrl url) {
     m_projectFolder = url;
 }
 
-void KdenliveDoc::moveProjectData(KUrl url) {
+void KdenliveDoc::moveProjectData(KUrl url)
+{
     QList <DocClipBase*> list = m_clipManager->documentClipList();
     //TODO: Also move ladspa effects files
     for (int i = 0; i < list.count(); i++) {
@@ -1058,15 +1076,18 @@ void KdenliveDoc::moveProjectData(KUrl url) {
     }
 }
 
-const QString &KdenliveDoc::profilePath() const {
+const QString &KdenliveDoc::profilePath() const
+{
     return m_profile.path;
 }
 
-MltVideoProfile KdenliveDoc::mltProfile() const {
+MltVideoProfile KdenliveDoc::mltProfile() const
+{
     return m_profile;
 }
 
-void KdenliveDoc::setProfilePath(QString path) {
+void KdenliveDoc::setProfilePath(QString path)
+{
     if (path.isEmpty()) path = KdenliveSettings::default_profile();
     if (path.isEmpty()) path = "dv_pal";
     m_profile = ProfilesDialog::getVideoProfile(path);
@@ -1080,20 +1101,24 @@ void KdenliveDoc::setProfilePath(QString path) {
     else m_timecode.setFormat((int) m_fps);
 }
 
-double KdenliveDoc::dar() {
+double KdenliveDoc::dar()
+{
     return (double) m_profile.display_aspect_num / m_profile.display_aspect_den;
 }
 
-void KdenliveDoc::setThumbsProgress(const QString &message, int progress) {
+void KdenliveDoc::setThumbsProgress(const QString &message, int progress)
+{
     emit progressInfo(message, progress);
 }
 
-void KdenliveDoc::loadingProgressed() {
+void KdenliveDoc::loadingProgressed()
+{
     m_documentLoadingProgress += m_documentLoadingStep;
     emit progressInfo(QString(), (int) m_documentLoadingProgress);
 }
 
-QUndoStack *KdenliveDoc::commandStack() {
+QUndoStack *KdenliveDoc::commandStack()
+{
     return m_commandStack;
 }
 
@@ -1111,7 +1136,8 @@ void KdenliveDoc::setRenderer(Render *render) {
     emit progressInfo(QString(), -1);
 }*/
 
-void KdenliveDoc::checkProjectClips() {
+void KdenliveDoc::checkProjectClips()
+{
     if (m_render == NULL) return;
     QList <Mlt::Producer *> prods = m_render->producersList();
     QString id ;
@@ -1151,26 +1177,31 @@ void KdenliveDoc::checkProjectClips() {
     }
 }
 
-void KdenliveDoc::updatePreviewSettings() {
+void KdenliveDoc::updatePreviewSettings()
+{
     m_clipManager->updatePreviewSettings();
     m_render->updatePreviewSettings();
     m_clipManager->resetProducersList(m_render->producersList());
 
 }
 
-Render *KdenliveDoc::renderer() {
+Render *KdenliveDoc::renderer()
+{
     return m_render;
 }
 
-void KdenliveDoc::updateClip(const QString &id) {
+void KdenliveDoc::updateClip(const QString &id)
+{
     emit updateClipDisplay(id);
 }
 
-int KdenliveDoc::getFramePos(QString duration) {
+int KdenliveDoc::getFramePos(QString duration)
+{
     return m_timecode.getFrameCount(duration, m_fps);
 }
 
-QString KdenliveDoc::producerName(const QString &id) {
+QString KdenliveDoc::producerName(const QString &id)
+{
     QString result = "unnamed";
     QDomNodeList prods = producersList();
     int ct = prods.count();
@@ -1185,7 +1216,8 @@ QString KdenliveDoc::producerName(const QString &id) {
     return result;
 }
 
-void KdenliveDoc::setProducerDuration(const QString &id, int duration) {
+void KdenliveDoc::setProducerDuration(const QString &id, int duration)
+{
     QDomNodeList prods = producersList();
     int ct = prods.count();
     for (int i = 0; i <  ct ; i++) {
@@ -1197,7 +1229,8 @@ void KdenliveDoc::setProducerDuration(const QString &id, int duration) {
     }
 }
 
-int KdenliveDoc::getProducerDuration(const QString &id) {
+int KdenliveDoc::getProducerDuration(const QString &id)
+{
     int result = 0;
     QDomNodeList prods = producersList();
     int ct = prods.count();
@@ -1211,46 +1244,56 @@ int KdenliveDoc::getProducerDuration(const QString &id) {
     return result;
 }
 
-QDomDocument KdenliveDoc::toXml() {
+QDomDocument KdenliveDoc::toXml()
+{
     return m_document;
 }
 
-Timecode KdenliveDoc::timecode() const {
+Timecode KdenliveDoc::timecode() const
+{
     return m_timecode;
 }
 
-QDomNodeList KdenliveDoc::producersList() {
+QDomNodeList KdenliveDoc::producersList()
+{
     return m_document.elementsByTagName("producer");
 }
 
-double KdenliveDoc::projectDuration() const {
+double KdenliveDoc::projectDuration() const
+{
     if (m_render)
         return GenTime(m_render->getLength(), m_fps).ms() / 1000;
     else
         return 0;
 }
 
-double KdenliveDoc::fps() const {
+double KdenliveDoc::fps() const
+{
     return m_fps;
 }
 
-int KdenliveDoc::width() const {
+int KdenliveDoc::width() const
+{
     return m_width;
 }
 
-int KdenliveDoc::height() const {
+int KdenliveDoc::height() const
+{
     return m_height;
 }
 
-KUrl KdenliveDoc::url() const {
+KUrl KdenliveDoc::url() const
+{
     return m_url;
 }
 
-void KdenliveDoc::setUrl(KUrl url) {
+void KdenliveDoc::setUrl(KUrl url)
+{
     m_url = url;
 }
 
-void KdenliveDoc::setModified(bool mod) {
+void KdenliveDoc::setModified(bool mod)
+{
     if (!m_url.isEmpty() && mod && KdenliveSettings::crashrecovery()) {
         m_autoSaveTimer->start(3000);
     }
@@ -1259,18 +1302,21 @@ void KdenliveDoc::setModified(bool mod) {
     emit docModified(m_modified);
 }
 
-bool KdenliveDoc::isModified() const {
+bool KdenliveDoc::isModified() const
+{
     return m_modified;
 }
 
-const QString KdenliveDoc::description() const {
+const QString KdenliveDoc::description() const
+{
     if (m_url.isEmpty())
         return i18n("Untitled") + " / " + m_profile.description;
     else
         return m_url.fileName() + " / " + m_profile.description;
 }
 
-void KdenliveDoc::addClip(QDomElement elem, QString clipId, bool createClipItem) {
+void KdenliveDoc::addClip(QDomElement elem, QString clipId, bool createClipItem)
+{
     const QString producerId = clipId.section('_', 0, 0);
     DocClipBase *clip = m_clipManager->getClipById(producerId);
     if (clip == NULL) {
@@ -1360,7 +1406,8 @@ void KdenliveDoc::addClip(QDomElement elem, QString clipId, bool createClipItem)
 }
 
 
-void KdenliveDoc::setNewClipResource(const QString &id, const QString &path) {
+void KdenliveDoc::setNewClipResource(const QString &id, const QString &path)
+{
     QDomNodeList prods = m_document.elementsByTagName("producer");
     int maxprod = prods.count();
     for (int i = 0; i < maxprod; i++) {
@@ -1379,7 +1426,8 @@ void KdenliveDoc::setNewClipResource(const QString &id, const QString &path) {
     }
 }
 
-QString KdenliveDoc::searchFileRecursively(const QDir &dir, const QString &matchSize, const QString &matchHash) const {
+QString KdenliveDoc::searchFileRecursively(const QDir &dir, const QString &matchSize, const QString &matchHash) const
+{
     QString foundFileName;
     QByteArray fileData;
     QByteArray fileHash;
@@ -1415,7 +1463,8 @@ QString KdenliveDoc::searchFileRecursively(const QDir &dir, const QString &match
     return foundFileName;
 }
 
-void KdenliveDoc::addClipInfo(QDomElement elem, QDomElement orig, QString clipId) {
+void KdenliveDoc::addClipInfo(QDomElement elem, QDomElement orig, QString clipId)
+{
     DocClipBase *clip = m_clipManager->getClipById(clipId);
     if (clip == NULL) {
         addClip(elem, clipId, false);
@@ -1449,7 +1498,8 @@ void KdenliveDoc::addClipInfo(QDomElement elem, QDomElement orig, QString clipId
     }
 }
 
-void KdenliveDoc::deleteProjectClip(QList <QString> ids) {
+void KdenliveDoc::deleteProjectClip(QList <QString> ids)
+{
     for (int i = 0; i < ids.size(); ++i) {
         emit deleteTimelineClip(ids.at(i));
         m_clipManager->slotDeleteClip(ids.at(i));
@@ -1457,34 +1507,40 @@ void KdenliveDoc::deleteProjectClip(QList <QString> ids) {
     setModified(true);
 }
 
-void KdenliveDoc::deleteClip(const QString &clipId) {
+void KdenliveDoc::deleteClip(const QString &clipId)
+{
     emit signalDeleteProjectClip(clipId);
     m_clipManager->deleteClip(clipId);
 }
 
-void KdenliveDoc::slotAddClipList(const KUrl::List urls, const QString group, const QString &groupId) {
+void KdenliveDoc::slotAddClipList(const KUrl::List urls, const QString group, const QString &groupId)
+{
     m_clipManager->slotAddClipList(urls, group, groupId);
     emit selectLastAddedClip(QString::number(m_clipManager->lastClipId()));
     setModified(true);
 }
 
 
-void KdenliveDoc::slotAddClipFile(const KUrl url, const QString group, const QString &groupId) {
+void KdenliveDoc::slotAddClipFile(const KUrl url, const QString group, const QString &groupId)
+{
     //kDebug() << "/////////  DOCUM, ADD CLP: " << url;
     m_clipManager->slotAddClipFile(url, group, groupId);
     emit selectLastAddedClip(QString::number(m_clipManager->lastClipId()));
     setModified(true);
 }
 
-const QString KdenliveDoc::getFreeClipId() {
+const QString KdenliveDoc::getFreeClipId()
+{
     return QString::number(m_clipManager->getFreeClipId());
 }
 
-DocClipBase *KdenliveDoc::getBaseClip(const QString &clipId) {
+DocClipBase *KdenliveDoc::getBaseClip(const QString &clipId)
+{
     return m_clipManager->getClipById(clipId);
 }
 
-void KdenliveDoc::slotCreateTextClip(QString /*group*/, const QString &/*groupId*/) {
+void KdenliveDoc::slotCreateTextClip(QString /*group*/, const QString &/*groupId*/)
+{
     QString titlesFolder = projectFolder().path() + "/titles/";
     KStandardDirs::makeDir(titlesFolder);
     TitleWidget *dia_ui = new TitleWidget(KUrl(), titlesFolder, m_render, kapp->activeWindow());
@@ -1499,51 +1555,62 @@ void KdenliveDoc::slotCreateTextClip(QString /*group*/, const QString &/*groupId
     delete dia_ui;
 }
 
-int KdenliveDoc::tracksCount() const {
+int KdenliveDoc::tracksCount() const
+{
     return m_tracksList.count();
 }
 
-TrackInfo KdenliveDoc::trackInfoAt(int ix) const {
+TrackInfo KdenliveDoc::trackInfoAt(int ix) const
+{
     return m_tracksList.at(ix);
 }
 
-void KdenliveDoc::switchTrackAudio(int ix, bool hide) {
+void KdenliveDoc::switchTrackAudio(int ix, bool hide)
+{
     m_tracksList[ix].isMute = hide; // !m_tracksList.at(ix).isMute;
 }
 
-void KdenliveDoc::switchTrackLock(int ix, bool lock) {
+void KdenliveDoc::switchTrackLock(int ix, bool lock)
+{
     m_tracksList[ix].isLocked = lock;
 }
 
-bool KdenliveDoc::isTrackLocked(int ix) const {
+bool KdenliveDoc::isTrackLocked(int ix) const
+{
     return m_tracksList[ix].isLocked;
 }
 
-void KdenliveDoc::switchTrackVideo(int ix, bool hide) {
+void KdenliveDoc::switchTrackVideo(int ix, bool hide)
+{
     m_tracksList[ix].isBlind = hide; // !m_tracksList.at(ix).isBlind;
 }
 
-void KdenliveDoc::insertTrack(int ix, TrackInfo type) {
+void KdenliveDoc::insertTrack(int ix, TrackInfo type)
+{
     if (ix == -1) m_tracksList << type;
     else m_tracksList.insert(ix, type);
 }
 
-void KdenliveDoc::deleteTrack(int ix) {
+void KdenliveDoc::deleteTrack(int ix)
+{
     m_tracksList.removeAt(ix);
 }
 
-void KdenliveDoc::setTrackType(int ix, TrackInfo type) {
+void KdenliveDoc::setTrackType(int ix, TrackInfo type)
+{
     m_tracksList[ix].type = type.type;
     m_tracksList[ix].isMute = type.isMute;
     m_tracksList[ix].isBlind = type.isBlind;
     m_tracksList[ix].isLocked = type.isLocked;
 }
 
-const QList <TrackInfo> KdenliveDoc::tracksList() const {
+const QList <TrackInfo> KdenliveDoc::tracksList() const
+{
     return m_tracksList;
 }
 
-QPoint KdenliveDoc::getTracksCount() const {
+QPoint KdenliveDoc::getTracksCount() const
+{
     int audio = 0;
     int video = 0;
     foreach(const TrackInfo &info, m_tracksList) {
@@ -1553,11 +1620,13 @@ QPoint KdenliveDoc::getTracksCount() const {
     return QPoint(video, audio);
 }
 
-void KdenliveDoc::cachePixmap(const QString &fileId, const QPixmap &pix) const {
+void KdenliveDoc::cachePixmap(const QString &fileId, const QPixmap &pix) const
+{
     pix.save(m_projectFolder.path() + "/thumbs/" + fileId + ".png");
 }
 
-QString KdenliveDoc::getLadspaFile() const {
+QString KdenliveDoc::getLadspaFile() const
+{
     int ct = 0;
     QString counter = QString::number(ct).rightJustified(5, '0', false);
     while (QFile::exists(m_projectFolder.path() + "/ladspa/" + counter + ".ladspa")) {
index fe7f61b0bc2ac874fbfb4d8b45107faf35e98aea..a2fdc171223f304fa0214e18376a4d09f14fa8ac 100644 (file)
@@ -45,7 +45,8 @@ class DocClipBase;
 class MainWindow;
 class TrackInfo;
 
-class KdenliveDoc: public QObject {
+class KdenliveDoc: public QObject
+{
 Q_OBJECT public:
 
     KdenliveDoc(const KUrl &url, const KUrl &projectFolder, QUndoGroup *undoGroup, const QString &profileName, const QPoint tracks, Render *render, MainWindow *parent = 0);
index 02f44690424a2c222f236e6510721ad8b78146ee..c0a3e7a3aee99543d8300e4311e30a5d7bc360d0 100644 (file)
@@ -40,7 +40,8 @@
 #endif /* NO_JOGSHUTTLE */
 
 
-KdenliveSettingsDialog::KdenliveSettingsDialog(QWidget * parent): KConfigDialog(parent, "settings", KdenliveSettings::self()) {
+KdenliveSettingsDialog::KdenliveSettingsDialog(QWidget * parent): KConfigDialog(parent, "settings", KdenliveSettings::self())
+{
 
     QWidget *p1 = new QWidget;
     m_configMisc.setupUi(p1);
@@ -164,11 +165,13 @@ KdenliveSettingsDialog::KdenliveSettingsDialog(QWidget * parent): KConfigDialog(
 
 KdenliveSettingsDialog::~KdenliveSettingsDialog() {}
 
-void KdenliveSettingsDialog::slotUpdateRmdRegionStatus() {
+void KdenliveSettingsDialog::slotUpdateRmdRegionStatus()
+{
     m_configCapture.region_group->setHidden(m_configCapture.kcfg_rmd_capture_type->currentIndex() != 1);
 }
 
-void KdenliveSettingsDialog::checkProfile() {
+void KdenliveSettingsDialog::checkProfile()
+{
     m_configMisc.kcfg_profiles_list->clear();
     QMap <QString, QString> profilesInfo = ProfilesDialog::getProfilesInfo();
     QMapIterator<QString, QString> i(profilesInfo);
@@ -188,7 +191,8 @@ void KdenliveSettingsDialog::checkProfile() {
     }
 }
 
-void KdenliveSettingsDialog::initDevices() {
+void KdenliveSettingsDialog::initDevices()
+{
     // Fill audio drivers
     m_configSdl.kcfg_audio_driver->addItem(i18n("Automatic"), QString());
     m_configSdl.kcfg_audio_driver->addItem(i18n("OSS"), "dsp");
@@ -262,7 +266,8 @@ void KdenliveSettingsDialog::initDevices() {
 }
 
 
-void KdenliveSettingsDialog::slotReadAudioDevices() {
+void KdenliveSettingsDialog::slotReadAudioDevices()
+{
     QString result = QString(m_readProcess.readAllStandardOutput());
     kDebug() << "// / / / / / READING APLAY: ";
     kDebug() << result;
@@ -278,7 +283,8 @@ void KdenliveSettingsDialog::slotReadAudioDevices() {
     }
 }
 
-void KdenliveSettingsDialog::showPage(int page, int option) {
+void KdenliveSettingsDialog::showPage(int page, int option)
+{
     switch (page) {
     case 1:
         setCurrentPage(page1);
@@ -300,7 +306,8 @@ void KdenliveSettingsDialog::showPage(int page, int option) {
     }
 }
 
-void KdenliveSettingsDialog::slotEditVideoApplication() {
+void KdenliveSettingsDialog::slotEditVideoApplication()
+{
     KService::Ptr service;
     KOpenWithDialog dlg(KUrl::List(), i18n("Select default video player"), m_configEnv.kcfg_defaultplayerapp->text(), this);
     if (dlg.exec() != QDialog::Accepted)
@@ -310,7 +317,8 @@ void KdenliveSettingsDialog::slotEditVideoApplication() {
     m_configEnv.kcfg_defaultplayerapp->setText(service->exec());
 }
 
-void KdenliveSettingsDialog::slotEditAudioApplication() {
+void KdenliveSettingsDialog::slotEditAudioApplication()
+{
     KService::Ptr service;
     KOpenWithDialog dlg(KUrl::List(), i18n("Select default audio editor"), m_configEnv.kcfg_defaultaudioapp->text(), this);
     if (dlg.exec() != QDialog::Accepted)
@@ -320,7 +328,8 @@ void KdenliveSettingsDialog::slotEditAudioApplication() {
     m_configEnv.kcfg_defaultaudioapp->setText(service->exec());
 }
 
-void KdenliveSettingsDialog::slotEditImageApplication() {
+void KdenliveSettingsDialog::slotEditImageApplication()
+{
     KService::Ptr service;
     KOpenWithDialog dlg(KUrl::List(), i18n("Select default image editor"), m_configEnv.kcfg_defaultimageapp->text(), this);
     if (dlg.exec() != QDialog::Accepted)
@@ -331,7 +340,8 @@ void KdenliveSettingsDialog::slotEditImageApplication() {
 }
 
 #ifndef NO_JOGSHUTTLE
-void KdenliveSettingsDialog::slotCheckShuttle(int state) {
+void KdenliveSettingsDialog::slotCheckShuttle(int state)
+{
     m_configShuttle.config_group->setEnabled(state);
     if (m_configShuttle.shuttledevicelist->count() == 0) {
         // parse devices
@@ -352,14 +362,16 @@ void KdenliveSettingsDialog::slotCheckShuttle(int state) {
     }
 }
 
-void KdenliveSettingsDialog::slotUpdateShuttleDevice(int ix) {
+void KdenliveSettingsDialog::slotUpdateShuttleDevice(int ix)
+{
     QString device = m_configShuttle.shuttledevicelist->itemData(ix).toString();
     //KdenliveSettings::setShuttledevice(device);
     m_configShuttle.kcfg_shuttledevice->setText(device);
 }
 #endif /* NO_JOGSHUTTLE */
 
-void KdenliveSettingsDialog::rebuildVideo4Commands() {
+void KdenliveSettingsDialog::rebuildVideo4Commands()
+{
     QString captureCommand;
     if (!m_configCapture.kcfg_video4adevice->text().isEmpty()) captureCommand = "-f " + m_configCapture.kcfg_video4aformat->text() + " -i " + m_configCapture.kcfg_video4adevice->text();
 
@@ -368,7 +380,8 @@ void KdenliveSettingsDialog::rebuildVideo4Commands() {
 }
 
 
-void KdenliveSettingsDialog::updateSettings() {
+void KdenliveSettingsDialog::updateSettings()
+{
     kDebug() << "// // // KCONFIG UPDATE called";
     m_defaultProfile = m_configMisc.kcfg_profiles_list->currentText();
     KdenliveSettings::setDefault_profile(m_defaultPath);
@@ -421,7 +434,8 @@ void KdenliveSettingsDialog::updateSettings() {
     if (updatePreview) emit updatePreviewSettings();
 }
 
-void KdenliveSettingsDialog::slotUpdateDisplay() {
+void KdenliveSettingsDialog::slotUpdateDisplay()
+{
     QString currentProfile = m_configMisc.kcfg_profiles_list->itemData(m_configMisc.kcfg_profiles_list->currentIndex()).toString();
     QMap< QString, QString > values = ProfilesDialog::getSettingsFromFile(currentProfile);
     m_configMisc.p_size->setText(values.value("width") + 'x' + values.value("height"));
index 6ebf2becc18eb37874e163eacfbbc5818feb6f6f..fc0eccb96b4599bc14ce24d6387dd9094fce918c 100644 (file)
@@ -33,7 +33,8 @@
 #include "ui_configjogshuttle_ui.h"
 #include "ui_configsdl_ui.h"
 
-class KdenliveSettingsDialog : public KConfigDialog {
+class KdenliveSettingsDialog : public KConfigDialog
+{
     Q_OBJECT
 
 public:
index 5dbfd1e64d99bd96d4a245c21268caed90a628f1..04a2c02b06da671f3dc41d15292428b603a4b197 100644 (file)
 
 
 KeyframeHelper::KeyframeHelper(QWidget *parent)
-        : QWidget(parent), m_geom(NULL), m_position(0), m_scale(0) {
+        : QWidget(parent), m_geom(NULL), m_position(0), m_scale(0)
+{
     setFont(KGlobalSettings::toolBarFont());
 }
 
 // virtual
-void KeyframeHelper::mousePressEvent(QMouseEvent * event) {
+void KeyframeHelper::mousePressEvent(QMouseEvent * event)
+{
     m_position = event->x() / m_scale;
     emit positionChanged(m_position);
     update();
 }
 
 // virtual
-void KeyframeHelper::mouseMoveEvent(QMouseEvent * event) {
+void KeyframeHelper::mouseMoveEvent(QMouseEvent * event)
+{
     m_position = event->x() / m_scale;
     m_position = qMax(0, m_position);
     m_position = qMin(m_length, m_position);
@@ -51,7 +54,8 @@ void KeyframeHelper::mouseMoveEvent(QMouseEvent * event) {
 
 
 // virtual
-void KeyframeHelper::wheelEvent(QWheelEvent * e) {
+void KeyframeHelper::wheelEvent(QWheelEvent * e)
+{
     if (e->delta() < 0) m_position = m_position - 1;
     else m_position = m_position + 1;
     m_position = qMax(0, m_position);
@@ -66,7 +70,8 @@ void KeyframeHelper::wheelEvent(QWheelEvent * e) {
 }
 
 // virtual
-void KeyframeHelper::paintEvent(QPaintEvent *e) {
+void KeyframeHelper::paintEvent(QPaintEvent *e)
+{
     QStylePainter p(this);
     const QRectF clipRect = e->rect();
     p.setClipRect(clipRect);
@@ -103,17 +108,20 @@ void KeyframeHelper::paintEvent(QPaintEvent *e) {
 
 }
 
-int KeyframeHelper::value() const {
+int KeyframeHelper::value() const
+{
     return m_position;
 }
 
-void KeyframeHelper::setValue(const int pos) {
+void KeyframeHelper::setValue(const int pos)
+{
     if (pos == m_position || m_geom == NULL) return;
     m_position = pos;
     update();
 }
 
-void KeyframeHelper::setKeyGeometry(Mlt::Geometry *geom, const int length) {
+void KeyframeHelper::setKeyGeometry(Mlt::Geometry *geom, const int length)
+{
     m_geom = geom;
     m_length = length;
     update();
index c5687337a7cbac32037e16a02dc917875ec0a41b..66c1872785fd8b525949ceb087d278039b0c91eb 100644 (file)
@@ -27,7 +27,8 @@
 
 #include "timecode.h"
 
-class KeyframeHelper : public QWidget {
+class KeyframeHelper : public QWidget
+{
     Q_OBJECT
 
 public:
index e80222fdd50b3aacc58b8d4643e15ad2b4bcc2b0..de7fc00b91e8137fb3391a3b1f07b5015948f394 100644 (file)
@@ -38,7 +38,8 @@
 #include <QImage>
 #include <QApplication>
 
-void MyThread::init(QObject *parent, KUrl url, QString target, double frame, double frameLength, int frequency, int channels, int arrayWidth) {
+void MyThread::init(QObject *parent, KUrl url, QString target, double frame, double frameLength, int frequency, int channels, int arrayWidth)
+{
     stop_me = false;
     m_parent = parent;
     m_isWorking = false;
@@ -51,11 +52,13 @@ void MyThread::init(QObject *parent, KUrl url, QString target, double frame, dou
     m_arrayWidth = arrayWidth;
 }
 
-bool MyThread::isWorking() {
+bool MyThread::isWorking()
+{
     return m_isWorking;
 }
 
-void MyThread::run() {
+void MyThread::run()
+{
     if (!f.open(QIODevice::WriteOnly)) {
         kDebug() << "++++++++  ERROR WRITING TO FILE: " << f.fileName() << endl;
         kDebug() << "++++++++  DISABLING AUDIO THUMBS" << endl;
@@ -123,15 +126,15 @@ void MyThread::run() {
 }
 
 KThumb::KThumb(ClipManager *clipManager, KUrl url, const QString &id, const QString &hash, QObject * parent, const char */*name*/)
-  : QObject(parent),
-    audioThumbProducer(),
-    m_url(url),
-    m_thumbFile(),
-    m_dar(1),
-    m_producer(NULL),
-    m_clipManager(clipManager),
-    m_id(id),
-    m_mainFrame(-1)
+        : QObject(parent),
+        audioThumbProducer(),
+        m_url(url),
+        m_thumbFile(),
+        m_dar(1),
+        m_producer(NULL),
+        m_clipManager(clipManager),
+        m_id(id),
+        m_mainFrame(-1)
 {
     m_thumbFile = clipManager->projectFolder() + "/thumbs/" + hash + ".thumb";
     connect(&audioThumbProducer, SIGNAL(audioThumbProgress(const int)), this, SLOT(slotAudioThumbProgress(const int)));
@@ -139,7 +142,8 @@ KThumb::KThumb(ClipManager *clipManager, KUrl url, const QString &id, const QStr
 
 }
 
-KThumb::~KThumb() {
+KThumb::~KThumb()
+{
     if (audioThumbProducer.isRunning()) {
         slotAudioThumbOver();
         audioThumbProducer.stop_me = true;
@@ -147,24 +151,29 @@ KThumb::~KThumb() {
     }
 }
 
-void KThumb::setProducer(Mlt::Producer *producer) {
+void KThumb::setProducer(Mlt::Producer *producer)
+{
     m_producer = producer;
     m_dar = producer->profile()->dar();
 }
 
-void KThumb::clearProducer() {
+void KThumb::clearProducer()
+{
     m_producer = NULL;
 }
 
-bool KThumb::hasProducer() const {
+bool KThumb::hasProducer() const
+{
     return m_producer != NULL;
 }
 
-void KThumb::updateThumbUrl(const QString &hash) {
+void KThumb::updateThumbUrl(const QString &hash)
+{
     m_thumbFile = m_clipManager->projectFolder() + "/thumbs/" + hash + ".thumb";
 }
 
-void KThumb::updateClipUrl(KUrl url, const QString &hash) {
+void KThumb::updateClipUrl(KUrl url, const QString &hash)
+{
     m_url = url;
     if (m_producer) {
         char *tmp = Render::decodedString(url.path());
@@ -175,12 +184,14 @@ void KThumb::updateClipUrl(KUrl url, const QString &hash) {
 }
 
 //static
-QPixmap KThumb::getImage(KUrl url, int width, int height) {
+QPixmap KThumb::getImage(KUrl url, int width, int height)
+{
     if (url.isEmpty()) return QPixmap();
     return getImage(url, 0, width, height);
 }
 
-void KThumb::extractImage(int frame, int frame2) {
+void KThumb::extractImage(int frame, int frame2)
+{
     if (m_url.isEmpty() || !KdenliveSettings::videothumbnails() || m_producer == NULL) return;
 
     const int twidth = (int)(KdenliveSettings::trackheight() * m_dar);
@@ -259,12 +270,14 @@ void KThumb::extractImage(int frame, int frame2) {
     }
 }
 
-QPixmap KThumb::extractImage(int frame, int width, int height) {
+QPixmap KThumb::extractImage(int frame, int width, int height)
+{
     return getFrame(m_producer, frame, width, height);
 }
 
 //static
-QPixmap KThumb::getImage(KUrl url, int frame, int width, int height) {
+QPixmap KThumb::getImage(KUrl url, int frame, int width, int height)
+{
     Mlt::Profile profile((char*) KdenliveSettings::current_profile().data());
     QPixmap pix(width, height);
     if (url.isEmpty()) return pix;
@@ -308,7 +321,8 @@ QPixmap KThumb::getImage(QDomElement xml, int frame, int width, int height) {
 }*/
 
 //static
-QPixmap KThumb::getFrame(Mlt::Producer *producer, int framepos, int width, int height) {
+QPixmap KThumb::getFrame(Mlt::Producer *producer, int framepos, int width, int height)
+{
     if (producer == NULL) {
         QPixmap p(width, height);
         p.fill(Qt::red);
@@ -420,18 +434,21 @@ void KThumb::getThumbs(KUrl url, int startframe, int endframe, int width, int he
     emit thumbReady(endframe, image);
 }
 */
-void KThumb::stopAudioThumbs() {
+void KThumb::stopAudioThumbs()
+{
     if (audioThumbProducer.isRunning()) audioThumbProducer.stop_me = true;
 }
 
-void KThumb::removeAudioThumb() {
+void KThumb::removeAudioThumb()
+{
     if (m_thumbFile.isEmpty()) return;
     stopAudioThumbs();
     QFile f(m_thumbFile);
     f.remove();
 }
 
-void KThumb::getAudioThumbs(int channel, double frame, double frameLength, int arrayWidth) {
+void KThumb::getAudioThumbs(int channel, double frame, double frameLength, int arrayWidth)
+{
     if (channel == 0) {
         slotAudioThumbOver();
         return;
@@ -474,16 +491,19 @@ void KThumb::getAudioThumbs(int channel, double frame, double frameLength, int a
     }
 }
 
-void KThumb::slotAudioThumbProgress(const int progress) {
+void KThumb::slotAudioThumbProgress(const int progress)
+{
     m_clipManager->setThumbsProgress(i18n("Creating thumbnail for %1", m_url.fileName()), progress);
 }
 
-void KThumb::slotAudioThumbOver() {
+void KThumb::slotAudioThumbOver()
+{
     m_clipManager->setThumbsProgress(i18n("Creating thumbnail for %1", m_url.fileName()), -1);
     m_clipManager->endAudioThumbsGeneration(m_id);
 }
 
-void KThumb::askForAudioThumbs(const QString &id) {
+void KThumb::askForAudioThumbs(const QString &id)
+{
     m_clipManager->askForAudioThumb(id);
 }
 
index 53600f6836629bc360ba058387bb71e6a64de44e..9a1dad8905f2a01140d18dead63e53a73ddb7fa4 100644 (file)
@@ -38,7 +38,8 @@ relevant signal that get's emitted once the call completes.
   */
 
 
-namespace Mlt {
+namespace Mlt
+{
 class Miracle;
 class Consumer;
 class Producer;
@@ -50,7 +51,8 @@ class ClipManager;
 
 
 
-class MyThread : public QThread {
+class MyThread : public QThread
+{
     Q_OBJECT
 public:
     virtual void run();
@@ -74,7 +76,8 @@ signals:
     void audioThumbOver();
 };
 
-class KThumb: public QObject {
+class KThumb: public QObject
+{
 Q_OBJECT public:
 
 
index f082152d72868379894f3bf095724d65f6aadfc4..e8571d89a6102f9e857d6da833b74376a64d2104 100644 (file)
 
 #include <KLocale>
 
-LockTrackCommand::LockTrackCommand(CustomTrackView *view, int ix, bool lock, bool doIt, QUndoCommand * parent) : QUndoCommand(parent), m_view(view), m_ix(ix), m_lock(lock), m_doIt(doIt) {
+LockTrackCommand::LockTrackCommand(CustomTrackView *view, int ix, bool lock, bool doIt, QUndoCommand * parent) : QUndoCommand(parent), m_view(view), m_ix(ix), m_lock(lock), m_doIt(doIt)
+{
     if (lock) setText(i18n("Lock track"));
     else setText(i18n("Unlock track"));
 }
 
 
 // virtual
-void LockTrackCommand::undo() {
+void LockTrackCommand::undo()
+{
     m_view->lockTrack(m_ix, !m_lock);
 }
 // virtual
-void LockTrackCommand::redo() {
+void LockTrackCommand::redo()
+{
     if (m_doIt) {
         m_view->lockTrack(m_ix, m_lock);
     }
index 0902d2cf804bd4f9572cb6a69ec6c0c4664c0503..6d40a24c74f34ce7f4e4b9c1a5f10b7f0f0610f3 100644 (file)
@@ -26,7 +26,8 @@
 
 class CustomTrackView;
 
-class LockTrackCommand : public QUndoCommand {
+class LockTrackCommand : public QUndoCommand
+{
 public:
     LockTrackCommand(CustomTrackView *view, int ix, bool lock, bool doIt, QUndoCommand * parent = 0);
     virtual void undo();
index 525a3c3d76e09d0cc93f6d001aecc785c5372527..7d0999d0070652f8b599de0ee307728d96a697cd 100644 (file)
@@ -34,7 +34,8 @@
 
 static const char version[] = VERSION;
 
-int main(int argc, char *argv[]) {
+int main(int argc, char *argv[])
+{
     KAboutData aboutData(QByteArray("kdenlive"), QByteArray("kdenlive"),
                          ki18n("Kdenlive"), QByteArray(version),
                          ki18n("An open source video editor."),
index 6970e4718305b3574763dd6355b6082f37dc4f96..88a942233e5284abd6003914ba9128704b56d95e 100644 (file)
@@ -95,7 +95,8 @@ static const int ID_TIMELINE_BUTTONS = 5;
 static const int ID_TIMELINE_POS = 6;
 static const int ID_TIMELINE_FORMAT = 7;
 
-namespace Mlt {
+namespace Mlt
+{
 class Producer;
 };
 
@@ -110,7 +111,8 @@ MainWindow::MainWindow(const QString &MltPath, const KUrl & Url, QWidget *parent
 #ifndef NO_JOGSHUTTLE
         m_jogProcess(NULL),
 #endif /* NO_JOGSHUTTLE */
-        m_findActivated(false), m_initialized(false) {
+        m_findActivated(false), m_initialized(false)
+{
 
     // Create DBus interface
     new MainWindowAdaptor(this);
@@ -372,13 +374,15 @@ MainWindow::MainWindow(const QString &MltPath, const KUrl & Url, QWidget *parent
     projectListDock->raise();
 }
 
-void MainWindow::queryQuit() {
+void MainWindow::queryQuit()
+{
     kDebug() << "----- SAVING CONFUIG";
     if (queryClose()) kapp->quit();
 }
 
 //virtual
-bool MainWindow::queryClose() {
+bool MainWindow::queryClose()
+{
     saveOptions();
     if (m_monitorManager) m_monitorManager->stopActiveMonitor();
     if (m_activeDocument && m_activeDocument->isModified()) {
@@ -396,7 +400,8 @@ bool MainWindow::queryClose() {
 }
 
 
-void MainWindow::loadPlugins() {
+void MainWindow::loadPlugins()
+{
     foreach(QObject *plugin, QPluginLoader::staticInstances())
     populateMenus(plugin);
 
@@ -419,7 +424,8 @@ void MainWindow::loadPlugins() {
     //exit(1);
 }
 
-void MainWindow::populateMenus(QObject *plugin) {
+void MainWindow::populateMenus(QObject *plugin)
+{
     QMenu *addMenu = static_cast<QMenu*>(factory()->container("generators", this));
     ClipGenerator *iGenerator = qobject_cast<ClipGenerator *>(plugin);
     if (iGenerator)
@@ -429,7 +435,8 @@ void MainWindow::populateMenus(QObject *plugin) {
 
 void MainWindow::addToMenu(QObject *plugin, const QStringList &texts,
                            QMenu *menu, const char *member,
-                           QActionGroup *actionGroup) {
+                           QActionGroup *actionGroup)
+{
     kDebug() << "// ADD to MENU" << texts;
     foreach(const QString &text, texts) {
         QAction *action = new QAction(text, plugin);
@@ -444,13 +451,15 @@ void MainWindow::addToMenu(QObject *plugin, const QStringList &texts,
     }
 }
 
-void MainWindow::aboutPlugins() {
+void MainWindow::aboutPlugins()
+{
     //PluginDialog dialog(pluginsDir.path(), m_pluginFileNames, this);
     //dialog.exec();
 }
 
 
-void MainWindow::generateClip() {
+void MainWindow::generateClip()
+{
     QAction *action = qobject_cast<QAction *>(sender());
     ClipGenerator *iGenerator = qobject_cast<ClipGenerator *>(action->parent());
 
@@ -460,19 +469,22 @@ void MainWindow::generateClip() {
     }
 }
 
-void MainWindow::saveProperties(KConfig*) {
+void MainWindow::saveProperties(KConfig*)
+{
     // save properties here,used by session management
     saveFile();
 }
 
 
-void MainWindow::readProperties(KConfig *config) {
+void MainWindow::readProperties(KConfig *config)
+{
     // read properties here,used by session management
     QString Lastproject = config->group("Recent Files").readPathEntry("File1", QString());
     openFile(KUrl(Lastproject));
 }
 
-void MainWindow::slotReloadEffects() {
+void MainWindow::slotReloadEffects()
+{
     initEffects::parseCustomEffectsFile();
     m_customEffectsMenu->clear();
     const QStringList effects = customEffects.effectNames();
@@ -489,7 +501,8 @@ void MainWindow::slotReloadEffects() {
 }
 
 #ifndef NO_JOGSHUTTLE
-void MainWindow::activateShuttleDevice() {
+void MainWindow::activateShuttleDevice()
+{
     if (m_jogProcess) delete m_jogProcess;
     m_jogProcess = NULL;
     if (KdenliveSettings::enableshuttle() == false) return;
@@ -502,7 +515,8 @@ void MainWindow::activateShuttleDevice() {
     connect(m_jogProcess, SIGNAL(button(int)), this, SLOT(slotShuttleButton(int)));
 }
 
-void MainWindow::slotShuttleButton(int code) {
+void MainWindow::slotShuttleButton(int code)
+{
     switch (code) {
     case 5:
         slotShuttleAction(KdenliveSettings::shuttle1());
@@ -522,7 +536,8 @@ void MainWindow::slotShuttleButton(int code) {
     }
 }
 
-void MainWindow::slotShuttleAction(int code) {
+void MainWindow::slotShuttleAction(int code)
+{
     switch (code) {
     case 0:
         return;
@@ -536,15 +551,18 @@ void MainWindow::slotShuttleAction(int code) {
 }
 #endif /* NO_JOGSHUTTLE */
 
-void MainWindow::configureNotifications() {
+void MainWindow::configureNotifications()
+{
     KNotifyConfigWidget::configure(this);
 }
 
-void MainWindow::slotFullScreen() {
+void MainWindow::slotFullScreen()
+{
     KToggleFullScreenAction::setFullScreen(this, actionCollection()->action("fullscreen")->isChecked());
 }
 
-void MainWindow::slotAddEffect(QDomElement effect, GenTime pos, int track) {
+void MainWindow::slotAddEffect(QDomElement effect, GenTime pos, int track)
+{
     if (!m_activeDocument) return;
     if (effect.isNull()) {
         kDebug() << "--- ERROR, TRYING TO APPEND NULL EFFECT";
@@ -554,17 +572,20 @@ void MainWindow::slotAddEffect(QDomElement effect, GenTime pos, int track) {
     currentTimeLine->projectView()->slotAddEffect(effect.cloneNode().toElement(), pos, track);
 }
 
-void MainWindow::slotRaiseMonitor(bool clipMonitor) {
+void MainWindow::slotRaiseMonitor(bool clipMonitor)
+{
     if (clipMonitor) clipMonitorDock->raise();
     else projectMonitorDock->raise();
 }
 
-void MainWindow::slotSetClipDuration(const QString &id, int duration) {
+void MainWindow::slotSetClipDuration(const QString &id, int duration)
+{
     if (!m_activeDocument) return;
     m_activeDocument->setProducerDuration(id, duration);
 }
 
-void MainWindow::slotConnectMonitors() {
+void MainWindow::slotConnectMonitors()
+{
 
     m_projectList->setRenderer(m_projectMonitor->render);
     connect(m_projectList, SIGNAL(receivedClipDuration(const QString &, int)), this, SLOT(slotSetClipDuration(const QString &, int)));
@@ -584,19 +605,22 @@ void MainWindow::slotConnectMonitors() {
     connect(m_projectMonitor, SIGNAL(saveZone(Render *, QPoint)), this, SLOT(slotSaveZone(Render *, QPoint)));
 }
 
-void MainWindow::slotAdjustClipMonitor() {
+void MainWindow::slotAdjustClipMonitor()
+{
     clipMonitorDock->updateGeometry();
     clipMonitorDock->adjustSize();
     m_clipMonitor->resetSize();
 }
 
-void MainWindow::slotAdjustProjectMonitor() {
+void MainWindow::slotAdjustProjectMonitor()
+{
     projectMonitorDock->updateGeometry();
     projectMonitorDock->adjustSize();
     m_projectMonitor->resetSize();
 }
 
-void MainWindow::setupActions() {
+void MainWindow::setupActions()
+{
 
     KActionCollection* collection = actionCollection();
     m_timecodeFormat = new KComboBox(this);
@@ -1095,11 +1119,13 @@ void MainWindow::setupActions() {
     //statusBar(), SLOT( clear() ) );
 }
 
-void MainWindow::slotDisplayActionMessage(QAction *a) {
+void MainWindow::slotDisplayActionMessage(QAction *a)
+{
     statusBar()->showMessage(a->data().toString(), 3000);
 }
 
-void MainWindow::saveOptions() {
+void MainWindow::saveOptions()
+{
     KdenliveSettings::self()->writeConfig();
     KSharedConfigPtr config = KGlobal::config();
     m_fileOpenRecent->saveEntries(KConfigGroup(config, "Recent Files"));
@@ -1108,7 +1134,8 @@ void MainWindow::saveOptions() {
     config->sync();
 }
 
-void MainWindow::readOptions() {
+void MainWindow::readOptions()
+{
     KSharedConfigPtr config = KGlobal::config();
     m_fileOpenRecent->loadEntries(KConfigGroup(config, "Recent Files"));
     KConfigGroup initialGroup(config, "version");
@@ -1145,7 +1172,8 @@ void MainWindow::readOptions() {
         m_projectList->setHeaderInfo(state);
 }
 
-void MainWindow::slotRunWizard() {
+void MainWindow::slotRunWizard()
+{
     Wizard *w = new Wizard(this);
     if (w->exec() == QDialog::Accepted && w->isOk()) {
         w->adjustSettings();
@@ -1153,7 +1181,8 @@ void MainWindow::slotRunWizard() {
     delete w;
 }
 
-void MainWindow::newFile(bool showProjectSettings) {
+void MainWindow::newFile(bool showProjectSettings)
+{
     QString profileName;
     KUrl projectFolder;
     QPoint projectTracks(KdenliveSettings::videotracks(), KdenliveSettings::audiotracks());
@@ -1184,7 +1213,8 @@ void MainWindow::newFile(bool showProjectSettings) {
     m_closeAction->setEnabled(m_timelineArea->count() > 1);
 }
 
-void MainWindow::activateDocument() {
+void MainWindow::activateDocument()
+{
     if (m_timelineArea->currentWidget() == NULL) return;
     TrackView *currentTab = (TrackView *) m_timelineArea->currentWidget();
     KdenliveDoc *currentDoc = currentTab->document();
@@ -1192,7 +1222,8 @@ void MainWindow::activateDocument() {
     connectDocument(currentTab, currentDoc);
 }
 
-void MainWindow::closeCurrentDocument() {
+void MainWindow::closeCurrentDocument()
+{
     QWidget *w = m_timelineArea->currentWidget();
     if (!w) return;
     // closing current document
@@ -1227,7 +1258,8 @@ void MainWindow::closeCurrentDocument() {
     }
 }
 
-bool MainWindow::saveFileAs(const QString &outputFileName) {
+bool MainWindow::saveFileAs(const QString &outputFileName)
+{
     QString currentSceneList;
     if (KdenliveSettings::dropbframes()) {
         KdenliveSettings::setDropbframes(false);
@@ -1254,7 +1286,8 @@ bool MainWindow::saveFileAs(const QString &outputFileName) {
     return true;
 }
 
-bool MainWindow::saveFileAs() {
+bool MainWindow::saveFileAs()
+{
     // Check that the Kdenlive mime type is correctly installed
     QString mimetype = "application/x-kdenlive";
     KMimeType::Ptr mime = KMimeType::mimeType(mimetype);
@@ -1268,7 +1301,8 @@ bool MainWindow::saveFileAs() {
     return saveFileAs(outputFile);
 }
 
-bool MainWindow::saveFile() {
+bool MainWindow::saveFile()
+{
     if (!m_activeDocument) return true;
     if (m_activeDocument->url().isEmpty()) {
         return saveFileAs();
@@ -1279,7 +1313,8 @@ bool MainWindow::saveFile() {
     }
 }
 
-void MainWindow::openFile() {
+void MainWindow::openFile()
+{
     // Check that the Kdenlive mime type is correctly installed
     QString mimetype = "application/x-kdenlive";
     KMimeType::Ptr mime = KMimeType::mimeType(mimetype);
@@ -1291,7 +1326,8 @@ void MainWindow::openFile() {
     openFile(url);
 }
 
-void MainWindow::openLastFile() {
+void MainWindow::openLastFile()
+{
     KSharedConfigPtr config = KGlobal::config();
     KUrl::List urls = m_fileOpenRecent->urls();
     //WARNING: this is buggy, we get a random url, not the last one. Bug in KRecentFileAction ?
@@ -1299,7 +1335,8 @@ void MainWindow::openLastFile() {
     else openFile(urls.last());
 }
 
-void MainWindow::openFile(const KUrl &url) {
+void MainWindow::openFile(const KUrl &url)
+{
     // Check if the document is already opened
     const int ct = m_timelineArea->count();
     bool isOpened = false;
@@ -1338,7 +1375,8 @@ void MainWindow::openFile(const KUrl &url) {
     doOpenFile(url, NULL);
 }
 
-void MainWindow::doOpenFile(const KUrl &url, KAutoSaveFile *stale) {
+void MainWindow::doOpenFile(const KUrl &url, KAutoSaveFile *stale)
+{
     KdenliveDoc *doc = new KdenliveDoc(url, KUrl(), m_commandStack, QString(), QPoint(3, 2), m_projectMonitor->render, this);
     if (stale == NULL) {
         stale = new KAutoSaveFile(url, doc);
@@ -1363,7 +1401,8 @@ void MainWindow::doOpenFile(const KUrl &url, KAutoSaveFile *stale) {
     m_projectMonitor->slotZoneMoved(trackView->inPoint(), trackView->outPoint());
 }
 
-void MainWindow::recoverFiles(QList<KAutoSaveFile *> staleFiles) {
+void MainWindow::recoverFiles(QList<KAutoSaveFile *> staleFiles)
+{
     if (!KdenliveSettings::activatetabs()) closeCurrentDocument();
     foreach(KAutoSaveFile *stale, staleFiles) {
         /*if (!stale->open(QIODevice::QIODevice::ReadOnly)) {
@@ -1380,7 +1419,8 @@ void MainWindow::recoverFiles(QList<KAutoSaveFile *> staleFiles) {
 }
 
 
-void MainWindow::parseProfiles(const QString &mltPath) {
+void MainWindow::parseProfiles(const QString &mltPath)
+{
     //kdDebug()<<" + + YOUR MLT INSTALL WAS FOUND IN: "<< MLT_PREFIX <<endl;
 
     //KdenliveSettings::setDefaulttmpfolder();
@@ -1445,7 +1485,8 @@ void MainWindow::parseProfiles(const QString &mltPath) {
 }
 
 
-void MainWindow::slotEditProfiles() {
+void MainWindow::slotEditProfiles()
+{
     ProfilesDialog *w = new ProfilesDialog;
     if (w->exec() == QDialog::Accepted) {
         KdenliveSettingsDialog* d = static_cast <KdenliveSettingsDialog*>(KConfigDialog::exists("settings"));
@@ -1454,7 +1495,8 @@ void MainWindow::slotEditProfiles() {
     delete w;
 }
 
-void MainWindow::slotEditProjectSettings() {
+void MainWindow::slotEditProjectSettings()
+{
     QPoint p = m_activeDocument->getTracksCount();
     ProjectSettings *w = new ProjectSettings(p.x(), p.y(), m_activeDocument->projectFolder().path(), true, this);
 
@@ -1480,7 +1522,8 @@ void MainWindow::slotEditProjectSettings() {
     delete w;
 }
 
-void MainWindow::slotRenderProject() {
+void MainWindow::slotRenderProject()
+{
     if (!m_renderWidget) {
         QString projectfolder = m_activeDocument ? m_activeDocument->projectFolder().path() : KdenliveSettings::defaultprojectfolder();
         m_renderWidget = new RenderWidget(projectfolder, this);
@@ -1498,7 +1541,8 @@ void MainWindow::slotRenderProject() {
     m_renderWidget->show();
 }
 
-void MainWindow::slotDoRender(const QString &dest, const QString &render, const QStringList &overlay_args, const QStringList &avformat_args, bool zoneOnly, bool playAfter, double guideStart, double guideEnd, bool resizeProfile, const QString &scriptExport) {
+void MainWindow::slotDoRender(const QString &dest, const QString &render, const QStringList &overlay_args, const QStringList &avformat_args, bool zoneOnly, bool playAfter, double guideStart, double guideEnd, bool resizeProfile, const QString &scriptExport)
+{
     kDebug() << "// SCRIPT EXPORT: " << scriptExport;
     if (dest.isEmpty()) return;
     int in = 0;
@@ -1591,15 +1635,18 @@ void MainWindow::slotDoRender(const QString &dest, const QString &render, const
     }
 }
 
-void MainWindow::setRenderingProgress(const QString &url, int progress) {
+void MainWindow::setRenderingProgress(const QString &url, int progress)
+{
     if (m_renderWidget) m_renderWidget->setRenderJob(url, progress);
 }
 
-void MainWindow::setRenderingFinished(const QString &url, int status, const QString &error) {
+void MainWindow::setRenderingFinished(const QString &url, int status, const QString &error)
+{
     if (m_renderWidget) m_renderWidget->setRenderStatus(url, status, error);
 }
 
-void MainWindow::slotUpdateMousePosition(int pos) {
+void MainWindow::slotUpdateMousePosition(int pos)
+{
     if (m_activeDocument)
         switch (m_timecodeFormat->currentIndex()) {
         case 0:
@@ -1610,7 +1657,8 @@ void MainWindow::slotUpdateMousePosition(int pos) {
         }
 }
 
-void MainWindow::slotUpdateDocumentState(bool modified) {
+void MainWindow::slotUpdateDocumentState(bool modified)
+{
     if (!m_activeDocument) return;
     setCaption(m_activeDocument->description(), modified);
     m_saveAction->setEnabled(modified);
@@ -1623,7 +1671,8 @@ void MainWindow::slotUpdateDocumentState(bool modified) {
     }
 }
 
-void MainWindow::connectDocumentInfo(KdenliveDoc *doc) {
+void MainWindow::connectDocumentInfo(KdenliveDoc *doc)
+{
     if (m_activeDocument) {
         if (m_activeDocument == doc) return;
         disconnect(m_activeDocument, SIGNAL(progressInfo(const QString &, int)), this, SLOT(slotGotProgressInfo(const QString &, int)));
@@ -1631,7 +1680,8 @@ void MainWindow::connectDocumentInfo(KdenliveDoc *doc) {
     connect(doc, SIGNAL(progressInfo(const QString &, int)), this, SLOT(slotGotProgressInfo(const QString &, int)));
 }
 
-void MainWindow::connectDocument(TrackView *trackView, KdenliveDoc *doc) { //changed
+void MainWindow::connectDocument(TrackView *trackView, KdenliveDoc *doc)   //changed
+{
     //m_projectMonitor->stop();
     m_closeAction->setEnabled(m_timelineArea->count() > 1);
     kDebug() << "///////////////////   CONNECTING DOC TO PROJECT VIEW ////////////////";
@@ -1761,16 +1811,19 @@ void MainWindow::connectDocument(TrackView *trackView, KdenliveDoc *doc) { //cha
     m_buttonSelectTool->setChecked(true);
 }
 
-void MainWindow::slotZoneMoved(int start, int end) {
+void MainWindow::slotZoneMoved(int start, int end)
+{
     m_activeDocument->setZone(start, end);
     m_projectMonitor->slotZoneMoved(start, end);
 }
 
-void MainWindow::slotGuidesUpdated() {
+void MainWindow::slotGuidesUpdated()
+{
     if (m_renderWidget) m_renderWidget->setGuides(m_activeDocument->guidesXml(), m_activeDocument->projectDuration());
 }
 
-void MainWindow::slotPreferences(int page, int option) {
+void MainWindow::slotPreferences(int page, int option)
+{
     //An instance of your dialog could be already created and could be
     // cached, in which case you want to display the cached dialog
     // instead of creating another one
@@ -1792,14 +1845,16 @@ void MainWindow::slotPreferences(int page, int option) {
     if (page != -1) dialog->showPage(page, option);
 }
 
-void MainWindow::slotUpdatePreviewSettings() {
+void MainWindow::slotUpdatePreviewSettings()
+{
     if (m_activeDocument) {
         m_clipMonitor->slotSetXml(NULL, 0);
         m_activeDocument->updatePreviewSettings();
     }
 }
 
-void MainWindow::updateConfiguration() {
+void MainWindow::updateConfiguration()
+{
     //TODO: we should apply settings to all projects, not only the current one
     if (m_activeTimeline) {
         m_activeTimeline->refresh();
@@ -1816,7 +1871,8 @@ void MainWindow::updateConfiguration() {
 }
 
 
-void MainWindow::slotSwitchVideoThumbs() {
+void MainWindow::slotSwitchVideoThumbs()
+{
     KdenliveSettings::setVideothumbnails(!KdenliveSettings::videothumbnails());
     if (m_activeTimeline) {
         m_activeTimeline->projectView()->slotUpdateAllThumbs();
@@ -1824,7 +1880,8 @@ void MainWindow::slotSwitchVideoThumbs() {
     m_buttonVideoThumbs->setChecked(KdenliveSettings::videothumbnails());
 }
 
-void MainWindow::slotSwitchAudioThumbs() {
+void MainWindow::slotSwitchAudioThumbs()
+{
     KdenliveSettings::setAudiothumbnails(!KdenliveSettings::audiothumbnails());
     if (m_activeTimeline) {
         m_activeTimeline->refresh();
@@ -1834,7 +1891,8 @@ void MainWindow::slotSwitchAudioThumbs() {
     m_buttonAudioThumbs->setChecked(KdenliveSettings::audiothumbnails());
 }
 
-void MainWindow::slotSwitchMarkersComments() {
+void MainWindow::slotSwitchMarkersComments()
+{
     KdenliveSettings::setShowmarkers(!KdenliveSettings::showmarkers());
     if (m_activeTimeline) {
         m_activeTimeline->refresh();
@@ -1842,26 +1900,30 @@ void MainWindow::slotSwitchMarkersComments() {
     m_buttonShowMarkers->setChecked(KdenliveSettings::showmarkers());
 }
 
-void MainWindow::slotSwitchSnap() {
+void MainWindow::slotSwitchSnap()
+{
     KdenliveSettings::setSnaptopoints(!KdenliveSettings::snaptopoints());
     m_buttonSnap->setChecked(KdenliveSettings::snaptopoints());
 }
 
 
-void MainWindow::slotDeleteTimelineClip() {
+void MainWindow::slotDeleteTimelineClip()
+{
     if (QApplication::focusWidget()->parentWidget()->parentWidget() == projectListDock) m_projectList->slotRemoveClip();
     else if (m_activeTimeline) {
         m_activeTimeline->projectView()->deleteSelectedClips();
     }
 }
 
-void MainWindow::slotChangeClipSpeed() {
+void MainWindow::slotChangeClipSpeed()
+{
     if (m_activeTimeline) {
         m_activeTimeline->projectView()->changeClipSpeed();
     }
 }
 
-void MainWindow::slotAddClipMarker() {
+void MainWindow::slotAddClipMarker()
+{
     DocClipBase *clip = NULL;
     GenTime pos;
     if (m_projectMonitor->isActive()) {
@@ -1889,7 +1951,8 @@ void MainWindow::slotAddClipMarker() {
     if (m_clipMonitor->isActive()) m_clipMonitor->checkOverlay();
 }
 
-void MainWindow::slotDeleteClipMarker() {
+void MainWindow::slotDeleteClipMarker()
+{
     DocClipBase *clip = NULL;
     GenTime pos;
     if (m_projectMonitor->isActive()) {
@@ -1920,7 +1983,8 @@ void MainWindow::slotDeleteClipMarker() {
 
 }
 
-void MainWindow::slotDeleteAllClipMarkers() {
+void MainWindow::slotDeleteAllClipMarkers()
+{
     DocClipBase *clip = NULL;
     if (m_projectMonitor->isActive()) {
         if (m_activeTimeline) {
@@ -1940,7 +2004,8 @@ void MainWindow::slotDeleteAllClipMarkers() {
     if (m_clipMonitor->isActive()) m_clipMonitor->checkOverlay();
 }
 
-void MainWindow::slotEditClipMarker() {
+void MainWindow::slotEditClipMarker()
+{
     DocClipBase *clip = NULL;
     GenTime pos;
     if (m_projectMonitor->isActive()) {
@@ -1979,78 +2044,92 @@ void MainWindow::slotEditClipMarker() {
     }
 }
 
-void MainWindow::slotAddGuide() {
+void MainWindow::slotAddGuide()
+{
     if (m_activeTimeline)
         m_activeTimeline->projectView()->slotAddGuide();
 }
 
-void MainWindow::slotInsertSpace() {
+void MainWindow::slotInsertSpace()
+{
     if (m_activeTimeline)
         m_activeTimeline->projectView()->slotInsertSpace();
 }
 
-void MainWindow::slotRemoveSpace() {
+void MainWindow::slotRemoveSpace()
+{
     if (m_activeTimeline)
         m_activeTimeline->projectView()->slotRemoveSpace();
 }
 
-void MainWindow::slotInsertTrack(int ix) {
+void MainWindow::slotInsertTrack(int ix)
+{
     m_projectMonitor->activateMonitor();
     if (m_activeTimeline)
         m_activeTimeline->projectView()->slotInsertTrack(ix);
 }
 
-void MainWindow::slotDeleteTrack(int ix) {
+void MainWindow::slotDeleteTrack(int ix)
+{
     m_projectMonitor->activateMonitor();
     if (m_activeTimeline)
         m_activeTimeline->projectView()->slotDeleteTrack(ix);
 }
 
-void MainWindow::slotChangeTrack(int ix) {
+void MainWindow::slotChangeTrack(int ix)
+{
     m_projectMonitor->activateMonitor();
     if (m_activeTimeline)
         m_activeTimeline->projectView()->slotChangeTrack(ix);
 }
 
-void MainWindow::slotEditGuide() {
+void MainWindow::slotEditGuide()
+{
     if (m_activeTimeline)
         m_activeTimeline->projectView()->slotEditGuide();
 }
 
-void MainWindow::slotDeleteGuide() {
+void MainWindow::slotDeleteGuide()
+{
     if (m_activeTimeline)
         m_activeTimeline->projectView()->slotDeleteGuide();
 }
 
-void MainWindow::slotDeleteAllGuides() {
+void MainWindow::slotDeleteAllGuides()
+{
     if (m_activeTimeline)
         m_activeTimeline->projectView()->slotDeleteAllGuides();
 }
 
-void MainWindow::slotCutTimelineClip() {
+void MainWindow::slotCutTimelineClip()
+{
     if (m_activeTimeline) {
         m_activeTimeline->projectView()->cutSelectedClips();
     }
 }
 
-void MainWindow::slotGroupClips() {
+void MainWindow::slotGroupClips()
+{
     if (m_activeTimeline) {
         m_activeTimeline->projectView()->groupClips();
     }
 }
 
-void MainWindow::slotUnGroupClips() {
+void MainWindow::slotUnGroupClips()
+{
     if (m_activeTimeline) {
         m_activeTimeline->projectView()->groupClips(false);
     }
 }
 
-void MainWindow::slotAddProjectClip(KUrl url) {
+void MainWindow::slotAddProjectClip(KUrl url)
+{
     if (m_activeDocument)
         m_activeDocument->slotAddClipFile(url, QString());
 }
 
-void MainWindow::slotAddTransition(QAction *result) {
+void MainWindow::slotAddTransition(QAction *result)
+{
     if (!result) return;
     QStringList info = result->data().toStringList();
     if (info.isEmpty()) return;
@@ -2060,7 +2139,8 @@ void MainWindow::slotAddTransition(QAction *result) {
     }
 }
 
-void MainWindow::slotAddVideoEffect(QAction *result) {
+void MainWindow::slotAddVideoEffect(QAction *result)
+{
     if (!result) return;
     QStringList info = result->data().toStringList();
     if (info.isEmpty()) return;
@@ -2068,7 +2148,8 @@ void MainWindow::slotAddVideoEffect(QAction *result) {
     slotAddEffect(effect);
 }
 
-void MainWindow::slotAddAudioEffect(QAction *result) {
+void MainWindow::slotAddAudioEffect(QAction *result)
+{
     if (!result) return;
     QStringList info = result->data().toStringList();
     if (info.isEmpty()) return;
@@ -2076,7 +2157,8 @@ void MainWindow::slotAddAudioEffect(QAction *result) {
     slotAddEffect(effect);
 }
 
-void MainWindow::slotAddCustomEffect(QAction *result) {
+void MainWindow::slotAddCustomEffect(QAction *result)
+{
     if (!result) return;
     QStringList info = result->data().toStringList();
     if (info.isEmpty()) return;
@@ -2084,21 +2166,25 @@ void MainWindow::slotAddCustomEffect(QAction *result) {
     slotAddEffect(effect);
 }
 
-void MainWindow::slotZoomIn() {
+void MainWindow::slotZoomIn()
+{
     m_zoomSlider->setValue(m_zoomSlider->value() - 1);
 }
 
-void MainWindow::slotZoomOut() {
+void MainWindow::slotZoomOut()
+{
     m_zoomSlider->setValue(m_zoomSlider->value() + 1);
 }
 
-void MainWindow::slotFitZoom() {
+void MainWindow::slotFitZoom()
+{
     if (m_activeTimeline) {
         m_zoomSlider->setValue(m_activeTimeline->fitZoom());
     }
 }
 
-void MainWindow::slotGotProgressInfo(const QString &message, int progress) {
+void MainWindow::slotGotProgressInfo(const QString &message, int progress)
+{
     statusProgressBar->setValue(progress);
     if (progress >= 0) {
         if (!message.isEmpty()) m_messageLabel->setMessage(message, InformationMessage);//statusLabel->setText(message);
@@ -2109,7 +2195,8 @@ void MainWindow::slotGotProgressInfo(const QString &message, int progress) {
     }
 }
 
-void MainWindow::slotShowClipProperties(DocClipBase *clip) {
+void MainWindow::slotShowClipProperties(DocClipBase *clip)
+{
     if (clip->clipType() == TEXT) {
         QString titlepath = m_activeDocument->projectFolder().path() + "/titles/";
         QString path = clip->getProperty("resource");
@@ -2148,77 +2235,90 @@ void MainWindow::slotShowClipProperties(DocClipBase *clip) {
     }
 }
 
-void MainWindow::customEvent(QEvent* e) {
+void MainWindow::customEvent(QEvent* e)
+{
     if (e->type() == QEvent::User) {
         // The timeline playing position changed...
         kDebug() << "RECEIVED JOG EVEMNT!!!";
     }
 }
-void MainWindow::slotActivateEffectStackView() {
+void MainWindow::slotActivateEffectStackView()
+{
     effectStack->raiseWindow(effectStackDock);
 }
 
-void MainWindow::slotActivateTransitionView(Transition *t) {
+void MainWindow::slotActivateTransitionView(Transition *t)
+{
     if (t) transitionConfig->raiseWindow(transitionConfigDock);
 }
 
-void MainWindow::slotSnapRewind() {
+void MainWindow::slotSnapRewind()
+{
     if (m_projectMonitor->isActive()) {
         if (m_activeTimeline)
             m_activeTimeline->projectView()->slotSeekToPreviousSnap();
     } else m_clipMonitor->slotSeekToPreviousSnap();
 }
 
-void MainWindow::slotSnapForward() {
+void MainWindow::slotSnapForward()
+{
     if (m_projectMonitor->isActive()) {
         if (m_activeTimeline)
             m_activeTimeline->projectView()->slotSeekToNextSnap();
     } else m_clipMonitor->slotSeekToNextSnap();
 }
 
-void MainWindow::slotClipStart() {
+void MainWindow::slotClipStart()
+{
     if (m_projectMonitor->isActive()) {
         if (m_activeTimeline)
             m_activeTimeline->projectView()->clipStart();
     }
 }
 
-void MainWindow::slotClipEnd() {
+void MainWindow::slotClipEnd()
+{
     if (m_projectMonitor->isActive()) {
         if (m_activeTimeline)
             m_activeTimeline->projectView()->clipEnd();
     }
 }
 
-void MainWindow::slotChangeTool(QAction * action) {
+void MainWindow::slotChangeTool(QAction * action)
+{
     if (action == m_buttonSelectTool) slotSetTool(SELECTTOOL);
     else if (action == m_buttonRazorTool) slotSetTool(RAZORTOOL);
     else if (action == m_buttonSpacerTool) slotSetTool(SPACERTOOL);
 }
 
-void MainWindow::slotSetTool(PROJECTTOOL tool) {
+void MainWindow::slotSetTool(PROJECTTOOL tool)
+{
     if (m_activeDocument && m_activeTimeline) {
         //m_activeDocument->setTool(tool);
         m_activeTimeline->projectView()->setTool(tool);
     }
 }
 
-void MainWindow::slotCopy() {
+void MainWindow::slotCopy()
+{
     if (!m_activeDocument || !m_activeTimeline) return;
     m_activeTimeline->projectView()->copyClip();
 }
 
-void MainWindow::slotPaste() {
+void MainWindow::slotPaste()
+{
     if (!m_activeDocument || !m_activeTimeline) return;
     m_activeTimeline->projectView()->pasteClip();
 }
 
-void MainWindow::slotPasteEffects() {
+void MainWindow::slotPasteEffects()
+{
     if (!m_activeDocument || !m_activeTimeline) return;
     m_activeTimeline->projectView()->pasteClipEffects();
 }
 
-void MainWindow::slotFind() {
+void MainWindow::slotFind()
+{
     if (!m_activeDocument || !m_activeTimeline) return;
     m_projectSearch->setEnabled(false);
     m_findActivated = true;
@@ -2229,7 +2329,8 @@ void MainWindow::slotFind() {
     qApp->installEventFilter(this);
 }
 
-void MainWindow::slotFindNext() {
+void MainWindow::slotFindNext()
+{
     if (m_activeTimeline && m_activeTimeline->projectView()->findNextString(m_findString)) {
         statusBar()->showMessage(i18n("Found : %1", m_findString));
     } else {
@@ -2238,7 +2339,8 @@ void MainWindow::slotFindNext() {
     m_findTimer.start(4000);
 }
 
-void MainWindow::findAhead() {
+void MainWindow::findAhead()
+{
     if (m_activeTimeline && m_activeTimeline->projectView()->findString(m_findString)) {
         m_projectSearchNext->setEnabled(true);
         statusBar()->showMessage(i18n("Found : %1", m_findString));
@@ -2248,7 +2350,8 @@ void MainWindow::findAhead() {
     }
 }
 
-void MainWindow::findTimeout() {
+void MainWindow::findTimeout()
+{
     m_projectSearchNext->setEnabled(false);
     m_findActivated = false;
     m_findString.clear();
@@ -2258,7 +2361,8 @@ void MainWindow::findTimeout() {
     removeEventFilter(this);
 }
 
-void MainWindow::keyPressEvent(QKeyEvent *ke) {
+void MainWindow::keyPressEvent(QKeyEvent *ke)
+{
     if (m_findActivated) {
         if (ke->key() == Qt::Key_Backspace) {
             m_findString = m_findString.left(m_findString.length() - 1);
@@ -2290,7 +2394,8 @@ void MainWindow::keyPressEvent(QKeyEvent *ke) {
 
 
 /** Gets called when the window gets hidden */
-void MainWindow::hideEvent(QHideEvent */*event*/) {
+void MainWindow::hideEvent(QHideEvent */*event*/)
+{
     // kDebug() << "I was hidden";
     // issue http://www.kdenlive.org/mantis/view.php?id=231
     if (isMinimized()) {
@@ -2299,7 +2404,8 @@ void MainWindow::hideEvent(QHideEvent */*event*/) {
     }
 }
 
-bool MainWindow::eventFilter(QObject *obj, QEvent *event) {
+bool MainWindow::eventFilter(QObject *obj, QEvent *event)
+{
     if (m_findActivated) {
         if (event->type() == QEvent::ShortcutOverride) {
             QKeyEvent* ke = (QKeyEvent*) event;
@@ -2313,7 +2419,8 @@ bool MainWindow::eventFilter(QObject *obj, QEvent *event) {
     }
 }
 
-void MainWindow::slotSaveZone(Render *render, QPoint zone) {
+void MainWindow::slotSaveZone(Render *render, QPoint zone)
+{
     KDialog *dialog = new KDialog(this);
     dialog->setCaption("Save clip zone");
     dialog->setButtons(KDialog::Ok | KDialog::Cancel);
@@ -2338,19 +2445,22 @@ void MainWindow::slotSaveZone(Render *render, QPoint zone) {
 
 }
 
-void MainWindow::slotSetInPoint() {
+void MainWindow::slotSetInPoint()
+{
     if (m_clipMonitor->isActive()) {
         m_clipMonitor->slotSetZoneStart();
     } else m_activeTimeline->projectView()->setInPoint();
 }
 
-void MainWindow::slotSetOutPoint() {
+void MainWindow::slotSetOutPoint()
+{
     if (m_clipMonitor->isActive()) {
         m_clipMonitor->slotSetZoneEnd();
     } else m_activeTimeline->projectView()->setOutPoint();
 }
 
-void MainWindow::slotGetNewLumaStuff() {
+void MainWindow::slotGetNewLumaStuff()
+{
     //KNS::Entry::List download();
     KNS::Entry::List entries = KNS::Engine::download();
     // list of changed entries
@@ -2367,7 +2477,8 @@ void MainWindow::slotGetNewLumaStuff() {
     initEffects::refreshLumas();
 }
 
-void MainWindow::slotGetNewRenderStuff() {
+void MainWindow::slotGetNewRenderStuff()
+{
     //KNS::Entry::List download();
 
     KNS::Engine engine(0);
@@ -2388,7 +2499,8 @@ void MainWindow::slotGetNewRenderStuff() {
     }
 }
 
-void MainWindow::slotGetNewMltProfileStuff() {
+void MainWindow::slotGetNewMltProfileStuff()
+{
     //KNS::Entry::List download();
 
     KNS::Engine engine(0);
@@ -2412,28 +2524,34 @@ void MainWindow::slotGetNewMltProfileStuff() {
     }
 }
 
-void MainWindow::slotAutoTransition() {
+void MainWindow::slotAutoTransition()
+{
     if (m_activeTimeline) m_activeTimeline->projectView()->autoTransition();
 }
 
-void MainWindow::slotSplitAudio() {
+void MainWindow::slotSplitAudio()
+{
     if (m_activeTimeline) m_activeTimeline->projectView()->splitAudio();
 }
 
-void MainWindow::slotAudioOnly() {
+void MainWindow::slotAudioOnly()
+{
     if (m_activeTimeline) m_activeTimeline->projectView()->audioOnly();
 }
 
-void MainWindow::slotVideoOnly() {
+void MainWindow::slotVideoOnly()
+{
     if (m_activeTimeline) m_activeTimeline->projectView()->videoOnly();
 }
 
-void MainWindow::slotDvdWizard(const QString &url, const QString &profile) {
+void MainWindow::slotDvdWizard(const QString &url, const QString &profile)
+{
     DvdWizard *w = new DvdWizard(url, profile, this);
     w->exec();
 }
 
-void MainWindow::slotShowTimeline(bool show) {
+void MainWindow::slotShowTimeline(bool show)
+{
     if (show == false) {
         m_timelineState = saveState();
         centralWidget()->setHidden(true);
@@ -2443,7 +2561,8 @@ void MainWindow::slotShowTimeline(bool show) {
     }
 }
 
-void MainWindow::slotMaximizeCurrent(bool show) {
+void MainWindow::slotMaximizeCurrent(bool show)
+{
     //TODO: is there a way to maximize current widget?
     //if (show == true)
     {
index a24780e5d60b811525a2ee8cdcc911ff50847bc8..106fbe6d33f97e78401cd5431a27dec54c33b951 100644 (file)
@@ -61,7 +61,8 @@ class DocClipBase;
 class Render;
 class Transition;
 
-class MainWindow : public KXmlGuiWindow {
+class MainWindow : public KXmlGuiWindow
+{
     Q_OBJECT
     Q_CLASSINFO("D-Bus Interface", "org.kdenlive.MainWindow")
 
index 497564cf58cf76b6960a2018a02ed43f3fc311b7..e9554ce4fd1f17a9639d1ff1b9bc5934f1614818 100644 (file)
@@ -34,7 +34,8 @@
 #include <QTimer>
 
 
-ManageCapturesDialog::ManageCapturesDialog(KUrl::List files, QWidget * parent): QDialog(parent) {
+ManageCapturesDialog::ManageCapturesDialog(KUrl::List files, QWidget * parent): QDialog(parent)
+{
     setFont(KGlobalSettings::toolBarFont());
     m_view.setupUi(this);
     m_importButton = m_view.buttonBox->button(QDialogButtonBox::Ok);
@@ -65,7 +66,8 @@ ManageCapturesDialog::ManageCapturesDialog(KUrl::List files, QWidget * parent):
 
 ManageCapturesDialog::~ManageCapturesDialog() {}
 
-void ManageCapturesDialog::slotCheckItemIcon() {
+void ManageCapturesDialog::slotCheckItemIcon()
+{
     int ct = 0;
     int count = m_view.treeWidget->topLevelItemCount();
     while (ct < count) {
@@ -83,7 +85,8 @@ void ManageCapturesDialog::slotCheckItemIcon() {
     m_view.treeWidget->setEnabled(true);
 }
 
-void ManageCapturesDialog::slotRefreshButtons() {
+void ManageCapturesDialog::slotRefreshButtons()
+{
     int count = m_view.treeWidget->topLevelItemCount();
     bool enabled = false;
     for (int i = 0; i < count; i++) {
@@ -96,7 +99,8 @@ void ManageCapturesDialog::slotRefreshButtons() {
     m_importButton->setEnabled(enabled);
 }
 
-void ManageCapturesDialog::slotDeleteCurrent() {
+void ManageCapturesDialog::slotDeleteCurrent()
+{
     QTreeWidgetItem *item = m_view.treeWidget->currentItem();
     if (!item) return;
     int i = m_view.treeWidget->indexOfTopLevelItem(item);
@@ -109,7 +113,8 @@ void ManageCapturesDialog::slotDeleteCurrent() {
     item = NULL;
 }
 
-void ManageCapturesDialog::slotToggle() {
+void ManageCapturesDialog::slotToggle()
+{
     int count = m_view.treeWidget->topLevelItemCount();
     for (int i = 0; i < count; i++) {
         QTreeWidgetItem *item = m_view.treeWidget->topLevelItem(i);
@@ -120,7 +125,8 @@ void ManageCapturesDialog::slotToggle() {
     }
 }
 
-KUrl::List ManageCapturesDialog::importFiles() {
+KUrl::List ManageCapturesDialog::importFiles()
+{
     KUrl::List result;
 
     int count = m_view.treeWidget->topLevelItemCount();
index 9c6b1c9165742e1a94d1038f7b74c12ccb0a10a4..dc0e1e784eb996a2a8ec132d2f600263f9bf5170 100644 (file)
@@ -28,7 +28,8 @@
 //#include "docclipbase.h"
 #include "ui_managecaptures_ui.h"
 
-class ManageCapturesDialog : public QDialog {
+class ManageCapturesDialog : public QDialog
+{
     Q_OBJECT
 
 public:
index 7f32b501fc6e4c1e9ed3ed511e0161ab36b79ffd..865f06cf2afe33b3308a4e587acd65dab79c7886 100644 (file)
@@ -26,7 +26,8 @@
 #include <KDebug>
 
 
-MarkerDialog::MarkerDialog(DocClipBase *clip, CommentedTime t, Timecode tc, const QString &caption, QWidget * parent): QDialog(parent), m_tc(tc), m_clip(clip), m_marker(t), m_producer(NULL), m_profile(NULL) {
+MarkerDialog::MarkerDialog(DocClipBase *clip, CommentedTime t, Timecode tc, const QString &caption, QWidget * parent): QDialog(parent), m_tc(tc), m_clip(clip), m_marker(t), m_producer(NULL), m_profile(NULL)
+{
     setFont(KGlobalSettings::toolBarFont());
     m_fps = m_tc.fps();
     m_view.setupUi(this);
@@ -87,13 +88,15 @@ MarkerDialog::MarkerDialog(DocClipBase *clip, CommentedTime t, Timecode tc, cons
     adjustSize();
 }
 
-MarkerDialog::~MarkerDialog() {
+MarkerDialog::~MarkerDialog()
+{
     delete m_previewTimer;
     if (m_producer) delete m_producer;
     if (m_profile) delete m_profile;
 }
 
-void MarkerDialog::slotUpdateThumb() {
+void MarkerDialog::slotUpdateThumb()
+{
     m_previewTimer->stop();
     int pos = m_tc.getFrameCount(m_view.marker_position->text(), m_fps);
     QPixmap p = KThumb::getFrame(m_producer, pos, (int)(100 * m_dar), 100);
@@ -101,25 +104,29 @@ void MarkerDialog::slotUpdateThumb() {
     else kDebug() << "!!!!!!!!!!!  ERROR CREATING THUMB";
 }
 
-void MarkerDialog::slotTimeUp() {
+void MarkerDialog::slotTimeUp()
+{
     int duration = m_tc.getFrameCount(m_view.marker_position->text(), m_fps);
     if (m_clip && duration >= m_clip->duration().frames(m_fps)) return;
     duration ++;
     m_view.marker_position->setText(m_tc.getTimecode(GenTime(duration, m_fps), m_fps));
 }
 
-void MarkerDialog::slotTimeDown() {
+void MarkerDialog::slotTimeDown()
+{
     int duration = m_tc.getFrameCount(m_view.marker_position->text(), m_fps);
     if (duration <= 0) return;
     duration --;
     m_view.marker_position->setText(m_tc.getTimecode(GenTime(duration, m_fps), m_fps));
 }
 
-CommentedTime MarkerDialog::newMarker() {
+CommentedTime MarkerDialog::newMarker()
+{
     return CommentedTime(GenTime(m_tc.getFrameCount(m_view.marker_position->text(), m_fps), m_fps), m_view.marker_comment->text());
 }
 
-void MarkerDialog::wheelEvent(QWheelEvent * event) {
+void MarkerDialog::wheelEvent(QWheelEvent * event)
+{
     if (m_view.marker_position->underMouse() || m_view.clip_thumb->underMouse()) {
         if (event->delta() > 0)
             slotTimeUp();
index 6d56e124381528303f21157cb05a8ef773a2355f..5979d23afa30f34b8845edf7cc57b42db8784dab 100644 (file)
 #include "timecode.h"
 #include "ui_markerdialog_ui.h"
 
-namespace Mlt {
+namespace Mlt
+{
 class Producer;
 class Profile;
 };
 
-class MarkerDialog : public QDialog {
+class MarkerDialog : public QDialog
+{
     Q_OBJECT
 
 public:
index 5ba70773ac31c50c7e40f867ae3dcff3b8d303c0..7edc2a5922a1f62f604dda5b884bc42d076248f3 100644 (file)
@@ -41,7 +41,8 @@
 
 
 Monitor::Monitor(QString name, MonitorManager *manager, QWidget *parent)
-        : QWidget(parent), render(NULL), m_monitorManager(manager), m_name(name), m_isActive(false), m_currentClip(NULL), m_dragStarted(false), m_overlay(NULL) {
+        : QWidget(parent), render(NULL), m_monitorManager(manager), m_name(name), m_isActive(false), m_currentClip(NULL), m_dragStarted(false), m_overlay(NULL)
+{
     ui.setupUi(this);
     m_scale = 1;
     m_ruler = new SmallRuler();
@@ -132,18 +133,21 @@ Monitor::Monitor(QString name, MonitorManager *manager, QWidget *parent)
     kDebug() << "/////// BUILDING MONITOR, ID: " << ui.video_frame->winId();
 }
 
-Monitor::~Monitor() {
+Monitor::~Monitor()
+{
     delete m_ruler;
     delete m_timePos;
     if (m_overlay) delete m_overlay;
     delete m_monitorRefresh;
 }
 
-QString Monitor::name() const {
+QString Monitor::name() const
+{
     return m_name;
 }
 
-void Monitor::setupMenu(QMenu *goMenu, QAction *playZone, QAction *loopZone, QMenu *markerMenu) {
+void Monitor::setupMenu(QMenu *goMenu, QAction *playZone, QAction *loopZone, QMenu *markerMenu)
+{
     m_contextMenu = new QMenu(this);
     m_contextMenu->addMenu(m_playMenu);
     m_contextMenu->addMenu(goMenu);
@@ -175,7 +179,8 @@ void Monitor::setupMenu(QMenu *goMenu, QAction *playZone, QAction *loopZone, QMe
 
 }
 
-void Monitor::slotSetSizeOneToOne() {
+void Monitor::slotSetSizeOneToOne()
+{
     QRect r = QApplication::desktop()->screenGeometry();
     const int maxWidth = r.width() - 20;
     const int maxHeight = r.height() - 20;
@@ -194,7 +199,8 @@ void Monitor::slotSetSizeOneToOne() {
     emit adjustMonitorSize();
 }
 
-void Monitor::slotSetSizeOneToTwo() {
+void Monitor::slotSetSizeOneToTwo()
+{
     QRect r = QApplication::desktop()->screenGeometry();
     const int maxWidth = r.width() - 20;
     const int maxHeight = r.height() - 20;
@@ -213,27 +219,33 @@ void Monitor::slotSetSizeOneToTwo() {
     emit adjustMonitorSize();
 }
 
-void Monitor::resetSize() {
+void Monitor::resetSize()
+{
     ui.video_frame->setMinimumSize(0, 0);
 }
 
-DocClipBase *Monitor::activeClip() {
+DocClipBase *Monitor::activeClip()
+{
     return m_currentClip;
 }
 
-void Monitor::slotSeekToPreviousSnap() {
+void Monitor::slotSeekToPreviousSnap()
+{
     if (m_currentClip) slotSeek(getSnapForPos(true).frames(m_monitorManager->timecode().fps()));
 }
 
-void Monitor::slotSeekToNextSnap() {
+void Monitor::slotSeekToNextSnap()
+{
     if (m_currentClip) slotSeek(getSnapForPos(false).frames(m_monitorManager->timecode().fps()));
 }
 
-GenTime Monitor::position() {
+GenTime Monitor::position()
+{
     return GenTime(m_position, m_monitorManager->timecode().fps());
 }
 
-GenTime Monitor::getSnapForPos(bool previous) {
+GenTime Monitor::getSnapForPos(bool previous)
+{
     QList <GenTime> snaps;
     QList < GenTime > markers = m_currentClip->snapMarkers();
     for (int i = 0; i < markers.size(); ++i) {
@@ -261,20 +273,23 @@ GenTime Monitor::getSnapForPos(bool previous) {
 
 
 
-void Monitor::slotZoneMoved(int start, int end) {
+void Monitor::slotZoneMoved(int start, int end)
+{
     m_ruler->setZone(start, end);
     checkOverlay();
     setClipZone(m_ruler->zone());
 }
 
-void Monitor::slotSetZoneStart() {
+void Monitor::slotSetZoneStart()
+{
     m_ruler->setZone(m_position, -1);
     emit zoneUpdated(m_ruler->zone());
     checkOverlay();
     setClipZone(m_ruler->zone());
 }
 
-void Monitor::slotSetZoneEnd() {
+void Monitor::slotSetZoneEnd()
+{
     m_ruler->setZone(-1, m_position);
     emit zoneUpdated(m_ruler->zone());
     checkOverlay();
@@ -282,7 +297,8 @@ void Monitor::slotSetZoneEnd() {
 }
 
 // virtual
-void Monitor::mousePressEvent(QMouseEvent * event) {
+void Monitor::mousePressEvent(QMouseEvent * event)
+{
     if (event->button() != Qt::RightButton) {
         if (ui.video_frame->underMouse()) {
             m_dragStarted = true;
@@ -292,7 +308,8 @@ void Monitor::mousePressEvent(QMouseEvent * event) {
 }
 
 // virtual
-void Monitor::mouseReleaseEvent(QMouseEvent * event) {
+void Monitor::mouseReleaseEvent(QMouseEvent * event)
+{
     if (m_dragStarted) {
         if (ui.video_frame->underMouse()) {
             slotPlay();
@@ -303,7 +320,8 @@ void Monitor::mouseReleaseEvent(QMouseEvent * event) {
 
 
 // virtual
-void Monitor::mouseMoveEvent(QMouseEvent *event) {
+void Monitor::mouseMoveEvent(QMouseEvent *event)
+{
     // kDebug() << "// DRAG STARTED, MOUSE MOVED: ";
     if (!m_dragStarted || m_currentClip == NULL) return;
 
@@ -352,7 +370,8 @@ Qt::DropActions Monitor::supportedDropActions() const {
     return Qt::MoveAction;
 }*/
 
-QStringList Monitor::mimeTypes() const {
+QStringList Monitor::mimeTypes() const
+{
     QStringList qstrList;
     // list of accepted mime types for drop
     qstrList.append("kdenlive/clip");
@@ -369,7 +388,8 @@ QStringList Monitor::mimeTypes() const {
  * Ctrl+wheel moves single frame, without Ctrl moves a second.
  *
  * See also http://www.kdenlive.org/mantis/view.php?id=265 */
-void Monitor::wheelEvent(QWheelEvent * event) {
+void Monitor::wheelEvent(QWheelEvent * event)
+{
     if (event->modifiers() == Qt::ControlModifier) {
         int delta = m_monitorManager->timecode().fps();
         if (event->delta() < 0) delta = 0 - delta;
@@ -380,7 +400,8 @@ void Monitor::wheelEvent(QWheelEvent * event) {
     }
 }
 
-void Monitor::slotSetThumbFrame() {
+void Monitor::slotSetThumbFrame()
+{
     if (m_currentClip == NULL) {
         return;
     }
@@ -388,7 +409,8 @@ void Monitor::slotSetThumbFrame() {
     emit refreshClipThumbnail(m_currentClip->getId());
 }
 
-void Monitor::slotExtractCurrentFrame() {
+void Monitor::slotExtractCurrentFrame()
+{
     QPixmap frame = render->extractFrame(m_position);
     QString outputFile = KFileDialog::getSaveFileName(KUrl(), "image/png");
     if (!outputFile.isEmpty()) {
@@ -397,20 +419,24 @@ void Monitor::slotExtractCurrentFrame() {
     }
 }
 
-bool Monitor::isActive() const {
+bool Monitor::isActive() const
+{
     return m_isActive;
 }
 
-void Monitor::activateMonitor() {
+void Monitor::activateMonitor()
+{
     if (!m_isActive) m_monitorManager->switchMonitors(); //m_monitorManager->activateMonitor(m_name);
 }
 
-void Monitor::slotSeek() {
+void Monitor::slotSeek()
+{
     const int frames = m_monitorManager->timecode().getFrameCount(m_timePos->text(), m_monitorManager->timecode().fps());
     slotSeek(frames);
 }
 
-void Monitor::slotSeek(int pos) {
+void Monitor::slotSeek(int pos)
+{
     activateMonitor();
     if (render == NULL) return;
     m_position = pos;
@@ -420,7 +446,8 @@ void Monitor::slotSeek(int pos) {
     m_timePos->setText(m_monitorManager->timecode().getTimecodeFromFrames(m_position));
 }
 
-void Monitor::checkOverlay() {
+void Monitor::checkOverlay()
+{
     if (m_overlay == NULL) return;
     QPoint zone = m_ruler->zone();
     if (m_position == zone.x()) m_overlay->setOverlayText(i18n("In Point"));
@@ -434,7 +461,8 @@ void Monitor::checkOverlay() {
     }
 }
 
-void Monitor::slotStart() {
+void Monitor::slotStart()
+{
     activateMonitor();
     render->play(0);
     m_position = 0;
@@ -443,7 +471,8 @@ void Monitor::slotStart() {
     m_timePos->setText(m_monitorManager->timecode().getTimecodeFromFrames(m_position));
 }
 
-void Monitor::slotEnd() {
+void Monitor::slotEnd()
+{
     activateMonitor();
     render->play(0);
     m_position = render->getLength();
@@ -452,7 +481,8 @@ void Monitor::slotEnd() {
     m_timePos->setText(m_monitorManager->timecode().getTimecodeFromFrames(m_position));
 }
 
-void Monitor::slotZoneStart() {
+void Monitor::slotZoneStart()
+{
     activateMonitor();
     render->play(0);
     m_position = m_ruler->zone().x();
@@ -461,7 +491,8 @@ void Monitor::slotZoneStart() {
     m_timePos->setText(m_monitorManager->timecode().getTimecodeFromFrames(m_position));
 }
 
-void Monitor::slotZoneEnd() {
+void Monitor::slotZoneEnd()
+{
     activateMonitor();
     render->play(0);
     m_position = m_ruler->zone().y();
@@ -470,7 +501,8 @@ void Monitor::slotZoneEnd() {
     m_timePos->setText(m_monitorManager->timecode().getTimecodeFromFrames(m_position));
 }
 
-void Monitor::slotRewind(double speed) {
+void Monitor::slotRewind(double speed)
+{
     activateMonitor();
     if (speed == 0) {
         double currentspeed = render->playSpeed();
@@ -481,7 +513,8 @@ void Monitor::slotRewind(double speed) {
     m_playAction->setIcon(m_pauseIcon);
 }
 
-void Monitor::slotForward(double speed) {
+void Monitor::slotForward(double speed)
+{
     activateMonitor();
     if (speed == 0) {
         double currentspeed = render->playSpeed();
@@ -492,7 +525,8 @@ void Monitor::slotForward(double speed) {
     m_playAction->setIcon(m_pauseIcon);
 }
 
-void Monitor::slotRewindOneFrame(int diff) {
+void Monitor::slotRewindOneFrame(int diff)
+{
     activateMonitor();
     render->play(0);
     if (m_position < 1) return;
@@ -504,7 +538,8 @@ void Monitor::slotRewindOneFrame(int diff) {
     checkOverlay();
 }
 
-void Monitor::slotForwardOneFrame(int diff) {
+void Monitor::slotForwardOneFrame(int diff)
+{
     activateMonitor();
     render->play(0);
     if (m_position >= m_length) return;
@@ -516,7 +551,8 @@ void Monitor::slotForwardOneFrame(int diff) {
     checkOverlay();
 }
 
-void Monitor::seekCursor(int pos) {
+void Monitor::seekCursor(int pos)
+{
     activateMonitor();
     checkOverlay();
     m_position = pos;
@@ -524,7 +560,8 @@ void Monitor::seekCursor(int pos) {
     m_ruler->slotNewValue(pos);
 }
 
-void Monitor::rendererStopped(int pos) {
+void Monitor::rendererStopped(int pos)
+{
     //int rulerPos = (int)(pos * m_scale);
     m_ruler->slotNewValue(pos);
     m_position = pos;
@@ -534,7 +571,8 @@ void Monitor::rendererStopped(int pos) {
     m_playAction->setIcon(m_playIcon);
 }
 
-void Monitor::initMonitor() {
+void Monitor::initMonitor()
+{
     kDebug() << "/////// INITING MONITOR, ID: " << ui.video_frame->winId();
 }
 
@@ -546,7 +584,8 @@ void Monitor::initMonitor() {
     //
 }*/
 
-void Monitor::adjustRulerSize(int length) {
+void Monitor::adjustRulerSize(int length)
+{
     if (length > 0) m_length = length;
     m_ruler->adjustScale(m_length);
     if (m_currentClip != NULL) {
@@ -555,26 +594,30 @@ void Monitor::adjustRulerSize(int length) {
     }
 }
 
-void Monitor::stop() {
+void Monitor::stop()
+{
     m_isActive = false;
     if (render) render->stop();
     //kDebug()<<"/// MONITOR RENDER STOP";
 }
 
-void Monitor::start() {
+void Monitor::start()
+{
     m_isActive = true;
     if (render) render->start();
     //kDebug()<<"/// MONITOR RENDER START";
 }
 
-void Monitor::refreshMonitor(bool visible) {
+void Monitor::refreshMonitor(bool visible)
+{
     if (visible && render) {
         activateMonitor();
         render->doRefresh(); //askForRefresh();
     }
 }
 
-void Monitor::pause() {
+void Monitor::pause()
+{
     if (render == NULL) return;
     activateMonitor();
     render->pause();
@@ -582,7 +625,8 @@ void Monitor::pause() {
     //m_playAction->setIcon(m_pauseIcon);
 }
 
-void Monitor::slotPlay() {
+void Monitor::slotPlay()
+{
     if (render == NULL) return;
     activateMonitor();
     if (render->playSpeed() == 0) {
@@ -595,7 +639,8 @@ void Monitor::slotPlay() {
     render->switchPlay();
 }
 
-void Monitor::slotPlayZone() {
+void Monitor::slotPlayZone()
+{
     if (render == NULL) return;
     activateMonitor();
     QPoint p = m_ruler->zone();
@@ -604,7 +649,8 @@ void Monitor::slotPlayZone() {
     m_playAction->setIcon(m_pauseIcon);
 }
 
-void Monitor::slotLoopZone() {
+void Monitor::slotLoopZone()
+{
     if (render == NULL) return;
     activateMonitor();
     QPoint p = m_ruler->zone();
@@ -613,7 +659,8 @@ void Monitor::slotLoopZone() {
     m_playAction->setIcon(m_pauseIcon);
 }
 
-void Monitor::slotSetXml(DocClipBase *clip, const int position) {
+void Monitor::slotSetXml(DocClipBase *clip, const int position)
+{
     if (render == NULL) return;
     activateMonitor();
     if (!clip && m_currentClip != NULL) {
@@ -628,7 +675,8 @@ void Monitor::slotSetXml(DocClipBase *clip, const int position) {
     } else if (position != -1) render->seek(GenTime(position, render->fps()));
 }
 
-void Monitor::slotOpenFile(const QString &file) {
+void Monitor::slotOpenFile(const QString &file)
+{
     if (render == NULL) return;
     activateMonitor();
     QDomDocument doc;
@@ -641,7 +689,8 @@ void Monitor::slotOpenFile(const QString &file) {
     render->setSceneList(doc, 0);
 }
 
-void Monitor::slotSaveZone() {
+void Monitor::slotSaveZone()
+{
     if (render == NULL) return;
     emit saveZone(render, m_ruler->zone());
 
@@ -649,28 +698,33 @@ void Monitor::slotSaveZone() {
 }
 
 
-void Monitor::resetProfile() {
+void Monitor::resetProfile()
+{
     if (render == NULL) return;
     render->resetProfile();
 }
 
-void Monitor::saveSceneList(QString path, QDomElement info) {
+void Monitor::saveSceneList(QString path, QDomElement info)
+{
     if (render == NULL) return;
     render->saveSceneList(path, info);
 }
 
-const QString Monitor::sceneList() {
+const QString Monitor::sceneList()
+{
     if (render == NULL) return QString();
     return render->sceneList();
 }
 
 
-void Monitor::setClipZone(QPoint pos) {
+void Monitor::setClipZone(QPoint pos)
+{
     if (m_currentClip == NULL) return;
     m_currentClip->setZone(pos);
 }
 
-void Monitor::slotSwitchMonitorInfo(bool show) {
+void Monitor::slotSwitchMonitorInfo(bool show)
+{
     KdenliveSettings::setDisplayMonitorInfo(show);
     if (show) {
         if (m_overlay) return;
@@ -683,28 +737,33 @@ void Monitor::slotSwitchMonitorInfo(bool show) {
     }
 }
 
-MonitorRefresh::MonitorRefresh(QWidget* parent): QWidget(parent), m_renderer(NULL) {
+MonitorRefresh::MonitorRefresh(QWidget* parent): QWidget(parent), m_renderer(NULL)
+{
     setAttribute(Qt::WA_PaintOnScreen);
     setAttribute(Qt::WA_OpaquePaintEvent); //setAttribute(Qt::WA_NoSystemBackground);
 }
 
-void MonitorRefresh::setRenderer(Render* render) {
+void MonitorRefresh::setRenderer(Render* render)
+{
     m_renderer = render;
 }
 
-void MonitorRefresh::paintEvent(QPaintEvent * /*event*/) {
+void MonitorRefresh::paintEvent(QPaintEvent * /*event*/)
+{
     if (m_renderer) m_renderer->doRefresh();
 }
 
 
-Overlay::Overlay(QWidget* parent): QLabel(parent) {
+Overlay::Overlay(QWidget* parent): QLabel(parent)
+{
     setAttribute(Qt::WA_TransparentForMouseEvents);
     setAttribute(Qt::WA_OpaquePaintEvent);
     //setAttribute(Qt::WA_NoSystemBackground);
     setAutoFillBackground(false);
 }
 
-void Overlay::paintEvent(QPaintEvent * /*event*/) {
+void Overlay::paintEvent(QPaintEvent * /*event*/)
+{
     QPainter painter(this);
     QColor col;
     painter.setPen(Qt::white);
@@ -716,7 +775,8 @@ void Overlay::paintEvent(QPaintEvent * /*event*/) {
 
 
 
-void Overlay::setOverlayText(const QString &text, bool isZone) {
+void Overlay::setOverlayText(const QString &text, bool isZone)
+{
     setHidden(true);
     m_isZone = isZone;
     setText(' ' + text + ' ');
index d9fea5355b754c26be7ab0ca1e8952ba65311df7..23a41c2045961ace269f9a74163fe087e0e55890 100644 (file)
@@ -36,7 +36,8 @@ class Render;
 class SmallRuler;
 class DocClipBase;
 
-class MonitorRefresh : public QWidget {
+class MonitorRefresh : public QWidget
+{
     Q_OBJECT
 public:
     MonitorRefresh(QWidget* parent);
@@ -47,7 +48,8 @@ private:
     Render *m_renderer;
 };
 
-class Overlay : public QLabel {
+class Overlay : public QLabel
+{
     Q_OBJECT
 public:
     Overlay(QWidget* parent);
@@ -58,7 +60,8 @@ private:
     bool m_isZone;
 };
 
-class Monitor : public QWidget {
+class Monitor : public QWidget
+{
     Q_OBJECT
 
 public:
index c620ece28ced9d1f7ac9bb58d56903cb24e7f870..30eda6e55c3400d6b4258424d19718246c1625ce 100644 (file)
 
 
 MonitorManager::MonitorManager(QWidget *parent)
-        : QObject(parent) {
+        : QObject(parent)
+{
 }
 
-Timecode MonitorManager::timecode() {
+Timecode MonitorManager::timecode()
+{
     return m_timecode;
 }
 
-void MonitorManager::initMonitors(Monitor *clipMonitor, Monitor *projectMonitor) {
+void MonitorManager::initMonitors(Monitor *clipMonitor, Monitor *projectMonitor)
+{
     m_clipMonitor = clipMonitor;
     m_projectMonitor = projectMonitor;
 }
 
-void MonitorManager::activateMonitor(QString name) {
+void MonitorManager::activateMonitor(QString name)
+{
     if (m_activeMonitor == name) return;
     if (name == "clip") {
         m_projectMonitor->stop();
@@ -55,7 +59,8 @@ void MonitorManager::activateMonitor(QString name) {
     m_activeMonitor = name;
 }
 
-void MonitorManager::switchMonitors() {
+void MonitorManager::switchMonitors()
+{
     if (m_clipMonitor->isActive()) {
         m_clipMonitor->stop();
         m_projectMonitor->start();
@@ -70,72 +75,86 @@ void MonitorManager::switchMonitors() {
     }
 }
 
-void MonitorManager::stopActiveMonitor() {
+void MonitorManager::stopActiveMonitor()
+{
     if (m_clipMonitor->isActive()) m_clipMonitor->pause();
     else m_projectMonitor->pause();
 }
 
-void MonitorManager::slotPlay() {
+void MonitorManager::slotPlay()
+{
     if (m_clipMonitor->isActive()) m_clipMonitor->slotPlay();
     else m_projectMonitor->slotPlay();
 }
 
-void MonitorManager::slotPlayZone() {
+void MonitorManager::slotPlayZone()
+{
     if (m_clipMonitor->isActive()) m_clipMonitor->slotPlayZone();
     else m_projectMonitor->slotPlayZone();
 }
 
-void MonitorManager::slotLoopZone() {
+void MonitorManager::slotLoopZone()
+{
     if (m_clipMonitor->isActive()) m_clipMonitor->slotLoopZone();
     else m_projectMonitor->slotLoopZone();
 }
 
-void MonitorManager::slotRewind(double speed) {
+void MonitorManager::slotRewind(double speed)
+{
     if (m_clipMonitor->isActive()) m_clipMonitor->slotRewind(speed);
     else m_projectMonitor->slotRewind(speed);
 }
 
-void MonitorManager::slotForward(double speed) {
+void MonitorManager::slotForward(double speed)
+{
     if (m_clipMonitor->isActive()) m_clipMonitor->slotForward(speed);
     else m_projectMonitor->slotForward(speed);
 }
 
-void MonitorManager::slotRewindOneFrame() {
+void MonitorManager::slotRewindOneFrame()
+{
     if (m_clipMonitor->isActive()) m_clipMonitor->slotRewindOneFrame();
     else m_projectMonitor->slotRewindOneFrame();
 }
 
-void MonitorManager::slotForwardOneFrame() {
+void MonitorManager::slotForwardOneFrame()
+{
     if (m_clipMonitor->isActive()) m_clipMonitor->slotForwardOneFrame();
     else m_projectMonitor->slotForwardOneFrame();
 }
 
-void MonitorManager::slotRewindOneSecond() {
+void MonitorManager::slotRewindOneSecond()
+{
     if (m_clipMonitor->isActive()) m_clipMonitor->slotRewindOneFrame(m_timecode.fps());
     else m_projectMonitor->slotRewindOneFrame(m_timecode.fps());
 }
 
-void MonitorManager::slotForwardOneSecond() {
+void MonitorManager::slotForwardOneSecond()
+{
     if (m_clipMonitor->isActive()) m_clipMonitor->slotForwardOneFrame(m_timecode.fps());
     else m_projectMonitor->slotForwardOneFrame(m_timecode.fps());
 }
 
-void MonitorManager::slotStart() {
+void MonitorManager::slotStart()
+{
     if (m_clipMonitor->isActive()) m_clipMonitor->slotStart();
     else m_projectMonitor->slotStart();
 }
 
-void MonitorManager::slotEnd() {
+void MonitorManager::slotEnd()
+{
     if (m_clipMonitor->isActive()) m_clipMonitor->slotEnd();
     else m_projectMonitor->slotEnd();
 }
 
-void MonitorManager::resetProfiles(Timecode tc) {
+void MonitorManager::resetProfiles(Timecode tc)
+{
     m_timecode = tc;
     QTimer::singleShot(300, this, SLOT(slotResetProfiles()));
 }
 
-void MonitorManager::slotResetProfiles() {
+void MonitorManager::slotResetProfiles()
+{
     activateMonitor("clip");
     m_clipMonitor->resetProfile();
     activateMonitor("project");
index 2109108427b9047ab184c8d162dea8ad94ad2479..e16f276d4c6814fbedd178cbff546022ef4dd2a5 100644 (file)
@@ -26,7 +26,8 @@
 
 class Monitor;
 
-class MonitorManager : public QObject {
+class MonitorManager : public QObject
+{
     Q_OBJECT
 
 public:
index fe0d0eda15a558a96dac50265415057dc9437c75..1df58fa6f0750a16395d9db9a23bc055c2f2727a 100644 (file)
 
 #include <KLocale>
 
-MoveClipCommand::MoveClipCommand(CustomTrackView *view, const ItemInfo start, const ItemInfo end, bool doIt, QUndoCommand * parent) : QUndoCommand(parent), m_view(view), m_startPos(start), m_endPos(end), m_doIt(doIt) {
+MoveClipCommand::MoveClipCommand(CustomTrackView *view, const ItemInfo start, const ItemInfo end, bool doIt, QUndoCommand * parent) : QUndoCommand(parent), m_view(view), m_startPos(start), m_endPos(end), m_doIt(doIt)
+{
     setText(i18n("Move clip"));
 }
 
 
 // virtual
-void MoveClipCommand::undo() {
+void MoveClipCommand::undo()
+{
 // kDebug()<<"----  undoing action";
     m_doIt = true;
     m_view->moveClip(m_endPos, m_startPos);
 }
 // virtual
-void MoveClipCommand::redo() {
+void MoveClipCommand::redo()
+{
     kDebug() << "----  redoing action";
     if (m_doIt)
         m_view->moveClip(m_startPos, m_endPos);
index b1803ca4f3e12e71de8c7044b06a56306a742e81..933318887488c3f80402493d57b22115d0da6bf4 100644 (file)
@@ -30,7 +30,8 @@
 
 class CustomTrackView;
 
-class MoveClipCommand : public QUndoCommand {
+class MoveClipCommand : public QUndoCommand
+{
 public:
     MoveClipCommand(CustomTrackView *view, const ItemInfo start, const ItemInfo end, bool doIt, QUndoCommand * parent = 0);
     virtual void undo();
index e6271afd91285fae791295fd07468973c6a411f8..74f8939f1b933871493548138f865949eb03351e 100644 (file)
@@ -23,7 +23,8 @@
 
 #include <KLocale>
 
-MoveEffectCommand::MoveEffectCommand(CustomTrackView *view, const int track, GenTime pos, int oldPos, int newPos, bool doIt, QUndoCommand * parent) : QUndoCommand(parent), m_view(view), m_track(track), m_pos(pos), m_oldindex(oldPos), m_newindex(newPos), m_doIt(doIt) {
+MoveEffectCommand::MoveEffectCommand(CustomTrackView *view, const int track, GenTime pos, int oldPos, int newPos, bool doIt, QUndoCommand * parent) : QUndoCommand(parent), m_view(view), m_track(track), m_pos(pos), m_oldindex(oldPos), m_newindex(newPos), m_doIt(doIt)
+{
     /*    QString effectName;
         QDomNode namenode = effect.elementsByTagName("name").item(0);
         if (!namenode.isNull()) effectName = i18n(namenode.toElement().text().toUtf8().data());
@@ -33,12 +34,14 @@ MoveEffectCommand::MoveEffectCommand(CustomTrackView *view, const int track, Gen
 }
 
 // virtual
-int MoveEffectCommand::id() const {
+int MoveEffectCommand::id() const
+{
     return 2;
 }
 
 // virtual
-bool MoveEffectCommand::mergeWith(const QUndoCommand * other) {
+bool MoveEffectCommand::mergeWith(const QUndoCommand * other)
+{
     if (other->id() != id()) return false;
     if (m_track != static_cast<const MoveEffectCommand*>(other)->m_track) return false;
     if (m_pos != static_cast<const MoveEffectCommand*>(other)->m_pos) return false;
@@ -48,12 +51,14 @@ bool MoveEffectCommand::mergeWith(const QUndoCommand * other) {
 }
 
 // virtual
-void MoveEffectCommand::undo() {
+void MoveEffectCommand::undo()
+{
     kDebug() << "----  undoing action";
     m_view->moveEffect(m_track, m_pos, m_newindex, m_oldindex);
 }
 // virtual
-void MoveEffectCommand::redo() {
+void MoveEffectCommand::redo()
+{
     kDebug() << "----  redoing action";
     m_view->moveEffect(m_track, m_pos, m_oldindex, m_newindex);
 }
index 1ac6946b6006bc7d0539b4fe9d0215f98ceced7e..0a75e71db332e54290640403875082b8546377ba 100644 (file)
@@ -28,7 +28,8 @@
 
 class CustomTrackView;
 
-class MoveEffectCommand : public QUndoCommand {
+class MoveEffectCommand : public QUndoCommand
+{
 public:
     MoveEffectCommand(CustomTrackView *view, const int track, GenTime pos, int oldPos, int newPos, bool doIt, QUndoCommand * parent = 0);
 
index 01e99dca21e9855afacdaf1505cb0225effedf0b..3723c39b11860bec4b99f0901728b61578471ad7 100644 (file)
 
 #include <KLocale>
 
-MoveGroupCommand::MoveGroupCommand(CustomTrackView *view, const QList <ItemInfo> startClip, const QList <ItemInfo> startTransition, const GenTime offset, const int trackOffset, bool doIt, QUndoCommand * parent) : QUndoCommand(parent), m_view(view), m_startClip(startClip), m_startTransition(startTransition), m_offset(offset), m_trackOffset(trackOffset), m_doIt(doIt) {
+MoveGroupCommand::MoveGroupCommand(CustomTrackView *view, const QList <ItemInfo> startClip, const QList <ItemInfo> startTransition, const GenTime offset, const int trackOffset, bool doIt, QUndoCommand * parent) : QUndoCommand(parent), m_view(view), m_startClip(startClip), m_startTransition(startTransition), m_offset(offset), m_trackOffset(trackOffset), m_doIt(doIt)
+{
     setText(i18n("Move group"));
 }
 
 
 // virtual
-void MoveGroupCommand::undo() {
+void MoveGroupCommand::undo()
+{
 // kDebug()<<"----  undoing action";
     m_doIt = true;
     m_view->moveGroup(m_startClip, m_startTransition, GenTime() - m_offset, - m_trackOffset, true);
 }
 // virtual
-void MoveGroupCommand::redo() {
+void MoveGroupCommand::redo()
+{
     if (m_doIt)
         m_view->moveGroup(m_startClip, m_startTransition, m_offset, m_trackOffset, false);
     m_doIt = true;
index d5cae6632e312dd1c9bcc63dcde47d4f7efd14ec..aa2a6ba49f345d37a0cca0b6b87e5fe83fec6151 100644 (file)
@@ -31,7 +31,8 @@
 class GenTime;
 class CustomTrackView;
 
-class MoveGroupCommand : public QUndoCommand {
+class MoveGroupCommand : public QUndoCommand
+{
 public:
     MoveGroupCommand(CustomTrackView *view, const QList <ItemInfo> startClip, const QList <ItemInfo> startTransition, const GenTime offset, const int trackOffset, bool doIt, QUndoCommand * parent = 0);
     virtual void undo();
index 4b4bf236a7b10b3ed95e543c66bdec9799735d48..40ba3e3f831024db5cde15023f233158613dae36 100644 (file)
 
 #include <KLocale>
 
-MoveTransitionCommand::MoveTransitionCommand(CustomTrackView *view, const ItemInfo start, const ItemInfo end, bool doIt, QUndoCommand * parent) : QUndoCommand(parent), m_view(view), m_startPos(start), m_endPos(end), m_doIt(doIt) {
+MoveTransitionCommand::MoveTransitionCommand(CustomTrackView *view, const ItemInfo start, const ItemInfo end, bool doIt, QUndoCommand * parent) : QUndoCommand(parent), m_view(view), m_startPos(start), m_endPos(end), m_doIt(doIt)
+{
     setText(i18n("Move transition"));
 }
 
 
 // virtual
-void MoveTransitionCommand::undo() {
+void MoveTransitionCommand::undo()
+{
 // kDebug()<<"----  undoing action";
     m_doIt = true;
     m_view->moveTransition(m_endPos, m_startPos);
 }
 // virtual
-void MoveTransitionCommand::redo() {
+void MoveTransitionCommand::redo()
+{
     kDebug() << "----  redoing action";
     if (m_doIt) m_view->moveTransition(m_startPos, m_endPos);
     m_doIt = true;
index f0e2f03ce5cdf2c96b03011521b6c85be8094fd5..feaeca437151f56a3398bf0c91f2d27e4ff88230 100644 (file)
@@ -28,7 +28,8 @@
 
 class CustomTrackView;
 
-class MoveTransitionCommand : public QUndoCommand {
+class MoveTransitionCommand : public QUndoCommand
+{
 public:
     MoveTransitionCommand(CustomTrackView *view, const ItemInfo start, const ItemInfo end, bool doIt, QUndoCommand * parent = 0);
     virtual void undo();
index 5d736d7279fc9705f090dd7f467a7a561e2c7987..d2fc920cdb5892daf6f8b1e4a7dd2e99e664451c 100644 (file)
@@ -23,7 +23,8 @@
 #include <KDebug>
 #include <KPlotPoint>
 
-ParameterPlotter::ParameterPlotter(QWidget *parent): KPlotWidget(parent) {
+ParameterPlotter::ParameterPlotter(QWidget *parent): KPlotWidget(parent)
+{
     setAntialiasing(true);
     setLeftPadding(20);
     setRightPadding(10);
@@ -52,7 +53,8 @@ ParameterPlotter::ParameterPlotter(QWidget *parent): KPlotWidget(parent) {
   </effect>
 
 */
-void ParameterPlotter::setPointLists(const QDomElement& d, const QString& paramName, int startframe, int endframe) {
+void ParameterPlotter::setPointLists(const QDomElement& d, const QString& paramName, int startframe, int endframe)
+{
 
     //QListIterator <QPair <QString, QMap< int , QVariant > > > nameit(params);
     m_paramName = paramName;
@@ -138,7 +140,8 @@ void ParameterPlotter::setPointLists(const QDomElement& d, const QString& paramN
 
 }
 
-void ParameterPlotter::createParametersNew() {
+void ParameterPlotter::createParametersNew()
+{
     QList<KPlotObject*> plotobjs = plotObjects();
     if (plotobjs.size() != parameterNameList.size()) {
         kDebug() << "ERROR size not equal";
@@ -165,7 +168,8 @@ void ParameterPlotter::createParametersNew() {
 }
 
 
-void ParameterPlotter::mouseMoveEvent(QMouseEvent * event) {
+void ParameterPlotter::mouseMoveEvent(QMouseEvent * event)
+{
 
     if (movepoint != NULL) {
         QList<KPlotPoint*> list =   pointsUnderPoint(event->pos() - QPoint(leftPadding(), topPadding())) ;
@@ -195,7 +199,8 @@ void ParameterPlotter::mouseMoveEvent(QMouseEvent * event) {
     }
 }
 
-void ParameterPlotter::replot(const QString & name) {
+void ParameterPlotter::replot(const QString & name)
+{
 
     //removeAllPlotObjects();
     int i = 0;
@@ -218,7 +223,8 @@ void ParameterPlotter::replot(const QString & name) {
     }
 }
 
-void ParameterPlotter::mousePressEvent(QMouseEvent * event) {
+void ParameterPlotter::mousePressEvent(QMouseEvent * event)
+{
     //topPadding and other padding can be wrong and this (i hope) will be correctet in newer kde versions
     QPoint inPlot = event->pos() - QPoint(leftPadding(), topPadding());
     QList<KPlotPoint*> list =   pointsUnderPoint(inPlot) ;
@@ -256,34 +262,42 @@ void ParameterPlotter::mousePressEvent(QMouseEvent * event) {
     }
 }
 
-void ParameterPlotter::setMoveX(bool b) {
+void ParameterPlotter::setMoveX(bool b)
+{
     m_moveX = b;
 }
 
-void ParameterPlotter::setMoveY(bool b) {
+void ParameterPlotter::setMoveY(bool b)
+{
     m_moveY = b;
 }
 
-void ParameterPlotter::setMoveTimeLine(bool b) {
+void ParameterPlotter::setMoveTimeLine(bool b)
+{
     m_moveTimeline = b;
 }
 
-void ParameterPlotter::setNewPoints(bool b) {
+void ParameterPlotter::setNewPoints(bool b)
+{
     m_newPoints = b;
 }
 
-bool ParameterPlotter::isMoveX() {
+bool ParameterPlotter::isMoveX()
+{
     return m_moveX;
 }
 
-bool ParameterPlotter::isMoveY() {
+bool ParameterPlotter::isMoveY()
+{
     return m_moveY;
 }
 
-bool ParameterPlotter::isMoveTimeline() {
+bool ParameterPlotter::isMoveTimeline()
+{
     return m_moveTimeline;
 }
 
-bool ParameterPlotter::isNewPoints() {
+bool ParameterPlotter::isNewPoints()
+{
     return m_newPoints;
 }
index a5c8816efc96af2287afa58574d6b13c71016954..ede3fa40fd97f9a8e1b0e20560d49f3415106a60 100644 (file)
@@ -22,7 +22,8 @@
 #include <QDomElement>
 #include <QMap>
 
-class ParameterPlotter : public KPlotWidget {
+class ParameterPlotter : public KPlotWidget
+{
     Q_OBJECT
 public:
     ParameterPlotter(QWidget *parent = 0);
index fe39f86b5cfe47aedb24e41f505de1336ef44288..56af2f61ecfb9acf1c291b71b683ba0b027d8668 100644 (file)
@@ -28,7 +28,8 @@
 #include <QDir>
 #include <QCloseEvent>
 
-ProfilesDialog::ProfilesDialog(QWidget * parent): QDialog(parent), m_isCustomProfile(false), m_profileIsModified(false) {
+ProfilesDialog::ProfilesDialog(QWidget * parent): QDialog(parent), m_isCustomProfile(false), m_profileIsModified(false)
+{
     m_view.setupUi(this);
 
     QStringList profilesFilter;
@@ -61,11 +62,13 @@ ProfilesDialog::ProfilesDialog(QWidget * parent): QDialog(parent), m_isCustomPro
     connect(m_view.size_w, SIGNAL(valueChanged(int)), this, SLOT(slotProfileEdited()));
 }
 
-void ProfilesDialog::slotProfileEdited() {
+void ProfilesDialog::slotProfileEdited()
+{
     m_profileIsModified = true;
 }
 
-void ProfilesDialog::fillList(const QString selectedProfile) {
+void ProfilesDialog::fillList(const QString selectedProfile)
+{
     // List the Mlt profiles
     m_view.profiles_list->clear();
     QMap <QString, QString> profilesInfo = ProfilesDialog::getProfilesInfo();
@@ -88,11 +91,13 @@ void ProfilesDialog::fillList(const QString selectedProfile) {
     m_selectedProfileIndex = m_view.profiles_list->currentIndex();
 }
 
-void ProfilesDialog::accept() {
+void ProfilesDialog::accept()
+{
     if (askForSave()) QDialog::accept();
 }
 
-void ProfilesDialog::closeEvent(QCloseEvent *event) {
+void ProfilesDialog::closeEvent(QCloseEvent *event)
+{
     if (askForSave()) {
         event->accept();
     } else {
@@ -100,26 +105,30 @@ void ProfilesDialog::closeEvent(QCloseEvent *event) {
     }
 }
 
-bool ProfilesDialog::askForSave() {
+bool ProfilesDialog::askForSave()
+{
     if (!m_profileIsModified) return true;
     if (KMessageBox::questionYesNo(this, i18n("The custom profile was modified, do you want to save it?")) != KMessageBox::Yes) return true;
     return slotSaveProfile();
 }
 
-void ProfilesDialog::slotCreateProfile() {
+void ProfilesDialog::slotCreateProfile()
+{
     m_view.button_delete->setEnabled(false);
     m_view.button_create->setEnabled(false);
     m_view.button_save->setEnabled(true);
     m_view.properties->setEnabled(true);
 }
 
-void ProfilesDialog::slotSetDefaultProfile() {
+void ProfilesDialog::slotSetDefaultProfile()
+{
     int ix = m_view.profiles_list->currentIndex();
     QString path = m_view.profiles_list->itemData(ix).toString();
     if (!path.isEmpty()) KdenliveSettings::setDefault_profile(path);
 }
 
-bool ProfilesDialog::slotSaveProfile() {
+bool ProfilesDialog::slotSaveProfile()
+{
     const QString profileDesc = m_view.description->text();
     int ix = m_view.profiles_list->findText(profileDesc);
     if (ix != -1) {
@@ -147,7 +156,8 @@ bool ProfilesDialog::slotSaveProfile() {
     return true;
 }
 
-void ProfilesDialog::saveProfile(const QString path) {
+void ProfilesDialog::saveProfile(const QString path)
+{
     QFile file(path);
     if (!file.open(QIODevice::WriteOnly)) {
         KMessageBox::sorry(this, i18n("Cannot write to file %1", path));
@@ -161,7 +171,8 @@ void ProfilesDialog::saveProfile(const QString path) {
     file.close();
 }
 
-void ProfilesDialog::slotDeleteProfile() {
+void ProfilesDialog::slotDeleteProfile()
+{
     const QString path = m_view.profiles_list->itemData(m_view.profiles_list->currentIndex()).toString();
     if (path.contains('/')) {
         KIO::NetAccess::del(KUrl(path), this);
@@ -170,7 +181,8 @@ void ProfilesDialog::slotDeleteProfile() {
 }
 
 // static
-MltVideoProfile ProfilesDialog::getVideoProfile(QString name) {
+MltVideoProfile ProfilesDialog::getVideoProfile(QString name)
+{
     MltVideoProfile result;
     QStringList profilesNames;
     QStringList profilesFiles;
@@ -214,7 +226,8 @@ MltVideoProfile ProfilesDialog::getVideoProfile(QString name) {
 }
 
 // static
-QString ProfilesDialog::getProfileDescription(QString name) {
+QString ProfilesDialog::getProfileDescription(QString name)
+{
     QStringList profilesNames;
     QStringList profilesFiles;
     QStringList profilesFilter;
@@ -241,7 +254,8 @@ QString ProfilesDialog::getProfileDescription(QString name) {
 }
 
 // static
-QMap <QString, QString> ProfilesDialog::getProfilesInfo() {
+QMap <QString, QString> ProfilesDialog::getProfilesInfo()
+{
     QMap <QString, QString> result;
     QStringList profilesFilter;
     profilesFilter << "*";
@@ -268,7 +282,8 @@ QMap <QString, QString> ProfilesDialog::getProfilesInfo() {
 }
 
 // static
-QMap< QString, QString > ProfilesDialog::getSettingsFromFile(const QString path) {
+QMap< QString, QString > ProfilesDialog::getSettingsFromFile(const QString path)
+{
     QStringList profilesNames;
     QStringList profilesFiles;
     QStringList profilesFilter;
@@ -286,7 +301,8 @@ QMap< QString, QString > ProfilesDialog::getSettingsFromFile(const QString path)
 }
 
 // static
-QMap< QString, QString > ProfilesDialog::getSettingsForProfile(const QString profileName) {
+QMap< QString, QString > ProfilesDialog::getSettingsForProfile(const QString profileName)
+{
     QStringList profilesNames;
     QStringList profilesFiles;
     QStringList profilesFilter;
@@ -320,7 +336,8 @@ QMap< QString, QString > ProfilesDialog::getSettingsForProfile(const QString pro
 }
 
 // static
-QString ProfilesDialog::getPathFromDescription(const QString profileDesc) {
+QString ProfilesDialog::getPathFromDescription(const QString profileDesc)
+{
     QStringList profilesNames;
     QStringList profilesFiles;
     QStringList profilesFilter;
@@ -348,7 +365,8 @@ QString ProfilesDialog::getPathFromDescription(const QString profileDesc) {
 }
 
 
-void ProfilesDialog::slotUpdateDisplay() {
+void ProfilesDialog::slotUpdateDisplay()
+{
     if (askForSave() == false) {
         m_view.profiles_list->blockSignals(true);
         m_view.profiles_list->setCurrentIndex(m_selectedProfileIndex);
index 04dbe8dc72c07ad0af0cbbd9bf0905033534025d..f75faef0002d8ed5ec8fe1b51db71d260ba15ea2 100644 (file)
@@ -25,7 +25,8 @@
 #include "definitions.h"
 #include "ui_profiledialog_ui.h"
 
-class ProfilesDialog : public QDialog {
+class ProfilesDialog : public QDialog
+{
     Q_OBJECT
 
 public:
index 3968c0d4d06769bda738be26e4b9d421af8b8243..03f3e17309397c9d9d59ca5b5b07bf4f342e0fa2 100644 (file)
@@ -35,7 +35,8 @@ const int UsageRole = NameRole + 2;
 
 // folder
 ProjectItem::ProjectItem(QTreeWidget * parent, const QStringList & strings, const QString &clipId)
-        : QTreeWidgetItem(parent, strings), m_clipType(FOLDER), m_clipId(clipId), m_clip(NULL), m_groupname(strings.at(1)) {
+        : QTreeWidgetItem(parent, strings), m_clipType(FOLDER), m_clipId(clipId), m_clip(NULL), m_groupname(strings.at(1))
+{
     setSizeHint(0, QSize(65, 45));
     setFlags(Qt::ItemIsSelectable | Qt::ItemIsDragEnabled | Qt::ItemIsEnabled | Qt::ItemIsEditable);
     setIcon(0, KIcon("folder"));
@@ -44,7 +45,8 @@ ProjectItem::ProjectItem(QTreeWidget * parent, const QStringList & strings, cons
 }
 
 ProjectItem::ProjectItem(QTreeWidget * parent, DocClipBase *clip)
-        : QTreeWidgetItem(parent) {
+        : QTreeWidgetItem(parent)
+{
     setSizeHint(0, QSize(65, 45));
     setFlags(Qt::ItemIsSelectable | Qt::ItemIsDragEnabled | Qt::ItemIsEnabled | Qt::ItemIsEditable);
     m_clip = clip;
@@ -63,7 +65,8 @@ ProjectItem::ProjectItem(QTreeWidget * parent, DocClipBase *clip)
 }
 
 ProjectItem::ProjectItem(QTreeWidgetItem * parent, DocClipBase *clip)
-        : QTreeWidgetItem(parent) {
+        : QTreeWidgetItem(parent)
+{
     setSizeHint(0, QSize(65, 45));
     setFlags(Qt::ItemIsSelectable | Qt::ItemIsDragEnabled | Qt::ItemIsEnabled | Qt::ItemIsEditable);
     m_clip = clip;
@@ -81,31 +84,38 @@ ProjectItem::ProjectItem(QTreeWidgetItem * parent, DocClipBase *clip)
 }
 
 
-ProjectItem::~ProjectItem() {
+ProjectItem::~ProjectItem()
+{
 }
 
-int ProjectItem::numReferences() const {
+int ProjectItem::numReferences() const
+{
     if (!m_clip) return 0;
     return m_clip->numReferences();
 }
 
-const QString &ProjectItem::clipId() const {
+const QString &ProjectItem::clipId() const
+{
     return m_clipId;
 }
 
-CLIPTYPE ProjectItem::clipType() const {
+CLIPTYPE ProjectItem::clipType() const
+{
     return m_clipType;
 }
 
-int ProjectItem::clipMaxDuration() const {
+int ProjectItem::clipMaxDuration() const
+{
     return m_clip->getProperty("duration").toInt();
 }
 
-bool ProjectItem::isGroup() const {
+bool ProjectItem::isGroup() const
+{
     return m_clipType == FOLDER;
 }
 
-QStringList ProjectItem::names() const {
+QStringList ProjectItem::names() const
+{
     QStringList result;
     result.append(text(0));
     result.append(text(1));
@@ -113,54 +123,65 @@ QStringList ProjectItem::names() const {
     return result;
 }
 
-QDomElement ProjectItem::toXml() const {
+QDomElement ProjectItem::toXml() const
+{
     return m_clip->toXML();
 }
 
-const KUrl ProjectItem::clipUrl() const {
+const KUrl ProjectItem::clipUrl() const
+{
     if (m_clipType != COLOR && m_clipType != VIRTUAL && m_clipType != UNKNOWN && m_clipType != FOLDER)
         return KUrl(m_clip->getProperty("resource"));
     else return KUrl();
 }
 
-void ProjectItem::changeDuration(int frames) {
+void ProjectItem::changeDuration(int frames)
+{
     setData(1, DurationRole, Timecode::getEasyTimecode(GenTime(frames, KdenliveSettings::project_fps()), KdenliveSettings::project_fps()));
 }
 
-void ProjectItem::setProperties(QMap <QString, QString> props) {
+void ProjectItem::setProperties(QMap <QString, QString> props)
+{
     if (m_clip == NULL) return;
     m_clip->setProperties(props);
 }
 
-QString ProjectItem::getClipHash() const {
+QString ProjectItem::getClipHash() const
+{
     if (m_clip == NULL) return QString();
     return m_clip->getClipHash();
 }
 
-void ProjectItem::setProperty(const QString &key, const QString &value) {
+void ProjectItem::setProperty(const QString &key, const QString &value)
+{
     if (m_clip == NULL) return;
     m_clip->setProperty(key, value);
 }
 
-void ProjectItem::clearProperty(const QString &key) {
+void ProjectItem::clearProperty(const QString &key)
+{
     if (m_clip == NULL) return;
     m_clip->clearProperty(key);
 }
 
-const QString ProjectItem::groupName() const {
+const QString ProjectItem::groupName() const
+{
     return m_groupname;
 }
 
-void ProjectItem::setGroupName(const QString name) {
+void ProjectItem::setGroupName(const QString name)
+{
     m_groupname = name;
     setText(1, name);
 }
 
-DocClipBase *ProjectItem::referencedClip() {
+DocClipBase *ProjectItem::referencedClip()
+{
     return m_clip;
 }
 
-void ProjectItem::slotSetToolTip() {
+void ProjectItem::slotSetToolTip()
+{
     QString tip = "<b>";
     switch (m_clipType) {
     case AUDIO:
@@ -199,7 +220,8 @@ void ProjectItem::slotSetToolTip() {
 }
 
 
-void ProjectItem::setProperties(const QMap < QString, QString > &attributes, const QMap < QString, QString > &metadata) {
+void ProjectItem::setProperties(const QMap < QString, QString > &attributes, const QMap < QString, QString > &metadata)
+{
     if (m_clip == NULL) return;
     //setFlags(Qt::ItemIsSelectable | Qt::ItemIsEditable | Qt::ItemIsDragEnabled | Qt::ItemIsEnabled);
     if (attributes.contains("duration")) {
index fc396115575efbd86868da560ade8645751ee019..2087ee17a796393eae985fb4d6c776c3c86450bd 100644 (file)
@@ -35,7 +35,8 @@ class DocClipBase;
 /** \brief Represents a clip or a folder in the projecttree
  *
  * This class represents a clip or folder in the projecttree and in the document(?) */
-class ProjectItem : public QTreeWidgetItem {
+class ProjectItem : public QTreeWidgetItem
+{
 public:
     /** Create folder item */
     ProjectItem(QTreeWidget * parent, const QStringList & strings, const QString &clipId);
index 51c60ce18308f743201e7faa76e650f659f4de7f..86b2d430041b38534a21ffe2a85e6a4d5f35612a 100644 (file)
@@ -55,7 +55,8 @@
 #include <QHeaderView>
 
 ProjectList::ProjectList(QWidget *parent)
-        : QWidget(parent), m_render(NULL), m_fps(-1), m_commandStack(NULL), m_selectedItem(NULL), m_infoQueue(QMap <QString, QDomElement> ()), m_thumbnailQueue(QList <QString> ()), m_refreshed(false), m_editAction(NULL), m_openAction(NULL), m_deleteAction(NULL), m_reloadAction(NULL) {
+        : QWidget(parent), m_render(NULL), m_fps(-1), m_commandStack(NULL), m_selectedItem(NULL), m_infoQueue(QMap <QString, QDomElement> ()), m_thumbnailQueue(QList <QString> ()), m_refreshed(false), m_editAction(NULL), m_openAction(NULL), m_deleteAction(NULL), m_reloadAction(NULL)
+{
 
     listView = new ProjectListView(this);;
     QVBoxLayout *layout = new QVBoxLayout;
@@ -98,12 +99,14 @@ ProjectList::ProjectList(QWidget *parent)
     }
 }
 
-ProjectList::~ProjectList() {
+ProjectList::~ProjectList()
+{
     delete m_menu;
     delete m_toolbar;
 }
 
-void ProjectList::setupMenu(QMenu *addMenu, QAction *defaultAction) {
+void ProjectList::setupMenu(QMenu *addMenu, QAction *defaultAction)
+{
     QList <QAction *> actions = addMenu->actions();
     for (int i = 0; i < actions.count(); i++) {
         if (actions.at(i)->data().toString() == "clip_properties") {
@@ -135,7 +138,8 @@ void ProjectList::setupMenu(QMenu *addMenu, QAction *defaultAction) {
     m_menu->addActions(addMenu->actions());
 }
 
-void ProjectList::setupGeneratorMenu(QMenu *addMenu) {
+void ProjectList::setupGeneratorMenu(QMenu *addMenu)
+{
     if (!addMenu) return;
     QMenu *menu = m_addButton->menu();
     menu->addMenu(addMenu);
@@ -151,15 +155,18 @@ void ProjectList::setupGeneratorMenu(QMenu *addMenu) {
 }
 
 
-QByteArray ProjectList::headerInfo() {
+QByteArray ProjectList::headerInfo()
+{
     return listView->header()->saveState();
 }
 
-void ProjectList::setHeaderInfo(const QByteArray &state) {
+void ProjectList::setHeaderInfo(const QByteArray &state)
+{
     listView->header()->restoreState(state);
 }
 
-void ProjectList::slotEditClip() {
+void ProjectList::slotEditClip()
+{
     ProjectItem *item = static_cast <ProjectItem*>(listView->currentItem());
     if (item && !item->isGroup()) {
         emit clipSelected(item->referencedClip());
@@ -167,7 +174,8 @@ void ProjectList::slotEditClip() {
     }
 }
 
-void ProjectList::slotOpenClip() {
+void ProjectList::slotOpenClip()
+{
     ProjectItem *item = static_cast <ProjectItem*>(listView->currentItem());
     if (item && !item->isGroup()) {
         if (item->clipType() == IMAGE) {
@@ -181,7 +189,8 @@ void ProjectList::slotOpenClip() {
     }
 }
 
-void ProjectList::slotReloadClip() {
+void ProjectList::slotReloadClip()
+{
     ProjectItem *item = static_cast <ProjectItem*>(listView->currentItem());
     if (item && !item->isGroup()) {
         if (item->clipType() == IMAGE) {
@@ -191,12 +200,14 @@ void ProjectList::slotReloadClip() {
     }
 }
 
-void ProjectList::setRenderer(Render *projectRender) {
+void ProjectList::setRenderer(Render *projectRender)
+{
     m_render = projectRender;
     listView->setIconSize(QSize(40 * m_render->dar(), 40));
 }
 
-void ProjectList::slotClipSelected() {
+void ProjectList::slotClipSelected()
+{
     if (listView->currentItem()) {
         ProjectItem *clip = static_cast <ProjectItem*>(listView->currentItem());
         if (!clip->isGroup()) {
@@ -222,11 +233,13 @@ void ProjectList::slotClipSelected() {
     }
 }
 
-void ProjectList::slotPauseMonitor() {
+void ProjectList::slotPauseMonitor()
+{
     if (m_render) m_render->pause();
 }
 
-void ProjectList::slotUpdateClipProperties(const QString &id, QMap <QString, QString> properties) {
+void ProjectList::slotUpdateClipProperties(const QString &id, QMap <QString, QString> properties)
+{
     ProjectItem *item = getItemById(id);
     if (item) {
         slotUpdateClipProperties(item, properties);
@@ -235,7 +248,8 @@ void ProjectList::slotUpdateClipProperties(const QString &id, QMap <QString, QSt
     }
 }
 
-void ProjectList::slotUpdateClipProperties(ProjectItem *clip, QMap <QString, QString> properties) {
+void ProjectList::slotUpdateClipProperties(ProjectItem *clip, QMap <QString, QString> properties)
+{
     if (!clip) return;
     if (!clip->isGroup()) clip->setProperties(properties);
     if (properties.contains("name")) {
@@ -258,7 +272,8 @@ void ProjectList::slotUpdateClipProperties(ProjectItem *clip, QMap <QString, QSt
     }
 }
 
-void ProjectList::slotItemEdited(QTreeWidgetItem *item, int column) {
+void ProjectList::slotItemEdited(QTreeWidgetItem *item, int column)
+{
     ProjectItem *clip = static_cast <ProjectItem*>(item);
     if (column == 2) {
         if (clip->referencedClip()) {
@@ -295,7 +310,8 @@ void ProjectList::slotItemEdited(QTreeWidgetItem *item, int column) {
     }
 }
 
-void ProjectList::slotContextMenu(const QPoint &pos, QTreeWidgetItem *item) {
+void ProjectList::slotContextMenu(const QPoint &pos, QTreeWidgetItem *item)
+{
     bool enable = false;
     if (item) {
         enable = true;
@@ -316,7 +332,8 @@ void ProjectList::slotContextMenu(const QPoint &pos, QTreeWidgetItem *item) {
     m_menu->popup(pos);
 }
 
-void ProjectList::slotRemoveClip() {
+void ProjectList::slotRemoveClip()
+{
     if (!listView->currentItem()) return;
     QList <QString> ids;
     QMap <QString, QString> folderids;
@@ -347,13 +364,15 @@ void ProjectList::slotRemoveClip() {
     }
 }
 
-void ProjectList::selectItemById(const QString &clipId) {
+void ProjectList::selectItemById(const QString &clipId)
+{
     ProjectItem *item = getItemById(clipId);
     if (item) listView->setCurrentItem(item);
 }
 
 
-void ProjectList::slotDeleteClip(const QString &clipId) {
+void ProjectList::slotDeleteClip(const QString &clipId)
+{
     ProjectItem *item = getItemById(clipId);
     if (!item) {
         kDebug() << "/// Cannot find clip to delete";
@@ -363,18 +382,21 @@ void ProjectList::slotDeleteClip(const QString &clipId) {
 }
 
 
-void ProjectList::editFolder(const QString folderName, const QString oldfolderName, const QString &clipId) {
+void ProjectList::editFolder(const QString folderName, const QString oldfolderName, const QString &clipId)
+{
     EditFolderCommand *command = new EditFolderCommand(this, folderName, oldfolderName, clipId, false);
     m_commandStack->push(command);
     m_doc->setModified(true);
 }
 
-void ProjectList::slotAddFolder() {
+void ProjectList::slotAddFolder()
+{
     AddFolderCommand *command = new AddFolderCommand(this, i18n("Folder"), QString::number(m_doc->clipManager()->getFreeFolderId()), true);
     m_commandStack->push(command);
 }
 
-void ProjectList::slotAddFolder(const QString foldername, const QString &clipId, bool remove, bool edit) {
+void ProjectList::slotAddFolder(const QString foldername, const QString &clipId, bool remove, bool edit)
+{
     if (remove) {
         ProjectItem *item = getFolderItemById(clipId);
         if (item) {
@@ -409,7 +431,8 @@ void ProjectList::slotAddFolder(const QString foldername, const QString &clipId,
 
 
 
-void ProjectList::deleteProjectFolder(QMap <QString, QString> map) {
+void ProjectList::deleteProjectFolder(QMap <QString, QString> map)
+{
     QMapIterator<QString, QString> i(map);
     QUndoCommand *delCommand = new QUndoCommand();
     delCommand->setText(i18n("Delete Folder"));
@@ -421,7 +444,8 @@ void ProjectList::deleteProjectFolder(QMap <QString, QString> map) {
     m_doc->setModified(true);
 }
 
-void ProjectList::slotAddClip(DocClipBase *clip, bool getProperties) {
+void ProjectList::slotAddClip(DocClipBase *clip, bool getProperties)
+{
     if (getProperties) listView->setEnabled(false);
     listView->blockSignals(true);
     const QString parent = clip->getProperty("groupid");
@@ -454,7 +478,8 @@ void ProjectList::slotAddClip(DocClipBase *clip, bool getProperties) {
     listView->blockSignals(false);
 }
 
-void ProjectList::slotResetProjectList() {
+void ProjectList::slotResetProjectList()
+{
     listView->clear();
     emit clipSelected(NULL);
     m_thumbnailQueue.clear();
@@ -462,14 +487,16 @@ void ProjectList::slotResetProjectList() {
     m_refreshed = false;
 }
 
-void ProjectList::requestClipInfo(const QDomElement xml, const QString id) {
+void ProjectList::requestClipInfo(const QDomElement xml, const QString id)
+{
     kDebug() << " PRG LIST REQUEST CLP INFO: " << id;
     m_infoQueue.insert(id, xml);
     listView->setEnabled(false);
     if (m_infoQueue.count() == 1) QTimer::singleShot(300, this, SLOT(slotProcessNextClipInQueue()));
 }
 
-void ProjectList::slotProcessNextClipInQueue() {
+void ProjectList::slotProcessNextClipInQueue()
+{
     if (m_infoQueue.isEmpty()) {
         listView->setEnabled(true);
         return;
@@ -484,14 +511,16 @@ void ProjectList::slotProcessNextClipInQueue() {
     if (m_infoQueue.isEmpty()) listView->setEnabled(true);
 }
 
-void ProjectList::slotUpdateClip(const QString &id) {
+void ProjectList::slotUpdateClip(const QString &id)
+{
     ProjectItem *item = getItemById(id);
     listView->blockSignals(true);
     if (item) item->setData(1, UsageRole, QString::number(item->numReferences()));
     listView->blockSignals(false);
 }
 
-void ProjectList::updateAllClips() {
+void ProjectList::updateAllClips()
+{
     QTreeWidgetItemIterator it(listView);
     while (*it) {
         ProjectItem *item = static_cast <ProjectItem *>(*it);
@@ -534,7 +563,8 @@ void ProjectList::updateAllClips() {
     QTimer::singleShot(500, this, SLOT(slotCheckForEmptyQueue()));
 }
 
-void ProjectList::slotAddClip(const QList <QUrl> givenList, QString group) {
+void ProjectList::slotAddClip(const QList <QUrl> givenList, QString group)
+{
     if (!m_commandStack) kDebug() << "!!!!!!!!!!!!!!!! NO CMD STK";
     KUrl::List list;
     if (givenList.isEmpty()) {
@@ -562,7 +592,8 @@ void ProjectList::slotAddClip(const QList <QUrl> givenList, QString group) {
     m_doc->slotAddClipList(list, group, groupId);
 }
 
-void ProjectList::slotRemoveInvalidClip(const QString &id) {
+void ProjectList::slotRemoveInvalidClip(const QString &id)
+{
     ProjectItem *item = getItemById(id);
     if (item) {
         const QString path = item->referencedClip()->fileURL().path();
@@ -575,7 +606,8 @@ void ProjectList::slotRemoveInvalidClip(const QString &id) {
     else listView->setEnabled(true);
 }
 
-void ProjectList::slotAddColorClip() {
+void ProjectList::slotAddColorClip()
+{
     if (!m_commandStack) kDebug() << "!!!!!!!!!!!!!!!! NO CMD STK";
     QDialog *dia = new QDialog(this);
     Ui::ColorClip_UI *dia_ui = new Ui::ColorClip_UI();
@@ -608,7 +640,8 @@ void ProjectList::slotAddColorClip() {
 }
 
 
-void ProjectList::slotAddSlideshowClip() {
+void ProjectList::slotAddSlideshowClip()
+{
     if (!m_commandStack) kDebug() << "!!!!!!!!!!!!!!!! NO CMD STK";
     SlideshowClip *dia = new SlideshowClip(this);
 
@@ -634,7 +667,8 @@ void ProjectList::slotAddSlideshowClip() {
     delete dia;
 }
 
-void ProjectList::slotAddTitleClip() {
+void ProjectList::slotAddTitleClip()
+{
     QString group;
     QString groupId;
     ProjectItem *item = static_cast <ProjectItem*>(listView->currentItem());
@@ -652,7 +686,8 @@ void ProjectList::slotAddTitleClip() {
     m_doc->slotCreateTextClip(group, groupId);
 }
 
-void ProjectList::setDocument(KdenliveDoc *doc) {
+void ProjectList::setDocument(KdenliveDoc *doc)
+{
     listView->blockSignals(true);
     listView->clear();
     emit clipSelected(NULL);
@@ -681,7 +716,8 @@ void ProjectList::setDocument(KdenliveDoc *doc) {
     m_toolbar->setEnabled(true);
 }
 
-QDomElement ProjectList::producersList() {
+QDomElement ProjectList::producersList()
+{
     QDomDocument doc;
     QDomElement prods = doc.createElement("producerlist");
     doc.appendChild(prods);
@@ -695,32 +731,37 @@ QDomElement ProjectList::producersList() {
     return prods;
 }
 
-void ProjectList::slotCheckForEmptyQueue() {
+void ProjectList::slotCheckForEmptyQueue()
+{
     if (!m_refreshed && m_thumbnailQueue.isEmpty() && m_infoQueue.isEmpty()) {
         m_refreshed = true;
         emit loadingIsOver();
     } else QTimer::singleShot(500, this, SLOT(slotCheckForEmptyQueue()));
 }
 
-void ProjectList::requestClipThumbnail(const QString &id) {
+void ProjectList::requestClipThumbnail(const QString &id)
+{
     m_thumbnailQueue.append(id);
     if (m_thumbnailQueue.count() == 1) QTimer::singleShot(300, this, SLOT(slotProcessNextThumbnail()));
 }
 
-void ProjectList::slotProcessNextThumbnail() {
+void ProjectList::slotProcessNextThumbnail()
+{
     if (m_thumbnailQueue.isEmpty()) {
         return;
     }
     slotRefreshClipThumbnail(m_thumbnailQueue.takeFirst(), false);
 }
 
-void ProjectList::slotRefreshClipThumbnail(const QString &clipId, bool update) {
+void ProjectList::slotRefreshClipThumbnail(const QString &clipId, bool update)
+{
     ProjectItem *item = getItemById(clipId);
     if (item) slotRefreshClipThumbnail(item, update);
     else slotProcessNextThumbnail();
 }
 
-void ProjectList::slotRefreshClipThumbnail(ProjectItem *item, bool update) {
+void ProjectList::slotRefreshClipThumbnail(ProjectItem *item, bool update)
+{
     if (item) {
         if (!item->referencedClip()) return;
         int height = 50;
@@ -739,7 +780,8 @@ void ProjectList::slotRefreshClipThumbnail(ProjectItem *item, bool update) {
     }
 }
 
-void ProjectList::slotReplyGetFileProperties(const QString &clipId, Mlt::Producer *producer, const QMap < QString, QString > &properties, const QMap < QString, QString > &metadata, bool replace) {
+void ProjectList::slotReplyGetFileProperties(const QString &clipId, Mlt::Producer *producer, const QMap < QString, QString > &properties, const QMap < QString, QString > &metadata, bool replace)
+{
     ProjectItem *item = getItemById(clipId);
     if (item && producer) {
         listView->blockSignals(true);
@@ -753,7 +795,8 @@ void ProjectList::slotReplyGetFileProperties(const QString &clipId, Mlt::Produce
     else listView->setEnabled(true);
 }
 
-void ProjectList::slotReplyGetImage(const QString &clipId, const QPixmap &pix) {
+void ProjectList::slotReplyGetImage(const QString &clipId, const QPixmap &pix)
+{
     ProjectItem *item = getItemById(clipId);
     if (item) {
         listView->blockSignals(true);
@@ -763,7 +806,8 @@ void ProjectList::slotReplyGetImage(const QString &clipId, const QPixmap &pix) {
     }
 }
 
-ProjectItem *ProjectList::getItemById(const QString &id) {
+ProjectItem *ProjectList::getItemById(const QString &id)
+{
     ProjectItem *item;
     QTreeWidgetItemIterator it(listView);
     while (*it) {
@@ -775,7 +819,8 @@ ProjectItem *ProjectList::getItemById(const QString &id) {
     return NULL;
 }
 
-ProjectItem *ProjectList::getFolderItemById(const QString &id) {
+ProjectItem *ProjectList::getFolderItemById(const QString &id)
+{
     ProjectItem *item;
     QTreeWidgetItemIterator it(listView);
     while (*it) {
@@ -787,7 +832,8 @@ ProjectItem *ProjectList::getFolderItemById(const QString &id) {
     return NULL;
 }
 
-void ProjectList::slotSelectClip(const QString &ix) {
+void ProjectList::slotSelectClip(const QString &ix)
+{
     ProjectItem *clip = getItemById(ix);
     if (clip) {
         listView->setCurrentItem(clip);
index 95d8eff0645ca8ae3530666f4ca1156e6295b50c..f665760e21778fa7a450c0f13d822b3706b74e7f 100644 (file)
@@ -39,7 +39,8 @@
 #include "timecode.h"
 #include "kdenlivesettings.h"
 
-namespace Mlt {
+namespace Mlt
+{
 class Producer;
 };
 
@@ -53,7 +54,8 @@ const int NameRole = Qt::UserRole;
 const int DurationRole = NameRole + 1;
 const int UsageRole = NameRole + 2;
 
-class ItemDelegate: public QItemDelegate {
+class ItemDelegate: public QItemDelegate
+{
 public:
     ItemDelegate(QAbstractItemView* parent = 0): QItemDelegate(parent) {
     }
@@ -110,7 +112,8 @@ public:
     }
 };
 
-class ProjectList : public QWidget {
+class ProjectList : public QWidget
+{
     Q_OBJECT
 
 public:
index 1fcd11ca6d3ff69ffe0a7f3fd45ccfed6e753259..4451fe0f8a369886dec4cee75bce7491806e0563 100644 (file)
@@ -31,7 +31,8 @@
 #include <QAction>
 
 ProjectListView::ProjectListView(QWidget *parent)
-        : QTreeWidget(parent), m_dragStarted(false) {
+        : QTreeWidget(parent), m_dragStarted(false)
+{
     setSelectionMode(QAbstractItemView::ExtendedSelection);
     setDragDropMode(QAbstractItemView::DragDrop);
     setDropIndicatorShown(true);
@@ -58,11 +59,13 @@ ProjectListView::ProjectListView(QWidget *parent)
     setSortingEnabled(true);
 }
 
-ProjectListView::~ProjectListView() {
+ProjectListView::~ProjectListView()
+{
 }
 
 
-void ProjectListView::configureColumns(const QPoint& pos) {
+void ProjectListView::configureColumns(const QPoint& pos)
+{
     KMenu popup(this);
     popup.addTitle(i18nc("@title:menu", "Columns"));
 
@@ -102,12 +105,14 @@ void ProjectListView::configureColumns(const QPoint& pos) {
 }
 
 // virtual
-void ProjectListView::contextMenuEvent(QContextMenuEvent * event) {
+void ProjectListView::contextMenuEvent(QContextMenuEvent * event)
+{
     emit requestMenu(event->globalPos(), itemAt(event->pos()));
 }
 
 // virtual
-void ProjectListView::mouseDoubleClickEvent(QMouseEvent * event) {
+void ProjectListView::mouseDoubleClickEvent(QMouseEvent * event)
+{
     ProjectItem *item = static_cast <ProjectItem *>(itemAt(event->pos()));
     if (!item) emit addClip();
     else if (item->isGroup()) {
@@ -120,7 +125,8 @@ void ProjectListView::mouseDoubleClickEvent(QMouseEvent * event) {
 }
 
 // virtual
-void ProjectListView::dragEnterEvent(QDragEnterEvent *event) {
+void ProjectListView::dragEnterEvent(QDragEnterEvent *event)
+{
     if (event->mimeData()->hasUrls() || event->mimeData()->hasText()) {
         kDebug() << "////////////////  DRAG ENTR OK";
     }
@@ -128,7 +134,8 @@ void ProjectListView::dragEnterEvent(QDragEnterEvent *event) {
 }
 
 // virtual
-void ProjectListView::dropEvent(QDropEvent *event) {
+void ProjectListView::dropEvent(QDropEvent *event)
+{
     kDebug() << "////////////////  DROPPED EVENT";
     if (event->mimeData()->hasUrls()) {
         QTreeWidgetItem *item = itemAt(event->pos());
@@ -189,7 +196,8 @@ void ProjectListView::dropEvent(QDropEvent *event) {
 }
 
 // virtual
-void ProjectListView::mousePressEvent(QMouseEvent *event) {
+void ProjectListView::mousePressEvent(QMouseEvent *event)
+{
     if (event->button() == Qt::LeftButton) {
         m_DragStartPosition = event->pos();
         m_dragStarted = true;
@@ -201,7 +209,8 @@ void ProjectListView::mousePressEvent(QMouseEvent *event) {
 
 
 // virtual
-void ProjectListView::mouseMoveEvent(QMouseEvent *event) {
+void ProjectListView::mouseMoveEvent(QMouseEvent *event)
+{
     //kDebug() << "// DRAG STARTED, MOUSE MOVED: ";
     if (!m_dragStarted) return;
 
@@ -242,7 +251,8 @@ void ProjectListView::mouseMoveEvent(QMouseEvent *event) {
 }
 
 // virtual
-void ProjectListView::dragMoveEvent(QDragMoveEvent * event) {
+void ProjectListView::dragMoveEvent(QDragMoveEvent * event)
+{
     event->setDropAction(Qt::IgnoreAction);
     event->setDropAction(Qt::MoveAction);
     if (event->mimeData()->hasText()) {
@@ -252,7 +262,8 @@ void ProjectListView::dragMoveEvent(QDragMoveEvent * event) {
     emit pauseMonitor();
 }
 
-QStringList ProjectListView::mimeTypes() const {
+QStringList ProjectListView::mimeTypes() const
+{
     QStringList qstrList;
     qstrList << QTreeWidget::mimeTypes();
     // list of accepted mime types for drop
@@ -263,7 +274,8 @@ QStringList ProjectListView::mimeTypes() const {
 }
 
 
-Qt::DropActions ProjectListView::supportedDropActions() const {
+Qt::DropActions ProjectListView::supportedDropActions() const
+{
     // returns what actions are supported when dropping
     return Qt::MoveAction;
 }
index edd9b5bc622967d3a165716f052c4c81e23201e4..a30cb7e842e35790521485f404d235eba759453a 100644 (file)
@@ -29,7 +29,8 @@ class DocClipBase;
 
 class KUrl;
 
-class ProjectListView : public QTreeWidget {
+class ProjectListView : public QTreeWidget
+{
     Q_OBJECT
 
 public:
index 1e5f43352b64a69b60e00d27c1f0cc15c16f322b..94bf02fbfad72e57568506cdfac52689226a7d6a 100644 (file)
@@ -26,7 +26,8 @@
 
 #include <QDir>
 
-ProjectSettings::ProjectSettings(int videotracks, int audiotracks, const QString projectPath, bool readOnlyTracks, QWidget * parent): QDialog(parent), m_isCustomProfile(false) {
+ProjectSettings::ProjectSettings(int videotracks, int audiotracks, const QString projectPath, bool readOnlyTracks, QWidget * parent): QDialog(parent), m_isCustomProfile(false)
+{
     m_view.setupUi(this);
 
     QMap <QString, QString> profilesInfo = ProfilesDialog::getProfilesInfo();
@@ -62,7 +63,8 @@ ProjectSettings::ProjectSettings(int videotracks, int audiotracks, const QString
 }
 
 
-void ProjectSettings::slotUpdateDisplay() {
+void ProjectSettings::slotUpdateDisplay()
+{
     QString currentProfile = m_view.profiles_list->itemData(m_view.profiles_list->currentIndex()).toString();
     QMap< QString, QString > values = ProfilesDialog::getSettingsFromFile(currentProfile);
     m_view.p_size->setText(values.value("width") + 'x' + values.value("height"));
@@ -73,31 +75,37 @@ void ProjectSettings::slotUpdateDisplay() {
     else m_view.p_progressive->setText(i18n("Progressive"));
 }
 
-void ProjectSettings::slotUpdateButton(const QString &path) {
+void ProjectSettings::slotUpdateButton(const QString &path)
+{
     if (path.isEmpty()) buttonOk->setEnabled(false);
     else buttonOk->setEnabled(true);
 }
 
-QString ProjectSettings::selectedProfile() const {
+QString ProjectSettings::selectedProfile() const
+{
     return m_view.profiles_list->itemData(m_view.profiles_list->currentIndex()).toString();
 }
 
-KUrl ProjectSettings::selectedFolder() const {
+KUrl ProjectSettings::selectedFolder() const
+{
     return m_view.project_folder->url();
 }
 
-QPoint ProjectSettings::tracks() {
+QPoint ProjectSettings::tracks()
+{
     QPoint p;
     p.setX(m_view.video_tracks->value());
     p.setY(m_view.audio_tracks->value());
     return p;
 }
 
-bool ProjectSettings::enableVideoThumbs() const {
+bool ProjectSettings::enableVideoThumbs() const
+{
     return m_view.video_thumbs->isChecked();
 }
 
-bool ProjectSettings::enableAudioThumbs() const {
+bool ProjectSettings::enableAudioThumbs() const
+{
     return m_view.audio_thumbs->isChecked();
 }
 
index d343cde74249f680f2996b638738ddceb76432eb..b0a2728d7e5b3cfb088bab8059a07737a84c9d24 100644 (file)
@@ -26,7 +26,8 @@
 
 #include "ui_projectsettings_ui.h"
 
-class ProjectSettings : public QDialog {
+class ProjectSettings : public QDialog
+{
     Q_OBJECT
 
 public:
index 071351f91ecfa93077a4384ac4ec5040d7325a9d..4b6a50c658988668c0801ab6c288e1e6183e79e6 100644 (file)
 
 #include <KLocale>
 
-RazorClipCommand::RazorClipCommand(CustomTrackView *view, const ItemInfo info, const GenTime cutTime, bool doIt, QUndoCommand * parent) : QUndoCommand(parent), m_view(view), m_info(info), m_cutTime(cutTime), m_doIt(doIt) {
+RazorClipCommand::RazorClipCommand(CustomTrackView *view, const ItemInfo info, const GenTime cutTime, bool doIt, QUndoCommand * parent) : QUndoCommand(parent), m_view(view), m_info(info), m_cutTime(cutTime), m_doIt(doIt)
+{
     setText(i18n("Razor clip"));
 }
 
 // virtual
-void RazorClipCommand::undo() {
+void RazorClipCommand::undo()
+{
     // kDebug()<<"----  undoing action";
     m_doIt = true;
     m_view->cutClip(m_info, m_cutTime, false);
 }
 // virtual
-void RazorClipCommand::redo() {
+void RazorClipCommand::redo()
+{
     // kDebug() << "----  redoing action cut: " << m_cutTime.frames(25);
     if (m_doIt)
         m_view->cutClip(m_info, m_cutTime, true);
index 200fc5df1fac5f6198c63d836e3050b08746f4c0..afaa2425304d5711d5000df936fedbb8c2cedf08 100644 (file)
@@ -29,7 +29,8 @@
 
 class CustomTrackView;
 
-class RazorClipCommand : public QUndoCommand {
+class RazorClipCommand : public QUndoCommand
+{
 public:
     RazorClipCommand(CustomTrackView *view, const ItemInfo info, const GenTime cutTime, bool doIt, QUndoCommand * parent = 0);
     virtual void undo();
index 4c52775774c2fb8f0a67e82ceb7ed346806947aa..b8173b22bfaeaf2102f7879bdf7dc43a377cdbf3 100644 (file)
@@ -39,7 +39,8 @@
 
 
 RecMonitor::RecMonitor(QString name, QWidget *parent)
-        : QWidget(parent), m_name(name), m_isActive(false), m_isCapturing(false), m_isPlaying(false), m_didCapture(false) {
+        : QWidget(parent), m_name(name), m_isActive(false), m_isCapturing(false), m_isPlaying(false), m_didCapture(false)
+{
     ui.setupUi(this);
 
     ui.video_frame->setAttribute(Qt::WA_PaintOnScreen);
@@ -113,25 +114,30 @@ RecMonitor::RecMonitor(QString name, QWidget *parent)
     kDebug() << "/////// BUILDING MONITOR, ID: " << ui.video_frame->winId();
 }
 
-RecMonitor::~RecMonitor() {
+RecMonitor::~RecMonitor()
+{
     delete captureProcess;
     delete displayProcess;
 }
 
-QString RecMonitor::name() const {
+QString RecMonitor::name() const
+{
     return m_name;
 }
 
-void RecMonitor::slotConfigure() {
+void RecMonitor::slotConfigure()
+{
     emit showConfigDialog(4, ui.device_selector->currentIndex());
 }
 
-void RecMonitor::slotUpdateCaptureFolder() {
+void RecMonitor::slotUpdateCaptureFolder()
+{
     if (captureProcess) captureProcess->setWorkingDirectory(KdenliveSettings::capturefolder());
     slotVideoDeviceChanged(ui.device_selector->currentIndex());
 }
 
-void RecMonitor::slotVideoDeviceChanged(int ix) {
+void RecMonitor::slotVideoDeviceChanged(int ix)
+{
     switch (ix) {
     case SCREENGRAB:
         m_discAction->setEnabled(false);
@@ -176,7 +182,8 @@ void RecMonitor::slotVideoDeviceChanged(int ix) {
     }
 }
 
-QPixmap RecMonitor::mergeSideBySide(const QPixmap& pix, const QString txt) {
+QPixmap RecMonitor::mergeSideBySide(const QPixmap& pix, const QString txt)
+{
     QPainter p;
     QRect r = p.fontMetrics().boundingRect(QRect(0, 0, ui.video_frame->width(), ui.video_frame->height()), Qt::AlignLeft, txt);
     int strWidth = r.width();
@@ -193,7 +200,8 @@ QPixmap RecMonitor::mergeSideBySide(const QPixmap& pix, const QString txt) {
 }
 
 
-void RecMonitor::checkDeviceAvailability() {
+void RecMonitor::checkDeviceAvailability()
+{
     if (!KIO::NetAccess::exists(KUrl(KdenliveSettings::video4vdevice()), KIO::NetAccess::SourceSide , this)) {
         m_playAction->setEnabled(false);
         m_recAction->setEnabled(false);
@@ -203,7 +211,8 @@ void RecMonitor::checkDeviceAvailability() {
         ui.video_frame->setPixmap(mergeSideBySide(KIcon("camera-web").pixmap(QSize(50, 50)), i18n("Press play or record button\nto start video capture\nFiles will be saved in:\n%1", KdenliveSettings::capturefolder())));
 }
 
-void RecMonitor::slotDisconnect() {
+void RecMonitor::slotDisconnect()
+{
     if (captureProcess->state() == QProcess::NotRunning) {
         m_captureTime = KDateTime::currentLocalDateTime();
         kDebug() << "CURRENT TIME: " << m_captureTime.toString();
@@ -224,15 +233,18 @@ void RecMonitor::slotDisconnect() {
     }
 }
 
-void RecMonitor::slotRewind() {
+void RecMonitor::slotRewind()
+{
     captureProcess->write("a", 1);
 }
 
-void RecMonitor::slotForward() {
+void RecMonitor::slotForward()
+{
     captureProcess->write("z", 1);
 }
 
-void RecMonitor::slotStopCapture() {
+void RecMonitor::slotStopCapture()
+{
     // stop capture
     switch (ui.device_selector->currentIndex()) {
     case FIREWIRE:
@@ -254,7 +266,8 @@ void RecMonitor::slotStopCapture() {
     }
 }
 
-void RecMonitor::slotStartCapture(bool play) {
+void RecMonitor::slotStartCapture(bool play)
+{
 
     /*
     *captureProcess<<"dvgrab";
@@ -369,7 +382,8 @@ void RecMonitor::slotStartCapture(bool play) {
     }
 }
 
-void RecMonitor::slotRecord() {
+void RecMonitor::slotRecord()
+{
     if (captureProcess->state() == QProcess::NotRunning && ui.device_selector->currentIndex() == FIREWIRE) {
         slotStartCapture();
     }
@@ -522,7 +536,8 @@ void RecMonitor::slotStartGrab(const QRect &rect) {
     captureProcess->start("ffmpeg", m_captureArgs);
 }*/
 
-void RecMonitor::slotProcessStatus(QProcess::ProcessState status) {
+void RecMonitor::slotProcessStatus(QProcess::ProcessState status)
+{
     if (status == QProcess::NotRunning) {
         displayProcess->kill();
         if (m_isCapturing && ui.device_selector->currentIndex() != FIREWIRE)
@@ -553,7 +568,8 @@ void RecMonitor::slotProcessStatus(QProcess::ProcessState status) {
     }
 }
 
-void RecMonitor::manageCapturedFiles() {
+void RecMonitor::manageCapturedFiles()
+{
     QString extension;
     switch (KdenliveSettings::firewireformat()) {
     case 0:
@@ -595,32 +611,38 @@ void RecMonitor::manageCapturedFiles() {
 }
 
 // virtual
-void RecMonitor::mousePressEvent(QMouseEvent * /*event*/) {
+void RecMonitor::mousePressEvent(QMouseEvent * /*event*/)
+{
     slotPlay();
 }
 
-void RecMonitor::activateRecMonitor() {
+void RecMonitor::activateRecMonitor()
+{
     //if (!m_isActive) m_monitorManager->activateRecMonitor(m_name);
 }
 
-void RecMonitor::stop() {
+void RecMonitor::stop()
+{
     m_isActive = false;
 
 }
 
-void RecMonitor::start() {
+void RecMonitor::start()
+{
     m_isActive = true;
 
 }
 
-void RecMonitor::refreshRecMonitor(bool visible) {
+void RecMonitor::refreshRecMonitor(bool visible)
+{
     if (visible) {
         //if (!m_isActive) m_monitorManager->activateRecMonitor(m_name);
 
     }
 }
 
-void RecMonitor::slotPlay() {
+void RecMonitor::slotPlay()
+{
 
     //if (!m_isActive) m_monitorManager->activateRecMonitor(m_name);
 
index a9ff801838284a322ec0ce60b632a05fe1709fbb..8d1c5ca77bf243e75cf4bbc4f46050bde78b83c8 100644 (file)
@@ -35,7 +35,8 @@
 #include "smallruler.h"
 #include "regiongrabber.h"
 
-class RecMonitor : public QWidget {
+class RecMonitor : public QWidget
+{
     Q_OBJECT
 
 public:
index 92b00a7d07e12f169cca5366a75e68f755f5fa35..9c7a3d90eb546f4b038b590cfff9d1f1d4f455b9 100644 (file)
@@ -35,7 +35,8 @@ RegionGrabber::RegionGrabber() :
         TLHandle(0, 0, handleSize, handleSize), TRHandle(0, 0, handleSize, handleSize),
         BLHandle(0, 0, handleSize, handleSize), BRHandle(0, 0, handleSize, handleSize),
         LHandle(0, 0, handleSize, handleSize), THandle(0, 0, handleSize, handleSize),
-        RHandle(0, 0, handleSize, handleSize), BHandle(0, 0, handleSize, handleSize) {
+        RHandle(0, 0, handleSize, handleSize), BHandle(0, 0, handleSize, handleSize)
+{
     handles << &TLHandle << &TRHandle << &BLHandle << &BRHandle
     << &LHandle << &THandle << &RHandle << &BHandle;
     setMouseTracking(true);
@@ -46,10 +47,12 @@ RegionGrabber::RegionGrabber() :
     idleTimer.start(3000);
 }
 
-RegionGrabber::~RegionGrabber() {
+RegionGrabber::~RegionGrabber()
+{
 }
 
-void RegionGrabber::init() {
+void RegionGrabber::init()
+{
     pixmap = QPixmap::grabWindow(QApplication::desktop()->winId());
     showFullScreen();
     resize(pixmap.size());
@@ -57,12 +60,14 @@ void RegionGrabber::init() {
     setCursor(Qt::CrossCursor);
 }
 
-void RegionGrabber::displayHelp() {
+void RegionGrabber::displayHelp()
+{
     showHelp = true;
     update();
 }
 
-void RegionGrabber::paintEvent(QPaintEvent* e) {
+void RegionGrabber::paintEvent(QPaintEvent* e)
+{
     Q_UNUSED(e);
     if (grabbing)   // grabWindow() should just get the background
         return;
@@ -152,7 +157,8 @@ void RegionGrabber::paintEvent(QPaintEvent* e) {
     }
 }
 
-void RegionGrabber::resizeEvent(QResizeEvent* e) {
+void RegionGrabber::resizeEvent(QResizeEvent* e)
+{
     Q_UNUSED(e);
     if (selection.isNull())
         return;
@@ -164,7 +170,8 @@ void RegionGrabber::resizeEvent(QResizeEvent* e) {
     selection = r;
 }
 
-void RegionGrabber::mousePressEvent(QMouseEvent* e) {
+void RegionGrabber::mousePressEvent(QMouseEvent* e)
+{
     showHelp = false;
     idleTimer.stop();
     if (e->button() == Qt::LeftButton) {
@@ -186,7 +193,8 @@ void RegionGrabber::mousePressEvent(QMouseEvent* e) {
     update();
 }
 
-void RegionGrabber::mouseMoveEvent(QMouseEvent* e) {
+void RegionGrabber::mouseMoveEvent(QMouseEvent* e)
+{
     if (mouseDown) {
         if (newSelection) {
             QPoint p = e->pos();
@@ -257,7 +265,8 @@ void RegionGrabber::mouseMoveEvent(QMouseEvent* e) {
     }
 }
 
-void RegionGrabber::mouseReleaseEvent(QMouseEvent* e) {
+void RegionGrabber::mouseReleaseEvent(QMouseEvent* e)
+{
     mouseDown = false;
     newSelection = false;
     idleTimer.start();
@@ -266,11 +275,13 @@ void RegionGrabber::mouseReleaseEvent(QMouseEvent* e) {
     update();
 }
 
-void RegionGrabber::mouseDoubleClickEvent(QMouseEvent*) {
+void RegionGrabber::mouseDoubleClickEvent(QMouseEvent*)
+{
     grabRect();
 }
 
-void RegionGrabber::keyPressEvent(QKeyEvent* e) {
+void RegionGrabber::keyPressEvent(QKeyEvent* e)
+{
     if (e->key() == Qt::Key_Escape) {
         emit regionGrabbed(QRect());
         close();
@@ -281,7 +292,8 @@ void RegionGrabber::keyPressEvent(QKeyEvent* e) {
     }
 }
 
-void RegionGrabber::grabRect() {
+void RegionGrabber::grabRect()
+{
     QRect r = selection.normalized();
     if (!r.isNull() && r.isValid()) {
         grabbing = true;
@@ -290,7 +302,8 @@ void RegionGrabber::grabRect() {
     close();
 }
 
-void RegionGrabber::updateHandles() {
+void RegionGrabber::updateHandles()
+{
     QRect r = selection.normalized().adjusted(0, 0, -1, -1);
     int s2 = handleSize / 2;
 
@@ -305,14 +318,16 @@ void RegionGrabber::updateHandles() {
     BHandle.moveBottomLeft(QPoint(r.x() + r.width() / 2 - s2, r.bottom()));
 }
 
-QRegion RegionGrabber::handleMask() const {
+QRegion RegionGrabber::handleMask() const
+{
     // note: not normalized QRects are bad here, since they will not be drawn
     QRegion mask;
     foreach(const QRect* rect, handles) mask += QRegion(*rect);
     return mask;
 }
 
-QPoint RegionGrabber::limitPointToRect(const QPoint &p, const QRect &r) const {
+QPoint RegionGrabber::limitPointToRect(const QPoint &p, const QRect &r) const
+{
     QPoint q;
     q.setX(p.x() < r.x() ? r.x() : p.x() < r.right() ? p.x() : r.right());
     q.setY(p.y() < r.y() ? r.y() : p.y() < r.bottom() ? p.y() : r.bottom());
index 1a88277745a3774e3e9fdb120a312c106fc51bfd..2a5191dda4a55fe3283b8285e70372e7c91ee22a 100644 (file)
@@ -31,7 +31,8 @@ class QPaintEvent;
 class QResizeEvent;
 class QMouseEvent;
 
-class RegionGrabber : public QWidget {
+class RegionGrabber : public QWidget
+{
     Q_OBJECT
 public:
     RegionGrabber();
index 7fdd9e4a9ac2c92dc92d401090e240a5a77f386b..a0c25344cb020ff0e330f272359fc85c853d2ac1 100644 (file)
@@ -42,7 +42,8 @@
 
 #include <stdlib.h>
 
-static void consumer_frame_show(mlt_consumer, Render * self, mlt_frame frame_ptr) {
+static void consumer_frame_show(mlt_consumer, Render * self, mlt_frame frame_ptr)
+{
     // detect if the producer has finished playing. Is there a better way to do it ?
     if (self->m_isBlocked) return;
     if (mlt_properties_get_double(MLT_FRAME_PROPERTIES(frame_ptr), "_speed") == 0.0) {
@@ -52,7 +53,8 @@ static void consumer_frame_show(mlt_consumer, Render * self, mlt_frame frame_ptr
     }
 }
 
-Render::Render(const QString & rendererName, int winid, int extid, QWidget *parent): QObject(parent), m_name(rendererName), m_mltConsumer(NULL), m_mltProducer(NULL), m_mltTextProducer(NULL), m_winid(winid), m_externalwinid(extid),  m_framePosition(0), m_isBlocked(true), m_blackClip(NULL), m_isSplitView(false), m_isZoneMode(false), m_isLoopMode(false) {
+Render::Render(const QString & rendererName, int winid, int extid, QWidget *parent): QObject(parent), m_name(rendererName), m_mltConsumer(NULL), m_mltProducer(NULL), m_mltTextProducer(NULL), m_winid(winid), m_externalwinid(extid),  m_framePosition(0), m_isBlocked(true), m_blackClip(NULL), m_isSplitView(false), m_isZoneMode(false), m_isLoopMode(false)
+{
     kDebug() << "//////////  USING PROFILE: " << (char*)KdenliveSettings::current_profile().toUtf8().data();
     refreshTimer = new QTimer(this);
     connect(refreshTimer, SIGNAL(timeout()), this, SLOT(refresh()));
@@ -71,12 +73,14 @@ Render::Render(const QString & rendererName, int winid, int extid, QWidget *pare
     m_mltProducer->set_speed(0.0);
 }
 
-Render::~Render() {
+Render::~Render()
+{
     closeMlt();
 }
 
 
-void Render::closeMlt() {
+void Render::closeMlt()
+{
     delete osdTimer;
     delete refreshTimer;
     if (m_mltConsumer)
@@ -88,7 +92,8 @@ void Render::closeMlt() {
 }
 
 
-void Render::buildConsumer() {
+void Render::buildConsumer()
+{
     char *tmp;
     m_activeProfile = KdenliveSettings::current_profile();
     tmp = decodedString(m_activeProfile);
@@ -149,7 +154,8 @@ void Render::buildConsumer() {
 
 }
 
-int Render::resetProfile() {
+int Render::resetProfile()
+{
     if (!m_mltConsumer) return 0;
     if (m_activeProfile == KdenliveSettings::current_profile()) {
         kDebug() << "reset to same profile, nothing to do";
@@ -201,7 +207,8 @@ int Render::resetProfile() {
 }
 
 /** Wraps the VEML command of the same name; Seeks the renderer clip to the given time. */
-void Render::seek(GenTime time) {
+void Render::seek(GenTime time)
+{
     if (!m_mltProducer)
         return;
     m_isBlocked = false;
@@ -210,7 +217,8 @@ void Render::seek(GenTime time) {
 }
 
 //static
-char *Render::decodedString(QString str) {
+char *Render::decodedString(QString str)
+{
     /*QCString fn = QFile::encodeName(str);
     char *t = new char[fn.length() + 1];
     strcpy(t, (const char *)fn);*/
@@ -236,15 +244,18 @@ char *Render::decodedString(QString str) {
     return pix;
 }
 */
-int Render::renderWidth() const {
+int Render::renderWidth() const
+{
     return (int)(m_mltProfile->height() * m_mltProfile->dar());
 }
 
-int Render::renderHeight() const {
+int Render::renderHeight() const
+{
     return m_mltProfile->height();
 }
 
-QPixmap Render::extractFrame(int frame_position, int width, int height) {
+QPixmap Render::extractFrame(int frame_position, int width, int height)
+{
     if (width == -1) {
         width = renderWidth();
         height = renderHeight();
@@ -257,7 +268,8 @@ QPixmap Render::extractFrame(int frame_position, int width, int height) {
     return KThumb::getFrame(m_mltProducer, frame_position, width, height);
 }
 
-QPixmap Render::getImageThumbnail(KUrl url, int /*width*/, int /*height*/) {
+QPixmap Render::getImageThumbnail(KUrl url, int /*width*/, int /*height*/)
+{
     QImage im;
     QPixmap pixmap;
     if (url.fileName().startsWith(".all.")) {  //  check for slideshow
@@ -368,13 +380,15 @@ void Render::getImage(KUrl url, int frame_position, QPoint size)
 }*/
 
 
-double Render::consumerRatio() const {
+double Render::consumerRatio() const
+{
     if (!m_mltConsumer) return 1.0;
     return (m_mltConsumer->get_double("aspect_ratio_num") / m_mltConsumer->get_double("aspect_ratio_den"));
 }
 
 
-int Render::getLength() {
+int Render::getLength()
+{
 
     if (m_mltProducer) {
         // kDebug()<<"//////  LENGTH: "<<mlt_producer_get_playtime(m_mltProducer->get_producer());
@@ -383,7 +397,8 @@ int Render::getLength() {
     return 0;
 }
 
-bool Render::isValid(KUrl url) {
+bool Render::isValid(KUrl url)
+{
     char *tmp = decodedString(url.path());
     Mlt::Producer producer(*m_mltProfile, tmp);
     delete[] tmp;
@@ -393,11 +408,13 @@ bool Render::isValid(KUrl url) {
     return true;
 }
 
-double Render::dar() const {
+double Render::dar() const
+{
     return m_mltProfile->dar();
 }
 
-void Render::slotSplitView(bool doit) {
+void Render::slotSplitView(bool doit)
+{
     m_isSplitView = doit;
     Mlt::Service service(m_mltProducer->parent().get_service());
     Mlt::Tractor tractor(service);
@@ -462,7 +479,8 @@ void Render::slotSplitView(bool doit) {
     }
 }
 
-void Render::getFileProperties(const QDomElement &xml, const QString &clipId, bool replaceProducer) {
+void Render::getFileProperties(const QDomElement &xml, const QString &clipId, bool replaceProducer)
+{
     KUrl url = KUrl(xml.attribute("resource", QString()));
     Mlt::Producer *producer = NULL;
     if (xml.attribute("type").toInt() == TEXT && !QFile::exists(url.path())) {
@@ -685,7 +703,8 @@ void Render::getFileProperties(const QDomElement &xml, const QString &clipId, bo
 
 /** Create the producer from the Westley QDomDocument */
 #if 0
-void Render::initSceneList() {
+void Render::initSceneList()
+{
     kDebug() << "--------  INIT SCENE LIST ------_";
     QDomDocument doc;
     QDomElement westley = doc.createElement("westley");
@@ -723,7 +742,8 @@ void Render::initSceneList() {
 
 
 /** Create the producer from the Westley QDomDocument */
-void Render::setProducer(Mlt::Producer *producer, int position) {
+void Render::setProducer(Mlt::Producer *producer, int position)
+{
     if (m_winid == -1) return;
 
     if (m_mltConsumer) {
@@ -760,12 +780,14 @@ void Render::setProducer(Mlt::Producer *producer, int position) {
 
 
 /** Create the producer from the Westley QDomDocument */
-void Render::setSceneList(QDomDocument list, int position) {
+void Render::setSceneList(QDomDocument list, int position)
+{
     setSceneList(list.toString(), position);
 }
 
 /** Create the producer from the Westley QDomDocument */
-void Render::setSceneList(QString playlist, int position) {
+void Render::setSceneList(QString playlist, int position)
+{
     if (m_winid == -1) return;
     m_isBlocked = true;
     m_slowmotionProducers.clear();
@@ -838,7 +860,8 @@ void Render::setSceneList(QString playlist, int position) {
 }
 
 /** Create the producer from the Westley QDomDocument */
-const QString Render::sceneList() {
+const QString Render::sceneList()
+{
     QString playlist;
     Mlt::Consumer westleyConsumer(*m_mltProfile , "westley:kdenlive_playlist");
     m_mltProducer->optimise();
@@ -854,7 +877,8 @@ const QString Render::sceneList() {
     return playlist;
 }
 
-bool Render::saveSceneList(QString path, QDomElement kdenliveData) {
+bool Render::saveSceneList(QString path, QDomElement kdenliveData)
+{
     QFile file(path);
     QDomDocument doc;
     doc.setContent(sceneList(), false);
@@ -878,7 +902,8 @@ bool Render::saveSceneList(QString path, QDomElement kdenliveData) {
 }
 
 
-void Render::saveZone(KUrl url, QString desc, QPoint zone) {
+void Render::saveZone(KUrl url, QString desc, QPoint zone)
+{
     kDebug() << "// SAVING CLIP ZONE, RENDER: " << m_name;
     char *tmppath = decodedString("westley:" + url.path());
     Mlt::Consumer westleyConsumer(*m_mltProfile , tmppath);
@@ -910,11 +935,13 @@ void Render::saveZone(KUrl url, QString desc, QPoint zone) {
     westleyConsumer.start();
 }
 
-double Render::fps() const {
+double Render::fps() const
+{
     return m_fps;
 }
 
-void Render::connectPlaylist() {
+void Render::connectPlaylist()
+{
     if (!m_mltConsumer) return;
     //m_mltConsumer->set("refresh", "0");
     m_mltConsumer->connect(*m_mltProducer);
@@ -932,7 +959,8 @@ void Render::connectPlaylist() {
      }*/
 }
 
-void Render::refreshDisplay() {
+void Render::refreshDisplay()
+{
 
     if (!m_mltProducer) return;
     //m_mltConsumer->set("refresh", 0);
@@ -951,7 +979,8 @@ void Render::refreshDisplay() {
     refresh();
 }
 
-void Render::setVolume(double /*volume*/) {
+void Render::setVolume(double /*volume*/)
+{
     if (!m_mltConsumer || !m_mltProducer) return;
     /*osdTimer->stop();
     m_mltConsumer->set("refresh", 0);
@@ -970,7 +999,8 @@ void Render::setVolume(double /*volume*/) {
     osdTimer->setSingleShot(2500);
 }
 
-void Render::slotOsdTimeout() {
+void Render::slotOsdTimeout()
+{
     mlt_properties properties = MLT_PRODUCER_PROPERTIES(m_mltProducer->get_producer());
     mlt_properties_set_int(properties, "meta.attr.osdvolume", 0);
     mlt_properties_set(properties, "meta.attr.osdvolume.markup", NULL);
@@ -978,7 +1008,8 @@ void Render::slotOsdTimeout() {
     refresh();
 }
 
-void Render::start() {
+void Render::start()
+{
     kDebug() << "-----  STARTING MONITOR: " << m_name;
     if (m_winid == -1) {
         kDebug() << "-----  BROKEN MONITOR: " << m_name << ", RESTART";
@@ -1000,7 +1031,8 @@ void Render::start() {
     m_isBlocked = false;
 }
 
-void Render::clear() {
+void Render::clear()
+{
     kDebug() << " *********  RENDER CLEAR";
     if (m_mltConsumer) {
         //m_mltConsumer->set("refresh", 0);
@@ -1016,7 +1048,8 @@ void Render::clear() {
     }
 }
 
-void Render::stop() {
+void Render::stop()
+{
     if (m_mltConsumer && !m_mltConsumer->is_stopped()) {
         kDebug() << "/////////////   RENDER STOPPED: " << m_name;
         m_isBlocked = true;
@@ -1037,7 +1070,8 @@ void Render::stop() {
     kDebug() << "/////////////   RENDER STOP3-------";
 }
 
-void Render::stop(const GenTime & startTime) {
+void Render::stop(const GenTime & startTime)
+{
 
     kDebug() << "/////////////   RENDER STOP-------2";
     if (m_mltProducer) {
@@ -1048,7 +1082,8 @@ void Render::stop(const GenTime & startTime) {
     m_mltConsumer->purge();
 }
 
-void Render::pause() {
+void Render::pause()
+{
     if (!m_mltProducer || !m_mltConsumer)
         return;
     if (m_mltProducer->get_speed() == 0.0) return;
@@ -1061,7 +1096,8 @@ void Render::pause() {
     m_mltConsumer->purge();
 }
 
-void Render::switchPlay() {
+void Render::switchPlay()
+{
     if (!m_mltProducer || !m_mltConsumer)
         return;
     if (m_isZoneMode) resetZoneMode();
@@ -1091,7 +1127,8 @@ void Render::switchPlay() {
     //refresh();
 }
 
-void Render::play(double speed) {
+void Render::play(double speed)
+{
     if (!m_mltProducer)
         return;
     // if (speed == 0.0) m_mltProducer->set("out", m_mltProducer->get_length() - 1);
@@ -1104,7 +1141,8 @@ void Render::play(double speed) {
     refresh();
 }
 
-void Render::play(const GenTime & startTime) {
+void Render::play(const GenTime & startTime)
+{
     if (!m_mltProducer || !m_mltConsumer)
         return;
     m_isBlocked = false;
@@ -1113,7 +1151,8 @@ void Render::play(const GenTime & startTime) {
     m_mltConsumer->set("refresh", 1);
 }
 
-void Render::loopZone(const GenTime & startTime, const GenTime & stopTime) {
+void Render::loopZone(const GenTime & startTime, const GenTime & stopTime)
+{
     if (!m_mltProducer || !m_mltConsumer)
         return;
     //m_mltProducer->set("eof", "loop");
@@ -1122,7 +1161,8 @@ void Render::loopZone(const GenTime & startTime, const GenTime & stopTime) {
     playZone(startTime, stopTime);
 }
 
-void Render::playZone(const GenTime & startTime, const GenTime & stopTime) {
+void Render::playZone(const GenTime & startTime, const GenTime & stopTime)
+{
     if (!m_mltProducer || !m_mltConsumer)
         return;
     m_isBlocked = false;
@@ -1134,7 +1174,8 @@ void Render::playZone(const GenTime & startTime, const GenTime & stopTime) {
     m_isZoneMode = true;
 }
 
-void Render::resetZoneMode() {
+void Render::resetZoneMode()
+{
     if (!m_isZoneMode && !m_isLoopMode) return;
     m_mltProducer->set("out", m_originalOut);
     //m_mltProducer->set("eof", "pause");
@@ -1142,7 +1183,8 @@ void Render::resetZoneMode() {
     m_isLoopMode = false;
 }
 
-void Render::seekToFrame(int pos) {
+void Render::seekToFrame(int pos)
+{
     //kDebug()<<" *********  RENDER SEEK TO POS";
     if (!m_mltProducer)
         return;
@@ -1152,17 +1194,20 @@ void Render::seekToFrame(int pos) {
     refresh();
 }
 
-void Render::askForRefresh() {
+void Render::askForRefresh()
+{
     // Use a Timer so that we don't refresh too much
     refreshTimer->start(200);
 }
 
-void Render::doRefresh() {
+void Render::doRefresh()
+{
     // Use a Timer so that we don't refresh too much
     if (!m_isBlocked && m_mltConsumer) m_mltConsumer->set("refresh", 1);
 }
 
-void Render::refresh() {
+void Render::refresh()
+{
     if (!m_mltProducer || m_isBlocked)
         return;
     refreshTimer->stop();
@@ -1171,29 +1216,34 @@ void Render::refresh() {
     }
 }
 
-double Render::playSpeed() {
+double Render::playSpeed()
+{
     if (m_mltProducer) return m_mltProducer->get_speed();
     return 0.0;
 }
 
-GenTime Render::seekPosition() const {
+GenTime Render::seekPosition() const
+{
     if (m_mltProducer) return GenTime((int) m_mltProducer->position(), m_fps);
     else return GenTime();
 }
 
 
-const QString & Render::rendererName() const {
+const QString & Render::rendererName() const
+{
     return m_name;
 }
 
 
-void Render::emitFrameNumber(double position) {
+void Render::emitFrameNumber(double position)
+{
     m_framePosition = position;
     emit rendererPosition((int) position);
     //if (qApp->activeWindow()) QApplication::postEvent(qApp->activeWindow(), new PositionChangeEvent( GenTime((int) position, m_fps), m_monitorId));
 }
 
-void Render::emitConsumerStopped() {
+void Render::emitConsumerStopped()
+{
     // This is used to know when the playing stopped
     if (m_mltProducer) {
         double pos = m_mltProducer->position();
@@ -1207,12 +1257,14 @@ void Render::emitConsumerStopped() {
 
 
 
-void Render::exportFileToFirewire(QString /*srcFileName*/, int /*port*/, GenTime /*startTime*/, GenTime /*endTime*/) {
+void Render::exportFileToFirewire(QString /*srcFileName*/, int /*port*/, GenTime /*startTime*/, GenTime /*endTime*/)
+{
     KMessageBox::sorry(0, i18n("Firewire is not enabled on your system.\n Please install Libiec61883 and recompile Kdenlive"));
 }
 
 
-void Render::exportCurrentFrame(KUrl url, bool /*notify*/) {
+void Render::exportCurrentFrame(KUrl url, bool /*notify*/)
+{
     if (!m_mltProducer) {
         KMessageBox::sorry(qApp->activeWindow(), i18n("There is no clip, cannot extract frame."));
         return;
@@ -1240,7 +1292,8 @@ void Render::exportCurrentFrame(KUrl url, bool /*notify*/) {
 /** MLT PLAYLIST DIRECT MANIPULATON  **/
 
 
-void Render::mltCheckLength() {
+void Render::mltCheckLength()
+{
     //kDebug()<<"checking track length: "<<track<<"..........";
 
     Mlt::Service service(m_mltProducer->get_service());
@@ -1284,7 +1337,8 @@ void Render::mltCheckLength() {
     }
 }
 
-void Render::mltInsertClip(ItemInfo info, QDomElement element, Mlt::Producer *prod) {
+void Render::mltInsertClip(ItemInfo info, QDomElement element, Mlt::Producer *prod)
+{
     if (!m_mltProducer) {
         kDebug() << "PLAYLIST NOT INITIALISED //////";
         return;
@@ -1337,7 +1391,8 @@ void Render::mltInsertClip(ItemInfo info, QDomElement element, Mlt::Producer *pr
 }
 
 
-void Render::mltCutClip(int track, GenTime position) {
+void Render::mltCutClip(int track, GenTime position)
+{
 
     m_isBlocked = true;
 
@@ -1413,14 +1468,16 @@ void Render::mltCutClip(int track, GenTime position) {
     m_isBlocked = false;
 }
 
-void Render::mltUpdateClip(ItemInfo info, QDomElement element, Mlt::Producer *prod) {
+void Render::mltUpdateClip(ItemInfo info, QDomElement element, Mlt::Producer *prod)
+{
     // TODO: optimize
     mltRemoveClip(info.track, info.startPos);
     mltInsertClip(info, element, prod);
 }
 
 
-bool Render::mltRemoveClip(int track, GenTime position) {
+bool Render::mltRemoveClip(int track, GenTime position)
+{
     Mlt::Service service(m_mltProducer->parent().get_service());
     if (service.type() != tractor_type) kWarning() << "// TRACTOR PROBLEM";
 
@@ -1465,7 +1522,8 @@ bool Render::mltRemoveClip(int track, GenTime position) {
     return true;
 }
 
-int Render::mltGetSpaceLength(const GenTime pos, int track, bool fromBlankStart) {
+int Render::mltGetSpaceLength(const GenTime pos, int track, bool fromBlankStart)
+{
     if (!m_mltProducer) {
         kDebug() << "PLAYLIST NOT INITIALISED //////";
         return -1;
@@ -1488,7 +1546,8 @@ int Render::mltGetSpaceLength(const GenTime pos, int track, bool fromBlankStart)
     return trackPlaylist.clip_length(clipIndex) + trackPlaylist.clip_start(clipIndex) - insertPos;
 }
 
-int Render::mltTrackDuration(int track) {
+int Render::mltTrackDuration(int track)
+{
     if (!m_mltProducer) {
         kDebug() << "PLAYLIST NOT INITIALISED //////";
         return -1;
@@ -1506,7 +1565,8 @@ int Render::mltTrackDuration(int track) {
     return trackProducer.get_playtime() - 1;
 }
 
-void Render::mltInsertSpace(QMap <int, int> trackClipStartList, QMap <int, int> trackTransitionStartList, int track, const GenTime duration, const GenTime timeOffset) {
+void Render::mltInsertSpace(QMap <int, int> trackClipStartList, QMap <int, int> trackTransitionStartList, int track, const GenTime duration, const GenTime timeOffset)
+{
     if (!m_mltProducer) {
         kDebug() << "PLAYLIST NOT INITIALISED //////";
         return;
@@ -1633,7 +1693,8 @@ void Render::mltInsertSpace(QMap <int, int> trackClipStartList, QMap <int, int>
     m_mltConsumer->set("refresh", 1);
 }
 
-int Render::mltChangeClipSpeed(ItemInfo info, double speed, double oldspeed, Mlt::Producer *prod) {
+int Render::mltChangeClipSpeed(ItemInfo info, double speed, double oldspeed, Mlt::Producer *prod)
+{
     m_isBlocked = true;
     int newLength = 0;
     Mlt::Service service(m_mltProducer->parent().get_service());
@@ -1753,7 +1814,8 @@ int Render::mltChangeClipSpeed(ItemInfo info, double speed, double oldspeed, Mlt
     return newLength;
 }
 
-bool Render::mltRemoveEffect(int track, GenTime position, QString index, bool updateIndex, bool doRefresh) {
+bool Render::mltRemoveEffect(int track, GenTime position, QString index, bool updateIndex, bool doRefresh)
+{
     kDebug() << "// TRYing to remove effect at: " << index;
     Mlt::Service service(m_mltProducer->parent().get_service());
     bool success = false;
@@ -1788,7 +1850,8 @@ bool Render::mltRemoveEffect(int track, GenTime position, QString index, bool up
 }
 
 
-bool Render::mltAddEffect(int track, GenTime position, EffectsParameterList params, bool doRefresh) {
+bool Render::mltAddEffect(int track, GenTime position, EffectsParameterList params, bool doRefresh)
+{
 
     Mlt::Service service(m_mltProducer->parent().get_service());
 
@@ -1925,7 +1988,8 @@ bool Render::mltAddEffect(int track, GenTime position, EffectsParameterList para
     return true;
 }
 
-bool Render::mltEditEffect(int track, GenTime position, EffectsParameterList params) {
+bool Render::mltEditEffect(int track, GenTime position, EffectsParameterList params)
+{
     QString index = params.paramValue("kdenlive_ix");
     QString tag =  params.paramValue("tag");
 
@@ -1996,7 +2060,8 @@ bool Render::mltEditEffect(int track, GenTime position, EffectsParameterList par
     return true;
 }
 
-void Render::mltMoveEffect(int track, GenTime position, int oldPos, int newPos) {
+void Render::mltMoveEffect(int track, GenTime position, int oldPos, int newPos)
+{
 
     kDebug() << "MOVING EFFECT FROM " << oldPos << ", TO: " << newPos;
     Mlt::Service service(m_mltProducer->parent().get_service());
@@ -2067,7 +2132,8 @@ void Render::mltMoveEffect(int track, GenTime position, int oldPos, int newPos)
     refresh();
 }
 
-bool Render::mltResizeClipEnd(ItemInfo info, GenTime clipDuration) {
+bool Render::mltResizeClipEnd(ItemInfo info, GenTime clipDuration)
+{
     m_isBlocked = true;
 
     Mlt::Service service(m_mltProducer->parent().get_service());
@@ -2138,7 +2204,8 @@ bool Render::mltResizeClipEnd(ItemInfo info, GenTime clipDuration) {
     return true;
 }
 
-void Render::mltChangeTrackState(int track, bool mute, bool blind) {
+void Render::mltChangeTrackState(int track, bool mute, bool blind)
+{
     Mlt::Service service(m_mltProducer->parent().get_service());
     Mlt::Tractor tractor(service);
     Mlt::Producer trackProducer(tractor.track(track));
@@ -2157,7 +2224,8 @@ void Render::mltChangeTrackState(int track, bool mute, bool blind) {
 }
 
 
-bool Render::mltResizeClipCrop(ItemInfo info, GenTime diff) {
+bool Render::mltResizeClipCrop(ItemInfo info, GenTime diff)
+{
     Mlt::Service service(m_mltProducer->parent().get_service());
     int frameOffset = (int) diff.frames(m_fps);
     Mlt::Tractor tractor(service);
@@ -2185,7 +2253,8 @@ bool Render::mltResizeClipCrop(ItemInfo info, GenTime diff) {
     return true;
 }
 
-bool Render::mltResizeClipStart(ItemInfo info, GenTime diff) {
+bool Render::mltResizeClipStart(ItemInfo info, GenTime diff)
+{
     //kDebug() << "////////  RSIZING CLIP from: "<<info.startPos.frames(25)<<" to "<<diff.frames(25);
     Mlt::Service service(m_mltProducer->parent().get_service());
     int moveFrame = (int) diff.frames(m_fps);
@@ -2238,12 +2307,14 @@ bool Render::mltResizeClipStart(ItemInfo info, GenTime diff) {
     return true;
 }
 
-bool Render::mltMoveClip(int startTrack, int endTrack, GenTime moveStart, GenTime moveEnd, Mlt::Producer *prod) {
+bool Render::mltMoveClip(int startTrack, int endTrack, GenTime moveStart, GenTime moveEnd, Mlt::Producer *prod)
+{
     return mltMoveClip(startTrack, endTrack, (int) moveStart.frames(m_fps), (int) moveEnd.frames(m_fps), prod);
 }
 
 
-void Render::mltUpdateClipProducer(int track, int pos, Mlt::Producer *prod) {
+void Render::mltUpdateClipProducer(int track, int pos, Mlt::Producer *prod)
+{
     if (prod == NULL || !prod->is_valid()) {
         kDebug() << "// Warning, CLIP on track " << track << ", at: " << pos << " is invalid, cannot update it!!!";
         return;
@@ -2287,7 +2358,8 @@ void Render::mltUpdateClipProducer(int track, int pos, Mlt::Producer *prod) {
     m_isBlocked = false;
 }
 
-bool Render::mltMoveClip(int startTrack, int endTrack, int moveStart, int moveEnd, Mlt::Producer *prod) {
+bool Render::mltMoveClip(int startTrack, int endTrack, int moveStart, int moveEnd, Mlt::Producer *prod)
+{
     m_isBlocked = true;
 
     m_mltConsumer->set("refresh", 0);
@@ -2380,7 +2452,8 @@ bool Render::mltMoveClip(int startTrack, int endTrack, int moveStart, int moveEn
     return true;
 }
 
-bool Render::mltMoveTransition(QString type, int startTrack, int newTrack, int newTransitionTrack, GenTime oldIn, GenTime oldOut, GenTime newIn, GenTime newOut) {
+bool Render::mltMoveTransition(QString type, int startTrack, int newTrack, int newTransitionTrack, GenTime oldIn, GenTime oldOut, GenTime newIn, GenTime newOut)
+{
     int new_in = (int)newIn.frames(m_fps);
     int new_out = (int)newOut.frames(m_fps) - 1;
     if (new_in >= new_out) return false;
@@ -2429,7 +2502,8 @@ bool Render::mltMoveTransition(QString type, int startTrack, int newTrack, int n
     return true;
 }
 
-void Render::mltUpdateTransition(QString oldTag, QString tag, int a_track, int b_track, GenTime in, GenTime out, QDomElement xml) {
+void Render::mltUpdateTransition(QString oldTag, QString tag, int a_track, int b_track, GenTime in, GenTime out, QDomElement xml)
+{
     // kDebug() << "update transition"  << tag << " at pos " << in.frames(25);
     if (oldTag == tag) mltUpdateTransitionParams(tag, a_track, b_track, in, out, xml);
     else {
@@ -2439,7 +2513,8 @@ void Render::mltUpdateTransition(QString oldTag, QString tag, int a_track, int b
     //mltSavePlaylist();
 }
 
-void Render::mltUpdateTransitionParams(QString type, int a_track, int b_track, GenTime in, GenTime out, QDomElement xml) {
+void Render::mltUpdateTransitionParams(QString type, int a_track, int b_track, GenTime in, GenTime out, QDomElement xml)
+{
     m_isBlocked = true;
     Mlt::Service service(m_mltProducer->parent().get_service());
     Mlt::Tractor tractor(service);
@@ -2494,7 +2569,8 @@ void Render::mltUpdateTransitionParams(QString type, int a_track, int b_track, G
     m_mltConsumer->set("refresh", 1);
 }
 
-void Render::mltDeleteTransition(QString tag, int /*a_track*/, int b_track, GenTime in, GenTime out, QDomElement /*xml*/, bool /*do_refresh*/) {
+void Render::mltDeleteTransition(QString tag, int /*a_track*/, int b_track, GenTime in, GenTime out, QDomElement /*xml*/, bool /*do_refresh*/)
+{
     Mlt::Service service(m_mltProducer->parent().get_service());
     Mlt::Tractor tractor(service);
     Mlt::Field *field = tractor.field();
@@ -2529,7 +2605,8 @@ void Render::mltDeleteTransition(QString tag, int /*a_track*/, int b_track, GenT
     //if (do_refresh) m_mltConsumer->set("refresh", 1);
 }
 
-QMap<QString, QString> Render::mltGetTransitionParamsFromXml(QDomElement xml) {
+QMap<QString, QString> Render::mltGetTransitionParamsFromXml(QDomElement xml)
+{
     QDomNodeList attribs = xml.elementsByTagName("parameter");
     QMap<QString, QString> map;
     for (int i = 0;i < attribs.count();i++) {
@@ -2567,7 +2644,8 @@ QMap<QString, QString> Render::mltGetTransitionParamsFromXml(QDomElement xml) {
     return map;
 }
 
-void Render::mltAddClipTransparency(ItemInfo info, int transitiontrack, int id) {
+void Render::mltAddClipTransparency(ItemInfo info, int transitiontrack, int id)
+{
     kDebug() << "/////////  ADDING CLIP TRANSPARENCY AT: " << info.startPos.frames(25);
     Mlt::Service service(m_mltProducer->parent().get_service());
     Mlt::Tractor tractor(service);
@@ -2582,7 +2660,8 @@ void Render::mltAddClipTransparency(ItemInfo info, int transitiontrack, int id)
     refresh();
 }
 
-void Render::mltDeleteTransparency(int pos, int track, int id) {
+void Render::mltDeleteTransparency(int pos, int track, int id)
+{
     Mlt::Service service(m_mltProducer->parent().get_service());
     Mlt::Tractor tractor(service);
     Mlt::Field *field = tractor.field();
@@ -2617,7 +2696,8 @@ void Render::mltDeleteTransparency(int pos, int track, int id) {
     //if (do_refresh) m_mltConsumer->set("refresh", 1);
 }
 
-void Render::mltResizeTransparency(int oldStart, int newStart, int newEnd, int track, int id) {
+void Render::mltResizeTransparency(int oldStart, int newStart, int newEnd, int track, int id)
+{
     Mlt::Service service(m_mltProducer->parent().get_service());
     Mlt::Tractor tractor(service);
 
@@ -2655,7 +2735,8 @@ void Render::mltResizeTransparency(int oldStart, int newStart, int newEnd, int t
 
 }
 
-void Render::mltMoveTransparency(int startTime, int endTime, int startTrack, int endTrack, int id) {
+void Render::mltMoveTransparency(int startTime, int endTime, int startTrack, int endTrack, int id)
+{
     Mlt::Service service(m_mltProducer->parent().get_service());
     Mlt::Tractor tractor(service);
 
@@ -2700,7 +2781,8 @@ void Render::mltMoveTransparency(int startTime, int endTime, int startTrack, int
 }
 
 
-bool Render::mltAddTransition(QString tag, int a_track, int b_track, GenTime in, GenTime out, QDomElement xml, bool /*do_refresh*/) {
+bool Render::mltAddTransition(QString tag, int a_track, int b_track, GenTime in, GenTime out, QDomElement xml, bool /*do_refresh*/)
+{
     if (in >= out) return false;
     QMap<QString, QString> args = mltGetTransitionParamsFromXml(xml);
     Mlt::Service service(m_mltProducer->parent().get_service());
@@ -2734,7 +2816,8 @@ bool Render::mltAddTransition(QString tag, int a_track, int b_track, GenTime in,
     return true;
 }
 
-void Render::mltSavePlaylist() {
+void Render::mltSavePlaylist()
+{
     kWarning() << "// UPDATING PLAYLIST TO DISK++++++++++++++++";
     Mlt::Consumer fileConsumer(*m_mltProfile, "westley");
     fileConsumer.set("resource", "/tmp/playlist.westley");
@@ -2745,7 +2828,8 @@ void Render::mltSavePlaylist() {
     fileConsumer.start();
 }
 
-QList <Mlt::Producer *> Render::producersList() {
+QList <Mlt::Producer *> Render::producersList()
+{
     QList <Mlt::Producer *> prods;
     Mlt::Service service(m_mltProducer->parent().get_service());
     if (service.type() != tractor_type) return prods;
@@ -2769,7 +2853,8 @@ QList <Mlt::Producer *> Render::producersList() {
     return prods;
 }
 
-void Render::fillSlowMotionProducers() {
+void Render::fillSlowMotionProducers()
+{
     Mlt::Service service(m_mltProducer->parent().get_service());
     if (service.type() != tractor_type) return;
 
@@ -2796,7 +2881,8 @@ void Render::fillSlowMotionProducers() {
     }
 }
 
-void Render::mltInsertTrack(int ix, bool videoTrack) {
+void Render::mltInsertTrack(int ix, bool videoTrack)
+{
     blockSignals(true);
     m_isBlocked = true;
 
@@ -2871,7 +2957,8 @@ void Render::mltInsertTrack(int ix, bool videoTrack) {
 }
 
 
-void Render::mltDeleteTrack(int ix) {
+void Render::mltDeleteTrack(int ix)
+{
     QDomDocument doc;
     doc.setContent(sceneList(), false);
     int tracksCount = doc.elementsByTagName("track").count() - 1;
@@ -2979,7 +3066,8 @@ void Render::mltDeleteTrack(int ix) {
 }
 
 
-void Render::updatePreviewSettings() {
+void Render::updatePreviewSettings()
+{
     kDebug() << "////// RESTARTING CONSUMER";
     if (!m_mltConsumer || !m_mltProducer) return;
     if (m_mltProducer->get_playtime() == 0) return;
index eda891903b6570d318b56ea54e88a438c4e2e8e5..d7f1306170ab32c598daa4e49b633b99f66c9b3b 100644 (file)
@@ -41,7 +41,8 @@ class Render;
 class QTimer;
 class QPixmap;
 
-namespace Mlt {
+namespace Mlt
+{
 class Consumer;
 class Playlist;
 class Tractor;
@@ -54,7 +55,8 @@ class Multitrack;
 
 
 
-class Render: public QObject {
+class Render: public QObject
+{
 Q_OBJECT public:
 
     enum FailStates { OK = 0,
index 84af5b95ee8cacf00870d14aab7c988d4cd4beda..9bb08df998345f4ab91229c692362e5f92d8cc6f 100644 (file)
@@ -48,7 +48,8 @@ const int EditableRole = GroupRole + 5;
 const int MetaGroupRole = GroupRole + 6;
 const int ExtraRole = GroupRole + 7;
 
-RenderWidget::RenderWidget(const QString &projectfolder, QWidget * parent): QDialog(parent), m_projectFolder(projectfolder) {
+RenderWidget::RenderWidget(const QString &projectfolder, QWidget * parent): QDialog(parent), m_projectFolder(projectfolder)
+{
     m_view.setupUi(this);
     setWindowTitle(i18n("Rendering"));
     m_view.buttonDelete->setIcon(KIcon("trash-empty"));
@@ -158,13 +159,15 @@ RenderWidget::RenderWidget(const QString &projectfolder, QWidget * parent): QDia
     focusFirstVisibleItem();
 }
 
-void RenderWidget::slotEditItem(QListWidgetItem *item) {
+void RenderWidget::slotEditItem(QListWidgetItem *item)
+{
     QString edit = item->data(EditableRole).toString();
     if (edit.isEmpty() || !edit.endsWith("customprofiles.xml")) slotSaveProfile();
     else slotEditProfile();
 }
 
-void RenderWidget::showInfoPanel() {
+void RenderWidget::showInfoPanel()
+{
     if (m_view.advanced_params->isVisible()) {
         m_view.advanced_params->setVisible(false);
         m_view.buttonInfo->setDown(false);
@@ -176,28 +179,33 @@ void RenderWidget::showInfoPanel() {
     }
 }
 
-void RenderWidget::setDocumentPath(const QString path) {
+void RenderWidget::setDocumentPath(const QString path)
+{
     m_projectFolder = path;
     const QString fileName = m_view.out_file->url().fileName();
     m_view.out_file->setUrl(KUrl(m_projectFolder + '/' + fileName));
     parseScriptFiles();
 }
 
-void RenderWidget::slotUpdateGuideBox() {
+void RenderWidget::slotUpdateGuideBox()
+{
     m_view.guides_box->setVisible(m_view.render_guide->isChecked());
 }
 
-void RenderWidget::slotCheckStartGuidePosition() {
+void RenderWidget::slotCheckStartGuidePosition()
+{
     if (m_view.guide_start->currentIndex() > m_view.guide_end->currentIndex())
         m_view.guide_start->setCurrentIndex(m_view.guide_end->currentIndex());
 }
 
-void RenderWidget::slotCheckEndGuidePosition() {
+void RenderWidget::slotCheckEndGuidePosition()
+{
     if (m_view.guide_end->currentIndex() < m_view.guide_start->currentIndex())
         m_view.guide_end->setCurrentIndex(m_view.guide_start->currentIndex());
 }
 
-void RenderWidget::setGuides(QDomElement guidesxml, double duration) {
+void RenderWidget::setGuides(QDomElement guidesxml, double duration)
+{
     m_view.guide_start->clear();
     m_view.guide_end->clear();
     QDomNodeList nodes = guidesxml.elementsByTagName("guide");
@@ -218,7 +226,8 @@ void RenderWidget::setGuides(QDomElement guidesxml, double duration) {
 
 // Will be called when the user selects an output file via the file dialog.
 // File extension will be added automatically.
-void RenderWidget::slotUpdateButtons(KUrl url) {
+void RenderWidget::slotUpdateButtons(KUrl url)
+{
     if (m_view.out_file->url().isEmpty()) m_view.buttonStart->setEnabled(false);
     else m_view.buttonStart->setEnabled(true);
     if (url != 0) {
@@ -231,12 +240,14 @@ void RenderWidget::slotUpdateButtons(KUrl url) {
 
 // Will be called when the user changes the output file path in the text line.
 // File extension must NOT be added, would make editing impossible!
-void RenderWidget::slotUpdateButtons() {
+void RenderWidget::slotUpdateButtons()
+{
     if (m_view.out_file->url().isEmpty()) m_view.buttonStart->setEnabled(false);
     else m_view.buttonStart->setEnabled(true);
 }
 
-void RenderWidget::slotSaveProfile() {
+void RenderWidget::slotSaveProfile()
+{
     //TODO: update to correctly use metagroups
     Ui::SaveProfile_UI ui;
     QDialog *d = new QDialog(this);
@@ -329,7 +340,8 @@ void RenderWidget::slotSaveProfile() {
     delete d;
 }
 
-void RenderWidget::slotEditProfile() {
+void RenderWidget::slotEditProfile()
+{
     QListWidgetItem *item = m_view.size_list->currentItem();
     if (!item) return;
     QString currentGroup = m_view.format_list->currentItem()->text();
@@ -432,7 +444,8 @@ void RenderWidget::slotEditProfile() {
     } else delete d;
 }
 
-void RenderWidget::slotDeleteProfile(bool refresh) {
+void RenderWidget::slotDeleteProfile(bool refresh)
+{
     //TODO: delete a profile installed by KNewStuff the easy way
     /*
     QString edit = m_view.size_list->currentItem()->data(EditableRole).toString();
@@ -493,7 +506,8 @@ void RenderWidget::slotDeleteProfile(bool refresh) {
     }
 }
 
-void RenderWidget::updateButtons() {
+void RenderWidget::updateButtons()
+{
     if (!m_view.size_list->currentItem() || m_view.size_list->currentItem()->isHidden()) {
         m_view.buttonSave->setEnabled(false);
         m_view.buttonDelete->setEnabled(false);
@@ -514,7 +528,8 @@ void RenderWidget::updateButtons() {
 }
 
 
-void RenderWidget::focusFirstVisibleItem() {
+void RenderWidget::focusFirstVisibleItem()
+{
     if (m_view.size_list->currentItem() && !m_view.size_list->currentItem()->isHidden()) {
         updateButtons();
         return;
@@ -530,7 +545,8 @@ void RenderWidget::focusFirstVisibleItem() {
     updateButtons();
 }
 
-void RenderWidget::slotExport(bool scriptExport) {
+void RenderWidget::slotExport(bool scriptExport)
+{
     QListWidgetItem *item = m_view.size_list->currentItem();
     if (!item) return;
 
@@ -648,7 +664,8 @@ void RenderWidget::slotExport(bool scriptExport) {
     }
 }
 
-void RenderWidget::setProfile(MltVideoProfile profile) {
+void RenderWidget::setProfile(MltVideoProfile profile)
+{
     m_profile = profile;
     //WARNING: this way to tell the video standard is a bit hackish...
     if (m_profile.description.contains("pal", Qt::CaseInsensitive) || m_profile.description.contains("25", Qt::CaseInsensitive) || m_profile.description.contains("50", Qt::CaseInsensitive)) m_view.format_selection->setCurrentIndex(0);
@@ -657,7 +674,8 @@ void RenderWidget::setProfile(MltVideoProfile profile) {
     refreshView();
 }
 
-void RenderWidget::refreshView() {
+void RenderWidget::refreshView()
+{
     m_view.size_list->blockSignals(true);
     QListWidgetItem *sizeItem;
 
@@ -785,7 +803,8 @@ void RenderWidget::refreshView() {
     refreshParams();
 }
 
-KUrl RenderWidget::filenameWithExtension(KUrl url, QString extension) {
+KUrl RenderWidget::filenameWithExtension(KUrl url, QString extension)
+{
     QString path;
     if (!url.isEmpty()) {
         path = url.path();
@@ -800,7 +819,8 @@ KUrl RenderWidget::filenameWithExtension(KUrl url, QString extension) {
 }
 
 
-void RenderWidget::refreshParams() {
+void RenderWidget::refreshParams()
+{
     QListWidgetItem *item = m_view.size_list->currentItem();
     if (!item || item->isHidden()) {
         m_view.advanced_params->clear();
@@ -843,11 +863,13 @@ void RenderWidget::refreshParams() {
     m_view.buttonStart->setEnabled(m_view.size_list->currentItem()->flags() & Qt::ItemIsEnabled);
 }
 
-void RenderWidget::reloadProfiles() {
+void RenderWidget::reloadProfiles()
+{
     parseProfiles();
 }
 
-void RenderWidget::parseProfiles(QString meta, QString group, QString profile) {
+void RenderWidget::parseProfiles(QString meta, QString group, QString profile)
+{
     m_view.size_list->clear();
     m_view.format_list->clear();
     m_view.destination_list->clear();
@@ -896,7 +918,8 @@ void RenderWidget::parseProfiles(QString meta, QString group, QString profile) {
     if (!child.isEmpty()) m_view.size_list->setCurrentItem(child.at(0));
 }
 
-void RenderWidget::parseFile(QString exportFile, bool editable) {
+void RenderWidget::parseFile(QString exportFile, bool editable)
+{
     kDebug() << "// Parsing file: " << exportFile;
     kDebug() << "------------------------------";
     QDomDocument doc;
@@ -1078,7 +1101,8 @@ void RenderWidget::parseFile(QString exportFile, bool editable) {
     }
 }
 
-void RenderWidget::setRenderJob(const QString &dest, int progress) {
+void RenderWidget::setRenderJob(const QString &dest, int progress)
+{
     QTreeWidgetItem *item;
     QList<QTreeWidgetItem *> existing = m_view.running_jobs->findItems(dest, Qt::MatchExactly, 1);
     if (!existing.isEmpty()) item = existing.at(0);
@@ -1097,7 +1121,8 @@ void RenderWidget::setRenderJob(const QString &dest, int progress) {
     }
 }
 
-void RenderWidget::setRenderStatus(const QString &dest, int status, const QString &error) {
+void RenderWidget::setRenderStatus(const QString &dest, int status, const QString &error)
+{
     QTreeWidgetItem *item;
     QList<QTreeWidgetItem *> existing = m_view.running_jobs->findItems(dest, Qt::MatchExactly, 1);
     if (!existing.isEmpty()) item = existing.at(0);
@@ -1136,12 +1161,14 @@ void RenderWidget::setRenderStatus(const QString &dest, int status, const QStrin
     slotCheckJob();
 }
 
-void RenderWidget::slotAbortCurrentJob() {
+void RenderWidget::slotAbortCurrentJob()
+{
     QTreeWidgetItem *current = m_view.running_jobs->currentItem();
     if (current) emit abortProcess(current->text(1));
 }
 
-void RenderWidget::slotCheckJob() {
+void RenderWidget::slotCheckJob()
+{
     bool activate = false;
     QTreeWidgetItem *current = m_view.running_jobs->currentItem();
     if (current) {
@@ -1151,7 +1178,8 @@ void RenderWidget::slotCheckJob() {
     m_view.abort_job->setEnabled(activate);
 }
 
-void RenderWidget::parseScriptFiles() {
+void RenderWidget::parseScriptFiles()
+{
     QStringList scriptsFilter;
     scriptsFilter << "*.sh";
     m_view.scripts_list->clear();
@@ -1193,7 +1221,8 @@ void RenderWidget::parseScriptFiles() {
     m_view.delete_script->setEnabled(activate);
 }
 
-void RenderWidget::slotCheckScript() {
+void RenderWidget::slotCheckScript()
+{
     bool activate = false;
     QTreeWidgetItemIterator it(m_view.scripts_list);
     if (*it) activate = true;
@@ -1201,7 +1230,8 @@ void RenderWidget::slotCheckScript() {
     m_view.delete_script->setEnabled(activate);
 }
 
-void RenderWidget::slotStartScript() {
+void RenderWidget::slotStartScript()
+{
     QTreeWidgetItem *item = m_view.scripts_list->currentItem();
     if (item) {
         QString path = item->data(0, Qt::UserRole + 1).toString();
@@ -1210,7 +1240,8 @@ void RenderWidget::slotStartScript() {
     }
 }
 
-void RenderWidget::slotDeleteScript() {
+void RenderWidget::slotDeleteScript()
+{
     QTreeWidgetItem *item = m_view.scripts_list->currentItem();
     if (item) {
         QString path = item->data(0, Qt::UserRole + 1).toString();
@@ -1220,7 +1251,8 @@ void RenderWidget::slotDeleteScript() {
     }
 }
 
-void RenderWidget::slotGenerateScript() {
+void RenderWidget::slotGenerateScript()
+{
     slotExport(true);
 }
 
index a97a8b1af6c4dbddc8835553a895bb5135163ded..d245976a0397dc2ccd09489044ae50c17d5ee623 100644 (file)
@@ -32,7 +32,8 @@ class QDomElement;
 
 
 // RenderViewDelegate is used to draw the progress bars.
-class RenderViewDelegate : public QItemDelegate {
+class RenderViewDelegate : public QItemDelegate
+{
     Q_OBJECT
 public:
     RenderViewDelegate(QWidget *parent) : QItemDelegate(parent) {}
@@ -97,7 +98,8 @@ public:
 
 
 // RenderScriptDelegate is used to draw the script items.
-class RenderScriptDelegate : public QItemDelegate {
+class RenderScriptDelegate : public QItemDelegate
+{
     Q_OBJECT
 public:
     RenderScriptDelegate(QWidget *parent) : QItemDelegate(parent) {}
@@ -131,7 +133,8 @@ public:
     }
 };
 
-class RenderWidget : public QDialog {
+class RenderWidget : public QDialog
+{
     Q_OBJECT
 
 public:
index 3f491c37e85e99ad2ce1c28c87e0f23ce975d967..db5037b40370a5645db4b560f46fe5bdc541ea66 100644 (file)
 
 #include <KLocale>
 
-ResizeClipCommand::ResizeClipCommand(CustomTrackView *view, const ItemInfo start, const ItemInfo end, bool doIt, QUndoCommand * parent) : QUndoCommand(parent), m_view(view), m_startPos(start), m_endPos(end), m_doIt(doIt) {
+ResizeClipCommand::ResizeClipCommand(CustomTrackView *view, const ItemInfo start, const ItemInfo end, bool doIt, QUndoCommand * parent) : QUndoCommand(parent), m_view(view), m_startPos(start), m_endPos(end), m_doIt(doIt)
+{
     setText(i18n("Resize clip"));
 }
 
 // virtual
-void ResizeClipCommand::undo() {
+void ResizeClipCommand::undo()
+{
 // kDebug()<<"----  undoing action";
     m_doIt = true;
     if (m_doIt) m_view->resizeClip(m_endPos, m_startPos);
 }
 // virtual
-void ResizeClipCommand::redo() {
+void ResizeClipCommand::redo()
+{
     kDebug() << "----  redoing action";
     if (m_doIt) m_view->resizeClip(m_startPos, m_endPos);
     m_doIt = true;
index 8aafadc221d0bfe3a0ce6c941b1c0647167909d7..8493c95d3b954a20c7dce3f7765aa2556e68bd81 100644 (file)
@@ -31,7 +31,8 @@
 
 class CustomTrackView;
 
-class ResizeClipCommand : public QUndoCommand {
+class ResizeClipCommand : public QUndoCommand
+{
 public:
     ResizeClipCommand(CustomTrackView *view, const ItemInfo start, const ItemInfo end, bool doIt, QUndoCommand * parent = 0);
     virtual void undo();
index 9ee89b46513a4e144d28f1a4889b5cfcc50c7c5f..639344a27ab8f61b03703e403e389584580cfd97 100644 (file)
@@ -26,7 +26,8 @@
 
 #include <QDir>
 
-SlideshowClip::SlideshowClip(QWidget * parent): QDialog(parent), m_count(0) {
+SlideshowClip::SlideshowClip(QWidget * parent): QDialog(parent), m_count(0)
+{
     setFont(KGlobalSettings::toolBarFont());
     setWindowTitle(i18n("Add Slideshow Clip"));
     m_view.setupUi(this);
@@ -77,7 +78,8 @@ SlideshowClip::SlideshowClip(QWidget * parent): QDialog(parent), m_count(0) {
     adjustSize();
 }
 
-void SlideshowClip::slotEnableLuma(int state) {
+void SlideshowClip::slotEnableLuma(int state)
+{
     bool enable = false;
     if (state == Qt::Checked) enable = true;
     m_view.luma_duration->setEnabled(enable);
@@ -89,7 +91,8 @@ void SlideshowClip::slotEnableLuma(int state) {
     m_view.luma_softness->setEnabled(m_view.label_softness->isEnabled());
 }
 
-void SlideshowClip::slotEnableLumaFile(int state) {
+void SlideshowClip::slotEnableLumaFile(int state)
+{
     bool enable = false;
     if (state == Qt::Checked) enable = true;
     m_view.luma_file->setEnabled(enable);
@@ -97,7 +100,8 @@ void SlideshowClip::slotEnableLumaFile(int state) {
     m_view.label_softness->setEnabled(enable);
 }
 
-void SlideshowClip::parseFolder() {
+void SlideshowClip::parseFolder()
+{
     m_view.icon_list->clear();
     QDir dir(m_view.folder_url->url().path());
 
@@ -131,7 +135,8 @@ void SlideshowClip::parseFolder() {
     m_view.icon_list->setCurrentRow(0);
 }
 
-void SlideshowClip::slotSetItemIcon(int row) {
+void SlideshowClip::slotSetItemIcon(int row)
+{
     QListWidgetItem * item = m_view.icon_list->item(row);
     if (item) {
         QString path = item->data(Qt::UserRole).toString();
@@ -143,41 +148,50 @@ void SlideshowClip::slotSetItemIcon(int row) {
     }
 }
 
-QString SlideshowClip::selectedPath() const {
+QString SlideshowClip::selectedPath() const
+{
     QString extension = "/.all." + m_view.image_type->itemData(m_view.image_type->currentIndex()).toString();
     return m_view.folder_url->url().path() + extension;
 }
 
 
-QString SlideshowClip::clipName() const {
+QString SlideshowClip::clipName() const
+{
     return m_view.clip_name->text();
 }
 
-QString SlideshowClip::clipDuration() const {
+QString SlideshowClip::clipDuration() const
+{
     return m_view.clip_duration->text();
 }
 
-int SlideshowClip::imageCount() const {
+int SlideshowClip::imageCount() const
+{
     return m_count;
 }
 
-int SlideshowClip::softness() const {
+int SlideshowClip::softness() const
+{
     return m_view.luma_softness->value();
 }
 
-bool SlideshowClip::loop() const {
+bool SlideshowClip::loop() const
+{
     return m_view.slide_loop->isChecked();
 }
 
-bool SlideshowClip::fade() const {
+bool SlideshowClip::fade() const
+{
     return m_view.slide_fade->isChecked();
 }
 
-QString SlideshowClip::lumaDuration() const {
+QString SlideshowClip::lumaDuration() const
+{
     return m_view.luma_duration->text();
 }
 
-QString SlideshowClip::lumaFile() const {
+QString SlideshowClip::lumaFile() const
+{
     if (!m_view.luma_fade->isChecked() || !m_view.luma_file->isEnabled()) return QString();
     return m_view.luma_file->itemData(m_view.luma_file->currentIndex()).toString();
 }
index 7c101c6f907af0639e798cb621147301792732f1..f185f64fc61b74a95d687a5b4607189e02a63bab 100644 (file)
@@ -27,7 +27,8 @@
 #include "timecode.h"
 #include "ui_slideshowclip_ui.h"
 
-class SlideshowClip : public QDialog {
+class SlideshowClip : public QDialog
+{
     Q_OBJECT
 
 public:
index b75dd03f79416e417fe5e43ec17f8dd27b712d51..d63ef06cb24d92306d5b565abae678d13a1a75cb 100644 (file)
 #include <QStylePainter>
 
 SmallRuler::SmallRuler(QWidget *parent)
-        : QWidget(parent), m_scale(1), m_maxval(25) {
+        : QWidget(parent), m_scale(1), m_maxval(25)
+{
     m_zoneStart = 10;
     m_zoneEnd = 60;
     m_zoneColor = QColor(133, 255, 143);
 }
 
-void SmallRuler::adjustScale(int maximum) {
+void SmallRuler::adjustScale(int maximum)
+{
     m_maxval = maximum;
     m_scale = (double) width() / (double) maximum;
     if (m_scale == 0) m_scale = 1;
@@ -51,7 +53,8 @@ void SmallRuler::adjustScale(int maximum) {
     update();
 }
 
-void SmallRuler::setZone(int start, int end) {
+void SmallRuler::setZone(int start, int end)
+{
     if (start != -1) {
         if (end != -1 && start >= end) {
             m_zoneEnd = qMin(m_maxval, end + (start - m_zoneStart));
@@ -73,12 +76,14 @@ void SmallRuler::setZone(int start, int end) {
     update();
 }
 
-QPoint SmallRuler::zone() {
+QPoint SmallRuler::zone()
+{
     return QPoint(m_zoneStart, m_zoneEnd);
 }
 
 // virtual
-void SmallRuler::mousePressEvent(QMouseEvent * event) {
+void SmallRuler::mousePressEvent(QMouseEvent * event)
+{
     const int pos = event->x() / m_scale;
     if (event->button() == Qt::RightButton) {
         // Right button clicked, move selection zone
@@ -91,12 +96,14 @@ void SmallRuler::mousePressEvent(QMouseEvent * event) {
 }
 
 // virtual
-void SmallRuler::mouseMoveEvent(QMouseEvent * event) {
+void SmallRuler::mouseMoveEvent(QMouseEvent * event)
+{
     const int pos = event->x() / m_scale;
     if (event->buttons() & Qt::LeftButton) emit seekRenderer((int) pos);
 }
 
-void SmallRuler::slotNewValue(int value) {
+void SmallRuler::slotNewValue(int value)
+{
     m_cursorFramePosition = value;
     int oldPos = m_cursorPosition;
     m_cursorPosition = value * m_scale;
@@ -108,12 +115,14 @@ void SmallRuler::slotNewValue(int value) {
 }
 
 //virtual
-void SmallRuler::resizeEvent(QResizeEvent *) {
+void SmallRuler::resizeEvent(QResizeEvent *)
+{
     adjustScale(m_maxval);
 }
 
 // virtual
-void SmallRuler::paintEvent(QPaintEvent *e) {
+void SmallRuler::paintEvent(QPaintEvent *e)
+{
 
     QPainter p(this);
     QRect r = e->rect();
index 9d5d07d095ff28a5e92f55b904af0d9c0329c17a..2414a502edbfbfad29af60dbbfa106e5950074f0 100644 (file)
@@ -23,7 +23,8 @@
 
 #include <QWidget>
 
-class SmallRuler : public QWidget {
+class SmallRuler : public QWidget
+{
     Q_OBJECT
 
 public:
index cb0fc9ba55430628c880e2ff1c54a3eb6087432d..9427cf312050c988814fdf3331f3543042feafea 100644 (file)
@@ -26,7 +26,8 @@
 #include <KDebug>
 
 
-SpacerDialog::SpacerDialog(const GenTime duration, Timecode tc, int track, int trackNumber, QWidget * parent): QDialog(parent), m_tc(tc) {
+SpacerDialog::SpacerDialog(const GenTime duration, Timecode tc, int track, int trackNumber, QWidget * parent): QDialog(parent), m_tc(tc)
+{
     setFont(KGlobalSettings::toolBarFont());
     m_fps = m_tc.fps();
     m_view.setupUi(this);
@@ -45,27 +46,32 @@ SpacerDialog::SpacerDialog(const GenTime duration, Timecode tc, int track, int t
     adjustSize();
 }
 
-SpacerDialog::~SpacerDialog() {
+SpacerDialog::~SpacerDialog()
+{
 }
 
-void SpacerDialog::slotTimeUp() {
+void SpacerDialog::slotTimeUp()
+{
     int duration = m_tc.getFrameCount(m_view.space_duration->text(), m_fps);
     duration ++;
     m_view.space_duration->setText(m_tc.getTimecode(GenTime(duration, m_fps), m_fps));
 }
 
-void SpacerDialog::slotTimeDown() {
+void SpacerDialog::slotTimeDown()
+{
     int duration = m_tc.getFrameCount(m_view.space_duration->text(), m_fps);
     if (duration <= 0) return;
     duration --;
     m_view.space_duration->setText(m_tc.getTimecode(GenTime(duration, m_fps), m_fps));
 }
 
-GenTime SpacerDialog::selectedDuration() {
+GenTime SpacerDialog::selectedDuration()
+{
     return GenTime(m_tc.getFrameCount(m_view.space_duration->text(), m_fps), m_fps);
 }
 
-void SpacerDialog::wheelEvent(QWheelEvent * event) {
+void SpacerDialog::wheelEvent(QWheelEvent * event)
+{
     if (m_view.space_duration->underMouse()) {
         if (event->delta() > 0)
             slotTimeUp();
@@ -74,7 +80,8 @@ void SpacerDialog::wheelEvent(QWheelEvent * event) {
     }
 }
 
-int SpacerDialog::selectedTrack() {
+int SpacerDialog::selectedTrack()
+{
     return m_view.track_number->currentIndex() - 1;
 }
 
index 516de61a1fa5433e9029b2245bfe5232c6ebd176..9f527b78654232c6db4755a5e58010840b4baef7 100644 (file)
@@ -25,7 +25,8 @@
 #include "timecode.h"
 #include "ui_spacerdialog_ui.h"
 
-class SpacerDialog : public QDialog {
+class SpacerDialog : public QDialog
+{
     Q_OBJECT
 
 public:
index f754669217ced44f0e03f01be0e40027012b25d4..9fa61ffaa86e38768c02203be619bae8d18fbdbf 100644 (file)
 
 #include <KLocale>
 
-SplitAudioCommand::SplitAudioCommand(CustomTrackView *view, const int track, const GenTime &pos, bool doIt, QUndoCommand * parent) : QUndoCommand(parent), m_view(view), m_track(track), m_pos(pos), m_doIt(doIt) {
+SplitAudioCommand::SplitAudioCommand(CustomTrackView *view, const int track, const GenTime &pos, bool doIt, QUndoCommand * parent) : QUndoCommand(parent), m_view(view), m_track(track), m_pos(pos), m_doIt(doIt)
+{
     setText(i18n("Split audio"));
 }
 
 // virtual
-void SplitAudioCommand::undo() {
+void SplitAudioCommand::undo()
+{
 // kDebug()<<"----  undoing action";
     m_doIt = true;
     m_view->doSplitAudio(m_pos, m_track, false);
 }
 // virtual
-void SplitAudioCommand::redo() {
+void SplitAudioCommand::redo()
+{
     kDebug() << "----  redoing action";
     if (m_doIt)
         m_view->doSplitAudio(m_pos, m_track, true);
index d14d970029543ba26ca9ae02e84616ffe9952464..e833a91b53ece9c260be94b7622fde62336fc0eb 100644 (file)
@@ -31,7 +31,8 @@
 class GenTime;
 class CustomTrackView;
 
-class SplitAudioCommand : public QUndoCommand {
+class SplitAudioCommand : public QUndoCommand
+{
 public:
     SplitAudioCommand(CustomTrackView *view, const int track, const GenTime &pos, bool doIt, QUndoCommand * parent = 0);
     virtual void undo();
index e7e87b48868e090d8e40ed245c2e8ae2378b1194..19e921c0ca68afd539cfd966512a5cab4aad2fac 100644 (file)
@@ -41,7 +41,8 @@ StatusBarMessageLabel::StatusBarMessageLabel(QWidget* parent) :
         m_illumination(0),
         m_minTextHeight(-1),
         m_timer(0),
-        m_closeButton(0) {
+        m_closeButton(0)
+{
     setMinimumHeight(KIconLoader::SizeSmall);
 
     QPalette palette;
@@ -58,11 +59,13 @@ StatusBarMessageLabel::StatusBarMessageLabel(QWidget* parent) :
             this, SLOT(closeErrorMessage()));
 }
 
-StatusBarMessageLabel::~StatusBarMessageLabel() {
+StatusBarMessageLabel::~StatusBarMessageLabel()
+{
 }
 
 void StatusBarMessageLabel::setMessage(const QString& text,
-                                       MessageType type) {
+                                       MessageType type)
+{
     if ((text == m_text) && (type == m_type)) {
         return;
     }
@@ -118,7 +121,8 @@ void StatusBarMessageLabel::setMessage(const QString& text,
     show(); //update();
 }
 
-void StatusBarMessageLabel::setMinimumTextHeight(int min) {
+void StatusBarMessageLabel::setMinimumTextHeight(int min)
+{
     if (min != m_minTextHeight) {
         m_minTextHeight = min;
         setMinimumHeight(min);
@@ -128,13 +132,15 @@ void StatusBarMessageLabel::setMinimumTextHeight(int min) {
     }
 }
 
-int StatusBarMessageLabel::widthGap() const {
+int StatusBarMessageLabel::widthGap() const
+{
     QFontMetrics fontMetrics(font());
     const int defaultGap = 10;
     return fontMetrics.width(m_text) - availableTextWidth() + defaultGap;
 }
 
-void StatusBarMessageLabel::paintEvent(QPaintEvent* /* event */) {
+void StatusBarMessageLabel::paintEvent(QPaintEvent* /* event */)
+{
     QPainter painter(this);
 
     // draw background
@@ -170,13 +176,15 @@ void StatusBarMessageLabel::paintEvent(QPaintEvent* /* event */) {
     painter.end();
 }
 
-void StatusBarMessageLabel::resizeEvent(QResizeEvent* event) {
+void StatusBarMessageLabel::resizeEvent(QResizeEvent* event)
+{
     QWidget::resizeEvent(event);
     //updateCloseButtonPosition();
     //QTimer::singleShot(GeometryTimeout, this, SLOT(assureVisibleText()));
 }
 
-void StatusBarMessageLabel::timerDone() {
+void StatusBarMessageLabel::timerDone()
+{
     switch (m_state) {
     case Illuminate: {
         // increase the illumination
@@ -219,7 +227,8 @@ void StatusBarMessageLabel::timerDone() {
     }
 }
 
-void StatusBarMessageLabel::assureVisibleText() {
+void StatusBarMessageLabel::assureVisibleText()
+{
     if (m_text.isEmpty()) {
         return;
     }
@@ -265,26 +274,30 @@ void StatusBarMessageLabel::assureVisibleText() {
     //updateCloseButtonPosition();
 }
 
-int StatusBarMessageLabel::availableTextWidth() const {
+int StatusBarMessageLabel::availableTextWidth() const
+{
     const int buttonWidth = 0; /*(m_type == ErrorMessage) ?
                             m_closeButton->width() + BorderGap : 0;*/
     return width() - m_pixmap.width() - (BorderGap * 4) - buttonWidth;
 }
 
-void StatusBarMessageLabel::updateCloseButtonPosition() {
+void StatusBarMessageLabel::updateCloseButtonPosition()
+{
     const int x = width() - m_closeButton->width() - BorderGap;
     const int y = (height() - m_closeButton->height()) / 2;
     m_closeButton->move(x, y);
 }
 
-void StatusBarMessageLabel::closeErrorMessage() {
+void StatusBarMessageLabel::closeErrorMessage()
+{
     if (!showPendingMessage()) {
         reset();
         setMessage(m_defaultText, DefaultMessage);
     }
 }
 
-bool StatusBarMessageLabel::showPendingMessage() {
+bool StatusBarMessageLabel::showPendingMessage()
+{
     if (!m_pendingMessages.isEmpty()) {
         reset();
         setMessage(m_pendingMessages.takeFirst(), ErrorMessage);
@@ -293,7 +306,8 @@ bool StatusBarMessageLabel::showPendingMessage() {
     return false;
 }
 
-void StatusBarMessageLabel::reset() {
+void StatusBarMessageLabel::reset()
+{
     m_text.clear();
     m_pixmap = QPixmap();
     m_type = DefaultMessage;
index 51312cae62f438079e6f3921e40f9d16f2a20c51..594b5551bc34bb7e28418a3093844502249086c3 100644 (file)
@@ -43,7 +43,8 @@ class QTimer;
  * DolphinStatusBar::Error a dynamic color blending is done to get the
  * attention from the user.
  */
-class StatusBarMessageLabel : public QWidget {
+class StatusBarMessageLabel : public QWidget
+{
     Q_OBJECT
 
 public:
@@ -141,23 +142,28 @@ private:
     QPushButton* m_closeButton;
 };
 
-inline MessageType StatusBarMessageLabel::type() const {
+inline MessageType StatusBarMessageLabel::type() const
+{
     return m_type;
 }
 
-inline const QString& StatusBarMessageLabel::text() const {
+inline const QString& StatusBarMessageLabel::text() const
+{
     return m_text;
 }
 
-inline void StatusBarMessageLabel::setDefaultText(const QString& text) {
+inline void StatusBarMessageLabel::setDefaultText(const QString& text)
+{
     m_defaultText = text;
 }
 
-inline const QString& StatusBarMessageLabel::defaultText() const {
+inline const QString& StatusBarMessageLabel::defaultText() const
+{
     return m_defaultText;
 }
 
-inline int StatusBarMessageLabel::minimumTextHeight() const {
+inline int StatusBarMessageLabel::minimumTextHeight() const
+{
     return m_minTextHeight;
 }
 
index 8baf2ac61a30abf00f88791ee90417b085bfc42a..182f6d9009d17431c3589f4f2881b76645e0c8a6 100644 (file)
 
 Timecode::Timecode(Formats format, int framesPerSecond,
                    bool dropFrame): m_format(format), m_dropFrame(dropFrame),
-        m_displayedFramesPerSecond(framesPerSecond) {
+        m_displayedFramesPerSecond(framesPerSecond)
+{
 }
 
-Timecode::~Timecode() {
+Timecode::~Timecode()
+{
 }
 
-int Timecode::fps() {
+int Timecode::fps()
+{
     return m_displayedFramesPerSecond;
 }
 
 
-int Timecode::getFrameCount(const QString duration, double fps) const {
+int Timecode::getFrameCount(const QString duration, double fps) const
+{
     if (m_dropFrame) {
         // calculate how many frames need to be dropped every minute.
         int frames;
@@ -63,7 +67,8 @@ int Timecode::getFrameCount(const QString duration, double fps) const {
     return (int)((duration.section(':', 0, 0).toInt()*3600.0 + duration.section(':', 1, 1).toInt()*60.0 + duration.section(':', 2, 2).toInt()) * fps + duration.section(':', 3, 3).toInt());
 }
 
-QString Timecode::getTimecode(const GenTime & time, double fps) const {
+QString Timecode::getTimecode(const GenTime & time, double fps) const
+{
     switch (m_format) {
     case HH_MM_SS_FF:
         return getTimecodeHH_MM_SS_FF(time, fps);
@@ -85,12 +90,14 @@ QString Timecode::getTimecode(const GenTime & time, double fps) const {
     }
 }
 
-QString Timecode::getTimecodeFromFrames(int frames) {
+QString Timecode::getTimecodeFromFrames(int frames)
+{
     return getTimecodeHH_MM_SS_FF(frames);
 }
 
 //static
-QString Timecode::getEasyTimecode(const GenTime & time, const double &fps) {
+QString Timecode::getEasyTimecode(const GenTime & time, const double &fps)
+{
     // Returns the timecode in an easily read display, like 3 min. 5 sec.
     int frames = (int)time.frames(fps);
     int seconds = frames / (int) floor(fps + 0.5);
@@ -134,14 +141,16 @@ QString Timecode::getEasyTimecode(const GenTime & time, const double &fps) {
 }
 
 
-QString Timecode::getTimecodeHH_MM_SS_FF(const GenTime & time, double fps) const {
+QString Timecode::getTimecodeHH_MM_SS_FF(const GenTime & time, double fps) const
+{
     if (m_dropFrame)
         return getTimecodeDropFrame(time, fps);
 
     return getTimecodeHH_MM_SS_FF((int)time.frames(fps));
 }
 
-QString Timecode::getTimecodeHH_MM_SS_FF(int frames) const {
+QString Timecode::getTimecodeHH_MM_SS_FF(int frames) const
+{
     int seconds = frames / m_displayedFramesPerSecond;
     frames = frames % m_displayedFramesPerSecond;
 
@@ -163,7 +172,8 @@ QString Timecode::getTimecodeHH_MM_SS_FF(int frames) const {
     return text;
 }
 
-QString Timecode::getTimecodeHH_MM_SS_HH(const GenTime & time) const {
+QString Timecode::getTimecodeHH_MM_SS_HH(const GenTime & time) const
+{
     int hundredths = (int)(time.seconds() * 100);
     int seconds = hundredths / 100;
     hundredths = hundredths % 100;
@@ -185,15 +195,18 @@ QString Timecode::getTimecodeHH_MM_SS_HH(const GenTime & time) const {
     return text;
 }
 
-QString Timecode::getTimecodeFrames(const GenTime & time, double fps) const {
+QString Timecode::getTimecodeFrames(const GenTime & time, double fps) const
+{
     return QString::number(time.frames(fps));
 }
 
-QString Timecode::getTimecodeSeconds(const GenTime & time) const {
+QString Timecode::getTimecodeSeconds(const GenTime & time) const
+{
     return QString::number(time.seconds());
 }
 
-QString Timecode::getTimecodeDropFrame(const GenTime & time, double fps) const {
+QString Timecode::getTimecodeDropFrame(const GenTime & time, double fps) const
+{
     // Calculate the timecode using dropframes to remove the difference in fps. Note that this algorithm should work
     // for NTSC times, but is untested for any others - it is in no way an "official" algorithm, unless it's by fluke.
     int frames = (int)time.frames(fps);
index 7e384bc41691935cdd2766e90c935f5349f7ac0a..00eae56aae0824fd2ccc885ba0584c7a8db70141 100644 (file)
@@ -26,7 +26,8 @@ Handles the conversion of a GenTime into a nicely formatted string, taking into
 
 @author Jason Wood
 */
-class Timecode {
+class Timecode
+{
 public:
     enum Formats { HH_MM_SS_FF, HH_MM_SS_HH, Frames, Seconds };
 
index 0a90afbc28f3bcd5b39bd5d70b337e3e0979607a..6b59dc7e3efc4c89fbc4c9b6a030428334189df6 100644 (file)
 #include <QFile>
 
 
-TitleDocument::TitleDocument() {
+TitleDocument::TitleDocument()
+{
     scene = NULL;
 }
 
-void TitleDocument::setScene(QGraphicsScene* _scene) {
+void TitleDocument::setScene(QGraphicsScene* _scene)
+{
     scene = _scene;
 }
 
-QDomDocument TitleDocument::xml(QGraphicsPolygonItem* startv, QGraphicsPolygonItem* endv) {
+QDomDocument TitleDocument::xml(QGraphicsPolygonItem* startv, QGraphicsPolygonItem* endv)
+{
     QDomDocument doc;
 
     QDomElement main = doc.createElement("kdenlivetitle");
@@ -129,7 +132,8 @@ QDomDocument TitleDocument::xml(QGraphicsPolygonItem* startv, QGraphicsPolygonIt
 
 /** \brief Get the background color (incl. alpha) from the document, if possibly
   * \returns The background color of the document, inclusive alpha. If none found, returns (0,0,0,0) */
-QColor TitleDocument::getBackgroundColor() {
+QColor TitleDocument::getBackgroundColor()
+{
     QColor color(0, 0, 0, 0);
     if (scene) {
         QList<QGraphicsItem *> items = scene->items();
@@ -144,7 +148,8 @@ QColor TitleDocument::getBackgroundColor() {
 }
 
 
-bool TitleDocument::saveDocument(const KUrl& url, QGraphicsPolygonItem* startv, QGraphicsPolygonItem* endv) {
+bool TitleDocument::saveDocument(const KUrl& url, QGraphicsPolygonItem* startv, QGraphicsPolygonItem* endv)
+{
     if (!scene)
         return false;
 
@@ -165,7 +170,8 @@ bool TitleDocument::saveDocument(const KUrl& url, QGraphicsPolygonItem* startv,
     return KIO::NetAccess::upload(tmpfile.fileName(), url, 0);
 }
 
-int TitleDocument::loadDocument(const KUrl& url, QGraphicsPolygonItem* startv, QGraphicsPolygonItem* endv) {
+int TitleDocument::loadDocument(const KUrl& url, QGraphicsPolygonItem* startv, QGraphicsPolygonItem* endv)
+{
     QString tmpfile;
     QDomDocument doc;
     if (!scene)
@@ -184,7 +190,8 @@ int TitleDocument::loadDocument(const KUrl& url, QGraphicsPolygonItem* startv, Q
     return -1;
 }
 
-int TitleDocument::loadFromXml(QDomDocument doc, QGraphicsPolygonItem* /*startv*/, QGraphicsPolygonItem* /*endv*/) {
+int TitleDocument::loadFromXml(QDomDocument doc, QGraphicsPolygonItem* /*startv*/, QGraphicsPolygonItem* /*endv*/)
+{
     QDomNodeList titles = doc.elementsByTagName("kdenlivetitle");
     int maxZValue = 0;
     if (titles.size()) {
@@ -275,19 +282,22 @@ int TitleDocument::loadFromXml(QDomDocument doc, QGraphicsPolygonItem* /*startv*
     return maxZValue;
 }
 
-QString TitleDocument::colorToString(const QColor& c) {
+QString TitleDocument::colorToString(const QColor& c)
+{
     QString ret = "%1,%2,%3,%4";
     ret = ret.arg(c.red()).arg(c.green()).arg(c.blue()).arg(c.alpha());
     return ret;
 }
 
-QString TitleDocument::rectFToString(const QRectF& c) {
+QString TitleDocument::rectFToString(const QRectF& c)
+{
     QString ret = "%1,%2,%3,%4";
     ret = ret.arg(c.x()).arg(c.y()).arg(c.width()).arg(c.height());
     return ret;
 }
 
-QRectF TitleDocument::stringToRect(const QString & s) {
+QRectF TitleDocument::stringToRect(const QString & s)
+{
 
     QStringList l = s.split(',');
     if (l.size() < 4)
@@ -295,13 +305,15 @@ QRectF TitleDocument::stringToRect(const QString & s) {
     return QRectF(l[0].toDouble(), l[1].toDouble(), l[2].toDouble(), l[3].toDouble());
 }
 
-QColor TitleDocument::stringToColor(const QString & s) {
+QColor TitleDocument::stringToColor(const QString & s)
+{
     QStringList l = s.split(',');
     if (l.size() < 4)
         return QColor();
     return QColor(l[0].toInt(), l[1].toInt(), l[2].toInt(), l[3].toInt());;
 }
-QTransform TitleDocument::stringToTransform(const QString& s) {
+QTransform TitleDocument::stringToTransform(const QString& s)
+{
     QStringList l = s.split(',');
     if (l.size() < 9)
         return QTransform();
index 19c1b9dbbc8829383d6f607a57706db880949e04..e8bad6b7844fac619286b5ab189871e3a10c0c64 100644 (file)
@@ -24,7 +24,8 @@
 class QGraphicsScene;
 class QGraphicsPolygonItem;
 
-class TitleDocument {
+class TitleDocument
+{
     QGraphicsScene* scene;
 public:
     TitleDocument();
index 5f876ea87c0f1e3b6515c557a53a975cf425f5d1..917399b91e24b6482f080aff78877382efccfb6c 100644 (file)
@@ -33,7 +33,8 @@
 
 int settingUp = false;
 
-TitleWidget::TitleWidget(KUrl url, QString projectPath, Render *render, QWidget *parent): QDialog(parent), m_render(render), m_count(0), m_projectPath(projectPath), startViewport(NULL), endViewport(NULL) {
+TitleWidget::TitleWidget(KUrl url, QString projectPath, Render *render, QWidget *parent): QDialog(parent), m_render(render), m_count(0), m_projectPath(projectPath), startViewport(NULL), endViewport(NULL)
+{
     setupUi(this);
     setFont(KGlobalSettings::toolBarFont());
     //toolBox->setFont(KGlobalSettings::toolBarFont());
@@ -192,7 +193,8 @@ TitleWidget::TitleWidget(KUrl url, QString projectPath, Render *render, QWidget
     }
 }
 
-TitleWidget::~TitleWidget() {
+TitleWidget::~TitleWidget()
+{
     delete m_buttonRect;
     delete m_buttonText;
     delete m_buttonImage;
@@ -208,7 +210,8 @@ TitleWidget::~TitleWidget() {
 }
 
 //static
-QStringList TitleWidget::getFreeTitleInfo(const KUrl &projectUrl) {
+QStringList TitleWidget::getFreeTitleInfo(const KUrl &projectUrl)
+{
     QStringList result;
     QString titlePath = projectUrl.path() + "/titles/";
     KStandardDirs::makeDir(titlePath);
@@ -224,7 +227,8 @@ QStringList TitleWidget::getFreeTitleInfo(const KUrl &projectUrl) {
     return result;
 }
 
-QString TitleWidget::getTitleResourceFromName(const KUrl &projectUrl, const QString &titleName) {
+QString TitleWidget::getTitleResourceFromName(const KUrl &projectUrl, const QString &titleName)
+{
     QStringList result;
     QString titlePath = projectUrl.path() + "/titles/";
     KStandardDirs::makeDir(titlePath);
@@ -232,11 +236,13 @@ QString TitleWidget::getTitleResourceFromName(const KUrl &projectUrl, const QStr
 }
 
 //virtual
-void TitleWidget::resizeEvent(QResizeEvent * /*event*/) {
+void TitleWidget::resizeEvent(QResizeEvent * /*event*/)
+{
     //slotAdjustZoom();
 }
 
-void TitleWidget::slotTextTool() {
+void TitleWidget::slotTextTool()
+{
     rect_properties->setHidden(true);
     text_properties->setHidden(false);
     m_scene->setTool(TITLE_TEXT);
@@ -244,7 +250,8 @@ void TitleWidget::slotTextTool() {
     m_buttonCursor->setChecked(false);
 }
 
-void TitleWidget::slotRectTool() {
+void TitleWidget::slotRectTool()
+{
     text_properties->setHidden(true);
     rect_properties->setHidden(false);
     m_scene->setTool(TITLE_RECTANGLE);
@@ -253,14 +260,16 @@ void TitleWidget::slotRectTool() {
     m_buttonRect->setChecked(true);
 }
 
-void TitleWidget::slotSelectTool() {
+void TitleWidget::slotSelectTool()
+{
     m_scene->setTool(TITLE_SELECT);
     m_buttonCursor->setChecked(true);
     m_buttonText->setChecked(false);
     m_buttonRect->setChecked(false);
 }
 
-void TitleWidget::slotImageTool() {
+void TitleWidget::slotImageTool()
+{
     KUrl url = KFileDialog::getOpenUrl(KUrl(), "*.svg *.png *.jpg *.jpeg *.gif *.raw", this, i18n("Load Image"));
     if (!url.isEmpty()) {
         if (url.path().endsWith(".svg")) {
@@ -285,7 +294,8 @@ void TitleWidget::slotImageTool() {
     m_buttonText->setChecked(false);
 }
 
-void TitleWidget::displayBackgroundFrame() {
+void TitleWidget::displayBackgroundFrame()
+{
     if (!displayBg->isChecked()) {
         QPixmap bg(m_frameWidth / 2, m_frameHeight / 2);
         QPixmap pattern(20, 20);
@@ -306,7 +316,8 @@ void TitleWidget::displayBackgroundFrame() {
     }
 }
 
-void TitleWidget::initViewports() {
+void TitleWidget::initViewports()
+{
     startViewport = new QGraphicsPolygonItem(QPolygonF(QRectF(0, 0, 0, 0)));
     endViewport = new QGraphicsPolygonItem(QPolygonF(QRectF(0, 0, 0, 0)));
 
@@ -331,19 +342,22 @@ void TitleWidget::initViewports() {
     graphicsView->scene()->addItem(endViewport);
 }
 
-void TitleWidget::slotUpdateZoom(int pos) {
+void TitleWidget::slotUpdateZoom(int pos)
+{
     m_scene->setZoom((double) pos / 100);
     zoom_label->setText(QString::number(pos) + '%');
 }
 
-void TitleWidget::slotZoom(bool up) {
+void TitleWidget::slotZoom(bool up)
+{
     int pos = zoom_slider->value();
     if (up) pos++;
     else pos--;
     zoom_slider->setValue(pos);
 }
 
-void TitleWidget::slotAdjustZoom() {
+void TitleWidget::slotAdjustZoom()
+{
     /*double scalex = graphicsView->width() / (double)(m_frameWidth * 1.2);
     double scaley = graphicsView->height() / (double)(m_frameHeight * 1.2);
     if (scalex > scaley) scalex = scaley;
@@ -354,12 +368,14 @@ void TitleWidget::slotAdjustZoom() {
     graphicsView->centerOn(m_frameBorder);
 }
 
-void TitleWidget::slotZoomOneToOne() {
+void TitleWidget::slotZoomOneToOne()
+{
     zoom_slider->setValue(100);
     graphicsView->centerOn(m_frameBorder);
 }
 
-void TitleWidget::slotNewRect(QGraphicsRectItem * rect) {
+void TitleWidget::slotNewRect(QGraphicsRectItem * rect)
+{
     QColor f = rectFColor->color();
     f.setAlpha(rectFAlpha->value());
     QPen penf(f);
@@ -373,7 +389,8 @@ void TitleWidget::slotNewRect(QGraphicsRectItem * rect) {
     //graphicsView->setFocus();
 }
 
-void TitleWidget::slotNewText(QGraphicsTextItem *tt) {
+void TitleWidget::slotNewText(QGraphicsTextItem *tt)
+{
     QFont font = font_family->currentFont();
     font.setPixelSize(font_size->value());
     // mbd: issue 551:
@@ -389,18 +406,21 @@ void TitleWidget::slotNewText(QGraphicsTextItem *tt) {
     setCurrentItem(tt);
 }
 
-void TitleWidget::setCurrentItem(QGraphicsItem *item) {
+void TitleWidget::setCurrentItem(QGraphicsItem *item)
+{
     m_scene->setSelectedItem(item);
 }
 
-void TitleWidget::zIndexChanged(int v) {
+void TitleWidget::zIndexChanged(int v)
+{
     QList<QGraphicsItem*> l = graphicsView->scene()->selectedItems();
     if (l.size() >= 1) {
         l[0]->setZValue(v);
     }
 }
 
-void TitleWidget::selectionChanged() {
+void TitleWidget::selectionChanged()
+{
     if (m_scene->tool() != TITLE_SELECT) return;
     QList<QGraphicsItem*> l = graphicsView->scene()->selectedItems();
     //toolBox->setItemEnabled(2, false);
@@ -492,7 +512,8 @@ void TitleWidget::selectionChanged() {
     } else frame_properties->setEnabled(false);
 }
 
-void TitleWidget::slotAdjustSelectedItem() {
+void TitleWidget::slotAdjustSelectedItem()
+{
     QList<QGraphicsItem*> l = graphicsView->scene()->selectedItems();
     if (l.size() >= 1) {
         if (l[0]->type() == 3) {
@@ -508,13 +529,15 @@ void TitleWidget::slotAdjustSelectedItem() {
     }
 }
 
-void TitleWidget::slotChangeBackground() {
+void TitleWidget::slotChangeBackground()
+{
     QColor color = kcolorbutton->color();
     color.setAlpha(horizontalSlider->value());
     m_frameBorder->setBrush(QBrush(color));
 }
 
-void TitleWidget::textChanged() {
+void TitleWidget::textChanged()
+{
     QList<QGraphicsItem*> l = graphicsView->scene()->selectedItems();
     if (l.size() == 1 && (l[0])->type() == 8 && !l[0]->hasFocus()) {
         //kDebug() << ktextedit->document()->toHtml();
@@ -522,7 +545,8 @@ void TitleWidget::textChanged() {
     }
 }
 
-void TitleWidget::slotUpdateText() {
+void TitleWidget::slotUpdateText()
+{
     QFont font = font_family->currentFont();
     font.setPixelSize(font_size->value());
     font.setBold(buttonBold->isChecked());
@@ -557,7 +581,8 @@ void TitleWidget::slotUpdateText() {
     }*/
 }
 
-void TitleWidget::rectChanged() {
+void TitleWidget::rectChanged()
+{
     QList<QGraphicsItem*> l = graphicsView->scene()->selectedItems();
     if (l.size() == 1 && (l[0])->type() == 3 && !settingUp) {
         QGraphicsRectItem *rec = (QGraphicsRectItem*)l[0];
@@ -572,14 +597,16 @@ void TitleWidget::rectChanged() {
     }
 }
 
-void TitleWidget::fontBold() {
+void TitleWidget::fontBold()
+{
     QList<QGraphicsItem*> l = graphicsView->scene()->selectedItems();
     if (l.size() == 1 && (l[0])->type() == 8 && !l[0]->hasFocus()) {
         //ktextedit->document()->setTextOption();
     }
 }
 
-void TitleWidget::itemScaled(int val) {
+void TitleWidget::itemScaled(int val)
+{
     QList<QGraphicsItem*> l = graphicsView->scene()->selectedItems();
     if (l.size() == 1) {
         Transform x = transformations[l[0]];
@@ -593,7 +620,8 @@ void TitleWidget::itemScaled(int val) {
     }
 }
 
-void TitleWidget::itemRotate(int val) {
+void TitleWidget::itemRotate(int val)
+{
     QList<QGraphicsItem*> l = graphicsView->scene()->selectedItems();
     if (l.size() == 1) {
         Transform x = transformations[l[0]];
@@ -606,7 +634,8 @@ void TitleWidget::itemRotate(int val) {
     }
 }
 
-void TitleWidget::itemHCenter() {
+void TitleWidget::itemHCenter()
+{
     QList<QGraphicsItem*> l = graphicsView->scene()->selectedItems();
     if (l.size() == 1) {
         QGraphicsItem *item = l[0];
@@ -620,7 +649,8 @@ void TitleWidget::itemHCenter() {
     }
 }
 
-void TitleWidget::itemVCenter() {
+void TitleWidget::itemVCenter()
+{
     QList<QGraphicsItem*> l = graphicsView->scene()->selectedItems();
     if (l.size() == 1) {
         QGraphicsItem *item = l[0];
@@ -634,7 +664,8 @@ void TitleWidget::itemVCenter() {
     }
 }
 
-void TitleWidget::setupViewports() {
+void TitleWidget::setupViewports()
+{
     double aspect_ratio = 4.0 / 3.0;//read from project
 
     QRectF sp(0, 0, 0, 0);
@@ -653,7 +684,8 @@ void TitleWidget::setupViewports() {
 
 }
 
-void TitleWidget::loadTitle() {
+void TitleWidget::loadTitle()
+{
     KUrl url = KFileDialog::getOpenUrl(KUrl(m_projectPath), "*.kdenlivetitle", this, i18n("Load Title"));
     if (!url.isEmpty()) {
         QList<QGraphicsItem *> items = m_scene->items();
@@ -665,7 +697,8 @@ void TitleWidget::loadTitle() {
     }
 }
 
-void TitleWidget::saveTitle(KUrl url) {
+void TitleWidget::saveTitle(KUrl url)
+{
     if (url.isEmpty()) url = KFileDialog::getSaveUrl(KUrl(m_projectPath), "*.kdenlivetitle", this, i18n("Save Title"));
     if (!url.isEmpty()) {
         if (m_titledocument.saveDocument(url, startViewport, endViewport) == false)
@@ -673,11 +706,13 @@ void TitleWidget::saveTitle(KUrl url) {
     }
 }
 
-QDomDocument TitleWidget::xml() {
+QDomDocument TitleWidget::xml()
+{
     return m_titledocument.xml(startViewport, endViewport);
 }
 
-void TitleWidget::setXml(QDomDocument doc) {
+void TitleWidget::setXml(QDomDocument doc)
+{
     m_count = m_titledocument.loadFromXml(doc, startViewport, endViewport);
     // mbd: Update the GUI color selectors to match the stuff from the loaded document
     QColor background_color = m_titledocument.getBackgroundColor();
@@ -692,7 +727,8 @@ void TitleWidget::setXml(QDomDocument doc) {
     slotSelectTool();
 }
 
-QImage TitleWidget::renderedPixmap() {
+QImage TitleWidget::renderedPixmap()
+{
     QImage pix(m_frameWidth, m_frameHeight, QImage::Format_ARGB32);
     pix.fill(Qt::transparent);
     QPainter painter(&pix);
@@ -714,12 +750,14 @@ QImage TitleWidget::renderedPixmap() {
 }
 
 /** \brief Connected to the accepted signal - calls writeChoices */
-void TitleWidget::slotAccepted() {
+void TitleWidget::slotAccepted()
+{
     writeChoices();
 }
 
 /** \brief Store the current choices of font, background and rect values */
-void TitleWidget::writeChoices() {
+void TitleWidget::writeChoices()
+{
     // Get a pointer to a shared configuration instance, then get the TitleWidget group.
     KSharedConfigPtr config = KGlobal::config();
     KConfigGroup titleConfig(config, "TitleWidget");
@@ -747,7 +785,8 @@ void TitleWidget::writeChoices() {
 }
 
 /** \brief Read the last stored choices into the dialog */
-void TitleWidget::readChoices() {
+void TitleWidget::readChoices()
+{
     // Get a pointer to a shared configuration instance, then get the TitleWidget group.
     KSharedConfigPtr config = KGlobal::config();
     KConfigGroup titleConfig(config, "TitleWidget");
index bc9f96cb2a35ccd7dcd221a316e82f5f66f1a0a4..0544b35bc5e45bc8ad4ed6e6cde3bad72913645a 100644 (file)
@@ -27,7 +27,8 @@
 #include <QMap>
 
 
-class Transform {
+class Transform
+{
 public:
     Transform() {
         scalex = 1.0;
@@ -38,7 +39,8 @@ public:
     double rotate;
 };
 
-class TitleWidget : public QDialog , public Ui::TitleWidget_UI {
+class TitleWidget : public QDialog , public Ui::TitleWidget_UI
+{
     Q_OBJECT
 
 public:
index 490d56c5a431ff3b719393f678c92b5828e0cc4c..3f39bc75812c781417516d723ed3c2ed3feef271 100644 (file)
@@ -37,7 +37,8 @@
 #include <QScrollBar>
 
 TrackView::TrackView(KdenliveDoc *doc, QWidget *parent)
-        : QWidget(parent), m_doc(doc), m_scale(1.0), m_projectTracks(0) {
+        : QWidget(parent), m_doc(doc), m_scale(1.0), m_projectTracks(0)
+{
 
     view = new Ui::TimeLine_UI();
     view->setupUi(this);
@@ -90,36 +91,44 @@ TrackView::TrackView(KdenliveDoc *doc, QWidget *parent)
 }
 
 
-int TrackView::duration() const {
+int TrackView::duration() const
+{
     return m_trackview->duration();
 }
 
-int TrackView::tracksNumber() const {
+int TrackView::tracksNumber() const
+{
     return m_projectTracks - 1;
 }
 
-int TrackView::inPoint() const {
+int TrackView::inPoint() const
+{
     return m_ruler->inPoint();
 }
 
-int TrackView::outPoint() const {
+int TrackView::outPoint() const
+{
     return m_ruler->outPoint();
 }
 
-void TrackView::slotSetZone(QPoint p) {
+void TrackView::slotSetZone(QPoint p)
+{
     m_ruler->setZone(p);
 }
 
-void TrackView::slotTransitionItemSelected(Transition *t, bool update) {
+void TrackView::slotTransitionItemSelected(Transition *t, bool update)
+{
     emit transitionItemSelected(t, update);
 }
 
-void TrackView::setDuration(int dur) {
+void TrackView::setDuration(int dur)
+{
     m_trackview->setDuration(dur);
     m_ruler->setDuration(dur);
 }
 
-void TrackView::parseDocument(QDomDocument doc) {
+void TrackView::parseDocument(QDomDocument doc)
+{
     //int cursorPos = 0;
     m_documentErrors.clear();
     // kDebug() << "//// DOCUMENT: " << doc.toString();
@@ -328,26 +337,31 @@ void TrackView::parseDocument(QDomDocument doc) {
     //m_scrollBox->setGeometry(0, 0, 300 * zoomFactor(), m_scrollArea->height());
 }
 
-void TrackView::slotDeleteClip(const QString &clipId) {
+void TrackView::slotDeleteClip(const QString &clipId)
+{
     m_trackview->deleteClip(clipId);
 }
 
-void TrackView::setCursorPos(int pos) {
+void TrackView::setCursorPos(int pos)
+{
     m_trackview->setCursorPos(pos);
 }
 
-void TrackView::moveCursorPos(int pos) {
+void TrackView::moveCursorPos(int pos)
+{
     m_trackview->setCursorPos(pos, false);
 }
 
-void TrackView::slotChangeZoom(int factor) {
+void TrackView::slotChangeZoom(int factor)
+{
     m_doc->setZoom(factor);
     m_ruler->setPixelPerMark(factor);
     m_scale = (double) FRAME_SIZE / m_ruler->comboScale[factor]; // m_ruler->comboScale[m_currentZoom] /
     m_trackview->setScale(m_scale);
 }
 
-int TrackView::fitZoom() const {
+int TrackView::fitZoom() const
+{
     int zoom = (int)((duration() + 20 / m_scale) * FRAME_SIZE / m_trackview->width());
     int i;
     for (i = 0; i < 13; i++)
@@ -355,15 +369,18 @@ int TrackView::fitZoom() const {
     return i;
 }
 
-KdenliveDoc *TrackView::document() {
+KdenliveDoc *TrackView::document()
+{
     return m_doc;
 }
 
-void TrackView::refresh() {
+void TrackView::refresh()
+{
     m_trackview->viewport()->update();
 }
 
-void TrackView::slotRebuildTrackHeaders() {
+void TrackView::slotRebuildTrackHeaders()
+{
     QList <TrackInfo> list = m_doc->tracksList();
     QList<HeaderTrack *> widgets = findChildren<HeaderTrack *>();
     for (int i = 0; i < widgets.count(); i++)
@@ -384,7 +401,8 @@ void TrackView::slotRebuildTrackHeaders() {
 }
 
 
-int TrackView::slotAddProjectTrack(int ix, QDomElement xml, bool locked) {
+int TrackView::slotAddProjectTrack(int ix, QDomElement xml, bool locked)
+{
     // parse track
     int position = 0;
     QDomNodeList children = xml.childNodes();
@@ -632,7 +650,8 @@ int TrackView::slotAddProjectTrack(int ix, QDomElement xml, bool locked) {
     //track->show();
 }
 
-DocClipBase *TrackView::getMissingProducer(const QString id) const {
+DocClipBase *TrackView::getMissingProducer(const QString id) const
+{
     QDomElement missingXml;
     QDomDocument doc = m_doc->toXml();
     QString docRoot = doc.documentElement().attribute("root");
@@ -667,23 +686,28 @@ DocClipBase *TrackView::getMissingProducer(const QString id) const {
     return missingClip;
 }
 
-QGraphicsScene *TrackView::projectScene() {
+QGraphicsScene *TrackView::projectScene()
+{
     return m_scene;
 }
 
-CustomTrackView *TrackView::projectView() {
+CustomTrackView *TrackView::projectView()
+{
     return m_trackview;
 }
 
-void TrackView::setEditMode(const QString & editMode) {
+void TrackView::setEditMode(const QString & editMode)
+{
     m_editMode = editMode;
 }
 
-const QString & TrackView::editMode() const {
+const QString & TrackView::editMode() const
+{
     return m_editMode;
 }
 
-void TrackView::slotChangeTrackLock(int ix, bool lock) {
+void TrackView::slotChangeTrackLock(int ix, bool lock)
+{
     QList<HeaderTrack *> widgets = findChildren<HeaderTrack *>();
     widgets.at(ix)->setLock(lock);
 }
index 98105e60571f039643346799c8d0ba4d5f0f4b68..69646e4fd3165d2ca22c8bb89940ef9711701b19 100644 (file)
@@ -40,7 +40,8 @@ class KdenliveDoc;
 class CustomRuler;
 class DocClipBase;
 
-class TrackView : public QWidget {
+class TrackView : public QWidget
+{
     Q_OBJECT
 
 public:
index 607f209ab879a676cd55e1445a3ec8aecc72a08d..14da9bd5ebf61924b061ee52aaa1e41d914b6a3b 100644 (file)
@@ -31,7 +31,8 @@
 #include <QStyleOptionGraphicsItem>
 
 
-Transition::Transition(const ItemInfo info, int transitiontrack, double fps, QDomElement params, bool automaticTransition) : AbstractClipItem(info, QRectF(), fps), m_automaticTransition(automaticTransition), m_forceTransitionTrack(false) {
+Transition::Transition(const ItemInfo info, int transitiontrack, double fps, QDomElement params, bool automaticTransition) : AbstractClipItem(info, QRectF(), fps), m_automaticTransition(automaticTransition), m_forceTransitionTrack(false)
+{
     setZValue(2);
     setRect(0, 0, (info.endPos - info.startPos).frames(fps) - 0.02, (qreal)(KdenliveSettings::trackheight() / 3 * 2 - 1));
     setPos(info.startPos.frames(fps), (qreal)(info.track * KdenliveSettings::trackheight() + KdenliveSettings::trackheight() / 3 * 2));
@@ -61,28 +62,34 @@ Transition::Transition(const ItemInfo info, int transitiontrack, double fps, QDo
     //m_referenceClip->addTransition(this);
 }
 
-Transition::~Transition() {
+Transition::~Transition()
+{
 }
 
-Transition *Transition::clone() {
+Transition *Transition::clone()
+{
     QDomElement xml = toXML().cloneNode().toElement();
     Transition *tr = new Transition(info(), transitionEndTrack(), m_fps, xml);
     return tr;
 }
 
-QString Transition::transitionName() const {
+QString Transition::transitionName() const
+{
     return m_name;
 }
 
-QString Transition::transitionTag() const {
+QString Transition::transitionTag() const
+{
     return m_parameters.attribute("tag");
 }
 
-bool Transition::isAutomatic() const {
+bool Transition::isAutomatic() const
+{
     return m_automaticTransition;
 }
 
-void Transition::setAutomatic(bool automatic) {
+void Transition::setAutomatic(bool automatic)
+{
     m_automaticTransition = automatic;
     if (automatic) {
         m_parameters.setAttribute("automatic", 1);
@@ -94,7 +101,8 @@ void Transition::setAutomatic(bool automatic) {
     update();
 }
 
-void Transition::setTransitionParameters(const QDomElement params) {
+void Transition::setTransitionParameters(const QDomElement params)
+{
     m_parameters = params;
     if (m_parameters.attribute("force_track") == "1") setForcedTrack(true, m_parameters.attribute("transition_btrack").toInt());
     else if (m_parameters.attribute("force_track") == "0") setForcedTrack(false, m_parameters.attribute("transition_btrack").toInt());
@@ -103,11 +111,13 @@ void Transition::setTransitionParameters(const QDomElement params) {
 }
 
 
-bool Transition::invertedTransition() const {
+bool Transition::invertedTransition() const
+{
     return false; //m_parameters.attribute("reverse").toInt();
 }
 
-QPixmap Transition::transitionPixmap() const {
+QPixmap Transition::transitionPixmap() const
+{
     KIcon icon;
     QString tag = transitionTag();
     if (tag == "luma") {
@@ -122,30 +132,36 @@ QPixmap Transition::transitionPixmap() const {
 }
 
 
-void Transition::setTransitionDirection(bool /*inv*/) {
+void Transition::setTransitionDirection(bool /*inv*/)
+{
     //m_parameters.setAttribute("reverse", inv);
 }
 
-int Transition::transitionEndTrack() const {
+int Transition::transitionEndTrack() const
+{
     return m_transitionTrack;
 }
 
-void Transition::updateTransitionEndTrack(int newtrack) {
+void Transition::updateTransitionEndTrack(int newtrack)
+{
     if (!m_forceTransitionTrack) m_transitionTrack = newtrack;
 }
 
-void Transition::setForcedTrack(bool force, int track) {
+void Transition::setForcedTrack(bool force, int track)
+{
     m_forceTransitionTrack = force;
     m_transitionTrack = track;
 }
 
-bool Transition::forcedTrack() const {
+bool Transition::forcedTrack() const
+{
     return m_forceTransitionTrack;
 }
 
 void Transition::paint(QPainter *painter,
                        const QStyleOptionGraphicsItem *option,
-                       QWidget */*widget*/) {
+                       QWidget */*widget*/)
+{
     const double scale = option->matrix.m11();
     QRectF exposed = option->exposedRect;
     painter->setClipRect(exposed);
@@ -190,12 +206,14 @@ void Transition::paint(QPainter *painter,
     painter->drawRect(br);
 }
 
-int Transition::type() const {
+int Transition::type() const
+{
     return TRANSITIONWIDGET;
 }
 
 //virtual
-QVariant Transition::itemChange(GraphicsItemChange change, const QVariant &value) {
+QVariant Transition::itemChange(GraphicsItemChange change, const QVariant &value)
+{
     if (change == ItemPositionChange && scene()) {
         // calculate new position.
         QPointF newPos = value.toPointF();
@@ -244,7 +262,8 @@ QVariant Transition::itemChange(GraphicsItemChange change, const QVariant &value
 }
 
 
-OPERATIONTYPE Transition::operationMode(QPointF pos) {
+OPERATIONTYPE Transition::operationMode(QPointF pos)
+{
     if (isItemLocked()) return NONE;
 
     const double scale = projectScene()->scale();
@@ -256,12 +275,14 @@ OPERATIONTYPE Transition::operationMode(QPointF pos) {
     return MOVE;
 }
 
-bool Transition::hasClip(const ClipItem * clip) const {
+bool Transition::hasClip(const ClipItem * clip) const
+{
     if (clip == m_secondClip) return true;
     return false;
 }
 
-bool Transition::belongsToClip(const ClipItem * clip) const {
+bool Transition::belongsToClip(const ClipItem * clip) const
+{
     if (clip == m_referenceClip) return true;
     return false;
 }
@@ -276,15 +297,18 @@ Transition *Transition::reparent(ClipItem * clip) {
     return new Transition::Transition(rect(), clip, toXML(), m_fps, m_referenceClip->startPos());
 }*/
 
-bool Transition::isValid() const {
+bool Transition::isValid() const
+{
     return true; //(m_transitionDuration != GenTime());
 }
 
-const ClipItem *Transition::referencedClip() const {
+const ClipItem *Transition::referencedClip() const
+{
     return m_referenceClip;
 }
 
-QDomElement Transition::toXML() {
+QDomElement Transition::toXML()
+{
     m_parameters.setAttribute("type", transitionTag());
     //m_transitionParameters.setAttribute("inverted", invertTransition());
     m_parameters.setAttribute("transition_atrack", track());
@@ -301,7 +325,8 @@ QDomElement Transition::toXML() {
     return m_parameters;
 }
 
-bool Transition::hasGeometry() {
+bool Transition::hasGeometry()
+{
     QDomNodeList namenode = m_parameters.elementsByTagName("parameter");
     for (int i = 0;i < namenode.count() ;i++) {
         QDomElement pa = namenode.item(i).toElement();
index f5f1ba755c493296cdc3aefe652fc8affefef67e..0c75f6ef8f1da4e5df81624a164affbf92e56a5f 100644 (file)
@@ -35,7 +35,8 @@
 
 class ClipItem;
 
-class Transition : public AbstractClipItem {
+class Transition : public AbstractClipItem
+{
     Q_OBJECT
 public:
 
index 1301fa34dbe1d5961889f80e18a03491d41e4197..2b15ebcb5c933698c7b350c3e79e236b47b9bf75 100644 (file)
@@ -26,7 +26,8 @@
 
 #include <KDebug>
 
-TransitionSettings::TransitionSettings(QWidget* parent): QWidget(parent), m_tracksCount(0), m_usedTransition(NULL) {
+TransitionSettings::TransitionSettings(QWidget* parent): QWidget(parent), m_tracksCount(0), m_usedTransition(NULL)
+{
     ui.setupUi(this);
     effectEdit = new EffectStackEdit(ui.frame);
     connect(effectEdit, SIGNAL(seekTimeline(int)), this, SIGNAL(seekTimeline(int)));
@@ -44,7 +45,8 @@ TransitionSettings::TransitionSettings(QWidget* parent): QWidget(parent), m_trac
     connect(effectEdit, SIGNAL(parameterChanged(const QDomElement&, const QDomElement&)), this , SLOT(slotUpdateEffectParams(const QDomElement&, const QDomElement&)));
 }
 
-void TransitionSettings::updateProjectFormat(MltVideoProfile profile, Timecode t, const uint tracksCount) {
+void TransitionSettings::updateProjectFormat(MltVideoProfile profile, Timecode t, const uint tracksCount)
+{
     m_tracksCount = tracksCount;
     effectEdit->updateProjectFormat(profile, t);
     QStringList tracksList;
@@ -60,7 +62,8 @@ void TransitionSettings::updateProjectFormat(MltVideoProfile profile, Timecode t
 }
 
 
-void TransitionSettings::slotTransitionChanged(bool reinit, bool updateCurrent) {
+void TransitionSettings::slotTransitionChanged(bool reinit, bool updateCurrent)
+{
     QDomElement e = m_usedTransition->toXML().cloneNode().toElement();
     if (reinit) {
         // Reset the transition parameters to the default one
@@ -78,7 +81,8 @@ void TransitionSettings::slotTransitionChanged(bool reinit, bool updateCurrent)
     }
 }
 
-void TransitionSettings::slotTransitionTrackChanged() {
+void TransitionSettings::slotTransitionTrackChanged()
+{
     if (m_usedTransition == NULL) return;
     int ix = 0;
     QDomElement oldxml = m_usedTransition->toXML().cloneNode().toElement();
@@ -95,7 +99,8 @@ void TransitionSettings::slotTransitionTrackChanged() {
     effectEdit->updateParameter("transition_btrack", QString::number(ix));
 }
 
-void TransitionSettings::slotTransitionItemSelected(Transition* t, bool update) {
+void TransitionSettings::slotTransitionItemSelected(Transition* t, bool update)
+{
     setEnabled(t != NULL);
     if (t == m_usedTransition) {
         if (t == NULL) return;
@@ -131,7 +136,8 @@ void TransitionSettings::slotTransitionItemSelected(Transition* t, bool update)
 
 }
 
-void TransitionSettings::slotUpdateEffectParams(const QDomElement &oldparam, const QDomElement &param) {
+void TransitionSettings::slotUpdateEffectParams(const QDomElement &oldparam, const QDomElement &param)
+{
     if (m_usedTransition) {
         m_usedTransition->setTransitionParameters(param);
         m_usedTransition->update();
@@ -142,7 +148,8 @@ void TransitionSettings::slotUpdateEffectParams(const QDomElement &oldparam, con
     }
 }
 
-void TransitionSettings::raiseWindow(QWidget* dock) {
+void TransitionSettings::raiseWindow(QWidget* dock)
+{
     if (dock && m_usedTransition)
         dock->raise();
 
index e7d3e2738fcafd24eb19dec4ca66a458bff9f513..91f9cb609b9468c0acb919a3140fe294fd3f036d 100644 (file)
@@ -27,7 +27,8 @@ class Transition;
 class EffectsList;
 class EffectStackEdit;
 
-class TransitionSettings : public QWidget  {
+class TransitionSettings : public QWidget
+{
     Q_OBJECT
 
 public:
index 3044f04e0f3f7fec5d395bb2f357858527953f95..13b8a547a6ccadf4905992b183e43ffe3a6492c5 100644 (file)
@@ -33,7 +33,8 @@
 
 const double recommendedMltVersion = 36;
 
-Wizard::Wizard(bool upgrade, QWidget *parent): QWizard(parent) {
+Wizard::Wizard(bool upgrade, QWidget *parent): QWizard(parent)
+{
     setPixmap(QWizard::WatermarkPixmap, QPixmap(KStandardDirs::locate("appdata", "banner.png")));
 
     QWizardPage *page1 = new QWizardPage;
@@ -112,7 +113,8 @@ Wizard::Wizard(bool upgrade, QWidget *parent): QWizard(parent) {
 }
 
 
-void Wizard::checkMltComponents() {
+void Wizard::checkMltComponents()
+{
     m_mltCheck.programList->setColumnCount(2);
     m_mltCheck.programList->setRootIsDecorated(false);
     m_mltCheck.programList->setHeaderHidden(true);
@@ -282,7 +284,8 @@ void Wizard::checkMltComponents() {
     }
 }
 
-void Wizard::slotCheckPrograms() {
+void Wizard::slotCheckPrograms()
+{
     m_check.programList->setColumnCount(2);
     m_check.programList->setRootIsDecorated(false);
     m_check.programList->setHeaderHidden(true);
@@ -324,7 +327,8 @@ void Wizard::slotCheckPrograms() {
 
 }
 
-void Wizard::installExtraMimes(QString baseName, QStringList globs) {
+void Wizard::installExtraMimes(QString baseName, QStringList globs)
+{
     QString mimefile = baseName;
     mimefile.replace('/', '-');
     KMimeType::Ptr mime = KMimeType::mimeType(baseName);
@@ -372,7 +376,8 @@ void Wizard::installExtraMimes(QString baseName, QStringList globs) {
     }
 }
 
-void Wizard::runUpdateMimeDatabase() {
+void Wizard::runUpdateMimeDatabase()
+{
     const QString localPackageDir = KStandardDirs::locateLocal("xdgdata-mime", QString());
     //Q_ASSERT(!localPackageDir.isEmpty());
     KProcess proc;
@@ -384,7 +389,8 @@ void Wizard::runUpdateMimeDatabase() {
     }
 }
 
-void Wizard::slotCheckThumbs() {
+void Wizard::slotCheckThumbs()
+{
     QString pixname = "timeline_vthumbs.png";
     if (!m_extra.audiothumbs->isChecked() && !m_extra.videothumbs->isChecked()) {
         pixname = "timeline_nothumbs.png";
@@ -397,7 +403,8 @@ void Wizard::slotCheckThumbs() {
     m_extra.timeline_preview->setPixmap(QPixmap(KStandardDirs::locate("appdata", pixname)));
 }
 
-void Wizard::slotCheckStandard() {
+void Wizard::slotCheckStandard()
+{
     m_standard.profiles_list->clear();
     QStringList profiles;
     if (m_standard.button_dv->isChecked()) {
@@ -424,13 +431,15 @@ void Wizard::slotCheckStandard() {
     m_standard.profiles_list->setCurrentRow(0);
 }
 
-void Wizard::slotCheckSelectedItem() {
+void Wizard::slotCheckSelectedItem()
+{
     // Make sure we always have an item highlighted
     m_standard.profiles_list->setCurrentRow(m_standard.profiles_list->currentRow());
 }
 
 
-void Wizard::adjustSettings() {
+void Wizard::adjustSettings()
+{
     if (m_extra.installmimes->isChecked()) {
         QStringList globs;
         globs << "*.mts" << "*.m2t" << "*.mod" << "*.ts";
@@ -454,7 +463,8 @@ void Wizard::adjustSettings() {
 
 }
 
-void Wizard::slotCheckMlt() {
+void Wizard::slotCheckMlt()
+{
     QString errorMessage;
     if (KdenliveSettings::rendererpath().isEmpty()) {
         errorMessage.append(i18n("your MLT installation cannot be found. Install MLT and restart Kdenlive.\n"));
@@ -496,7 +506,8 @@ void Wizard::slotCheckMlt() {
     slotCheckPrograms();
 }
 
-bool Wizard::isOk() const {
+bool Wizard::isOk() const
+{
     return m_systemCheckIsOk;
 }
 
index 4b922028d18068666caba659aa40a9d8e7630c12..56c094a606a98246477890661788fb0f7bc8dc01 100644 (file)
@@ -34,7 +34,8 @@
 #include "ui_wizardcheck_ui.h"
 #include "ui_wizardmltcheck_ui.h"
 
-class WizardDelegate: public QItemDelegate {
+class WizardDelegate: public QItemDelegate
+{
 public:
     WizardDelegate(QAbstractItemView* parent = 0): QItemDelegate(parent) {
     }
@@ -70,7 +71,8 @@ public:
 };
 
 
-class Wizard : public QWizard {
+class Wizard : public QWizard
+{
     Q_OBJECT
 public:
     Wizard(bool upgrade, QWidget * parent = 0);
index aede9b6936c1103fec4e54a8b67eadd6148421ba..84c563276fdf4308ebb3c2a27b30d35e2705991b 100644 (file)
 #define DBG_AREA
 
 //#include "config.h"
-extern "C" {
+extern "C"
+{
     KDE_EXPORT ThumbCreator *new_creator() {
         return new WestleyPreview;
     }
 }
 
 WestleyPreview::WestleyPreview()
-        : m_rand(0), m_inigoprocess(0) {
+        : m_rand(0), m_inigoprocess(0)
+{
 }
 
-WestleyPreview::~WestleyPreview() {
+WestleyPreview::~WestleyPreview()
+{
     delete m_rand;
     delete m_inigoprocess;
 }
 
-bool WestleyPreview::startAndWaitProcess(const QStringList &args) {
+bool WestleyPreview::startAndWaitProcess(const QStringList &args)
+{
     kDebug(DBG_AREA) << "westleypreview: starting process with args: " << args << endl;
     m_inigoprocess->start(args.join(" "));
     if (! m_inigoprocess->waitForStarted()) {
@@ -71,7 +75,8 @@ bool WestleyPreview::startAndWaitProcess(const QStringList &args) {
     return true;
 }
 
-bool WestleyPreview::create(const QString &path, int width, int /*height*/, QImage &img) {
+bool WestleyPreview::create(const QString &path, int width, int /*height*/, QImage &img)
+{
     QFileInfo fi(path);
     playerBin = KStandardDirs::findExe("inigo");
     if (playerBin.isEmpty()) {
@@ -133,7 +138,8 @@ bool WestleyPreview::create(const QString &path, int width, int /*height*/, QIma
     return true;
 }
 
-QImage WestleyPreview::getFrame(const QString &path) {
+QImage WestleyPreview::getFrame(const QString &path)
+{
     QStringList args;
     const int START = 25;
     const int RANGE = 500;
@@ -154,7 +160,8 @@ QImage WestleyPreview::getFrame(const QString &path) {
 }
 
 
-uint WestleyPreview::imageVariance(QImage image) {
+uint WestleyPreview::imageVariance(QImage image)
+{
     uint delta = 0;
     uint avg = 0;
     uint bytes = image.numBytes();
@@ -176,7 +183,8 @@ uint WestleyPreview::imageVariance(QImage image) {
     return delta / STEPS;
 }
 
-ThumbCreator::Flags WestleyPreview::flags() const {
+ThumbCreator::Flags WestleyPreview::flags() const
+{
     return None;
 }
 
index 3b85cf151a83dc4ab17a3b1d1278bce1d09cf562..be33e09d88b05fc2a7b59096d4525032d63c8d6f 100644 (file)
@@ -33,7 +33,8 @@ class QProcess;
 class KTempDir;
 class KRandomSequence;
 
-class WestleyPreview : public QObject, public ThumbCreator {
+class WestleyPreview : public QObject, public ThumbCreator
+{
     Q_OBJECT
 public:
     WestleyPreview();