diff options
Diffstat (limited to 'kfaxview')
-rw-r--r-- | kfaxview/faxmultipage.cpp | 8 | ||||
-rw-r--r-- | kfaxview/faxmultipage.h | 8 | ||||
-rw-r--r-- | kfaxview/faxrenderer.cpp | 20 | ||||
-rw-r--r-- | kfaxview/faxrenderer.h | 4 | ||||
-rw-r--r-- | kfaxview/libkfaximage/faxexpand.h | 10 | ||||
-rw-r--r-- | kfaxview/libkfaximage/kfaximage.cpp | 58 | ||||
-rw-r--r-- | kfaxview/libkfaximage/kfaximage.h | 44 | ||||
-rw-r--r-- | kfaxview/main.cpp | 24 |
8 files changed, 88 insertions, 88 deletions
diff --git a/kfaxview/faxmultipage.cpp b/kfaxview/faxmultipage.cpp index bbf4e566..44c1e273 100644 --- a/kfaxview/faxmultipage.cpp +++ b/kfaxview/faxmultipage.cpp @@ -31,8 +31,8 @@ typedef KParts::GenericFactory<FaxMultiPage> FaxMultiPageFactory; K_EXPORT_COMPONENT_FACTORY(kfaxviewpart, FaxMultiPageFactory) -FaxMultiPage::FaxMultiPage(QWidget *parentWidget, const char *widgetName, QObject *parent, - const char *name, const QStringList&) +FaxMultiPage::FaxMultiPage(TQWidget *parentWidget, const char *widgetName, TQObject *parent, + const char *name, const TQStringList&) : KMultiPage(parentWidget, widgetName, parent, name), faxRenderer(parentWidget) { /* This is kparts wizardry that cannot be understood by man. Simply @@ -72,11 +72,11 @@ KAboutData* FaxMultiPage::createAboutData() } -QStringList FaxMultiPage::fileFormats() const +TQStringList FaxMultiPage::fileFormats() const { /* This list is used in the file selection dialog when the file is saved */ - QStringList r; + TQStringList r; r << i18n("*.g3|Fax (g3) file (*.g3)"); return r; } diff --git a/kfaxview/faxmultipage.h b/kfaxview/faxmultipage.h index 1ea8b6c5..65a7fa25 100644 --- a/kfaxview/faxmultipage.h +++ b/kfaxview/faxmultipage.h @@ -21,7 +21,7 @@ #ifndef FAXMULTIPAGE_H #define FAXMULTIPAGE_H -#include <qstringlist.h> +#include <tqstringlist.h> #include "kmultipage.h" #include "faxrenderer.h" @@ -89,8 +89,8 @@ public: kmultipage. Please have a look at the constructor's source code to see how to adjust this for your implementation. */ - FaxMultiPage(QWidget *parentWidget, const char *widgetName, QObject *parent, - const char *name, const QStringList& args = QStringList()); + FaxMultiPage(TQWidget *parentWidget, const char *widgetName, TQObject *parent, + const char *name, const TQStringList& args = TQStringList()); /** Destructor @@ -103,7 +103,7 @@ public: This method returns the list of supported file formats for saving the file. */ - virtual QStringList fileFormats() const; + virtual TQStringList fileFormats() const; /** Author information diff --git a/kfaxview/faxrenderer.cpp b/kfaxview/faxrenderer.cpp index ec18d431..3e597863 100644 --- a/kfaxview/faxrenderer.cpp +++ b/kfaxview/faxrenderer.cpp @@ -23,8 +23,8 @@ #include <kmessagebox.h> #include <kdebug.h> #include <klocale.h> -#include <qfileinfo.h> -#include <qpainter.h> +#include <tqfileinfo.h> +#include <tqpainter.h> #include "documentWidget.h" #include "faxrenderer.h" @@ -32,7 +32,7 @@ //#define KF_DEBUG -FaxRenderer::FaxRenderer(QWidget* par) +FaxRenderer::FaxRenderer(TQWidget* par) : DocumentRenderer(par) { #ifdef KF_DEBUG @@ -81,11 +81,11 @@ void FaxRenderer::drawPage(double resolution, RenderedDocumentPage* page) return; } - QImage img = fax.page(page->getPageNumber() - 1); + TQImage img = fax.page(page->getPageNumber() - 1); SimplePageSize psize = pageSizes[page->getPageNumber() - 1]; if (psize.isValid()) { - QPainter *foreGroundPaint = page->getPainter(); + TQPainter *foreGroundPaint = page->getPainter(); if (foreGroundPaint != 0) { // Compute an image for the page. @@ -113,7 +113,7 @@ void FaxRenderer::drawPage(double resolution, RenderedDocumentPage* page) } -bool FaxRenderer::setFile(const QString &fname, const KURL &) +bool FaxRenderer::setFile(const TQString &fname, const KURL &) { #ifdef KF_DEBUG kdDebug() << "FaxRenderer::setFile(" << fname << ") called" << endl; @@ -132,8 +132,8 @@ bool FaxRenderer::setFile(const QString &fname, const KURL &) // Paranoid saftey checks: make sure the file actually exists, and // that it is a file, not a directory. Otherwise, show an error // message and exit.. - QFileInfo fi(fname); - QString filename = fi.absFilePath(); + TQFileInfo fi(fname); + TQString filename = fi.absFilePath(); if (!fi.exists() || fi.isDir()) { KMessageBox::error( parentWidget, i18n("<qt><strong>File error.</strong> The specified file '%1' does not exist.</qt>").arg(filename), @@ -179,8 +179,8 @@ bool FaxRenderer::setFile(const QString &fname, const KURL &) if (numPages != 0) { for(Q_UINT16 pg=0; pg < numPages; pg++) { - QSize pageSize = fax.page_size(pg); - QPoint dpi = fax.page_dpi(pg); + TQSize pageSize = fax.page_size(pg); + TQPoint dpi = fax.page_dpi(pg); double dpix = dpi.x(); double dpiy = dpi.y(); diff --git a/kfaxview/faxrenderer.h b/kfaxview/faxrenderer.h index d2b37657..e83f6ff4 100644 --- a/kfaxview/faxrenderer.h +++ b/kfaxview/faxrenderer.h @@ -46,7 +46,7 @@ public: This constructor simply prints a message (if debugging is enabled) and calls the default constructor. */ - FaxRenderer(QWidget* parent); + FaxRenderer(TQWidget* parent); /** Destructor @@ -67,7 +67,7 @@ public: @param fname the name of the file that should be opened. */ - virtual bool setFile(const QString& fname, const KURL &); + virtual bool setFile(const TQString& fname, const KURL &); /** Rendering a page diff --git a/kfaxview/libkfaximage/faxexpand.h b/kfaxview/libkfaximage/faxexpand.h index 8da4e8bc..736779bd 100644 --- a/kfaxview/libkfaximage/faxexpand.h +++ b/kfaxview/libkfaximage/faxexpand.h @@ -24,8 +24,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * #include <sys/types.h> #include <unistd.h> -#include <qglobal.h> -#include <qimage.h> +#include <tqglobal.h> +#include <tqimage.h> #define t32bits Q_UINT32 #define t16bits Q_UINT16 @@ -61,15 +61,15 @@ class pagenode { /* compressed page descriptor */ struct strip *strips; /* array of strips containing fax data in file */ t16bits *data; /* in-memory copy of strip */ size_t length; /* length of data */ - QSize size; /* width & height of page in pixels */ + TQSize size; /* width & height of page in pixels */ int inverse; /* black <=> white */ int lsbfirst; /* bit order is lsb first */ int type; /* Bernd: tiff vs no tiff*/ int orient; /* orientation - upsidedown, landscape, mirrored */ int vres; /* vertical resolution: 1 = fine */ - QPoint dpi; /* DPI horz/vert */ + TQPoint dpi; /* DPI horz/vert */ void (*expander)(class pagenode *, drawfunc); - QImage image; + TQImage image; unsigned int bytes_per_line; }; diff --git a/kfaxview/libkfaximage/kfaximage.cpp b/kfaxview/libkfaximage/kfaximage.cpp index 28744923..c0efb624 100644 --- a/kfaxview/libkfaximage/kfaximage.cpp +++ b/kfaxview/libkfaximage/kfaximage.cpp @@ -24,8 +24,8 @@ #include <stdlib.h> -#include <qimage.h> -#include <qfile.h> +#include <tqimage.h> +#include <tqfile.h> #include <kglobal.h> #include <klocale.h> @@ -38,22 +38,22 @@ static const char FAXMAGIC[] = "\000PC Research, Inc\000\000\000\000\000\000"; static const char littleTIFF[] = "\x49\x49\x2a\x00"; static const char bigTIFF[] = "\x4d\x4d\x00\x2a"; -KFaxImage::KFaxImage( const QString &filename, QObject *parent, const char *name ) - : QObject(parent,name) +KFaxImage::KFaxImage( const TQString &filename, TQObject *parent, const char *name ) + : TQObject(parent,name) { - KGlobal::locale()->insertCatalogue( QString::fromLatin1("libkfaximage") ); + KGlobal::locale()->insertCatalogue( TQString::fromLatin1("libkfaximage") ); loadImage(filename); } KFaxImage::~KFaxImage() { } -bool KFaxImage::loadImage( const QString &filename ) +bool KFaxImage::loadImage( const TQString &filename ) { reset(); m_filename = filename; - m_errorString = QString::null; + m_errorString = TQString::null; if (m_filename.isEmpty()) return false; @@ -74,33 +74,33 @@ void KFaxImage::reset() // they may be needed by calling application } -QImage KFaxImage::page( unsigned int pageNr ) +TQImage KFaxImage::page( unsigned int pageNr ) { if (pageNr >= numPages()) { kdDebug() << "KFaxImage::page() called with invalid page number\n"; - return QImage(); + return TQImage(); } pagenode *pn = m_pagenodes.at(pageNr); GetImage(pn); return pn->image; } -QPoint KFaxImage::page_dpi( unsigned int pageNr ) +TQPoint KFaxImage::page_dpi( unsigned int pageNr ) { if (pageNr >= numPages()) { kdDebug() << "KFaxImage::page_dpi() called with invalid page number\n"; - return QPoint(0,0); + return TQPoint(0,0); } pagenode *pn = m_pagenodes.at(pageNr); GetImage(pn); return pn->dpi; } -QSize KFaxImage::page_size( unsigned int pageNr ) +TQSize KFaxImage::page_size( unsigned int pageNr ) { if (pageNr >= numPages()) { kdDebug() << "KFaxImage::page_size() called with invalid page number\n"; - return QSize(0,0); + return TQSize(0,0); } pagenode *pn = m_pagenodes.at(pageNr); GetImage(pn); @@ -115,7 +115,7 @@ pagenode *KFaxImage::AppendImageNode(int type) pn->type = type; pn->expander = g31expand; pn->strips = NULL; - pn->size = QSize(1728,2339); + pn->size = TQSize(1728,2339); pn->vres = -1; pn->dpi = KFAX_DPI_FINE; m_pagenodes.append(pn); @@ -125,7 +125,7 @@ pagenode *KFaxImage::AppendImageNode(int type) bool KFaxImage::NewImage(pagenode *pn, int w, int h) { - pn->image = QImage( w, h, 1, 2, QImage::systemByteOrder() ); + pn->image = TQImage( w, h, 1, 2, TQImage::systemByteOrder() ); pn->image.setColor(0, qRgb(255,255,255)); pn->image.setColor(1, qRgb(0,0,0)); pn->data = (Q_UINT16*) pn->image.bits(); @@ -137,12 +137,12 @@ bool KFaxImage::NewImage(pagenode *pn, int w, int h) void KFaxImage::FreeImage(pagenode *pn) { - pn->image = QImage(); + pn->image = TQImage(); pn->data = NULL; pn->bytes_per_line = 0; } -void KFaxImage::kfaxerror(const QString& error) +void KFaxImage::kfaxerror(const TQString& error) { m_errorString = error; kdError() << "kfaxerror: " << error << endl; @@ -155,22 +155,22 @@ KFaxImage::notefile(int type) { pagenode *newnode = new pagenode(); newnode->type = type; - newnode->size = QSize(1728,0); + newnode->size = TQSize(1728,0); return newnode; } static t32bits -get4(unsigned char *p, QImage::Endian endian) +get4(unsigned char *p, TQImage::Endian endian) { - return (endian == QImage::BigEndian) + return (endian == TQImage::BigEndian) ? (p[0]<<24)|(p[1]<<16)|(p[2]<<8)|p[3] : p[0]|(p[1]<<8)|(p[2]<<16)|(p[3]<<24); } static int -get2(unsigned char *p, QImage::Endian endian) +get2(unsigned char *p, TQImage::Endian endian) { - return (endian == QImage::BigEndian) ? (p[0]<<8)|p[1] : p[0]|(p[1]<<8); + return (endian == TQImage::BigEndian) ? (p[0]<<8)|p[1] : p[0]|(p[1]<<8); } /* generate pagenodes for the images in a tiff file */ @@ -179,12 +179,12 @@ KFaxImage::notetiff() { #define SC(x) (char *)(x) unsigned char header[8]; - QImage::Endian endian; + TQImage::Endian endian; t32bits IFDoff; pagenode *pn = NULL; - QString str; + TQString str; - QFile file(filename()); + TQFile file(filename()); if (!file.open(IO_ReadOnly)) { kfaxerror(i18n("Unable to open file for reading.")); return 0; @@ -195,9 +195,9 @@ KFaxImage::notetiff() return 0; } if (memcmp(header, &littleTIFF, 4) == 0) - endian = QImage::LittleEndian; + endian = TQImage::LittleEndian; else if (memcmp(header, &bigTIFF, 4) == 0) - endian = QImage::BigEndian; + endian = TQImage::BigEndian; else { maybe_RAW_FAX: kfaxerror(i18n("This is not a TIFF FAX file.")); @@ -381,7 +381,7 @@ KFaxImage::notetiff() pn->nstrips = nstrips; pn->rowsperstrip = nstrips > 1 ? rowsperstrip : iheight; pn->strips = strips; - pn->size = QSize(iwidth,iheight); + pn->size = TQSize(iwidth,iheight); pn->inverse = inverse; pn->lsbfirst = lsbfirst; pn->orient = orient; @@ -454,7 +454,7 @@ KFaxImage::getstrip(pagenode *pn, int strip) #define ShortOrder so.b[1] so.s = 1; /* XXX */ - QFile file(filename()); + TQFile file(filename()); if (!file.open(IO_ReadOnly)) { badfile(pn); return NULL; diff --git a/kfaxview/libkfaximage/kfaximage.h b/kfaxview/libkfaximage/kfaximage.h index 0ed2db90..c0d61cb6 100644 --- a/kfaxview/libkfaximage/kfaximage.h +++ b/kfaxview/libkfaximage/kfaximage.h @@ -20,10 +20,10 @@ #ifndef _LIBKFAXIMAGE_H_ #define _LIBKFAXIMAGE_H_ -#include <qobject.h> -#include <qstring.h> -#include <qimage.h> -#include <qptrlist.h> +#include <tqobject.h> +#include <tqstring.h> +#include <tqimage.h> +#include <tqptrlist.h> #include <kdelibs_export.h> class pagenode; @@ -45,9 +45,9 @@ class pagenode; * 406 dpi x 392 lpi */ -#define KFAX_DPI_STANDARD QPoint(203,98) -#define KFAX_DPI_FINE QPoint(203,196) -#define KFAX_DPI_SUPERFINE QPoint(406,392) +#define KFAX_DPI_STANDARD TQPoint(203,98) +#define KFAX_DPI_FINE TQPoint(203,196) +#define KFAX_DPI_SUPERFINE TQPoint(406,392) class KDE_EXPORT KFaxImage : public QObject @@ -63,7 +63,7 @@ public: * @see: numPages */ - KFaxImage( const QString &filename = QString::null, QObject *parent = 0, const char *name = 0 ); + KFaxImage( const TQString &filename = TQString::null, TQObject *parent = 0, const char *name = 0 ); /** * Destructor @@ -81,14 +81,14 @@ public: * @see: errorString */ - bool loadImage( const QString &filename ); + bool loadImage( const TQString &filename ); /** * returns currently loaded image file name. * @return FAX filename */ - QString filename() { return m_filename; }; + TQString filename() { return m_filename; }; /** * returns number of pages which are stored in the FAX file @@ -98,34 +98,34 @@ public: unsigned int numPages() const { return m_pagenodes.count(); }; /** - * returns a QImage which holds the contents of page pageNr + * returns a TQImage which holds the contents of page pageNr * @param pageNr: page number (starting with 0) - * @return QImage of the page pageNr + * @return TQImage of the page pageNr */ - QImage page( unsigned int pageNr ); + TQImage page( unsigned int pageNr ); /** * returns the DPI (dots per inch) of page pageNr * @param pageNr: page number (starting with 0) - * @return a QPoint value with the DPIs in X- and Y-direction + * @return a TQPoint value with the DPIs in X- and Y-direction */ - QPoint page_dpi( unsigned int pageNr ); + TQPoint page_dpi( unsigned int pageNr ); /** * returns the physical pixels of page pageNr * @param pageNr: page number (starting with 0) - * @return a QSize value with the width and height of the image + * @return a TQSize value with the width and height of the image */ - QSize page_size( unsigned int pageNr ); + TQSize page_size( unsigned int pageNr ); /** * @return a user-visible, translated error string */ - const QString errorString() const { return m_errorString; }; + const TQString errorString() const { return m_errorString; }; @@ -135,10 +135,10 @@ public: * private member variables */ - QString m_filename; - QString m_errorString; + TQString m_filename; + TQString m_errorString; - typedef QPtrList<pagenode> t_PageNodeList; + typedef TQPtrList<pagenode> t_PageNodeList; t_PageNodeList m_pagenodes; /** @@ -146,7 +146,7 @@ public: */ void reset(); - void kfaxerror(const QString& error); + void kfaxerror(const TQString& error); pagenode *AppendImageNode(int type); bool NewImage(pagenode *pn, int w, int h); void FreeImage(pagenode *pn); diff --git a/kfaxview/main.cpp b/kfaxview/main.cpp index 8e967a96..05692315 100644 --- a/kfaxview/main.cpp +++ b/kfaxview/main.cpp @@ -8,7 +8,7 @@ #include <kurl.h> #include <klocale.h> #include <kaboutdata.h> -#include <qdir.h> +#include <tqdir.h> #include <stdlib.h> @@ -97,22 +97,22 @@ int main(int argc, char** argv) if (!url.isValid()) { - kdError(4300) << QString(I18N_NOOP("The URL %1 is not well-formed.")).arg(args->arg(0)) << endl; + kdError(4300) << TQString(I18N_NOOP("The URL %1 is not well-formed.")).arg(args->arg(0)) << endl; return -1; } if (!url.isLocalFile()) { - kdError(4300) << QString(I18N_NOOP("The URL %1 does not point to a local file. You can only specify local " + kdError(4300) << TQString(I18N_NOOP("The URL %1 does not point to a local file. You can only specify local " "files if you are using the '--unique' option.")).arg(args->arg(0)) << endl; return -1; } - QString qualPath = QFileInfo(url.path()).absFilePath(); + TQString qualPath = TQFileInfo(url.path()).absFilePath(); app.dcopClient()->attach(); // We need to register as "kviewshell" to stay compatible with existing DCOP-skripts. - QCString id = app.dcopClient()->registerAs("unique-kviewshell"); + TQCString id = app.dcopClient()->registerAs("unique-kviewshell"); if (id.isNull()) kdError(4300) << "There was an error using dcopClient()->registerAs()." << endl; QCStringList apps = app.dcopClient()->registeredApplications(); @@ -120,22 +120,22 @@ int main(int argc, char** argv) { if ((*it).find("kviewshell") == 0) { - QByteArray data, replyData; - QCString replyType; - QDataStream arg(data, IO_WriteOnly); + TQByteArray data, replyData; + TQCString replyType; + TQDataStream arg(data, IO_WriteOnly); bool result; arg << qualPath.stripWhiteSpace(); - if (!app.dcopClient()->call( *it, "kmultipage", "is_file_loaded(QString)", data, replyType, replyData)) + if (!app.dcopClient()->call( *it, "kmultipage", "is_file_loaded(TQString)", data, replyType, replyData)) kdError(4300) << "There was an error using DCOP." << endl; else { - QDataStream reply(replyData, IO_ReadOnly); + TQDataStream reply(replyData, IO_ReadOnly); if (replyType == "bool") { reply >> result; if (result == true) { - if (app.dcopClient()->send( *it, "kmultipage", "jumpToReference(QString)", url.ref()) == true) + if (app.dcopClient()->send( *it, "kmultipage", "jumpToReference(TQString)", url.ref()) == true) { app.dcopClient()->detach(); return 0; @@ -163,7 +163,7 @@ int main(int argc, char** argv) // If the url doesn't already has a reference part, add the // argument of --goto to the url as reference, to make the // KViewShell jump to this page. - QString reference = args->getOption("goto"); + TQString reference = args->getOption("goto"); url.setHTMLRef(reference); } shell->openURL(url); |