]> git.sesse.net Git - kdenlive/blobdiff - src/projectlist.h
Ask to change profile if first clip does not match project profile:
[kdenlive] / src / projectlist.h
index efe8d4bb317d68eff9bd96992d99e03c11781367..f09ed91fa91bf543cd13de69efb13bcc37e121d5 100644 (file)
@@ -71,19 +71,19 @@ public:
     }*/
 
     void paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const {
-        if (index.column() == 0 && !index.data(DurationRole).isNull()) {
+        if(index.column() == 0 && !index.data(DurationRole).isNull()) {
             QRect r1 = option.rect;
             painter->save();
             QStyleOptionViewItemV4 opt(option);
             QStyle *style = opt.widget ? opt.widget->style() : QApplication::style();
             style->drawPrimitive(QStyle::PE_PanelItemViewItem, &opt, painter, opt.widget);
 
-            if (option.state & QStyle::State_Selected) {
+            if(option.state & QStyle::State_Selected) {
                 painter->setPen(option.palette.highlightedText().color());
             }
             const int textMargin = style->pixelMetric(QStyle::PM_FocusFrameHMargin) + 1;
             QPixmap pixmap = qVariantValue<QPixmap>(index.data(Qt::DecorationRole));
-            if ((index.flags() & (Qt::ItemIsDragEnabled)) == false) {
+            if((index.flags() & (Qt::ItemIsDragEnabled)) == false) {
                 KIcon icon("dialog-close");
                 QPainter p(&pixmap);
                 p.drawPixmap(1, 1, icon.pixmap(16, 16));
@@ -105,17 +105,17 @@ public:
             painter->setFont(font);
             QString subText = index.data(DurationRole).toString();
             int usage = index.data(UsageRole).toInt();
-            if (usage != 0) subText.append(QString(" (%1)").arg(usage));
-            if (option.state & (QStyle::State_Selected)) painter->setPen(option.palette.color(QPalette::Mid));
+            if(usage != 0) subText.append(QString(" (%1)").arg(usage));
+            if(option.state & (QStyle::State_Selected)) painter->setPen(option.palette.color(QPalette::Mid));
             painter->drawText(r2, Qt::AlignLeft | Qt::AlignVCenter , subText);
             painter->restore();
-        } else if (index.column() == 2 && KdenliveSettings::activate_nepomuk()) {
-            if (index.data().toString().isEmpty()) {
+        } else if(index.column() == 2 && KdenliveSettings::activate_nepomuk()) {
+            if(index.data().toString().isEmpty()) {
                 QStyledItemDelegate::paint(painter, option, index);
                 return;
             }
             QRect r1 = option.rect;
-            if (option.state & (QStyle::State_Selected)) {
+            if(option.state & (QStyle::State_Selected)) {
                 painter->fillRect(r1, option.palette.highlight());
             }
 #ifdef NEPOMUK
@@ -278,6 +278,8 @@ signals:
     void updateRenderStatus();
     void deleteProjectClips(QStringList ids, QMap <QString, QString> folderids);
     void findInTimeline(const QString &clipId);
+    /** @brief Request a profile change for current document. */
+    void updateProfile(const QString &);
 };
 
 #endif