From c591dcd3a1d860a4c120461c68f963cd72ddb959 Mon Sep 17 00:00:00 2001 From: Alberto Villa Date: Tue, 18 May 2010 11:27:20 +0000 Subject: [PATCH] - Cleanup. svn path=/trunk/kdenlive/; revision=4450 --- src/mainwindow.cpp | 6 +++--- src/transition.h | 35 +++++++++++++++++++++-------------- src/transitionsettings.cpp | 3 +-- src/transitionsettings.h | 2 ++ 4 files changed, 27 insertions(+), 19 deletions(-) diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 6e606e77..0bbebd82 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -844,7 +844,7 @@ void MainWindow::setupActions() actionWidget->setStyleSheet(styleBorderless); connect(m_zoomSlider, SIGNAL(valueChanged(int)), this, SLOT(slotSetZoom(int))); - connect(m_zoomSlider, SIGNAL(sliderMoved(int)), this, SLOT(slotShowZoomSliderToolTip(int))); + connect(m_zoomSlider, SIGNAL(sliderMoved(int)), this, SLOT(slotShowZoomSliderToolTip(int))); connect(m_buttonFitZoom, SIGNAL(triggered()), this, SLOT(slotFitZoom())); connect(m_zoomIn, SIGNAL(triggered(bool)), this, SLOT(slotZoomIn())); connect(m_zoomOut, SIGNAL(triggered(bool)), this, SLOT(slotZoomOut())); @@ -2576,7 +2576,7 @@ void MainWindow::slotSetZoom(int value) m_zoomOut->setEnabled(value < m_zoomSlider->maximum()); m_zoomIn->setEnabled(value > m_zoomSlider->minimum()); - slotUpdateZoomSliderToolTip(value); + slotUpdateZoomSliderToolTip(value); m_zoomSlider->blockSignals(true); m_zoomSlider->setValue(value); @@ -2591,7 +2591,7 @@ void MainWindow::slotShowZoomSliderToolTip(int zoomlevel) QPoint global = m_zoomSlider->rect().topLeft(); global.ry() += m_zoomSlider->height() / 2; QHelpEvent toolTipEvent(QEvent::ToolTip, QPoint(0, 0), m_zoomSlider->mapToGlobal(global)); - QApplication::sendEvent(m_zoomSlider, &toolTipEvent); + QApplication::sendEvent(m_zoomSlider, &toolTipEvent); } void MainWindow::slotUpdateZoomSliderToolTip(int zoomlevel) diff --git a/src/transition.h b/src/transition.h index b4af6089..cf5ad84b 100644 --- a/src/transition.h +++ b/src/transition.h @@ -15,6 +15,12 @@ * * ***************************************************************************/ +/** + * @class Transition + * @author Jean-Baptiste Mardelle + * @brief Describes a transition with a name, parameters, keyframes, etc. + */ + #ifndef TRANSITION_H #define TRANSITION_H @@ -28,11 +34,6 @@ #include "definitions.h" #include "abstractclipitem.h" - -/**Describes a Transition, with a name, parameters keyframes, etc. - *@author Jean-Baptiste Mardelle - */ - class ClipItem; class Transition : public AbstractClipItem @@ -46,10 +47,11 @@ public: const QStyleOptionGraphicsItem *option, QWidget *widget); virtual int type() const; - /** Returns an XML representation of this transition. */ + + /** @brief Returns an XML representation of this transition. */ QDomElement toXML(); - /** Return the track number of transition in the playlist*/ + /** @brief Returns the track number of the transition in the playlist. */ int transitionEndTrack() const; bool hasClip(const ClipItem * clip) const; bool belongsToClip(const ClipItem * clip) const; @@ -63,7 +65,10 @@ public: void setTransitionTrack(int track); //Transition *reparent(ClipItem * clip); bool isValid() const; - /** Transition should be linked to another track */ + + /** @brief Links the transition to another track. + * + * This happens only if the current track is not forced. */ void updateTransitionEndTrack(int newtrack); void setForcedTrack(bool force, int track); bool forcedTrack() const; @@ -81,21 +86,23 @@ private: QString m_name; bool m_forceTransitionTrack; - /** true if the transition was added automatically and should be moved with its clip */ + /** @brief True if the transition is attached to its clip. */ bool m_automaticTransition; - /** contains the transition parameters */ + + /** @brief Contains the transition parameters. */ QDomElement m_parameters; - /** The clip to which the transition is attached */ + + /** @brief The clip to which the transition is attached. */ ClipItem *m_referenceClip; - /** The 2nd clip to which the transition is attached */ + /** @brief The second clip to which the transition is attached. */ ClipItem *m_secondClip; int m_transitionTrack; - /** Return the display name for a transition type */ + /** @brief Returns the display name for a transition type. */ QString getTransitionName(const TRANSITIONTYPE & type); - /** Return the transition type for a given name */ + /** @brief Returns the transition type for a given name. */ TRANSITIONTYPE getTransitionForName(const QString & type); #if QT_VERSION >= 0x040600 diff --git a/src/transitionsettings.cpp b/src/transitionsettings.cpp index b5f6257c..bb817fab 100644 --- a/src/transitionsettings.cpp +++ b/src/transitionsettings.cpp @@ -123,13 +123,12 @@ void TransitionSettings::slotTransitionTrackChanged() ix = transitionTrack->itemData(transitionTrack->currentIndex()).toInt(); m_usedTransition->setForcedTrack(true, ix); m_effectEdit->updateParameter("force_track", "1"); - emit transitionUpdated(m_usedTransition, oldxml); } else { ix = m_autoTrackTransition; m_usedTransition->setForcedTrack(false, ix); m_effectEdit->updateParameter("force_track", "0"); - emit transitionUpdated(m_usedTransition, oldxml); } + emit transitionUpdated(m_usedTransition, oldxml); m_effectEdit->updateParameter("transition_btrack", QString::number(ix)); } diff --git a/src/transitionsettings.h b/src/transitionsettings.h index a8a76164..4f0f03d7 100644 --- a/src/transitionsettings.h +++ b/src/transitionsettings.h @@ -51,6 +51,8 @@ public slots: void slotUpdateEffectParams(const QDomElement&, const QDomElement&); private slots: + + /** @brief Sets the new B track for the transition (automatic or forced). */ void slotTransitionTrackChanged(); signals: -- 2.39.2