summaryrefslogtreecommitdiffstats
path: root/kpdf/core
diff options
context:
space:
mode:
Diffstat (limited to 'kpdf/core')
-rw-r--r--kpdf/core/document.cpp44
-rw-r--r--kpdf/core/document.h7
-rw-r--r--kpdf/core/generator.h2
-rw-r--r--kpdf/core/generator_pdf/generator_pdf.cpp58
-rw-r--r--kpdf/core/generator_pdf/generator_pdf.h4
-rw-r--r--kpdf/core/generator_pdf/gp_outputdev.cpp8
-rw-r--r--kpdf/core/generator_pdf/gp_outputdev.h4
-rw-r--r--kpdf/core/link.cpp6
-rw-r--r--kpdf/core/link.h2
-rw-r--r--kpdf/core/page.cpp20
-rw-r--r--kpdf/core/page.h4
-rw-r--r--kpdf/core/pagetransition.cpp2
-rw-r--r--kpdf/core/pagetransition.h6
13 files changed, 84 insertions, 83 deletions
diff --git a/kpdf/core/document.cpp b/kpdf/core/document.cpp
index 02395747..6c918a4d 100644
--- a/kpdf/core/document.cpp
+++ b/kpdf/core/document.cpp
@@ -118,7 +118,7 @@ KPDFDocument::KPDFDocument(TQWidget *widget)
TQStringList::Iterator it = list.begin();
while( it != list.end() )
{
- d->kimgioMimes << KMimeType::findByPath(TQString("foo.%1").arg(*it), 0, true)->name();
+ d->kimgioMimes << KMimeType::findByPath(TQString("foo.%1").tqarg(*it), 0, true)->name();
++it;
}
}
@@ -139,13 +139,13 @@ bool KPDFDocument::openDocument( const TQString & docFile, const KURL & url, con
TQFile fileReadTest( docFile );
if ( !fileReadTest.open( IO_ReadOnly ) )
{
- d->docFileName = TQString::null;
+ d->docFileName = TQString();
return false;
}
// determine the related "xml document-info" filename
d->url = url;
d->docFileName = docFile;
- TQString fn = docFile.contains('/') ? docFile.section('/', -1, -1) : docFile;
+ TQString fn = docFile.tqcontains('/') ? docFile.section('/', -1, -1) : docFile;
fn = "kpdf/" + TQString::number(fileReadTest.size()) + "." + fn + ".xml";
fileReadTest.close();
d->xmlFileName = locateLocal( "data", fn );
@@ -298,7 +298,7 @@ void KPDFDocument::addObserver( DocumentObserver * pObserver )
void KPDFDocument::removeObserver( DocumentObserver * pObserver )
{
// remove observer from the map. it won't receive notifications anymore
- if ( d->observers.contains( pObserver->observerId() ) )
+ if ( d->observers.tqcontains( pObserver->observerId() ) )
{
// free observer's pixmap data
int observerId = pObserver->observerId();
@@ -331,7 +331,7 @@ void KPDFDocument::reparseConfig()
// reparse generator config and if something changed clear KPDFPages
if ( generator && generator->reparseConfig() )
{
- // invalidate pixmaps
+ // tqinvalidate pixmaps
TQValueVector<KPDFPage*>::iterator it = pages_vector.begin(), end = pages_vector.end();
for ( ; it != end; ++it )
(*it)->deletePixmapsAndRects();
@@ -357,7 +357,7 @@ void KPDFDocument::reparseConfig()
TQWidget *KPDFDocument::widget() const
{
- return static_cast<TQWidget*>(parent());
+ return TQT_TQWIDGET(tqparent());
}
bool KPDFDocument::isOpened() const
@@ -633,7 +633,7 @@ bool KPDFDocument::searchText( int searchID, const TQString & text, bool fromSta
return false;
// if searchID search not recorded, create new descriptor and init params
- if ( !d->searches.contains( searchID ) )
+ if ( !d->searches.tqcontains( searchID ) )
{
RunningSearch * search = new RunningSearch();
search->continueOnPage = -1;
@@ -707,12 +707,12 @@ bool KPDFDocument::searchText( int searchID, const TQString & text, bool fromSta
{
foundAMatch = true;
s->highlightedPages.append( pageNumber );
- if ( !pagesToNotify.contains( pageNumber ) )
+ if ( !pagesToNotify.tqcontains( pageNumber ) )
pagesToNotify.append( pageNumber );
}
}
- // reset cursor to previous shape
+ // reset cursor to previous tqshape
TQApplication::restoreOverrideCursor();
// send page lists if found anything new
@@ -747,7 +747,7 @@ bool KPDFDocument::searchText( int searchID, const TQString & text, bool fromSta
{
if ( currentPage >= pageCount )
{
- if ( noDialogs || KMessageBox::questionYesNo(widget(), i18n("End of document reached.\nContinue from the beginning?"), TQString::null, KStdGuiItem::cont(), KStdGuiItem::cancel()) == KMessageBox::Yes )
+ if ( noDialogs || KMessageBox::questionYesNo(widget(), i18n("End of document reached.\nContinue from the beginning?"), TQString(), KStdGuiItem::cont(), KStdGuiItem::cancel()) == KMessageBox::Yes )
currentPage = 0;
else
break;
@@ -764,7 +764,7 @@ bool KPDFDocument::searchText( int searchID, const TQString & text, bool fromSta
}
}
- // reset cursor to previous shape
+ // reset cursor to previous tqshape
TQApplication::restoreOverrideCursor();
// if a match has been found..
@@ -779,7 +779,7 @@ bool KPDFDocument::searchText( int searchID, const TQString & text, bool fromSta
pages_vector[ currentPage ]->setHighlight( searchID, match, color );
// ..queue page for notifying changes..
- if ( !pagesToNotify.contains( currentPage ) )
+ if ( !pagesToNotify.tqcontains( currentPage ) )
pagesToNotify.append( currentPage );
// ..move the viewport to show the searched word centered
@@ -793,7 +793,7 @@ bool KPDFDocument::searchText( int searchID, const TQString & text, bool fromSta
}
}
else if ( !noDialogs )
- KMessageBox::information( widget(), i18n("No matches found for '%1'.").arg( text ) );
+ KMessageBox::information( widget(), i18n("No matches found for '%1'.").tqarg( text ) );
}
// 3. PREVMATCH //TODO
else if ( type == PrevMatch )
@@ -860,12 +860,12 @@ bool KPDFDocument::searchText( int searchID, const TQString & text, bool fromSta
{
foundAMatch = true;
s->highlightedPages.append( pageNumber );
- if ( !pagesToNotify.contains( pageNumber ) )
+ if ( !pagesToNotify.tqcontains( pageNumber ) )
pagesToNotify.append( pageNumber );
}
}
- // reset cursor to previous shape
+ // reset cursor to previous tqshape
TQApplication::restoreOverrideCursor();
// send page lists to update observers (since some filter on bookmarks)
@@ -884,7 +884,7 @@ bool KPDFDocument::searchText( int searchID, const TQString & text, bool fromSta
bool KPDFDocument::continueSearch( int searchID )
{
// check if searchID is present in runningSearches
- if ( !d->searches.contains( searchID ) )
+ if ( !d->searches.tqcontains( searchID ) )
return false;
// start search with cached parameters from last search by searchID
@@ -897,7 +897,7 @@ bool KPDFDocument::continueSearch( int searchID )
void KPDFDocument::resetSearch( int searchID )
{
// check if searchID is present in runningSearches
- if ( !d->searches.contains( searchID ) )
+ if ( !d->searches.tqcontains( searchID ) )
return;
// get previous parameters for search
@@ -1016,7 +1016,7 @@ void KPDFDocument::processLink( const KPDFLink * link )
KRun::run( *ptr, lst );
}
else
- KMessageBox::information( widget(), i18n( "No application found for opening file of mimetype %1." ).arg( mime->name() ) );
+ KMessageBox::information( widget(), i18n( "No application found for opening file of mimetype %1." ).tqarg( mime->name() ) );
} break;
case KPDFLink::Action: {
@@ -1067,14 +1067,14 @@ void KPDFDocument::processLink( const KPDFLink * link )
case KPDFLink::Browse: {
const KPDFLinkBrowse * browse = static_cast< const KPDFLinkBrowse * >( link );
// if the url is a mailto one, invoke mailer
- if ( browse->url().startsWith( "mailto:", false ) )
+ if ( browse->url().tqstartsWith( "mailto:", false ) )
kapp->invokeMailer( browse->url() );
else
{
TQString url = browse->url();
// fix for #100366, documents with relative links that are the form of http:foo.pdf
- if (url.find("http:") == 0 && url.find("http://") == -1 && url.right(4) == ".pdf")
+ if (url.tqfind("http:") == 0 && url.tqfind("http://") == -1 && url.right(4) == ".pdf")
{
openRelativeFile(url.mid(5));
return;
@@ -1117,7 +1117,7 @@ void KPDFDocument::requestDone( PixmapRequest * req )
break;
}
- if ( d->observers.contains( req->id ) )
+ if ( d->observers.tqcontains( req->id ) )
{
// [MEM] 1.2 append memory allocation descriptor to the FIFO
int memoryBytes = 4 * req->width * req->height;
@@ -1381,7 +1381,7 @@ void KPDFDocument::loadDocumentInfo()
TQString KPDFDocument::giveAbsolutePath( const TQString & fileName )
{
if ( !d->url.isValid() )
- return TQString::null;
+ return TQString();
return d->url.upURL().url() + fileName;
}
diff --git a/kpdf/core/document.h b/kpdf/core/document.h
index c1eb840a..ee5a8a88 100644
--- a/kpdf/core/document.h
+++ b/kpdf/core/document.h
@@ -47,9 +47,10 @@ class KURL;
* For a better understanding of hieracies @see README.internals.png
* @see DocumentObserver, KPDFPage
*/
-class KPDFDocument : public QObject
+class KPDFDocument : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
KPDFDocument( TQWidget *widget );
~KPDFDocument();
@@ -184,7 +185,7 @@ class DocumentViewport
* The Info structure can be filled in by generators to display metadata
* about the currently opened file.
*/
-class DocumentInfo : public QDomDocument
+class DocumentInfo : public TQDomDocument
{
public:
DocumentInfo();
@@ -216,7 +217,7 @@ class DocumentInfo : public QDomDocument
* - ViewportName: A 'named reference' to the viewport that must be converted
* using getMetaData( "NamedViewport", *viewport_name* )
*/
-class DocumentSynopsis : public QDomDocument
+class DocumentSynopsis : public TQDomDocument
{
public:
DocumentSynopsis();
diff --git a/kpdf/core/generator.h b/kpdf/core/generator.h
index 841915a2..a3c1f985 100644
--- a/kpdf/core/generator.h
+++ b/kpdf/core/generator.h
@@ -40,7 +40,7 @@ class PixmapRequest;
* class stores the resulting data into 'KPDFPage's. The data will then be
* displayed by the GUI components (pageView, thumbnailList, etc..).
*/
-class Generator : public QObject
+class Generator : public TQObject
{
public:
/** virtual methods to reimplement **/
diff --git a/kpdf/core/generator_pdf/generator_pdf.cpp b/kpdf/core/generator_pdf/generator_pdf.cpp
index 9540d2fd..8ad34900 100644
--- a/kpdf/core/generator_pdf/generator_pdf.cpp
+++ b/kpdf/core/generator_pdf/generator_pdf.cpp
@@ -57,7 +57,7 @@
* internal: thread race prevention is done via the 'docLock' mutex. the
* mutex is needed only because we have the asyncronous thread; else
* the operations are all within the 'gui' thread, scheduled by the
- * Qt scheduler and no mutex is needed.
+ * TQt scheduler and no mutex is needed.
* external: dangerous operations are all locked via mutex internally, and the
* only needed external thing is the 'canGeneratePixmap' method
* that tells if the generator is free (since we don't want an
@@ -152,7 +152,7 @@ bool PDFGenerator::loadDocument( const TQString & filePath, TQValueVector<KPDFPa
}
// 2. reopen the document using the password
- GString * pwd2 = new GString( TQString::fromLocal8Bit(password.data()).latin1() );
+ GString * pwd2 = new GString( TQString(TQString::fromLocal8Bit(password.data())).latin1() );
delete pdfdoc;
pdfdoc = new PDFDoc( new GString( TQFile::encodeName( filePath ) ), pwd2, pwd2 );
delete pwd2;
@@ -209,7 +209,7 @@ const DocumentInfo * PDFGenerator::generateDocumentInfo()
if ( pdfdoc )
{
docInfo.set( "format", i18n( "PDF v. <version>", "PDF v. %1" )
- .arg( TQString::number( pdfdoc->getPDFVersion() ) ), i18n( "Format" ) );
+ .tqarg( TQString::number( pdfdoc->getPDFVersion() ) ), i18n( "Format" ) );
docInfo.set( "encryption", pdfdoc->isEncrypted() ? i18n( "Encrypted" ) : i18n( "Unencrypted" ),
i18n("Security") );
docInfo.set( "optimization", pdfdoc->isLinearized() ? i18n( "Yes" ) : i18n( "No" ),
@@ -423,18 +423,18 @@ bool PDFGenerator::print( KPrinter& printer )
marginBottom = (int)printer.option("kde-margin-bottom").toDouble();
bool forceRasterize = printer.option("kde-kpdf-forceRaster").toInt();
- if (ps.find(TQRegExp("w\\d+h\\d+")) == 0)
+ if (ps.tqfind(TQRegExp("w\\d+h\\d+")) == 0)
{
- // size not supported by Qt, CUPS gives us the size as wWIDTHhHEIGHT, at least on the printers i tester
+ // size not supported by TQt, CUPS gives us the size as wWIDTHhHEIGHT, at least on the printers i tester
// remove the w
ps = ps.mid(1);
- int hPos = ps.find("h");
+ int hPos = ps.tqfind("h");
paperWidth = ps.left(hPos).toInt();
paperHeight = ps.mid(hPos+1).toInt();
}
else
{
- // size is supported by Qt, we get either the pageSize name or nothing because the CUPS driver
+ // size is supported by TQt, we get either the pageSize name or nothing because the CUPS driver
// does not do any translation, then use KPrinter::pageSize to get the page size
KPrinter::PageSize qtPageSize;
if (!ps.isEmpty()) qtPageSize = pageNameToPageSize(ps);
@@ -449,7 +449,7 @@ bool PDFGenerator::print( KPrinter& printer )
paperHeight = metrics.height();
}
- KTempFile tf( TQString::null, ".ps" );
+ KTempFile tf( TQString(), ".ps" );
globalParams->setPSPaperWidth(paperWidth);
globalParams->setPSPaperHeight(paperHeight);
TQString pstitle = getDocumentInfo("Title", true);
@@ -457,7 +457,7 @@ bool PDFGenerator::print( KPrinter& printer )
{
pstitle = m_document->currentDocument().fileName( false );
}
- // this looks non-unicode-safe and it is. anything other than ASCII is not specified
+ // this looks non-tqunicode-safe and it is. anything other than ASCII is not specified
// and some printers actually stop printing when they encounter non-ASCII characters in the
// Postscript %%Title tag
TQCString pstitle8Bit = pstitle.latin1();
@@ -524,18 +524,18 @@ bool PDFGenerator::print( KPrinter& printer )
}
}
-static GString *QStringToGString(const TQString &s) {
+static GString *TQStringToGString(const TQString &s) {
int len = s.length();
char *cstring = (char *)gmallocn(s.length(), sizeof(char));
for (int i = 0; i < len; ++i)
- cstring[i] = s.at(i).unicode();
+ cstring[i] = s.tqat(i).tqunicode();
return new GString(cstring, len);
}
-static TQString unicodeToQString(Unicode* u, int len) {
+static TQString tqunicodeToTQString(Unicode* u, int len) {
TQString ret;
ret.setLength(len);
- TQChar* qch = (TQChar*) ret.unicode();
+ TQChar* qch = (TQChar*) ret.tqunicode();
for (;len;--len)
*qch++ = (TQChar) *u++;
return ret;
@@ -568,7 +568,7 @@ static TQString UnicodeParsedString(GString *s1) {
u = s1->getChar(i) & 0xff;
++i;
}
- result += unicodeToQString( &u, 1 );
+ result += tqunicodeToTQString( &u, 1 );
}
return result;
}
@@ -586,7 +586,7 @@ TQString PDFGenerator::getMetaData( const TQString & key, const TQString & optio
// asking for the page related to a 'named link destination'. the
// option is the link name. @see addSynopsisChildren.
DocumentViewport viewport;
- GString * namedDest = QStringToGString(option);
+ GString * namedDest = TQStringToGString(option);
docLock.lock();
LinkDest * destination = pdfdoc->findDest( namedDest );
if ( destination )
@@ -610,7 +610,7 @@ bool PDFGenerator::reparseConfig()
{
// load paper color from Settings or use the white default color
TQColor color = ( (KpdfSettings::renderMode() == KpdfSettings::EnumRenderMode::Paper ) &&
- KpdfSettings::changeColors() ) ? KpdfSettings::paperColor() : Qt::white;
+ KpdfSettings::changeColors() ) ? KpdfSettings::paperColor() : TQt::white;
// if paper color is changed we have to rebuild every visible pixmap in addition
// to the outputDevice. it's the 'heaviest' case, other effect are just recoloring
// over the page rendered on 'standard' white background.
@@ -789,11 +789,11 @@ TQString PDFGenerator::getDocumentInfo( const TQString & data, bool canReturnNul
// [Albert] Code adapted from pdfinfo.cc on xpdf
Object info;
if ( !pdfdoc )
- return canReturnNull ? TQString::null : i18n( "Unknown" );
+ return canReturnNull ? TQString() : i18n( "Unknown" );
pdfdoc->getDocInfo( &info );
if ( !info.isDict() )
- return canReturnNull ? TQString::null : i18n( "Unknown" );
+ return canReturnNull ? TQString() : i18n( "Unknown" );
Object obj;
Dict *infoDict = info.getDict();
@@ -807,7 +807,7 @@ TQString PDFGenerator::getDocumentInfo( const TQString & data, bool canReturnNul
}
obj.free();
info.free();
- return canReturnNull ? TQString::null : i18n( "Unknown" );
+ return canReturnNull ? TQString() : i18n( "Unknown" );
}
TQString PDFGenerator::getDocumentDate( const TQString & data ) const
@@ -856,7 +856,7 @@ TQString PDFGenerator::getDocumentDate( const TQString & data ) const
return result;
}
-void PDFGenerator::addSynopsisChildren( TQDomNode * parent, GList * items )
+void PDFGenerator::addSynopsisChildren( TQDomNode * tqparent, GList * items )
{
int numItems = items->getLength();
for ( int i = 0; i < numItems; ++i )
@@ -868,11 +868,11 @@ void PDFGenerator::addSynopsisChildren( TQDomNode * parent, GList * items )
TQString name;
Unicode * uniChar = outlineItem->getTitle();
int titleLength = outlineItem->getTitleLength();
- name = unicodeToQString(uniChar, titleLength);
+ name = tqunicodeToTQString(uniChar, titleLength);
if ( name.isEmpty() )
continue;
TQDomElement item = docSyn.createElement( name );
- parent->appendChild( item );
+ tqparent->appendChild( item );
// 2. find the page the link refers to
LinkAction * a = outlineItem->getAction();
@@ -888,7 +888,7 @@ void PDFGenerator::addSynopsisChildren( TQDomNode * parent, GList * items )
// so better storing the reference and provide the viewport as metadata
// on demand
GString *s = g->getNamedDest();
- TQChar *charArray = new QChar[s->getLength()];
+ TQChar *charArray = new TQChar[s->getLength()];
for (int i = 0; i < s->getLength(); ++i) charArray[i] = TQChar(s->getCString()[i]);
TQString option(charArray, s->getLength());
item.setAttribute( "ViewportName", option );
@@ -909,11 +909,11 @@ void PDFGenerator::addSynopsisChildren( TQDomNode * parent, GList * items )
item.setAttribute( "Open", TQVariant( (bool)outlineItem->isOpen() ).toString() );
- // 3. recursively descend over children
+ // 3. recursively descend over tqchildren
outlineItem->open();
- GList * children = outlineItem->getKids();
- if ( children )
- addSynopsisChildren( &item, children );
+ GList * tqchildren = outlineItem->getKids();
+ if ( tqchildren )
+ addSynopsisChildren( &item, tqchildren );
}
}
@@ -1017,10 +1017,10 @@ void PDFGenerator::addTransition( int pageNumber, KPDFPage * page )
switch ( pdfTransition->getAlignment() ) {
case PageTransition::Horizontal:
- transition->setAlignment( KPDFPageTransition::Horizontal );
+ transition->tqsetAlignment( KPDFPageTransition::Horizontal );
break;
case PageTransition::Vertical:
- transition->setAlignment( KPDFPageTransition::Vertical );
+ transition->tqsetAlignment( KPDFPageTransition::Vertical );
break;
}
diff --git a/kpdf/core/generator_pdf/generator_pdf.h b/kpdf/core/generator_pdf/generator_pdf.h
index 662c19fd..b7d2deb2 100644
--- a/kpdf/core/generator_pdf/generator_pdf.h
+++ b/kpdf/core/generator_pdf/generator_pdf.h
@@ -95,7 +95,7 @@ class PDFGenerator : public Generator
TQString getDocumentInfo( const TQString & data, bool canReturnNull = false ) const;
TQString getDocumentDate( const TQString & data ) const;
// private function for creating the document synopsis hieracy
- void addSynopsisChildren( TQDomNode * parent, GList * items );
+ void addSynopsisChildren( TQDomNode * tqparent, GList * items );
// private function for creating the transition information
void addTransition( int pageNumber, KPDFPage * page );
// (async related) receive data from the generator thread
@@ -124,7 +124,7 @@ class PDFGenerator : public Generator
* @short A thread that builds contents for PDFGenerator in the background.
*
*/
-class PDFPixmapGeneratorThread : public QThread
+class PDFPixmapGeneratorThread : public TQThread
{
public:
PDFPixmapGeneratorThread( PDFGenerator * generator );
diff --git a/kpdf/core/generator_pdf/gp_outputdev.cpp b/kpdf/core/generator_pdf/gp_outputdev.cpp
index df3fd85b..b6c40520 100644
--- a/kpdf/core/generator_pdf/gp_outputdev.cpp
+++ b/kpdf/core/generator_pdf/gp_outputdev.cpp
@@ -109,7 +109,7 @@ void KPDFOutputDev::endPage()
for (int j = 0; j < bh; j++)
{
getBitmap()->getPixel(i, j, pixel);
- img->setPixel( i, j, qRgb( pixel[0], pixel[1], pixel[2] ) );
+ img->setPixel( i, j, tqRgb( pixel[0], pixel[1], pixel[2] ) );
}
}
delete [] pixel;
@@ -172,7 +172,7 @@ void KPDFOutputDev::processLink( Link * link, Catalog * catalog )
}
void KPDFOutputDev::drawImage( GfxState *state, Object *ref, Stream *str,
- int _width, int _height, GfxImageColorMap *colorMap, int *maskColors, GBool inlineImg )
+ int _width, int _height, GfxImageColorMap *colorMap, int *tqmaskColors, GBool inlineImg )
{
if ( m_generateImages )
{
@@ -207,7 +207,7 @@ void KPDFOutputDev::drawImage( GfxState *state, Object *ref, Stream *str,
m_rects.push_back( rect );
}
}
- SplashOutputDev::drawImage( state, ref, str, _width, _height, colorMap, maskColors, inlineImg );
+ SplashOutputDev::drawImage( state, ref, str, _width, _height, colorMap, tqmaskColors, inlineImg );
}
//END - OutputDev hooked calls
@@ -246,7 +246,7 @@ KPDFLink * KPDFOutputDev::generateLink( LinkAction * a )
{
LinkGoTo * g = (LinkGoTo *) a;
// ceate link: no ext file, namedDest, object pointer
- link = new KPDFLinkGoto( TQString::null, decodeViewport( g->getNamedDest(), g->getDest() ) );
+ link = new KPDFLinkGoto( TQString(), decodeViewport( g->getNamedDest(), g->getDest() ) );
}
break;
diff --git a/kpdf/core/generator_pdf/gp_outputdev.h b/kpdf/core/generator_pdf/gp_outputdev.h
index 7788b1db..a4d33b04 100644
--- a/kpdf/core/generator_pdf/gp_outputdev.h
+++ b/kpdf/core/generator_pdf/gp_outputdev.h
@@ -32,7 +32,7 @@ class DocumentViewport;
* @short A SplashOutputDev renderer that grabs text and links.
*
* This output device:
- * - renders the page using SplashOutputDev (its parent)
+ * - renders the page using SplashOutputDev (its tqparent)
* - harvests text into a textPage (for searching text)
* - harvests links and collects them
* - collects images and collects them
@@ -63,7 +63,7 @@ class KPDFOutputDev : public SplashOutputDev
virtual void processLink(Link *link, Catalog *catalog);
//----- image drawing
virtual void drawImage(GfxState *state, Object *ref, Stream *str, int width, int height,
- GfxImageColorMap *colorMap, int *maskColors, GBool inlineImg);
+ GfxImageColorMap *colorMap, int *tqmaskColors, GBool inlineImg);
private:
// delete all interal objects and data
diff --git a/kpdf/core/link.cpp b/kpdf/core/link.cpp
index 33d0fe98..a872ba60 100644
--- a/kpdf/core/link.cpp
+++ b/kpdf/core/link.cpp
@@ -18,12 +18,12 @@ KPDFLink::~KPDFLink()
TQString KPDFLinkGoto::linkTip() const
{
- return m_extFileName.isEmpty() ? ( m_vp.pageNumber != -1 ? i18n( "Go to page %1" ).arg( m_vp.pageNumber + 1 ) : TQString::null ) : i18n("Open external file");
+ return m_extFileName.isEmpty() ? ( m_vp.pageNumber != -1 ? i18n( "Go to page %1" ).tqarg( m_vp.pageNumber + 1 ) : TQString() ) : i18n("Open external file");
}
TQString KPDFLinkExecute::linkTip() const
{
- return i18n( "Execute '%1'..." ).arg( m_fileName );
+ return i18n( "Execute '%1'..." ).tqarg( m_fileName );
}
TQString KPDFLinkBrowse::linkTip() const
@@ -61,5 +61,5 @@ TQString KPDFLinkAction::linkTip() const
default: ;
}
- return TQString::null;
+ return TQString();
}
diff --git a/kpdf/core/link.h b/kpdf/core/link.h
index eff3573e..839292fd 100644
--- a/kpdf/core/link.h
+++ b/kpdf/core/link.h
@@ -27,7 +27,7 @@ class KPDFLink
// get link type (inherited classes mustreturn an unique identifier)
enum LinkType { Goto, Execute, Browse, Action, Movie };
virtual LinkType linkType() const = 0;
- virtual TQString linkTip() const { return TQString::null; }
+ virtual TQString linkTip() const { return TQString(); }
// virtual destructor (remove warnings)
virtual ~KPDFLink();
diff --git a/kpdf/core/page.cpp b/kpdf/core/page.cpp
index 6b611360..630c9480 100644
--- a/kpdf/core/page.cpp
+++ b/kpdf/core/page.cpp
@@ -74,7 +74,7 @@ void KPDFPage::setRotation( int r )
bool KPDFPage::hasPixmap( int id, int width, int height ) const
{
- if ( !m_pixmaps.contains( id ) )
+ if ( !m_pixmaps.tqcontains( id ) )
return false;
if ( width == -1 || height == -1 )
return true;
@@ -98,7 +98,7 @@ bool KPDFPage::hasObjectRect( double x, double y ) const
return false;
TQValueList< ObjectRect * >::const_iterator it = m_rects.begin(), end = m_rects.end();
for ( ; it != end; ++it )
- if ( (*it)->contains( x, y ) )
+ if ( (*it)->tqcontains( x, y ) )
return true;
return false;
}
@@ -131,11 +131,11 @@ NormalizedRect * KPDFPage::findText( const TQString & text, bool strictCase, Nor
return 0;
// create a xpf's Unicode (unsigned int) array for the given text
- const TQChar * str = text.unicode();
+ const TQChar * str = text.tqunicode();
int len = text.length();
TQMemArray<Unicode> u(len);
for (int i = 0; i < len; ++i)
- u[i] = str[i].unicode();
+ u[i] = str[i].tqunicode();
// find out the direction of search
enum SearchDir { FromTop, NextMatch, PrevMatch } dir = lastRect ? NextMatch : FromTop;
@@ -175,7 +175,7 @@ NormalizedRect * KPDFPage::findText( const TQString & text, bool strictCase, Nor
const TQString KPDFPage::getText( const NormalizedRect & rect ) const
{
if ( !m_text )
- return TQString::null;
+ return TQString();
int left = (int)( rect.left * m_width ),
top = (int)( rect.top * m_height ),
right = (int)( rect.right * m_width ),
@@ -190,7 +190,7 @@ const ObjectRect * KPDFPage::hasObject( ObjectRect::ObjectType type, double x, d
{
TQValueList< ObjectRect * >::const_iterator it = m_rects.begin(), end = m_rects.end();
for ( ; it != end; ++it )
- if ( (*it)->contains( x, y ) )
+ if ( (*it)->tqcontains( x, y ) )
if ((*it)->objectType() == type) return *it;
return 0;
}
@@ -203,7 +203,7 @@ const KPDFPageTransition * KPDFPage::getTransition() const
void KPDFPage::setPixmap( int id, TQPixmap * pixmap )
{
- if ( m_pixmaps.contains( id ) )
+ if ( m_pixmaps.tqcontains( id ) )
delete m_pixmaps[id];
m_pixmaps[id] = pixmap;
}
@@ -252,7 +252,7 @@ void KPDFPage::setTransition( KPDFPageTransition * transition )
void KPDFPage::deletePixmap( int id )
{
- if ( m_pixmaps.contains( id ) )
+ if ( m_pixmaps.tqcontains( id ) )
{
delete m_pixmaps[ id ];
m_pixmaps.remove( id );
@@ -304,7 +304,7 @@ NormalizedRect::NormalizedRect( const TQRect & r, double xScale, double yScale )
: left( (double)r.left() / xScale ), top( (double)r.top() / yScale ),
right( (double)r.right() / xScale ), bottom( (double)r.bottom() / yScale ) {}
-bool NormalizedRect::contains( double x, double y ) const
+bool NormalizedRect::tqcontains( double x, double y ) const
{
return x >= left && x <= right && y >= top && y <= bottom;
}
@@ -319,7 +319,7 @@ bool NormalizedRect::intersects( double l, double t, double r, double b ) const
return (l < right) && (r > left) && (t < bottom) && (b > top);
}
-TQRect NormalizedRect::geometry( int xScale, int yScale ) const
+TQRect NormalizedRect::tqgeometry( int xScale, int yScale ) const
{
int l = (int)( left * xScale ),
t = (int)( top * yScale ),
diff --git a/kpdf/core/page.h b/kpdf/core/page.h
index 2de7aceb..51d7781c 100644
--- a/kpdf/core/page.h
+++ b/kpdf/core/page.h
@@ -32,11 +32,11 @@ class NormalizedRect
NormalizedRect( double l, double t, double r, double b );
NormalizedRect( const TQRect & r, double xScale, double yScale );
- bool contains( double x, double y ) const;
+ bool tqcontains( double x, double y ) const;
bool intersects( const NormalizedRect & normRect ) const;
bool intersects( double l, double t, double r, double b ) const;
- TQRect geometry( int xScale, int yScale ) const;
+ TQRect tqgeometry( int xScale, int yScale ) const;
};
/**
diff --git a/kpdf/core/pagetransition.cpp b/kpdf/core/pagetransition.cpp
index cdf04a7f..41d743c6 100644
--- a/kpdf/core/pagetransition.cpp
+++ b/kpdf/core/pagetransition.cpp
@@ -15,7 +15,7 @@
KPDFPageTransition::KPDFPageTransition( Type type )
: m_type( type ),
m_duration( 1 ),
- m_alignment( Horizontal ),
+ m_tqalignment(Horizontal ),
m_direction( Inward ),
m_angle( 0 ),
m_scale( 1.0 ),
diff --git a/kpdf/core/pagetransition.h b/kpdf/core/pagetransition.h
index 70792355..25280437 100644
--- a/kpdf/core/pagetransition.h
+++ b/kpdf/core/pagetransition.h
@@ -51,7 +51,7 @@ class KPDFPageTransition
inline int duration() const { return m_duration; }
// Get dimension in which the transition effect occurs.
- inline Alignment alignment() const { return m_alignment; }
+ inline Alignment tqalignment() const { return m_tqalignment; }
// Get direction of motion of the transition effect.
inline Direction direction() const { return m_direction; }
@@ -67,7 +67,7 @@ class KPDFPageTransition
inline void setType( Type type ) { m_type = type; }
inline void setDuration( int duration ) { m_duration = duration; }
- inline void setAlignment( Alignment alignment ) { m_alignment = alignment; }
+ inline void tqsetAlignment( Alignment tqalignment ) { m_tqalignment = tqalignment; }
inline void setDirection( Direction direction ) { m_direction = direction; }
inline void setAngle( int angle ) { m_angle = angle; }
inline void setScale( double scale ) { m_scale = scale; }
@@ -76,7 +76,7 @@ class KPDFPageTransition
private:
Type m_type;
int m_duration;
- Alignment m_alignment;
+ Alignment m_tqalignment;
Direction m_direction;
int m_angle;
double m_scale;