]> git.sesse.net Git - kdenlive/commitdiff
remove unused code
authorJean-Baptiste Mardelle <jb@kdenlive.org>
Sat, 24 Dec 2011 12:51:25 +0000 (13:51 +0100)
committerJean-Baptiste Mardelle <jb@kdenlive.org>
Sat, 24 Dec 2011 12:51:25 +0000 (13:51 +0100)
src/renderwidget.h

index 53b50ef812eb6ed1e60d09a06c7c0564dd11d04d..eba43211e2bfd7067ddaf9cacb33bf7075b9c295 100644 (file)
@@ -87,34 +87,6 @@ public:
                 painter->drawText(r1, Qt::AlignLeft | Qt::AlignBottom , index.data(Qt::UserRole + 5).toString());
             }
             painter->restore();
-        } else if (index.column() == 2) {
-            // Set up a QStyleOptionProgressBar to precisely mimic the
-            // environment of a progress bar.
-            QStyleOptionViewItemV4 opt(option);
-            QStyle *style = opt.widget ? opt.widget->style() : QApplication::style();
-            style->drawPrimitive(QStyle::PE_PanelItemViewItem, &opt, painter, opt.widget);
-
-            QStyleOptionProgressBar progressBarOption;
-            progressBarOption.state = option.state;
-            progressBarOption.direction = QApplication::layoutDirection();
-            QRect rect = option.rect;
-            int mid = rect.height() / 2;
-            rect.setTop(rect.top() + mid / 2);
-            rect.setHeight(mid);
-            progressBarOption.rect = rect;
-            progressBarOption.fontMetrics = QApplication::fontMetrics();
-            progressBarOption.minimum = 0;
-            progressBarOption.maximum = 100;
-            progressBarOption.textAlignment = Qt::AlignCenter;
-            progressBarOption.textVisible = true;
-
-            // Set the progress and text values of the style option.
-            int progress = index.data(Qt::UserRole).toInt();
-            progressBarOption.progress = progress < 0 ? 0 : progress;
-            progressBarOption.text = QString().sprintf("%d%%", progressBarOption.progress);
-
-            // Draw the progress bar onto the view.
-            QApplication::style()->drawControl(QStyle::CE_ProgressBar, &progressBarOption, painter);
         } else QStyledItemDelegate::paint(painter, option, index);
     }
 };