double /*y,*/ u, v;
QPoint pt;
QRgb px;
+ int bpp = image.depth() / 8;
- const int stepsize = 4*accelFactor;
+ const int stepsize = bpp * accelFactor;
// Just an average for the number of image pixels per scope pixel.
// NOTE: byteCount() has to be replaced by (img.bytesPerLine()*img.height()) for Qt 4.5 to compile, see: http://doc.trolltech.org/4.6/qimage.html#bytesPerLine
- double avgPxPerPx = (double) 4*(image.bytesPerLine()*image.height())/scope.size().width()/scope.size().height()/accelFactor;
+ double avgPxPerPx = (double) bpp*(image.bytesPerLine()*image.height())/scope.size().width()/scope.size().height()/accelFactor;
for (int i = 0; i < (image.bytesPerLine()*image.height()); i+= stepsize) {
QRgb *col = (QRgb *) bits;
#include <KRun>
#include <KPixmapSequence>
#include <KPixmapSequenceOverlayPainter>
-
+#include <KFileItem>
#ifdef USE_NEPOMUK
#if KDE_IS_VERSION(4,6,0)
#include <Nepomuk/Vocabulary/NIE>
#include <Nepomuk/Vocabulary/NCO>
#include <Nepomuk/Vocabulary/NDO>
-#include <kfileitem.h>
#endif
#endif
}
-void ResourceWidget::slotForcePlaySound(bool play)
-{
- /*
- if (m_service != FREESOUND) return;
- m_previewProcess->close();
- if (m_currentPreview.isEmpty()) return;
- if (play)
- m_previewProcess->start("ffplay", QStringList() << m_currentPreview << "-nodisp");
- */
-}
-
-void ResourceWidget::slotPreviewStatusChanged(QProcess::ProcessState state)
-{
- /*if (state == QProcess::NotRunning)
- button_preview->setText(i18n("Preview"));
- else
- button_preview->setText(i18n("Stop"));*/
-}
-
void ResourceWidget::slotSaveItem(const QString originalUrl)
{
//if (m_currentUrl.isEmpty()) return;
void slotStartSearch(int page = 0);
void slotUpdateCurrentSound();
void slotPlaySound();
- void slotForcePlaySound(bool play);
- void slotPreviewStatusChanged(QProcess::ProcessState state);
void slotDisplayMetaInfo(QMap <QString, QString> metaInfo);
void slotSaveItem(const QString originalUrl = QString());
void slotOpenUrl(const QString &url);