]> git.sesse.net Git - kdenlive/commitdiff
reindent
authorAlberto Villa <avilla@FreeBSD.org>
Thu, 4 Feb 2010 03:35:38 +0000 (03:35 +0000)
committerAlberto Villa <avilla@FreeBSD.org>
Thu, 4 Feb 2010 03:35:38 +0000 (03:35 +0000)
svn path=/trunk/kdenlive/; revision=4290

renderer/renderjob.cpp
src/KoSliderCombo.cpp
src/KoSliderCombo.h
src/titlewidget.cpp
src/titlewidget.h

index 47c26d89246417153d9ca933146faf7dea7936e3..779f0fbc8299c5f45d187a531e6b525e838bfaa0 100644 (file)
@@ -84,7 +84,7 @@ RenderJob::RenderJob(bool erase, bool usekuiserver, const QString &renderer, con
     connect(m_renderProcess, SIGNAL(stateChanged(QProcess::ProcessState)), this, SLOT(slotCheckProcess(QProcess::ProcessState)));
     //connect(m_renderProcess, SIGNAL(finished(int, QProcess::ExitStatus)), this, SLOT(slotIsOver(int, QProcess::ExitStatus)));
     m_renderProcess->setReadChannel(QProcess::StandardError);
-    
+
     m_enablelog = (getenv("KDENLIVE_RENDER_LOG") != NULL);
     if (m_enablelog) {
         // Create a log of every render process.
index 538c71d31157f26427323b748b8e75ccfbd7108a..3b49449d58940c60abb2750b21394b184b3e7e0a 100644 (file)
@@ -42,7 +42,7 @@
 class KoSliderComboContainer : public QMenu
 {
 public:
-    KoSliderComboContainer(KoSliderCombo *parent) : QMenu(parent ), m_parent(parent) {}
+    KoSliderComboContainer(KoSliderCombo *parent) : QMenu(parent), m_parent(parent) {}
 
 protected:
     virtual void mousePressEvent(QMouseEvent *e);
@@ -57,14 +57,15 @@ void KoSliderComboContainer::mousePressEvent(QMouseEvent *e)
     opt.subControls = QStyle::SC_All;
     opt.activeSubControls = QStyle::SC_ComboBoxArrow;
     QStyle::SubControl sc = style()->hitTestComplexControl(QStyle::CC_ComboBox, &opt,
-                                                           m_parent->mapFromGlobal(e->globalPos()),
-                                                           m_parent);
+                            m_parent->mapFromGlobal(e->globalPos()),
+                            m_parent);
     if (sc == QStyle::SC_ComboBoxArrow)
         setAttribute(Qt::WA_NoMouseReplay);
     QMenu::mousePressEvent(e);
 }
 
-class KoSliderCombo::KoSliderComboPrivate {
+class KoSliderCombo::KoSliderComboPrivate
+{
 public:
     KoSliderCombo *thePublic;
     QValidator *m_validator;
@@ -86,8 +87,8 @@ public:
 };
 
 KoSliderCombo::KoSliderCombo(QWidget *parent)
-   : QComboBox(parent)
-    ,d(new KoSliderComboPrivate())
+        : QComboBox(parent)
+        , d(new KoSliderComboPrivate())
 {
     d->thePublic = this;
     d->minimum = 0.0;
@@ -155,14 +156,14 @@ QSize KoSliderCombo::minimumSizeHint() const
 
 void KoSliderCombo::KoSliderComboPrivate::showPopup()
 {
-    if(firstShowOfSlider) {
+    if (firstShowOfSlider) {
         container->show(); //show container a bit early so the slider can be layout'ed
         firstShowOfSlider = false;
     }
 
     QStyleOptionSlider opt;
     opt.init(slider);
-    opt.maximum=256;
+    opt.maximum = 256;
     opt.sliderPosition = opt.sliderValue = slider->value();
     int hdlPos = thePublic->style()->subControlRect(QStyle::CC_Slider, &opt, QStyle::SC_SliderHandle).center().x();
 
@@ -202,17 +203,16 @@ void KoSliderCombo::hideEvent(QHideEvent *)
 
 void KoSliderCombo::changeEvent(QEvent *e)
 {
-    switch (e->type())
-    {
-        case QEvent::EnabledChange:
-            if (!isEnabled())
-                d->hidePopup();
-            break;
-        case QEvent::PaletteChange:
-            d->container->setPalette(palette());
-            break;
-        default:
-            break;
+    switch (e->type()) {
+    case QEvent::EnabledChange:
+        if (!isEnabled())
+            d->hidePopup();
+        break;
+    case QEvent::PaletteChange:
+        d->container->setPalette(palette());
+        break;
+    default:
+        break;
     }
     QComboBox::changeEvent(e);
 }
@@ -238,26 +238,24 @@ void KoSliderCombo::mousePressEvent(QMouseEvent *e)
     opt.subControls = QStyle::SC_All;
     opt.editable = true;
     QStyle::SubControl sc = style()->hitTestComplexControl(QStyle::CC_ComboBox, &opt, e->pos(),
-                                                           this);
-    if (sc == QStyle::SC_ComboBoxArrow && !d->container->isVisible())
-    {
+                            this);
+    if (sc == QStyle::SC_ComboBoxArrow && !d->container->isVisible()) {
         d->showPopup();
-    }
-    else
+    } else
         QComboBox::mousePressEvent(e);
 }
 
 void KoSliderCombo::keyPressEvent(QKeyEvent *e)
 {
-    if (e->key() == Qt::Key_Up) setValue(value() + d->slider->singleStep() * (maximum() - minimum()) / 256 + 0.5);
-    else if (e->key() == Qt::Key_Down) setValue(value() - d->slider->singleStep() * (maximum() - minimum()) / 256 - 0.5);
+    if (e->key() == Qt::Key_Up) setValue(value() + d->slider->singleStep() *(maximum() - minimum()) / 256 + 0.5);
+    else if (e->key() == Qt::Key_Down) setValue(value() - d->slider->singleStep() *(maximum() - minimum()) / 256 - 0.5);
     else QComboBox::keyPressEvent(e);
 }
 
 void KoSliderCombo::wheelEvent(QWheelEvent *e)
 {
-    if (e->delta() > 0) setValue(value() + d->slider->singleStep() * (maximum() - minimum()) / 256 + 0.5);
-    else setValue(value() - d->slider->singleStep() * (maximum() - minimum()) / 256 - 0.5);
+    if (e->delta() > 0) setValue(value() + d->slider->singleStep() *(maximum() - minimum()) / 256 + 0.5);
+    else setValue(value() - d->slider->singleStep() *(maximum() - minimum()) / 256 - 0.5);
 }
 
 void KoSliderCombo::KoSliderComboPrivate::lineEditFinished()
@@ -271,7 +269,7 @@ void KoSliderCombo::KoSliderComboPrivate::lineEditFinished()
 
 void KoSliderCombo::KoSliderComboPrivate::sliderValueChanged(int slidervalue)
 {
-    thePublic->setEditText(KGlobal::locale()->formatNumber(minimum + (maximum - minimum)*slidervalue/256, decimals));
+    thePublic->setEditText(KGlobal::locale()->formatNumber(minimum + (maximum - minimum)*slidervalue / 256, decimals));
 
     qreal value = thePublic->currentText().toDouble();
     emit thePublic->valueChanged(value, false);
@@ -322,9 +320,9 @@ void KoSliderCombo::setMaximum(qreal max)
 
 void KoSliderCombo::setValue(qreal value)
 {
-    if(value < d->minimum)
+    if (value < d->minimum)
         value = d->minimum;
-    if(value > d->maximum)
+    if (value > d->maximum)
         value = d->maximum;
     setEditText(KGlobal::locale()->formatNumber(value, d->decimals));
     d->slider->blockSignals(true);
index 52fcae84a2f9a06167cb30199271aee530d4c38e..fb3b6f8ade5a6146ad49162e5ae346efd42ef393 100644 (file)
  *
  * KoSliderCombo combines a numerical input and a dropdown slider in a way that takes up as
  * little screen space as possible.
- * 
+ *
  * It allows the user to either enter a floating point value or quickly set the value using a slider
- * 
+ *
  * One signal is emitted when the value changes. The signal is even emitted when the slider
  * is moving. The second argument of the signal however tells you if the value is final or not. A
  * final value is produced by entering a value numerically or by releasing the slider.
- * 
+ *
  * The input of the numerical line edit is constrained to numbers and decimal signs.
  */
 class KoSliderCombo : public QComboBox
@@ -49,7 +49,7 @@ public:
      *
      * @param parent parent QWidget
      */
-    KoSliderCombo(QWidget *parent=0);
+    KoSliderCombo(QWidget *parent = 0);
 
     /**
      * Destructor
@@ -93,9 +93,9 @@ public:
      */
     void setMaximum(qreal max);
 
-     /**
-     * The value shown.
-     */
+    /**
+    * The value shown.
+    */
     qreal value() const;
 
     virtual QSize minimumSizeHint() const; ///< reimplemented from QComboBox
@@ -103,11 +103,11 @@ public:
 
 public slots:
 
-     /**
-     * Sets the value.
-     * The value actually set is forced to be within the legal range: minimum <= value <= maximum
-     * @param value the new value
-     */
+    /**
+    * Sets the value.
+    * The value actually set is forced to be within the legal range: minimum <= value <= maximum
+    * @param value the new value
+    */
     void setValue(qreal value);
 
 signals:
index 9c9b517514d12c4a1431c8918da6ad1d6a5f3dee..1ef232aa4ea7fa1ba21b5904a9f35273e9275119 100644 (file)
@@ -267,7 +267,7 @@ TitleWidget::TitleWidget(KUrl url, Timecode tc, QString projectTitlePath, Render
     zDown->setDefaultAction(m_zDown);
 
     m_zTop = new QAction(KIcon("kdenlive-zindex-top"), QString(), this);
-    // TODO mbt 1414: Shortcut should change z index only if 
+    // TODO mbt 1414: Shortcut should change z index only if
     // cursor is NOT in a text field ...
     //m_zTop->setShortcut(Qt::Key_Home);
     m_zTop->setToolTip(i18n("Raise object to top"));
@@ -1771,9 +1771,9 @@ void TitleWidget::setXml(QDomDocument doc)
                 x.rotatez = rotlist[2].toDouble();
 
                 // Try to adjust zoom
-                t.rotate(x.rotatex * (-1), Qt::XAxis);
-                t.rotate(x.rotatey * (-1), Qt::YAxis);
-                t.rotate(x.rotatez * (-1), Qt::ZAxis);
+                t.rotate(x.rotatex *(-1), Qt::XAxis);
+                t.rotate(x.rotatey *(-1), Qt::YAxis);
+                t.rotate(x.rotatez *(-1), Qt::ZAxis);
                 x.scalex = t.m11();
                 x.scaley = t.m22();
             } else {
index b6ecc7c99b6c8804040b560d80b6956f4342c29a..44e38ced5789d40d9044c917041e13b50dc647ff 100644 (file)
@@ -169,7 +169,7 @@ private:
     void deleteAnimInfoText();
 
     qreal maxZIndex();
-    /** 
+    /**
      * \brief Get the minimum/maximum z index value of items.
      * \param maxBound true: Use maximum z index. false: Use minimum
      * \param intersectingOnly Only considers the items intersecting with