[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdegraphics
From: Helge Deller <deller () kde ! org>
Date: 2004-11-20 15:52:04
Message-ID: 20041120155204.D467F16EE8 () office ! kde ! org
[Download RAW message or body]
CVS commit by deller:
fix scanning with kooka
M +7 -11 kooka/kookaview.cpp 1.74
M +2 -2 kooka/kookaview.h 1.35
M +2 -4 libkscan/previewer.cpp 1.25
--- kdegraphics/libkscan/previewer.cpp #1.24:1.25
@@ -24,5 +24,4 @@
#include <qtooltip.h>
#include <qpopupmenu.h>
-#include <qregexp.h>
#include <qfile.h>
#include <qtextstream.h>
@@ -305,7 +304,6 @@ QString Previewer::previewFile( const QS
{
QString fname = galleryRoot() + QString::fromLatin1(".previews/");
- QRegExp rx( "/" );
QString sname( scanner );
- sname.replace( rx, "_");
+ sname.replace( '/', "_");
fname += sname;
@@ -319,5 +317,5 @@ QString Previewer::galleryRoot()
QString dir = (KGlobal::dirs())->saveLocation( "data", "ScanImages", true );
- if( dir.right(1) != "/" )
+ if( !dir.endsWith('/') )
dir += "/";
--- kdegraphics/kooka/kookaview.cpp #1.73:1.74
@@ -30,4 +30,5 @@
#include "resource.h"
#include "kscandevice.h"
+#include "imgscaninfo.h"
#include "devselector.h"
#include "ksaneocr.h"
@@ -246,7 +247,7 @@ KookaView::KookaView( KParts::DockMainWi
/* New image created after scanning */
- connect(sane, SIGNAL(sigNewImage(QImage*)), this, \
SLOT(slNewImageScanned(QImage*))); + connect(sane, \
SIGNAL(sigNewImage(QImage*,ImgScanInfo*)), this, \
SLOT(slNewImageScanned(QImage*,ImgScanInfo*))); /* New preview image */
- connect(sane, SIGNAL(sigNewPreview(QImage*)), this, SLOT( \
slNewPreview(QImage*))); + connect(sane, SIGNAL(sigNewPreview(QImage*,ImgScanInfo \
*)), this, SLOT( slNewPreview(QImage*,ImgScanInfo *)));
connect( sane, SIGNAL( sigScanStart() ), this, SLOT( slScanStart()));
@@ -479,5 +480,5 @@ void KookaView::print()
}
-void KookaView::slNewPreview( QImage *new_img )
+void KookaView::slNewPreview( QImage *new_img, ImgScanInfo * )
{
if( new_img )
@@ -657,13 +658,8 @@ void KookaView::slAcquireStart( )
}
-void KookaView::slNewImageScanned( QImage* img )
+void KookaView::slNewImageScanned( QImage* img, ImgScanInfo* si )
{
KookaImageMeta *meta = new KookaImageMeta;
-
- KScanOption res ( SANE_NAME_SCAN_RESOLUTION );
- int resX;
- res.get(&resX);
- meta->setScanResolution(resX);
-
+ meta->setScanResolution(si->getXResolution(), si->getYResolution());
packager->slAddImage(img, meta);
}
--- kdegraphics/kooka/kookaview.h #1.34:1.35
@@ -103,5 +103,5 @@ public slots:
void slShowPreview() { }
void slShowPackager() { }
- void slNewPreview( QImage * );
+ void slNewPreview( QImage *, ImgScanInfo * );
void slSetScanParamsVisible( bool v )
@@ -178,5 +178,5 @@ protected slots:
* Needs to convert the one-page-QImage to a KookaImage
*/
- void slNewImageScanned(QImage*);
+ void slNewImageScanned(QImage*, ImgScanInfo*);
/**
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic