]> git.sesse.net Git - kdenlive/blobdiff - src/doubleparameterwidget.cpp
Use label at the bottom of the effect stack instead of tooltips for showing parameter...
[kdenlive] / src / doubleparameterwidget.cpp
index efc28e0bd0254de4cd97268aed08a701c54c8dba..e258dbcbe0ed06b8bf7a8f38566602b9e199663a 100644 (file)
 
 DoubleParameterWidget::DoubleParameterWidget(const QString &name, int value, int min, int max, int defaultValue, const QString &comment, const QString suffix, QWidget *parent) :
         QWidget(parent),
-        m_default(defaultValue)
+        m_default(defaultValue),
+        m_comment(comment)
 {
-    setToolTip(comment);
-
     QHBoxLayout *layout = new QHBoxLayout(this);
     layout->setContentsMargins(0, 0, 0, 0);
 
@@ -60,6 +59,15 @@ DoubleParameterWidget::DoubleParameterWidget(const QString &name, int value, int
     reset->setToolTip(i18n("Reset to default value"));
     layout->addWidget(reset);
 
+    if (m_comment != QString()) {
+        QToolButton *showComment  = new QToolButton(this);
+        showComment->setAutoRaise(true);
+        showComment->setIcon(KIcon("help-about"));
+        layout->addWidget(showComment);
+
+        connect(showComment, SIGNAL(clicked(bool)), this, SLOT(slotShowComment()));
+    }
+
     connect(m_slider,  SIGNAL(valueChanged(int)), this, SLOT(setValue(int)));
     connect(m_spinBox, SIGNAL(valueChanged(int)), this, SLOT(setValue(int)));
     connect(reset,     SIGNAL(clicked(bool)),     this, SLOT(slotReset()));
@@ -96,4 +104,9 @@ void DoubleParameterWidget::slotReset()
     setValue(m_default);
 }
 
+void DoubleParameterWidget::slotShowComment()
+{
+    emit showComment(m_comment);
+}
+
 #include "doubleparameterwidget.moc"