Q3PtrList -> QList

svn path=/branches/work/kde4/playground/graphics/okular/; revision=549243
This commit is contained in:
Pino Toscano 2006-06-07 20:57:28 +00:00
parent f41e458e7e
commit c9e38ddf93
2 changed files with 13 additions and 13 deletions

View file

@ -69,15 +69,15 @@ bool KFaxImage::loadImage( const QString &filename )
void KFaxImage::reset()
{
fax_init_tables();
m_pagenodes.setAutoDelete(true);
qDeleteAll(m_pagenodes);
m_pagenodes.clear();
// do not reset m_errorString and m_filename, since
// they may be needed by calling application
}
QImage KFaxImage::page( unsigned int pageNr )
QImage KFaxImage::page( int pageNr )
{
if (pageNr >= numPages()) {
if (pageNr < 0 || pageNr >= numPages()) {
kDebug() << "KFaxImage::page() called with invalid page number\n";
return QImage();
}
@ -86,9 +86,9 @@ QImage KFaxImage::page( unsigned int pageNr )
return pn->image;
}
QPoint KFaxImage::page_dpi( unsigned int pageNr )
QPoint KFaxImage::page_dpi( int pageNr )
{
if (pageNr >= numPages()) {
if (pageNr < 0 || pageNr >= numPages()) {
kDebug() << "KFaxImage::page_dpi() called with invalid page number\n";
return QPoint(0,0);
}
@ -97,9 +97,9 @@ QPoint KFaxImage::page_dpi( unsigned int pageNr )
return pn->dpi;
}
QSize KFaxImage::page_size( unsigned int pageNr )
QSize KFaxImage::page_size( int pageNr )
{
if (pageNr >= numPages()) {
if (pageNr < 0 || pageNr >= numPages()) {
kDebug() << "KFaxImage::page_size() called with invalid page number\n";
return QSize(0,0);
}

View file

@ -23,7 +23,7 @@
#include <qobject.h>
#include <qstring.h>
#include <qimage.h>
#include <q3ptrlist.h>
#include <qlist.h>
#include <kdelibs_export.h>
class pagenode;
@ -95,7 +95,7 @@ public:
* @return page count
*/
unsigned int numPages() const { return m_pagenodes.count(); };
int numPages() const { return m_pagenodes.count(); };
/**
* returns a QImage which holds the contents of page pageNr
@ -103,7 +103,7 @@ public:
* @return QImage of the page pageNr
*/
QImage page( unsigned int pageNr );
QImage page( int pageNr );
/**
* returns the DPI (dots per inch) of page pageNr
@ -111,7 +111,7 @@ public:
* @return a QPoint value with the DPIs in X- and Y-direction
*/
QPoint page_dpi( unsigned int pageNr );
QPoint page_dpi( int pageNr );
/**
* returns the physical pixels of page pageNr
@ -119,7 +119,7 @@ public:
* @return a QSize value with the width and height of the image
*/
QSize page_size( unsigned int pageNr );
QSize page_size( int pageNr );
/**
* @return a user-visible, translated error string
@ -138,7 +138,7 @@ public:
QString m_filename;
QString m_errorString;
typedef Q3PtrList<pagenode> t_PageNodeList;
typedef QList<pagenode*> t_PageNodeList;
t_PageNodeList m_pagenodes;
/**