svn path=/trunk/kdenlive/; revision=5725
}
QPixmap p;
for (int i = start; i <= end; i++) {
}
QPixmap p;
for (int i = start; i <= end; i++) {
+#if KDE_IS_VERSION(4,5,0)
if (!view->m_pixmapCache->findPixmap(m_clip->fileURL().path() + "%" + QString::number(i), &p)) {
p = m_clip->thumbProducer()->extractImage(i, twidth, theight);
view->m_pixmapCache->insertPixmap(m_clip->fileURL().path() + "%" + QString::number(i), p);
}
if (!view->m_pixmapCache->findPixmap(m_clip->fileURL().path() + "%" + QString::number(i), &p)) {
p = m_clip->thumbProducer()->extractImage(i, twidth, theight);
view->m_pixmapCache->insertPixmap(m_clip->fileURL().path() + "%" + QString::number(i), p);
}
+#else
+ if (!view->m_pixmapCache->find(m_clip->fileURL().path() + "%" + QString::number(i), p)) {
+ p = m_clip->thumbProducer()->extractImage(i, twidth, theight);
+ view->m_pixmapCache->insert(m_clip->fileURL().path() + "%" + QString::number(i), p);
+ }
+#endif
painter->drawPixmap(startPos + QPointF(twidth *(i - offset), 0), p);
}
}
painter->drawPixmap(startPos + QPointF(twidth *(i - offset), 0), p);
}
}
m_activeTrackBrush = KStatefulBrush(KColorScheme::View, KColorScheme::ActiveBackground, KSharedConfig::openConfig(KdenliveSettings::colortheme()));
m_activeTrackBrush = KStatefulBrush(KColorScheme::View, KColorScheme::ActiveBackground, KSharedConfig::openConfig(KdenliveSettings::colortheme()));
+#if KDE_IS_VERSION(4,5,0)
m_pixmapCache = new KImageCache("kdenlive-thumbs", 1000000);
m_pixmapCache = new KImageCache("kdenlive-thumbs", 1000000);
+#else
+ m_pixmapCache = new KPixmapCache("kdenlive-thumbs");
+#endif
m_animationTimer = new QTimeLine(800);
m_animationTimer->setFrameRange(0, 5);
m_animationTimer = new QTimeLine(800);
m_animationTimer->setFrameRange(0, 5);
#ifndef CUSTOMTRACKVIEW_H
#define CUSTOMTRACKVIEW_H
#ifndef CUSTOMTRACKVIEW_H
#define CUSTOMTRACKVIEW_H
+#include <kdeversion.h>
+#if KDE_IS_VERSION(4,5,0)
+#else
+#include <KPixmapCache>
+#endif
+
#include <KColorScheme>
#include <QGraphicsView>
#include <KColorScheme>
#include <QGraphicsView>
void clearSelection();
void editItemDuration();
void buildGuidesMenu(QMenu *goMenu) const;
void clearSelection();
void editItemDuration();
void buildGuidesMenu(QMenu *goMenu) const;
+#if KDE_IS_VERSION(4,5,0)
KImageCache* m_pixmapCache;
KImageCache* m_pixmapCache;
+#else
+ KPixmapCache* m_pixmapCache;
+#endif
/** update the timeline objects when palette changes */
void updatePalette();
/** @brief Returns true if a track has audio data on it.
/** update the timeline objects when palette changes */
void updatePalette();
/** @brief Returns true if a track has audio data on it.