diff options
Diffstat (limited to 'kpdf')
36 files changed, 159 insertions, 937 deletions
diff --git a/kpdf/conf/dlgperformance.ui b/kpdf/conf/dlgperformance.ui index 3676c3ba..d0730717 100644 --- a/kpdf/conf/dlgperformance.ui +++ b/kpdf/conf/dlgperformance.ui @@ -265,11 +265,11 @@ <include location="global" impldecl="in implementation">kiconloader.h</include> <include location="local" impldecl="in implementation">dlgperformance.ui.h</include> </includes> -<Q_SLOTS> +<slots> <slot>lowRadio_toggled( bool on )</slot> <slot>normalRadio_toggled( bool on )</slot> <slot>aggressiveRadio_toggled( bool on )</slot> -</Q_SLOTS> +</slots> <functions> <function access="private">init()</function> </functions> diff --git a/kpdf/conf/kpdf.kcfg b/kpdf/conf/kpdf.kcfg index 7f84081e..c9c4f94f 100644 --- a/kpdf/conf/kpdf.kcfg +++ b/kpdf/conf/kpdf.kcfg @@ -6,7 +6,7 @@ <kcfgfile name="kpdfpartrc" /> <group name="Accessibility" > <entry key="PaperColor" type="Color" > - <default code="true" >Qt::white</default> + <default code="true" >TQt::white</default> </entry> <entry key="HighlightImages" type="Bool" > <default>false</default> @@ -129,7 +129,7 @@ <default>false</default> </entry> <entry key="SlidesBackgroundColor" type="Color" > - <default code="true" >Qt::black</default> + <default code="true" >TQt::black</default> </entry> <entry key="SlidesTransition" type="Enum" > <default>Replace</default> diff --git a/kpdf/core/document.cpp b/kpdf/core/document.cpp index f97be985..97bc6706 100644 --- a/kpdf/core/document.cpp +++ b/kpdf/core/document.cpp @@ -204,7 +204,7 @@ bool KPDFDocument::openDocument( const TQString & docFile, const KURL & url, con if ( !d->saveBookmarksTimer ) { d->saveBookmarksTimer = new TQTimer( this ); - connect( d->saveBookmarksTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( saveDocumentInfo() ) ); + connect( d->saveBookmarksTimer, TQ_SIGNAL( timeout() ), this, TQ_SLOT( saveDocumentInfo() ) ); } d->saveBookmarksTimer->start( 5 * 60 * 1000 ); @@ -212,7 +212,7 @@ bool KPDFDocument::openDocument( const TQString & docFile, const KURL & url, con if ( !d->memCheckTimer ) { d->memCheckTimer = new TQTimer( this ); - connect( d->memCheckTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( slotTimedMemoryCheck() ) ); + connect( d->memCheckTimer, TQ_SIGNAL( timeout() ), this, TQ_SLOT( slotTimedMemoryCheck() ) ); } d->memCheckTimer->start( 2000 ); @@ -357,7 +357,7 @@ void KPDFDocument::reparseConfig() TQWidget *KPDFDocument::widget() const { - return TQT_TQWIDGET(parent()); + return static_cast<TQWidget*>(parent()); } bool KPDFDocument::isOpened() const diff --git a/kpdf/core/document.h b/kpdf/core/document.h index a0529261..247a8dfd 100644 --- a/kpdf/core/document.h +++ b/kpdf/core/document.h @@ -49,7 +49,7 @@ class KURL; */ class KPDFDocument : public TQObject { - Q_OBJECT + TQ_OBJECT public: KPDFDocument( TQWidget *widget ); diff --git a/kpdf/part.cpp b/kpdf/part.cpp index 65714b05..97f1b5b4 100644 --- a/kpdf/part.cpp +++ b/kpdf/part.cpp @@ -120,11 +120,11 @@ Part::Part(TQWidget *parentWidget, const char *widgetName, m_actionsSearched(false), m_searchStarted(false) { // connect the started signal to tell the job the mimetypes we like - connect(this, TQT_SIGNAL(started(TDEIO::Job *)), this, TQT_SLOT(setMimeTypes(TDEIO::Job *))); + connect(this, TQ_SIGNAL(started(TDEIO::Job *)), this, TQ_SLOT(setMimeTypes(TDEIO::Job *))); // connect the completed signal so we can put the window caption when loading remote files - connect(this, TQT_SIGNAL(completed()), this, TQT_SLOT(emitWindowCaption())); - connect(this, TQT_SIGNAL(canceled(const TQString &)), this, TQT_SLOT(emitWindowCaption())); + connect(this, TQ_SIGNAL(completed()), this, TQ_SLOT(emitWindowCaption())); + connect(this, TQ_SIGNAL(canceled(const TQString &)), this, TQ_SLOT(emitWindowCaption())); // load catalog for translation TDEGlobal::locale()->insertCatalogue("kpdf"); @@ -144,17 +144,17 @@ Part::Part(TQWidget *parentWidget, const char *widgetName, // build the document m_document = new KPDFDocument(widget()); - connect( m_document, TQT_SIGNAL( linkFind() ), this, TQT_SLOT( slotFind() ) ); - connect( m_document, TQT_SIGNAL( linkGoToPage() ), this, TQT_SLOT( slotGoToPage() ) ); - connect( m_document, TQT_SIGNAL( linkPresentation() ), this, TQT_SLOT( slotShowPresentation() ) ); - connect( m_document, TQT_SIGNAL( linkEndPresentation() ), this, TQT_SLOT( slotHidePresentation() ) ); - connect( m_document, TQT_SIGNAL( openURL(const KURL &) ), this, TQT_SLOT( openURLFromDocument(const KURL &) ) ); - connect( m_document, TQT_SIGNAL( close() ), this, TQT_SLOT( close() ) ); + connect( m_document, TQ_SIGNAL( linkFind() ), this, TQ_SLOT( slotFind() ) ); + connect( m_document, TQ_SIGNAL( linkGoToPage() ), this, TQ_SLOT( slotGoToPage() ) ); + connect( m_document, TQ_SIGNAL( linkPresentation() ), this, TQ_SLOT( slotShowPresentation() ) ); + connect( m_document, TQ_SIGNAL( linkEndPresentation() ), this, TQ_SLOT( slotHidePresentation() ) ); + connect( m_document, TQ_SIGNAL( openURL(const KURL &) ), this, TQ_SLOT( openURLFromDocument(const KURL &) ) ); + connect( m_document, TQ_SIGNAL( close() ), this, TQ_SLOT( close() ) ); if (parent && parent->metaObject()->slotNames(true).contains("slotQuit()")) - connect( m_document, TQT_SIGNAL( quit() ), parent, TQT_SLOT( slotQuit() ) ); + connect( m_document, TQ_SIGNAL( quit() ), parent, TQ_SLOT( slotQuit() ) ); else - connect( m_document, TQT_SIGNAL( quit() ), this, TQT_SLOT( cannotQuit() ) ); + connect( m_document, TQ_SIGNAL( quit() ), this, TQ_SLOT( cannotQuit() ) ); // widgets: ^searchbar (toolbar containing label and SearchWidget) // m_searchToolBar = new TDEToolBar( parentWidget, "searchBar" ); @@ -169,7 +169,7 @@ Part::Part(TQWidget *parentWidget, const char *widgetName, m_splitter->setOpaqueResize( true ); setWidget( m_splitter ); - m_showLeftPanel = new TDEToggleAction( i18n( "Show &Navigation Panel"), "show_side_panel", 0, this, TQT_SLOT( slotShowLeftPanel() ), actionCollection(), "show_leftpanel" ); + m_showLeftPanel = new TDEToggleAction( i18n( "Show &Navigation Panel"), "show_side_panel", 0, this, TQ_SLOT( slotShowLeftPanel() ), actionCollection(), "show_leftpanel" ); m_showLeftPanel->setCheckedState( i18n( "Hide &Navigation Panel") ); m_showLeftPanel->setShortcut( "CTRL+L" ); m_showLeftPanel->setChecked( KpdfSettings::showLeftPanel() ); @@ -191,7 +191,7 @@ Part::Part(TQWidget *parentWidget, const char *widgetName, TQVBoxLayout *tocWrapperLayout = new TQVBoxLayout(tocWrapper); m_tocFrame = new TOC( tocWrapper, m_document ); tocWrapperLayout->add(m_tocFrame); - connect(m_tocFrame, TQT_SIGNAL(hasTOC(bool)), this, TQT_SLOT(enableTOC(bool))); + connect(m_tocFrame, TQ_SIGNAL(hasTOC(bool)), this, TQ_SLOT(enableTOC(bool))); index = m_toolBox->addItem( tocWrapper, TQIconSet(SmallIcon("format-text-direction-ltr")), i18n("Contents") ); m_toolBox->setItemToolTip(index, i18n("Contents")); enableTOC( false ); @@ -201,8 +201,8 @@ Part::Part(TQWidget *parentWidget, const char *widgetName, m_searchWidget = new SearchWidget( thumbsBox, m_document ); m_thumbnailList = new ThumbnailList( thumbsBox, m_document ); // ThumbnailController * m_tc = new ThumbnailController( thumbsBox, m_thumbnailList ); - connect( m_thumbnailList, TQT_SIGNAL( urlDropped( const KURL& ) ), TQT_SLOT( openURLFromDocument( const KURL & )) ); - connect( m_thumbnailList, TQT_SIGNAL( rightClick(const KPDFPage *, const TQPoint &) ), this, TQT_SLOT( slotShowMenu(const KPDFPage *, const TQPoint &) ) ); + connect( m_thumbnailList, TQ_SIGNAL( urlDropped( const KURL& ) ), TQ_SLOT( openURLFromDocument( const KURL & )) ); + connect( m_thumbnailList, TQ_SIGNAL( rightClick(const KPDFPage *, const TQPoint &) ), this, TQ_SLOT( slotShowMenu(const KPDFPage *, const TQPoint &) ) ); // shrink the bottom controller toolbar (too hackish..) thumbsBox->setStretchFactor( m_searchWidget, 100 ); thumbsBox->setStretchFactor( m_thumbnailList, 100 ); @@ -234,8 +234,8 @@ Part::Part(TQWidget *parentWidget, const char *widgetName, m_pageView = new PageView( m_splitter, m_document ); m_pageView->setFocus(); //usability setting m_splitter->setFocusProxy(m_pageView); - connect( m_pageView, TQT_SIGNAL( urlDropped( const KURL& ) ), TQT_SLOT( openURLFromDocument( const KURL & ))); - connect( m_pageView, TQT_SIGNAL( rightClick(const KPDFPage *, const TQPoint &) ), this, TQT_SLOT( slotShowMenu(const KPDFPage *, const TQPoint &) ) ); + connect( m_pageView, TQ_SIGNAL( urlDropped( const KURL& ) ), TQ_SLOT( openURLFromDocument( const KURL & ))); + connect( m_pageView, TQ_SIGNAL( rightClick(const KPDFPage *, const TQPoint &) ), this, TQ_SLOT( slotShowMenu(const KPDFPage *, const TQPoint &) ) ); // add document observers m_document->addObserver( this ); @@ -248,53 +248,53 @@ Part::Part(TQWidget *parentWidget, const char *widgetName, TDEActionCollection * ac = actionCollection(); // Page Traversal actions - m_gotoPage = KStdAction::gotoPage( this, TQT_SLOT( slotGoToPage() ), ac, "goto_page" ); + m_gotoPage = KStdAction::gotoPage( this, TQ_SLOT( slotGoToPage() ), ac, "goto_page" ); m_gotoPage->setShortcut( "CTRL+G" ); // dirty way to activate gotopage when pressing miniBar's button - connect( m_miniBar, TQT_SIGNAL( gotoPage() ), m_gotoPage, TQT_SLOT( activate() ) ); + connect( m_miniBar, TQ_SIGNAL( gotoPage() ), m_gotoPage, TQ_SLOT( activate() ) ); - m_prevPage = KStdAction::prior(this, TQT_SLOT(slotPreviousPage()), ac, "previous_page"); + m_prevPage = KStdAction::prior(this, TQ_SLOT(slotPreviousPage()), ac, "previous_page"); m_prevPage->setWhatsThis( i18n( "Moves to the previous page of the document" ) ); m_prevPage->setShortcut( 0 ); // dirty way to activate prev page when pressing miniBar's button - connect( m_miniBar, TQT_SIGNAL( prevPage() ), m_prevPage, TQT_SLOT( activate() ) ); + connect( m_miniBar, TQ_SIGNAL( prevPage() ), m_prevPage, TQ_SLOT( activate() ) ); - m_nextPage = KStdAction::next(this, TQT_SLOT(slotNextPage()), ac, "next_page" ); + m_nextPage = KStdAction::next(this, TQ_SLOT(slotNextPage()), ac, "next_page" ); m_nextPage->setWhatsThis( i18n( "Moves to the next page of the document" ) ); m_nextPage->setShortcut( 0 ); // dirty way to activate next page when pressing miniBar's button - connect( m_miniBar, TQT_SIGNAL( nextPage() ), m_nextPage, TQT_SLOT( activate() ) ); + connect( m_miniBar, TQ_SIGNAL( nextPage() ), m_nextPage, TQ_SLOT( activate() ) ); - m_firstPage = KStdAction::firstPage( this, TQT_SLOT( slotGotoFirst() ), ac, "first_page" ); + m_firstPage = KStdAction::firstPage( this, TQ_SLOT( slotGotoFirst() ), ac, "first_page" ); m_firstPage->setWhatsThis( i18n( "Moves to the first page of the document" ) ); - m_lastPage = KStdAction::lastPage( this, TQT_SLOT( slotGotoLast() ), ac, "last_page" ); + m_lastPage = KStdAction::lastPage( this, TQ_SLOT( slotGotoLast() ), ac, "last_page" ); m_lastPage->setWhatsThis( i18n( "Moves to the last page of the document" ) ); - m_historyBack = KStdAction::back( this, TQT_SLOT( slotHistoryBack() ), ac, "history_back" ); + m_historyBack = KStdAction::back( this, TQ_SLOT( slotHistoryBack() ), ac, "history_back" ); m_historyBack->setWhatsThis( i18n( "Go to the place you were before" ) ); - m_historyNext = KStdAction::forward( this, TQT_SLOT( slotHistoryNext() ), ac, "history_forward" ); + m_historyNext = KStdAction::forward( this, TQ_SLOT( slotHistoryNext() ), ac, "history_forward" ); m_historyNext->setWhatsThis( i18n( "Go to the place you were after" ) ); // Find and other actions - m_find = KStdAction::find( this, TQT_SLOT( slotFind() ), ac, "find" ); + m_find = KStdAction::find( this, TQ_SLOT( slotFind() ), ac, "find" ); m_find->setEnabled( false ); - m_findNext = KStdAction::findNext( this, TQT_SLOT( slotFindNext() ), ac, "find_next" ); + m_findNext = KStdAction::findNext( this, TQ_SLOT( slotFindNext() ), ac, "find_next" ); m_findNext->setEnabled( false ); - m_saveAs = KStdAction::saveAs( this, TQT_SLOT( slotSaveFileAs() ), ac, "save" ); + m_saveAs = KStdAction::saveAs( this, TQ_SLOT( slotSaveFileAs() ), ac, "save" ); m_saveAs->setEnabled( false ); - TDEAction * prefs = KStdAction::preferences( this, TQT_SLOT( slotPreferences() ), ac, "preferences" ); + TDEAction * prefs = KStdAction::preferences( this, TQ_SLOT( slotPreferences() ), ac, "preferences" ); prefs->setText( i18n( "Configure KPDF..." ) ); - m_printPreview = KStdAction::printPreview( this, TQT_SLOT( slotPrintPreview() ), ac ); + m_printPreview = KStdAction::printPreview( this, TQ_SLOT( slotPrintPreview() ), ac ); m_printPreview->setEnabled( false ); - m_showProperties = new TDEAction(i18n("&Properties"), "application-vnd.tde.info", 0, this, TQT_SLOT(slotShowProperties()), ac, "properties"); + m_showProperties = new TDEAction(i18n("&Properties"), "application-vnd.tde.info", 0, this, TQ_SLOT(slotShowProperties()), ac, "properties"); m_showProperties->setEnabled( false ); - m_showPresentation = new TDEAction( i18n("P&resentation"), "application-x-kpresenter", "Ctrl+Shift+P", this, TQT_SLOT(slotShowPresentation()), ac, "presentation"); + m_showPresentation = new TDEAction( i18n("P&resentation"), "application-x-kpresenter", "Ctrl+Shift+P", this, TQ_SLOT(slotShowPresentation()), ac, "presentation"); m_showPresentation->setEnabled( false ); // attach the actions of the children widgets too @@ -313,11 +313,11 @@ Part::Part(TQWidget *parentWidget, const char *widgetName, // by connecting to TQt4::TQSplitter's sliderMoved()) m_pageView->installEventFilter( this ); m_watcher = new KDirWatch( this ); - connect( m_watcher, TQT_SIGNAL( dirty( const TQString& ) ), this, TQT_SLOT( slotFileDirty( const TQString& ) ) ); + connect( m_watcher, TQ_SIGNAL( dirty( const TQString& ) ), this, TQ_SLOT( slotFileDirty( const TQString& ) ) ); m_dirtyHandler = new TQTimer( this ); - connect( m_dirtyHandler, TQT_SIGNAL( timeout() ),this, TQT_SLOT( slotDoFileDirty() ) ); + connect( m_dirtyHandler, TQ_SIGNAL( timeout() ),this, TQ_SLOT( slotDoFileDirty() ) ); m_saveSplitterSizeTimer = new TQTimer( this ); - connect( m_saveSplitterSizeTimer, TQT_SIGNAL( timeout() ),this, TQT_SLOT( saveSplitterSize() ) ); + connect( m_saveSplitterSizeTimer, TQ_SIGNAL( timeout() ),this, TQ_SLOT( saveSplitterSize() ) ); slotNewConfig(); @@ -432,7 +432,7 @@ bool Part::openFile() *p << app; *p << m_file << m_temporaryLocalFile; m_pageView->showText(i18n("Converting from ps to pdf..."), 0); - connect(p, TQT_SIGNAL(processExited(TDEProcess *)), this, TQT_SLOT(psTransformEnded())); + connect(p, TQ_SIGNAL(processExited(TDEProcess *)), this, TQ_SLOT(psTransformEnded())); p -> start(); return true; } @@ -527,7 +527,7 @@ void Part::setMimeTypes(TDEIO::Job *job) if (job) { job->addMetaData("accept", "application/pdf, */*;q=0.5"); - connect(job, TQT_SIGNAL(mimetype(TDEIO::Job*,const TQString&)), this, TQT_SLOT(readMimeType(TDEIO::Job*,const TQString&))); + connect(job, TQ_SIGNAL(mimetype(TDEIO::Job*,const TQString&)), this, TQ_SLOT(readMimeType(TDEIO::Job*,const TQString&))); } } @@ -571,7 +571,7 @@ bool Part::closeURL() bool Part::eventFilter( TQObject * watched, TQEvent * e ) { // if pageView has been resized, save splitter sizes - if ( TQT_BASE_OBJECT(watched) == TQT_BASE_OBJECT(m_pageView) && e->type() == TQEvent::Resize ) + if ( watched == m_pageView && e->type() == TQEvent::Resize ) m_saveSplitterSizeTimer->start(500, true); // only intercept events, don't block them @@ -830,7 +830,7 @@ void Part::slotPreferences() // we didn't find an instance of this dialog, so lets create it PreferencesDialog * dialog = new PreferencesDialog( m_pageView, KpdfSettings::self() ); // keep us informed when the user changes settings - connect( dialog, TQT_SIGNAL( settingsChanged() ), this, TQT_SLOT( slotNewConfig() ) ); + connect( dialog, TQ_SIGNAL( settingsChanged() ), this, TQ_SLOT( slotNewConfig() ) ); dialog->show(); } diff --git a/kpdf/part.h b/kpdf/part.h index afa39250..aa3b6659 100644 --- a/kpdf/part.h +++ b/kpdf/part.h @@ -58,7 +58,7 @@ class BrowserExtension; */ class Part : public KParts::ReadOnlyPart, public DocumentObserver, virtual public kpdf_dcop { -Q_OBJECT +TQ_OBJECT public: @@ -196,7 +196,7 @@ private: class BrowserExtension : public KParts::BrowserExtension { -Q_OBJECT +TQ_OBJECT public: diff --git a/kpdf/shell/shell.cpp b/kpdf/shell/shell.cpp index 209f8760..a0fdefdc 100644 --- a/kpdf/shell/shell.cpp +++ b/kpdf/shell/shell.cpp @@ -66,7 +66,7 @@ void Shell::init() { // now that the Part is loaded, we cast it to a Part to get // our hands on it - m_part = (KParts::ReadOnlyPart*) factory->createPart(this, "kpdf_part", TQT_TQOBJECT(this), 0, "KParts::ReadOnlyPart"); + m_part = (KParts::ReadOnlyPart*) factory->createPart(this, "kpdf_part", this, 0, "KParts::ReadOnlyPart"); if (m_part) { // then, setup our actions @@ -87,9 +87,9 @@ void Shell::init() m_part = 0; return; } - connect( this, TQT_SIGNAL( restoreDocument(TDEConfig*) ),m_part, TQT_SLOT( restoreDocument(TDEConfig*))); - connect( this, TQT_SIGNAL( saveDocumentRestoreInfo(TDEConfig*) ), m_part, TQT_SLOT( saveDocumentRestoreInfo(TDEConfig*))); - connect( m_part, TQT_SIGNAL( enablePrintAction(bool) ), m_printAction, TQT_SLOT( setEnabled(bool))); + connect( this, TQ_SIGNAL( restoreDocument(TDEConfig*) ),m_part, TQ_SLOT( restoreDocument(TDEConfig*))); + connect( this, TQ_SIGNAL( saveDocumentRestoreInfo(TDEConfig*) ), m_part, TQ_SLOT( saveDocumentRestoreInfo(TDEConfig*))); + connect( m_part, TQ_SIGNAL( enablePrintAction(bool) ), m_printAction, TQ_SLOT( setEnabled(bool))); readSettings(); if (!TDEGlobal::config()->hasGroup("MainWindow")) @@ -99,7 +99,7 @@ void Shell::init() } setAutoSaveSettings(); - if (m_openUrl.isValid()) TQTimer::singleShot(0, this, TQT_SLOT(delayedOpen())); + if (m_openUrl.isValid()) TQTimer::singleShot(0, this, TQ_SLOT(delayedOpen())); } void Shell::delayedOpen() @@ -146,19 +146,19 @@ void Shell::writeSettings() void Shell::setupActions() { - TDEAction * openAction = KStdAction::open(TQT_TQOBJECT(this), TQT_SLOT(fileOpen()), actionCollection()); - m_recent = KStdAction::openRecent( TQT_TQOBJECT(this), TQT_SLOT( openURL( const KURL& ) ), actionCollection() ); - connect( m_recent, TQT_SIGNAL( activated() ), openAction, TQT_SLOT( activate() ) ); + TDEAction * openAction = KStdAction::open(this, TQ_SLOT(fileOpen()), actionCollection()); + m_recent = KStdAction::openRecent( this, TQ_SLOT( openURL( const KURL& ) ), actionCollection() ); + connect( m_recent, TQ_SIGNAL( activated() ), openAction, TQ_SLOT( activate() ) ); m_recent->setWhatsThis( i18n( "<b>Click</b> to open a file or <b>Click and hold</b> to select a recent file" ) ); - m_printAction = KStdAction::print( m_part, TQT_SLOT( slotPrint() ), actionCollection() ); + m_printAction = KStdAction::print( m_part, TQ_SLOT( slotPrint() ), actionCollection() ); m_printAction->setEnabled( false ); - KStdAction::quit(TQT_TQOBJECT(this), TQT_SLOT(slotQuit()), actionCollection()); + KStdAction::quit(this, TQ_SLOT(slotQuit()), actionCollection()); setStandardToolBarMenuEnabled(true); - m_showMenuBarAction = KStdAction::showMenubar( TQT_TQOBJECT(this), TQT_SLOT( slotShowMenubar() ), actionCollection()); - KStdAction::configureToolbars(TQT_TQOBJECT(this), TQT_SLOT(optionsConfigureToolbars()), actionCollection()); - m_fullScreenAction = KStdAction::fullScreen( TQT_TQOBJECT(this), TQT_SLOT( slotUpdateFullScreen() ), actionCollection(), this ); + m_showMenuBarAction = KStdAction::showMenubar( this, TQ_SLOT( slotShowMenubar() ), actionCollection()); + KStdAction::configureToolbars(this, TQ_SLOT(optionsConfigureToolbars()), actionCollection()); + m_fullScreenAction = KStdAction::fullScreen( this, TQ_SLOT( slotUpdateFullScreen() ), actionCollection(), this ); } void Shell::saveProperties(TDEConfig* config) @@ -197,7 +197,7 @@ Shell::fileOpen() Shell::optionsConfigureToolbars() { KEditToolbar dlg(factory()); - connect(&dlg, TQT_SIGNAL(newToolbarConfig()), this, TQT_SLOT(applyNewToolbarConfig())); + connect(&dlg, TQ_SIGNAL(newToolbarConfig()), this, TQ_SLOT(applyNewToolbarConfig())); dlg.exec(); } diff --git a/kpdf/shell/shell.h b/kpdf/shell/shell.h index 6c2e4057..0784516f 100644 --- a/kpdf/shell/shell.h +++ b/kpdf/shell/shell.h @@ -35,7 +35,7 @@ namespace KPDF */ class Shell : public KParts::MainWindow { - Q_OBJECT + TQ_OBJECT public: diff --git a/kpdf/ui/minibar.cpp b/kpdf/ui/minibar.cpp index eaceeed2..f05b8931 100644 --- a/kpdf/ui/minibar.cpp +++ b/kpdf/ui/minibar.cpp @@ -121,10 +121,10 @@ MiniBar::MiniBar( TQWidget * parent, KPDFDocument * document ) setFrameStyle( TQFrame::StyledPanel | TQFrame::Sunken ); // connect signals from child widgets to internal handlers / signals bouncers - connect( m_pagesEdit, TQT_SIGNAL( returnPressed() ), this, TQT_SLOT( slotChangePage() ) ); - connect( m_pagesButton, TQT_SIGNAL( clicked() ), this, TQT_SIGNAL( gotoPage() ) ); - connect( m_prevButton, TQT_SIGNAL( clicked() ), this, TQT_SIGNAL( prevPage() ) ); - connect( m_nextButton, TQT_SIGNAL( clicked() ), this, TQT_SIGNAL( nextPage() ) ); + connect( m_pagesEdit, TQ_SIGNAL( returnPressed() ), this, TQ_SLOT( slotChangePage() ) ); + connect( m_pagesButton, TQ_SIGNAL( clicked() ), this, TQ_SIGNAL( gotoPage() ) ); + connect( m_prevButton, TQ_SIGNAL( clicked() ), this, TQ_SIGNAL( prevPage() ) ); + connect( m_nextButton, TQ_SIGNAL( clicked() ), this, TQ_SIGNAL( nextPage() ) ); // widget starts hidden (will be shown after opening a document) parent->hide(); @@ -146,7 +146,7 @@ void MiniBar::notifySetup( const TQValueVector< KPDFPage * > & pageVector, bool if ( pages < 1 ) { m_currentPage = -1; - TQT_TQWIDGET( parent() )->hide(); + static_cast<TQWidget*>( parent() )->hide(); return; } @@ -171,7 +171,7 @@ void MiniBar::notifySetup( const TQValueVector< KPDFPage * > & pageVector, bool m_pagesButton->setText( TQString::number( pages ) ); m_prevButton->setEnabled( false ); m_nextButton->setEnabled( false ); - TQT_TQWIDGET( parent() )->show(); + static_cast<TQWidget*>( parent() )->show(); } void MiniBar::notifyViewportChanged( bool /*smoothMove*/ ) @@ -275,13 +275,13 @@ void ProgressWidget::setProgress( float percentage ) void ProgressWidget::mouseMoveEvent( TQMouseEvent * e ) { - if ( e->state() == Qt::LeftButton && width() > 0 ) + if ( e->state() == TQt::LeftButton && width() > 0 ) m_miniBar->slotGotoNormalizedPage( (float)( TQApplication::reverseLayout() ? width() - e->x() : e->x() ) / (float)width() ); } void ProgressWidget::mousePressEvent( TQMouseEvent * e ) { - if ( e->button() == Qt::LeftButton && width() > 0 ) + if ( e->button() == TQt::LeftButton && width() > 0 ) m_miniBar->slotGotoNormalizedPage( (float)( TQApplication::reverseLayout() ? width() - e->x() : e->x() ) / (float)width() ); } @@ -333,7 +333,7 @@ PagesEdit::PagesEdit( MiniBar * parent ) focusOutEvent( 0 ); // use an integer validator - m_validator = new TQIntValidator( 1, 1, TQT_TQOBJECT(this) ); + m_validator = new TQIntValidator( 1, 1, this ); setValidator( m_validator ); // customize text properties diff --git a/kpdf/ui/minibar.h b/kpdf/ui/minibar.h index 2d4ee4bb..29c117d5 100644 --- a/kpdf/ui/minibar.h +++ b/kpdf/ui/minibar.h @@ -24,7 +24,7 @@ class ProgressWidget; */ class MiniBar : public TQFrame, public DocumentObserver { - Q_OBJECT + TQ_OBJECT public: MiniBar( TQWidget *parent, KPDFDocument * document ); diff --git a/kpdf/ui/pageview.cpp b/kpdf/ui/pageview.cpp index 97302be4..57f201a0 100644 --- a/kpdf/ui/pageview.cpp +++ b/kpdf/ui/pageview.cpp @@ -207,7 +207,7 @@ PageView::PageView( TQWidget *parent, KPDFDocument *document ) // widget setup: setup focus, accept drops and track mouse viewport()->setFocusProxy( this ); - viewport()->setFocusPolicy( TQ_StrongFocus ); + viewport()->setFocusPolicy( TQWidget::StrongFocus ); //viewport()->setPaletteBackgroundColor( TQt::white ); viewport()->setBackgroundMode( TQt::NoBackground ); setResizePolicy( Manual ); @@ -216,8 +216,8 @@ PageView::PageView( TQWidget *parent, KPDFDocument *document ) viewport()->setMouseTracking( true ); // conntect the padding of the viewport to pixmaps requests - connect( this, TQT_SIGNAL(contentsMoving(int, int)), this, TQT_SLOT(slotRequestVisiblePixmaps(int, int)) ); - connect( &d->dragScrollTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotDragScroll()) ); + connect( this, TQ_SIGNAL(contentsMoving(int, int)), this, TQ_SLOT(slotRequestVisiblePixmaps(int, int)) ); + connect( &d->dragScrollTimer, TQ_SIGNAL(timeout()), this, TQ_SLOT(slotDragScroll()) ); // set a corner button to resize the view to the page size // TQPushButton * resizeButton = new TQPushButton( viewport() ); @@ -228,7 +228,7 @@ PageView::PageView( TQWidget *parent, KPDFDocument *document ) setInputMethodEnabled( true ); // schedule the welcome message - TQTimer::singleShot( 0, this, TQT_SLOT( slotShowWelcome() ) ); + TQTimer::singleShot( 0, this, TQ_SLOT( slotShowWelcome() ) ); } PageView::~PageView() @@ -246,68 +246,68 @@ PageView::~PageView() void PageView::setupActions( TDEActionCollection * ac ) { // Zoom actions ( higher scales takes lots of memory! ) - d->aZoom = new TDESelectAction( i18n( "Zoom" ), "viewmag", 0, TQT_TQOBJECT(this), TQT_SLOT( slotZoom() ), ac, "zoom_to" ); + d->aZoom = new TDESelectAction( i18n( "Zoom" ), "viewmag", 0, this, TQ_SLOT( slotZoom() ), ac, "zoom_to" ); d->aZoom->setEditable( true ); #if KDE_IS_VERSION(3,4,89) d->aZoom->setMaxComboViewCount( 13 ); #endif updateZoomText(); - KStdAction::zoomIn( TQT_TQOBJECT(this), TQT_SLOT( slotZoomIn() ), ac, "zoom_in" ); + KStdAction::zoomIn( this, TQ_SLOT( slotZoomIn() ), ac, "zoom_in" ); - KStdAction::zoomOut( TQT_TQOBJECT(this), TQT_SLOT( slotZoomOut() ), ac, "zoom_out" ); + KStdAction::zoomOut( this, TQ_SLOT( slotZoomOut() ), ac, "zoom_out" ); d->aZoomFitWidth = new TDEToggleAction( i18n("Fit to Page &Width"), "view_fit_width", 0, ac, "zoom_fit_width" ); - connect( d->aZoomFitWidth, TQT_SIGNAL( toggled( bool ) ), TQT_SLOT( slotFitToWidthToggled( bool ) ) ); + connect( d->aZoomFitWidth, TQ_SIGNAL( toggled( bool ) ), TQ_SLOT( slotFitToWidthToggled( bool ) ) ); d->aZoomFitPage = new TDEToggleAction( i18n("Fit to &Page"), "view_fit_window", 0, ac, "zoom_fit_page" ); - connect( d->aZoomFitPage, TQT_SIGNAL( toggled( bool ) ), TQT_SLOT( slotFitToPageToggled( bool ) ) ); + connect( d->aZoomFitPage, TQ_SIGNAL( toggled( bool ) ), TQ_SLOT( slotFitToPageToggled( bool ) ) ); d->aZoomFitText = new TDEToggleAction( i18n("Fit to &Text"), "zoom-fit-best", 0, ac, "zoom_fit_text" ); - connect( d->aZoomFitText, TQT_SIGNAL( toggled( bool ) ), TQT_SLOT( slotFitToTextToggled( bool ) ) ); + connect( d->aZoomFitText, TQ_SIGNAL( toggled( bool ) ), TQ_SLOT( slotFitToTextToggled( bool ) ) ); // rotate actions TDEAction *action; action = new TDEAction( i18n("Rotate Right"), "object-rotate-right", TDEShortcut( "Ctrl+Shift++" ), - TQT_TQOBJECT(this), TQT_SLOT( slotRotateRight() ), ac, "rotate_right" ); + this, TQ_SLOT( slotRotateRight() ), ac, "rotate_right" ); action = new TDEAction( i18n("Rotate Left"), "object-rotate-left", TDEShortcut( "Ctrl+Shift+-" ), - TQT_TQOBJECT(this), TQT_SLOT( slotRotateLeft() ), ac, "rotate_left" ); + this, TQ_SLOT( slotRotateLeft() ), ac, "rotate_left" ); // View-Layout actions d->aViewTwoPages = new TDEToggleAction( i18n("&Two Pages"), "view_left_right", 0, ac, "view_twopages" ); - connect( d->aViewTwoPages, TQT_SIGNAL( toggled( bool ) ), TQT_SLOT( slotTwoPagesToggled( bool ) ) ); + connect( d->aViewTwoPages, TQ_SIGNAL( toggled( bool ) ), TQ_SLOT( slotTwoPagesToggled( bool ) ) ); d->aViewTwoPages->setChecked( KpdfSettings::viewColumns() > 1 ); d->aViewContinuous = new TDEToggleAction( i18n("&Continuous"), "view_text", 0, ac, "view_continuous" ); - connect( d->aViewContinuous, TQT_SIGNAL( toggled( bool ) ), TQT_SLOT( slotContinuousToggled( bool ) ) ); + connect( d->aViewContinuous, TQ_SIGNAL( toggled( bool ) ), TQ_SLOT( slotContinuousToggled( bool ) ) ); d->aViewContinuous->setChecked( KpdfSettings::viewContinuous() ); d->aViewCoverPage = new TDEToggleAction( i18n("Co&ver Page"), "contents2", 0, ac, "view_coverpage" ); - connect( d->aViewCoverPage, TQT_SIGNAL( toggled( bool ) ), TQT_SLOT( slotCoverPageToggled( bool ) ) ); + connect( d->aViewCoverPage, TQ_SIGNAL( toggled( bool ) ), TQ_SLOT( slotCoverPageToggled( bool ) ) ); d->aViewCoverPage->setChecked( KpdfSettings::viewCoverPage() ); d->aViewCoverPage->setEnabled( KpdfSettings::viewColumns() > 1 ); // Mouse-Mode actions - d->aMouseNormal = new TDERadioAction( i18n("&Browse Tool"), "input-mouse", 0, TQT_TQOBJECT(this), TQT_SLOT( slotSetMouseNormal() ), ac, "mouse_drag" ); + d->aMouseNormal = new TDERadioAction( i18n("&Browse Tool"), "input-mouse", 0, this, TQ_SLOT( slotSetMouseNormal() ), ac, "mouse_drag" ); d->aMouseNormal->setExclusiveGroup( "MouseType" ); d->aMouseNormal->setChecked( true ); - TDEToggleAction * mz = new TDERadioAction( i18n("&Zoom Tool"), "viewmag", 0, TQT_TQOBJECT(this), TQT_SLOT( slotSetMouseZoom() ), ac, "mouse_zoom" ); + TDEToggleAction * mz = new TDERadioAction( i18n("&Zoom Tool"), "viewmag", 0, this, TQ_SLOT( slotSetMouseZoom() ), ac, "mouse_zoom" ); mz->setExclusiveGroup( "MouseType" ); - d->aMouseSelect = new TDERadioAction( i18n("&Select Tool"), "frame_edit", 0, TQT_TQOBJECT(this), TQT_SLOT( slotSetMouseSelect() ), ac, "mouse_select" ); + d->aMouseSelect = new TDERadioAction( i18n("&Select Tool"), "frame_edit", 0, this, TQ_SLOT( slotSetMouseSelect() ), ac, "mouse_select" ); d->aMouseSelect->setExclusiveGroup( "MouseType" ); -/* d->aMouseEdit = new TDERadioAction( i18n("Draw"), "edit", 0, TQT_TQOBJECT(this), TQT_SLOT( slotSetMouseDraw() ), ac, "mouse_draw" ); +/* d->aMouseEdit = new TDERadioAction( i18n("Draw"), "edit", 0, this, TQ_SLOT( slotSetMouseDraw() ), ac, "mouse_draw" ); d->aMouseEdit->setExclusiveGroup("MouseType"); d->aMouseEdit->setEnabled( false ); // implement feature before removing this line*/ // Other actions - TDEAction * su = new TDEAction( i18n("Scroll Up"), 0, TQT_TQOBJECT(this), TQT_SLOT( slotScrollUp() ), ac, "view_scroll_up" ); + TDEAction * su = new TDEAction( i18n("Scroll Up"), 0, this, TQ_SLOT( slotScrollUp() ), ac, "view_scroll_up" ); su->setShortcut( "Shift+Up" ); - TDEAction * sd = new TDEAction( i18n("Scroll Down"), 0, TQT_TQOBJECT(this), TQT_SLOT( slotScrollDown() ), ac, "view_scroll_down" ); + TDEAction * sd = new TDEAction( i18n("Scroll Down"), 0, this, TQ_SLOT( slotScrollDown() ), ac, "view_scroll_down" ); sd->setShortcut( "Shift+Down" ); } @@ -354,7 +354,7 @@ void PageView::notifySetup( const TQValueVector< KPDFPage * > & pageSet, bool do // Need slotRelayoutPages() here instead of d->dirtyLayout = true // because opening a pdf from another pdf will not trigger a viewportchange // so pages are never relayouted - TQTimer::singleShot(0, this, TQT_SLOT(slotRelayoutPages())); + TQTimer::singleShot(0, this, TQ_SLOT(slotRelayoutPages())); else { // update the mouse cursor when closing because we may have close through a link and @@ -437,8 +437,8 @@ void PageView::notifyViewportChanged( bool smoothMove ) if ( !d->viewportMoveTimer ) { d->viewportMoveTimer = new TQTimer( this ); - connect( d->viewportMoveTimer, TQT_SIGNAL( timeout() ), - this, TQT_SLOT( slotMoveViewport() ) ); + connect( d->viewportMoveTimer, TQ_SIGNAL( timeout() ), + this, TQ_SLOT( slotMoveViewport() ) ); } d->viewportMoveTimer->start( 25 ); verticalScrollBar()->setEnabled( false ); @@ -643,7 +643,7 @@ void PageView::viewportResizeEvent( TQResizeEvent * ) if ( !d->delayResizeTimer ) { d->delayResizeTimer = new TQTimer( this ); - connect( d->delayResizeTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( slotRelayoutPages() ) ); + connect( d->delayResizeTimer, TQ_SIGNAL( timeout() ), this, TQ_SLOT( slotRelayoutPages() ) ); } d->delayResizeTimer->start( 333, true ); } @@ -725,7 +725,7 @@ void PageView::keyPressEvent( TQKeyEvent * e ) { // create the timer on demand d->findTimeoutTimer = new TQTimer( this ); - connect( d->findTimeoutTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( findAheadStop() ) ); + connect( d->findTimeoutTimer, TQ_SIGNAL( timeout() ), this, TQ_SLOT( findAheadStop() ) ); } d->findTimeoutTimer->start( 3000, true ); // it is needed to grab the keyboard becase people may have Space assigned to a @@ -846,7 +846,7 @@ void PageView::contentsMouseMoveEvent( TQMouseEvent * e ) return; // if holding mouse mid button, perform zoom - if ( (e->state() & Qt::MidButton) && d->mouseMidStartY >= 0 ) + if ( (e->state() & TQt::MidButton) && d->mouseMidStartY >= 0 ) { int deltaY = d->mouseMidStartY - e->globalPos().y(); d->mouseMidStartY = e->globalPos().y(); @@ -857,8 +857,8 @@ void PageView::contentsMouseMoveEvent( TQMouseEvent * e ) return; } - bool leftButton = e->state() & Qt::LeftButton, - rightButton = e->state() & Qt::RightButton; + bool leftButton = e->state() & TQt::LeftButton, + rightButton = e->state() & TQt::RightButton; switch ( d->mouseMode ) { case MouseNormal: @@ -926,7 +926,7 @@ void PageView::contentsMousePressEvent( TQMouseEvent * e ) } // if pressing mid mouse button while not doing other things, begin 'comtinous zoom' mode - if ( e->button() & Qt::MidButton ) + if ( e->button() & TQt::MidButton ) { d->mouseMidStartY = e->globalPos().y(); setCursor( KCursor::sizeVerCursor() ); @@ -937,8 +937,8 @@ void PageView::contentsMousePressEvent( TQMouseEvent * e ) d->mousePressPos = e->globalPos(); // handle mode dependant mouse press actions - bool leftButton = e->button() & Qt::LeftButton, - rightButton = e->button() & Qt::RightButton; + bool leftButton = e->button() & TQt::LeftButton, + rightButton = e->button() & TQt::RightButton; switch ( d->mouseMode ) { case MouseNormal: // drag start / click / link following @@ -979,7 +979,7 @@ void PageView::contentsMouseReleaseEvent( TQMouseEvent * e ) if ( d->items.isEmpty() ) { // ..except for right Clicks (emitted even it viewport is empty) - if ( e->button() == Qt::RightButton ) + if ( e->button() == TQt::RightButton ) emit rightClick( 0, e->globalPos() ); return; } @@ -989,7 +989,7 @@ void PageView::contentsMouseReleaseEvent( TQMouseEvent * e ) return; // handle mode indepent mid buttom zoom - bool midButton = e->button() & Qt::MidButton; + bool midButton = e->button() & TQt::MidButton; if ( midButton && d->mouseMidStartY > 0 ) { d->mouseMidStartY = -1; @@ -998,8 +998,8 @@ void PageView::contentsMouseReleaseEvent( TQMouseEvent * e ) return; } - bool leftButton = e->button() & Qt::LeftButton, - rightButton = e->button() & Qt::RightButton; + bool leftButton = e->button() & TQt::LeftButton, + rightButton = e->button() & TQt::RightButton; switch ( d->mouseMode ) { case MouseNormal:{ @@ -2004,7 +2004,7 @@ void PageView::slotAutoScoll() if ( !d->autoScrollTimer ) { d->autoScrollTimer = new TQTimer( this ); - connect( d->autoScrollTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( slotAutoScoll() ) ); + connect( d->autoScrollTimer, TQ_SIGNAL( timeout() ), this, TQ_SLOT( slotAutoScoll() ) ); } // if scrollIncrement is zero, stop the timer diff --git a/kpdf/ui/pageview.h b/kpdf/ui/pageview.h index 267c58f5..4072713d 100644 --- a/kpdf/ui/pageview.h +++ b/kpdf/ui/pageview.h @@ -38,7 +38,7 @@ class PageViewTip; */ class PageView : public TQScrollView, public DocumentObserver { - Q_OBJECT + TQ_OBJECT friend class PageViewTip; diff --git a/kpdf/ui/pageviewutils.cpp b/kpdf/ui/pageviewutils.cpp index 91a9de8d..90d90472 100644 --- a/kpdf/ui/pageviewutils.cpp +++ b/kpdf/ui/pageviewutils.cpp @@ -24,7 +24,7 @@ PageViewMessage::PageViewMessage( TQWidget * parent ) : TQWidget( parent, "pageViewMessage" ), m_timer( 0 ) { - setFocusPolicy( TQ_NoFocus ); + setFocusPolicy( TQWidget::NoFocus ); setBackgroundMode( NoBackground ); setPaletteBackgroundColor(kapp->palette().color(TQPalette::Active, TQColorGroup::Background)); // if the layout is LtR, we can safely place it in the right position @@ -131,7 +131,7 @@ void PageViewMessage::display( const TQString & message, Icon icon, int duration if ( !m_timer ) { m_timer = new TQTimer( this ); - connect( m_timer, TQT_SIGNAL( timeout() ), TQT_SLOT( hide() ) ); + connect( m_timer, TQ_SIGNAL( timeout() ), TQ_SLOT( hide() ) ); } m_timer->start( durationMs, true ); } else if ( m_timer ) diff --git a/kpdf/ui/presentationwidget.cpp b/kpdf/ui/presentationwidget.cpp index 6dfd2a9d..65645400 100644 --- a/kpdf/ui/presentationwidget.cpp +++ b/kpdf/ui/presentationwidget.cpp @@ -61,7 +61,7 @@ PresentationWidget::PresentationWidget( TQWidget * parent, KPDFDocument * doc ) m_width = -1; - m_accel = new TDEAccel( this, TQT_TQOBJECT(this), "presentationmode-accel" ); + m_accel = new TDEAccel( this, this, "presentationmode-accel" ); // show widget and take control showFullScreen(); @@ -69,11 +69,11 @@ PresentationWidget::PresentationWidget( TQWidget * parent, KPDFDocument * doc ) // misc stuff setMouseTracking( true ); m_transitionTimer = new TQTimer( this ); - connect( m_transitionTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( slotTransitionStep() ) ); + connect( m_transitionTimer, TQ_SIGNAL( timeout() ), this, TQ_SLOT( slotTransitionStep() ) ); m_overlayHideTimer = new TQTimer( this ); - connect( m_overlayHideTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( slotHideOverlay() ) ); + connect( m_overlayHideTimer, TQ_SIGNAL( timeout() ), this, TQ_SLOT( slotHideOverlay() ) ); m_nextPageTimer = new TQTimer( this ); - connect( m_nextPageTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( slotNextPage() ) ); + connect( m_nextPageTimer, TQ_SIGNAL( timeout() ), this, TQ_SLOT( slotNextPage() ) ); // handle cursor appearance as specified in configuration if ( KpdfSettings::slidesCursor() == KpdfSettings::EnumSlidesCursor::HiddenDelay ) @@ -100,11 +100,11 @@ PresentationWidget::~PresentationWidget() void PresentationWidget::setupActions( TDEActionCollection * ac ) { - m_accel->insert( "previous_page", ac->action( "previous_page" )->shortcut(), TQT_TQOBJECT(this), TQT_SLOT( slotPrevPage() ), false, true ); - m_accel->insert( "next_page", ac->action( "next_page" )->shortcut(), TQT_TQOBJECT(this), TQT_SLOT( slotNextPage() ), false, true ); - m_accel->insert( "first_page", ac->action( "first_page" )->shortcut(), TQT_TQOBJECT(this), TQT_SLOT( slotFirstPage() ), false, true ); - m_accel->insert( "last_page", ac->action( "last_page" )->shortcut(), TQT_TQOBJECT(this), TQT_SLOT( slotLastPage() ), false, true ); - m_accel->insert( "presentation", ac->action( "presentation" )->shortcut(), TQT_TQOBJECT(this), TQT_SLOT( close() ), false, true ); + m_accel->insert( "previous_page", ac->action( "previous_page" )->shortcut(), this, TQ_SLOT( slotPrevPage() ), false, true ); + m_accel->insert( "next_page", ac->action( "next_page" )->shortcut(), this, TQ_SLOT( slotNextPage() ), false, true ); + m_accel->insert( "first_page", ac->action( "first_page" )->shortcut(), this, TQ_SLOT( slotFirstPage() ), false, true ); + m_accel->insert( "last_page", ac->action( "last_page" )->shortcut(), this, TQ_SLOT( slotLastPage() ), false, true ); + m_accel->insert( "presentation", ac->action( "presentation" )->shortcut(), this, TQ_SLOT( close() ), false, true ); } void PresentationWidget::notifySetup( const TQValueVector< KPDFPage * > & pageSet, bool /*documentChanged*/ ) @@ -235,7 +235,7 @@ void PresentationWidget::wheelEvent( TQWheelEvent * e ) void PresentationWidget::mousePressEvent( TQMouseEvent * e ) { // pressing left button - if ( e->button() == Qt::LeftButton ) + if ( e->button() == TQt::LeftButton ) { // if pressing on a link, skip other checks if ( ( m_pressedLink = getLink( e->x(), e->y() ) ) ) @@ -252,14 +252,14 @@ void PresentationWidget::mousePressEvent( TQMouseEvent * e ) slotNextPage(); } // pressing right button - else if ( e->button() == Qt::RightButton ) + else if ( e->button() == TQt::RightButton ) slotPrevPage(); } void PresentationWidget::mouseReleaseEvent( TQMouseEvent * e ) { // if releasing on the same link we pressed over, execute it - if ( m_pressedLink && e->button() == Qt::LeftButton ) + if ( m_pressedLink && e->button() == TQt::LeftButton ) { const KPDFLink * link = getLink( e->x(), e->y() ); if ( link == m_pressedLink ) @@ -290,7 +290,7 @@ void PresentationWidget::mouseMoveEvent( TQMouseEvent * e ) if ( e->y() <= (geometry().top() + 1) ) m_topBar->show(); // handle "dragging the wheel" if clicking on its geometry - else if ( e->state() == Qt::LeftButton && m_overlayGeometry.contains( e->pos() ) ) + else if ( e->state() == TQt::LeftButton && m_overlayGeometry.contains( e->pos() ) ) overlayClick( e->pos() ); } } @@ -307,9 +307,9 @@ void PresentationWidget::paintEvent( TQPaintEvent * pe ) m_topBar = new TDEToolBar( this, "presentationBar" ); m_topBar->setIconSize( 32 ); m_topBar->setMovingEnabled( false ); - m_topBar->insertButton( TQApplication::reverseLayout() ? "1rightarrow" : "1leftarrow", 2, TQT_SIGNAL( clicked() ), TQT_TQOBJECT(this), TQT_SLOT( slotPrevPage() ) ); - m_topBar->insertButton( TQApplication::reverseLayout() ? "1leftarrow" : "1rightarrow", 3, TQT_SIGNAL( clicked() ), TQT_TQOBJECT(this), TQT_SLOT( slotNextPage() ) ); - m_topBar->insertButton( "system-log-out", 1, TQT_SIGNAL( clicked() ), TQT_TQOBJECT(this), TQT_SLOT( close() ) ); + m_topBar->insertButton( TQApplication::reverseLayout() ? "1rightarrow" : "1leftarrow", 2, TQ_SIGNAL( clicked() ), this, TQ_SLOT( slotPrevPage() ) ); + m_topBar->insertButton( TQApplication::reverseLayout() ? "1leftarrow" : "1rightarrow", 3, TQ_SIGNAL( clicked() ), this, TQ_SLOT( slotNextPage() ) ); + m_topBar->insertButton( "system-log-out", 1, TQ_SIGNAL( clicked() ), this, TQ_SLOT( close() ) ); m_topBar->setGeometry( 0, 0, m_width, 32 + 10 ); m_topBar->alignItemRight( 1 ); m_topBar->hide(); diff --git a/kpdf/ui/presentationwidget.h b/kpdf/ui/presentationwidget.h index 177b3da0..e38332d7 100644 --- a/kpdf/ui/presentationwidget.h +++ b/kpdf/ui/presentationwidget.h @@ -34,7 +34,7 @@ class PresentationFrame; */ class PresentationWidget : public TQDialog, public DocumentObserver { - Q_OBJECT + TQ_OBJECT public: PresentationWidget( TQWidget * parent, KPDFDocument * doc ); diff --git a/kpdf/ui/searchwidget.cpp b/kpdf/ui/searchwidget.cpp index 8fcbfe22..f7c5b719 100644 --- a/kpdf/ui/searchwidget.cpp +++ b/kpdf/ui/searchwidget.cpp @@ -40,18 +40,18 @@ SearchWidget::SearchWidget( TQWidget * parent, KPDFDocument * document ) // a timer to ensure that we don't flood the document with requests to search m_inputDelayTimer = new TQTimer(this); - connect( m_inputDelayTimer, TQT_SIGNAL( timeout() ), - this, TQT_SLOT( startSearch() ) ); + connect( m_inputDelayTimer, TQ_SIGNAL( timeout() ), + this, TQ_SLOT( startSearch() ) ); // 1. text line - insertLined( TQString(), LEDIT_ID, TQT_SIGNAL( textChanged(const TQString &) ), - TQT_TQOBJECT(this), TQT_SLOT( slotTextChanged(const TQString &) ), true, + insertLined( TQString(), LEDIT_ID, TQ_SIGNAL( textChanged(const TQString &) ), + this, TQ_SLOT( slotTextChanged(const TQString &) ), true, i18n( "Enter at least 3 letters to filter pages" ), 0/*size*/, 1 ); // 2. clear button (uses a lineEdit slot, so it must be created after) insertButton( TQApplication::reverseLayout() ? "clear_left" : "locationbar_erase", - CLEAR_ID, TQT_SIGNAL( clicked() ), - TQT_TQOBJECT(getLined( LEDIT_ID )), TQT_SLOT( clear() ), true, + CLEAR_ID, TQ_SIGNAL( clicked() ), + getLined( LEDIT_ID ), TQ_SLOT( clear() ), true, i18n( "Clear filter" ), 0/*index*/ ); // 3.1. create the popup menu for changing filtering features @@ -62,7 +62,7 @@ SearchWidget::SearchWidget( TQWidget * parent, KPDFDocument * document ) m_menu->insertItem( i18n("Match All Words"), 4 ); m_menu->insertItem( i18n("Match Any Word"), 5 ); m_menu->setItemChecked( 3, true ); - connect( m_menu, TQT_SIGNAL( activated(int) ), TQT_SLOT( slotMenuChaged(int) ) ); + connect( m_menu, TQ_SIGNAL( activated(int) ), TQ_SLOT( slotMenuChaged(int) ) ); // 3.2. create the toolbar button that spawns the popup menu insertButton( "kpdf", FIND_ID, m_menu, true, i18n( "Filter Options" ), 2/*index*/ ); diff --git a/kpdf/ui/searchwidget.h b/kpdf/ui/searchwidget.h index c84db96f..16a492de 100644 --- a/kpdf/ui/searchwidget.h +++ b/kpdf/ui/searchwidget.h @@ -29,7 +29,7 @@ class m_inputDelayTimer; */ class SearchWidget : public TDEToolBar { - Q_OBJECT + TQ_OBJECT public: SearchWidget( TQWidget *parent, KPDFDocument *document ); diff --git a/kpdf/ui/thumbnaillist.cpp b/kpdf/ui/thumbnaillist.cpp index b443daa5..7d66cfb2 100644 --- a/kpdf/ui/thumbnaillist.cpp +++ b/kpdf/ui/thumbnaillist.cpp @@ -76,7 +76,7 @@ ThumbnailList::ThumbnailList( TQWidget *parent, KPDFDocument *document ) // widget setup: can be focused by tab and mouse click (not wheel) viewport()->setFocusProxy( this ); - viewport()->setFocusPolicy( TQ_StrongFocus ); + viewport()->setFocusPolicy( TQWidget::StrongFocus ); setResizePolicy( Manual ); setAcceptDrops( true ); setDragAutoScroll( false ); @@ -85,7 +85,7 @@ ThumbnailList::ThumbnailList( TQWidget *parent, KPDFDocument *document ) viewport()->setPaletteBackgroundColor( palette().active().base() ); setFrameStyle( StyledPanel | Raised ); - connect( this, TQT_SIGNAL(contentsMoving(int, int)), this, TQT_SLOT(slotRequestVisiblePixmaps(int, int)) ); + connect( this, TQ_SIGNAL(contentsMoving(int, int)), this, TQ_SLOT(slotRequestVisiblePixmaps(int, int)) ); } ThumbnailList::~ThumbnailList() @@ -311,7 +311,7 @@ void ThumbnailList::keyPressEvent( TQKeyEvent * keyEvent ) void ThumbnailList::contentsMousePressEvent( TQMouseEvent * e ) { - if ( e->button() != Qt::LeftButton ) + if ( e->button() != TQt::LeftButton ) return; int clickY = e->y(); TQValueList<ThumbnailWidget *>::iterator vIt = m_visibleThumbnails.begin(), vEnd = m_visibleThumbnails.end(); @@ -444,7 +444,7 @@ void ThumbnailList::delayedRequestVisiblePixmaps( int delayMs ) if ( !m_delayTimer ) { m_delayTimer = new TQTimer( this ); - connect( m_delayTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( slotDelayTimeout() ) ); + connect( m_delayTimer, TQ_SIGNAL( timeout() ), this, TQ_SLOT( slotDelayTimeout() ) ); } m_delayTimer->start( delayMs, true ); } @@ -479,7 +479,7 @@ void ThumbnailWidget::setSelected( bool selected ) void ThumbnailWidget::mouseReleaseEvent( TQMouseEvent * e ) { - if ( e->button() != Qt::RightButton ) + if ( e->button() != TQt::RightButton ) return; m_tl->forwardRightClick( m_page, e->globalPos() ); @@ -563,8 +563,8 @@ ThumbnailController::ThumbnailController( TQWidget * parent, ThumbnailList * lis // insert a togglebutton [show only bookmarked pages] //insertSeparator(); - insertButton( "bookmark", FILTERB_ID, TQT_SIGNAL( toggled( bool ) ), - TQT_TQOBJECT(list), TQT_SLOT( slotFilterBookmarks( bool ) ), + insertButton( "bookmark", FILTERB_ID, TQ_SIGNAL( toggled( bool ) ), + list, TQ_SLOT( slotFilterBookmarks( bool ) ), true, i18n( "Show bookmarked pages only" ) ); setToggle( FILTERB_ID ); setButton( FILTERB_ID, KpdfSettings::filterBookmarks() ); diff --git a/kpdf/ui/thumbnaillist.h b/kpdf/ui/thumbnaillist.h index b9fc06ae..b08a98f8 100644 --- a/kpdf/ui/thumbnaillist.h +++ b/kpdf/ui/thumbnaillist.h @@ -29,7 +29,7 @@ class ThumbnailWidget; */ class ThumbnailList : public TQScrollView, public DocumentObserver { -Q_OBJECT +TQ_OBJECT public: ThumbnailList(TQWidget *parent, KPDFDocument *document); diff --git a/kpdf/ui/toc.cpp b/kpdf/ui/toc.cpp index 00ac8eaf..e71f8746 100644 --- a/kpdf/ui/toc.cpp +++ b/kpdf/ui/toc.cpp @@ -67,8 +67,8 @@ TOC::TOC(TQWidget *parent, KPDFDocument *document) : TDEListView(parent), m_docu // the next line causes bug:147233 // setResizeMode(AllColumns); setAllColumnsShowFocus(true); - connect(this, TQT_SIGNAL(clicked(TQListViewItem *)), this, TQT_SLOT(slotExecuted(TQListViewItem *))); - connect(this, TQT_SIGNAL(returnPressed(TQListViewItem *)), this, TQT_SLOT(slotExecuted(TQListViewItem *))); + connect(this, TQ_SIGNAL(clicked(TQListViewItem *)), this, TQ_SLOT(slotExecuted(TQListViewItem *))); + connect(this, TQ_SIGNAL(returnPressed(TQListViewItem *)), this, TQ_SLOT(slotExecuted(TQListViewItem *))); } TOC::~TOC() diff --git a/kpdf/ui/toc.h b/kpdf/ui/toc.h index 3de43502..9ed1d55c 100644 --- a/kpdf/ui/toc.h +++ b/kpdf/ui/toc.h @@ -19,7 +19,7 @@ class KPDFDocument; class TOC : public TDEListView, public DocumentObserver { -Q_OBJECT +TQ_OBJECT public: TOC(TQWidget *parent, KPDFDocument *document); diff --git a/kpdf/xpdf/ConfigureChecks.cmake b/kpdf/xpdf/ConfigureChecks.cmake index 6c4b5614..b15a82ef 100644 --- a/kpdf/xpdf/ConfigureChecks.cmake +++ b/kpdf/xpdf/ConfigureChecks.cmake @@ -21,20 +21,6 @@ if( NOT JPEG_FOUND ) endif( ) -# check for t1lib -if( WITH_T1LIB ) - check_include_file( t1lib.h HAVE_T1LIB_H ) - if( HAVE_T1LIB_H ) - check_library_exists( t1 T1_InitLib "" HAVE_T1LIB ) - endif( ) - if( HAVE_T1LIB_H AND HAVE_T1LIB ) - set( T1_LIBRARY t1 CACHE INTERNAL "" FORCE ) - else( ) - tde_message_fatal( "t1lib is required, but was not found on your system" ) - endif( ) -endif( ) - - # check for libpaper if( WITH_PAPER ) check_include_file( paper.h HAVE_PAPER_H ) diff --git a/kpdf/xpdf/splash/CMakeLists.txt b/kpdf/xpdf/splash/CMakeLists.txt index a9c3d72b..a99ceeb2 100644 --- a/kpdf/xpdf/splash/CMakeLists.txt +++ b/kpdf/xpdf/splash/CMakeLists.txt @@ -27,7 +27,6 @@ tde_add_library( splash STATIC_PIC SplashFTFontEngine.cpp SplashFTFontFile.cpp SplashFont.cpp SplashFontEngine.cpp SplashFontFile.cpp SplashFontFileID.cpp SplashPath.cpp SplashPattern.cpp SplashScreen.cpp SplashState.cpp - SplashT1Font.cpp SplashT1FontEngine.cpp SplashT1FontFile.cpp SplashXPath.cpp SplashXPathScanner.cpp LINK ${FREETYPE_LIBRARIES} ${FONTCONFIG_LIBRARIES} ) diff --git a/kpdf/xpdf/splash/Makefile.am b/kpdf/xpdf/splash/Makefile.am index 724eaa6a..5bf50df6 100644 --- a/kpdf/xpdf/splash/Makefile.am +++ b/kpdf/xpdf/splash/Makefile.am @@ -2,7 +2,7 @@ INCLUDES = -I$(srcdir)/.. -I$(srcdir)/../fofi -I$(srcdir)/../goo $(LIBFREETYPE_C libsplash_la_SOURCES = Splash.cpp SplashBitmap.cpp SplashClip.cpp SplashFTFont.cpp SplashFTFontEngine.cpp \ SplashFTFontFile.cpp SplashFont.cpp SplashFontEngine.cpp SplashFontFile.cpp SplashFontFileID.cpp \ - SplashPath.cpp SplashPattern.cpp SplashScreen.cpp SplashState.cpp SplashT1Font.cpp \ - SplashT1FontEngine.cpp SplashT1FontFile.cpp SplashXPath.cpp SplashXPathScanner.cpp + SplashPath.cpp SplashPattern.cpp SplashScreen.cpp SplashState.cpp \ + SplashXPath.cpp SplashXPathScanner.cpp noinst_LTLIBRARIES = libsplash.la diff --git a/kpdf/xpdf/splash/SplashFontEngine.cpp b/kpdf/xpdf/splash/SplashFontEngine.cpp index d79a48a0..c3eb33a7 100644 --- a/kpdf/xpdf/splash/SplashFontEngine.cpp +++ b/kpdf/xpdf/splash/SplashFontEngine.cpp @@ -10,10 +10,6 @@ #pragma implementation #endif -#if HAVE_T1LIB_H -#include <t1lib.h> -#endif - #include <stdlib.h> #include <stdio.h> #ifndef WIN32 @@ -22,7 +18,6 @@ #include "gmem.h" #include "GString.h" #include "SplashMath.h" -#include "SplashT1FontEngine.h" #include "SplashFTFontEngine.h" #include "SplashFontFile.h" #include "SplashFontFileID.h" @@ -40,9 +35,6 @@ extern "C" int unlink(char *filename); //------------------------------------------------------------------------ SplashFontEngine::SplashFontEngine( -#if HAVE_T1LIB_H - GBool enableT1lib, -#endif #if HAVE_FREETYPE_FREETYPE_H || HAVE_FREETYPE_H GBool enableFreeType, #endif @@ -53,13 +45,6 @@ SplashFontEngine::SplashFontEngine( fontCache[i] = NULL; } -#if HAVE_T1LIB_H - if (enableT1lib) { - t1Engine = SplashT1FontEngine::init(aa); - } else { - t1Engine = NULL; - } -#endif #if HAVE_FREETYPE_FREETYPE_H || HAVE_FREETYPE_H if (enableFreeType) { ftEngine = SplashFTFontEngine::init(aa); @@ -78,11 +63,6 @@ SplashFontEngine::~SplashFontEngine() { } } -#if HAVE_T1LIB_H - if (t1Engine) { - delete t1Engine; - } -#endif #if HAVE_FREETYPE_FREETYPE_H || HAVE_FREETYPE_H if (ftEngine) { delete ftEngine; @@ -111,11 +91,6 @@ SplashFontFile *SplashFontEngine::loadType1Font(SplashFontFileID *idA, SplashFontFile *fontFile; fontFile = NULL; -#if HAVE_T1LIB_H - if (!fontFile && t1Engine) { - fontFile = t1Engine->loadType1Font(idA, src, enc); - } -#endif #if HAVE_FREETYPE_FREETYPE_H || HAVE_FREETYPE_H if (!fontFile && ftEngine) { fontFile = ftEngine->loadType1Font(idA, src, enc); @@ -138,11 +113,6 @@ SplashFontFile *SplashFontEngine::loadType1CFont(SplashFontFileID *idA, SplashFontFile *fontFile; fontFile = NULL; -#if HAVE_T1LIB_H - if (!fontFile && t1Engine) { - fontFile = t1Engine->loadType1CFont(idA, sec, enc); - } -#endif #if HAVE_FREETYPE_FREETYPE_H || HAVE_FREETYPE_H if (!fontFile && ftEngine) { fontFile = ftEngine->loadType1CFont(idA, src, enc); diff --git a/kpdf/xpdf/splash/SplashFontEngine.h b/kpdf/xpdf/splash/SplashFontEngine.h index ace5e9ae..4718a208 100644 --- a/kpdf/xpdf/splash/SplashFontEngine.h +++ b/kpdf/xpdf/splash/SplashFontEngine.h @@ -15,7 +15,6 @@ #include "gtypes.h" -class SplashT1FontEngine; class SplashFTFontEngine; class SplashDTFontEngine; class SplashDT4FontEngine; @@ -37,9 +36,6 @@ public: // Create a font engine. SplashFontEngine( -#if HAVE_T1LIB_H - GBool enableT1lib, -#endif #if HAVE_FREETYPE_FREETYPE_H || HAVE_FREETYPE_H GBool enableFreeType, #endif @@ -75,9 +71,6 @@ private: SplashFont *fontCache[splashFontCacheSize]; -#if HAVE_T1LIB_H - SplashT1FontEngine *t1Engine; -#endif #if HAVE_FREETYPE_FREETYPE_H || HAVE_FREETYPE_H SplashFTFontEngine *ftEngine; #endif diff --git a/kpdf/xpdf/splash/SplashT1Font.cpp b/kpdf/xpdf/splash/SplashT1Font.cpp deleted file mode 100644 index 17dfcd78..00000000 --- a/kpdf/xpdf/splash/SplashT1Font.cpp +++ /dev/null @@ -1,292 +0,0 @@ -//======================================================================== -// -// SplashT1Font.cpp -// -//======================================================================== - -#include <aconf.h> - -#if HAVE_T1LIB_H - -#ifdef USE_GCC_PRAGMAS -#pragma implementation -#endif - -#include <stdlib.h> -#include <t1lib.h> -#include "gmem.h" -#include "SplashMath.h" -#include "SplashGlyphBitmap.h" -#include "SplashPath.h" -#include "SplashT1FontEngine.h" -#include "SplashT1FontFile.h" -#include "SplashT1Font.h" - -//------------------------------------------------------------------------ - -static Guchar bitReverse[256] = { - 0x00, 0x80, 0x40, 0xc0, 0x20, 0xa0, 0x60, 0xe0, - 0x10, 0x90, 0x50, 0xd0, 0x30, 0xb0, 0x70, 0xf0, - 0x08, 0x88, 0x48, 0xc8, 0x28, 0xa8, 0x68, 0xe8, - 0x18, 0x98, 0x58, 0xd8, 0x38, 0xb8, 0x78, 0xf8, - 0x04, 0x84, 0x44, 0xc4, 0x24, 0xa4, 0x64, 0xe4, - 0x14, 0x94, 0x54, 0xd4, 0x34, 0xb4, 0x74, 0xf4, - 0x0c, 0x8c, 0x4c, 0xcc, 0x2c, 0xac, 0x6c, 0xec, - 0x1c, 0x9c, 0x5c, 0xdc, 0x3c, 0xbc, 0x7c, 0xfc, - 0x02, 0x82, 0x42, 0xc2, 0x22, 0xa2, 0x62, 0xe2, - 0x12, 0x92, 0x52, 0xd2, 0x32, 0xb2, 0x72, 0xf2, - 0x0a, 0x8a, 0x4a, 0xca, 0x2a, 0xaa, 0x6a, 0xea, - 0x1a, 0x9a, 0x5a, 0xda, 0x3a, 0xba, 0x7a, 0xfa, - 0x06, 0x86, 0x46, 0xc6, 0x26, 0xa6, 0x66, 0xe6, - 0x16, 0x96, 0x56, 0xd6, 0x36, 0xb6, 0x76, 0xf6, - 0x0e, 0x8e, 0x4e, 0xce, 0x2e, 0xae, 0x6e, 0xee, - 0x1e, 0x9e, 0x5e, 0xde, 0x3e, 0xbe, 0x7e, 0xfe, - 0x01, 0x81, 0x41, 0xc1, 0x21, 0xa1, 0x61, 0xe1, - 0x11, 0x91, 0x51, 0xd1, 0x31, 0xb1, 0x71, 0xf1, - 0x09, 0x89, 0x49, 0xc9, 0x29, 0xa9, 0x69, 0xe9, - 0x19, 0x99, 0x59, 0xd9, 0x39, 0xb9, 0x79, 0xf9, - 0x05, 0x85, 0x45, 0xc5, 0x25, 0xa5, 0x65, 0xe5, - 0x15, 0x95, 0x55, 0xd5, 0x35, 0xb5, 0x75, 0xf5, - 0x0d, 0x8d, 0x4d, 0xcd, 0x2d, 0xad, 0x6d, 0xed, - 0x1d, 0x9d, 0x5d, 0xdd, 0x3d, 0xbd, 0x7d, 0xfd, - 0x03, 0x83, 0x43, 0xc3, 0x23, 0xa3, 0x63, 0xe3, - 0x13, 0x93, 0x53, 0xd3, 0x33, 0xb3, 0x73, 0xf3, - 0x0b, 0x8b, 0x4b, 0xcb, 0x2b, 0xab, 0x6b, 0xeb, - 0x1b, 0x9b, 0x5b, 0xdb, 0x3b, 0xbb, 0x7b, 0xfb, - 0x07, 0x87, 0x47, 0xc7, 0x27, 0xa7, 0x67, 0xe7, - 0x17, 0x97, 0x57, 0xd7, 0x37, 0xb7, 0x77, 0xf7, - 0x0f, 0x8f, 0x4f, 0xcf, 0x2f, 0xaf, 0x6f, 0xef, - 0x1f, 0x9f, 0x5f, 0xdf, 0x3f, 0xbf, 0x7f, 0xff -}; - -//------------------------------------------------------------------------ -// SplashT1Font -//------------------------------------------------------------------------ - -SplashT1Font::SplashT1Font(SplashT1FontFile *fontFileA, SplashCoord *matA, - SplashCoord *textMatA): - SplashFont(fontFileA, matA, textMatA, fontFileA->engine->aa) -{ - T1_TMATRIX matrix; - BBox bbox; - SplashCoord bbx0, bby0, bbx1, bby1; - int x, y; - - t1libID = T1_CopyFont(fontFileA->t1libID); - outlineID = -1; - - // compute font size - size = (float)splashSqrt(mat[2]*mat[2] + mat[3]*mat[3]); - - // transform the four corners of the font bounding box -- the min - // and max values form the bounding box of the transformed font - bbox = T1_GetFontBBox(t1libID); - bbx0 = 0.001 * bbox.llx; - bby0 = 0.001 * bbox.lly; - bbx1 = 0.001 * bbox.urx; - bby1 = 0.001 * bbox.ury; - // some fonts are completely broken, so we fake it (with values - // large enough that most glyphs should fit) - if (bbx0 == 0 && bby0 == 0 && bbx1 == 0 && bby1 == 0) { - bbx0 = bby0 = -0.5; - bbx1 = bby1 = 1.5; - } - x = (int)(mat[0] * bbx0 + mat[2] * bby0); - xMin = xMax = x; - y = (int)(mat[1] * bbx0 + mat[3] * bby0); - yMin = yMax = y; - x = (int)(mat[0] * bbx0 + mat[2] * bby1); - if (x < xMin) { - xMin = x; - } else if (x > xMax) { - xMax = x; - } - y = (int)(mat[1] * bbx0 + mat[3] * bby1); - if (y < yMin) { - yMin = y; - } else if (y > yMax) { - yMax = y; - } - x = (int)(mat[0] * bbx1 + mat[2] * bby0); - if (x < xMin) { - xMin = x; - } else if (x > xMax) { - xMax = x; - } - y = (int)(mat[1] * bbx1 + mat[3] * bby0); - if (y < yMin) { - yMin = y; - } else if (y > yMax) { - yMax = y; - } - x = (int)(mat[0] * bbx1 + mat[2] * bby1); - if (x < xMin) { - xMin = x; - } else if (x > xMax) { - xMax = x; - } - y = (int)(mat[1] * bbx1 + mat[3] * bby1); - if (y < yMin) { - yMin = y; - } else if (y > yMax) { - yMax = y; - } - // This is a kludge: some buggy PDF generators embed fonts with - // zero bounding boxes. - if (xMax == xMin) { - xMin = 0; - xMax = (int)size; - } - if (yMax == yMin) { - yMin = 0; - yMax = (int)(1.2 * size); - } - // Another kludge: an unusually large xMin or yMin coordinate is - // probably wrong. - if (xMin > 0) { - xMin = 0; - } - if (yMin > 0) { - yMin = 0; - } - // Another kludge: t1lib doesn't correctly handle fonts with - // real (non-integer) bounding box coordinates. - if (xMax - xMin > 5000) { - xMin = 0; - xMax = (int)size; - } - if (yMax - yMin > 5000) { - yMin = 0; - yMax = (int)(1.2 * size); - } - - // transform the font - matrix.cxx = (double)mat[0] / size; - matrix.cxy = (double)mat[1] / size; - matrix.cyx = (double)mat[2] / size; - matrix.cyy = (double)mat[3] / size; - T1_TransformFont(t1libID, &matrix); -} - -SplashT1Font::~SplashT1Font() { - T1_DeleteFont(t1libID); - if (outlineID >= 0) { - T1_DeleteFont(outlineID); - } -} - -GBool SplashT1Font::getGlyph(int c, int xFrac, int yFrac, - SplashGlyphBitmap *bitmap, int x0, int y0, SplashClip *clip, SplashClipResult *clipRes) { - return SplashFont::getGlyph(c, 0, 0, bitmap, x0, y0, clip, clipRes); -} - -GBool SplashT1Font::makeGlyph(int c, int xFrac, int yFrac, - SplashGlyphBitmap *bitmap, int x0, int y0, SplashClip *clip, SplashClipResult *clipRes) { - GLYPH *glyph; - int n, i; - - if (aa) { - glyph = T1_AASetChar(t1libID, c, size, NULL); - } else { - glyph = T1_SetChar(t1libID, c, size, NULL); - } - if (!glyph) { - return gFalse; - } - - bitmap->x = -glyph->metrics.leftSideBearing; - bitmap->y = glyph->metrics.ascent; - bitmap->w = glyph->metrics.rightSideBearing - glyph->metrics.leftSideBearing; - bitmap->h = glyph->metrics.ascent - glyph->metrics.descent; - bitmap->aa = aa; - if (aa) { - bitmap->data = (Guchar *)glyph->bits; - bitmap->freeData = gFalse; - } else { - n = bitmap->h * ((bitmap->w + 7) >> 3); - bitmap->data = (Guchar *)gmalloc(n); - for (i = 0; i < n; ++i) { - bitmap->data[i] = bitReverse[glyph->bits[i] & 0xff]; - } - bitmap->freeData = gTrue; - } - - *clipRes = clip->testRect(x0 - bitmap->x, - y0 - bitmap->y, - x0 - bitmap->x + bitmap->w - 1, - y0 - bitmap->y + bitmap->h - 1); - - return gTrue; -} - -SplashPath *SplashT1Font::getGlyphPath(int c) { - T1_TMATRIX matrix; - SplashPath *path; - T1_OUTLINE *outline; - T1_PATHSEGMENT *seg; - T1_BEZIERSEGMENT *bez; - SplashCoord x, y, x1, y1; - GBool needClose; - - if (outlineID < 0) { - outlineID = T1_CopyFont(((SplashT1FontFile *)fontFile)->t1libID); - outlineSize = (float)splashSqrt(textMat[2]*textMat[2] + - textMat[3]*textMat[3]); - matrix.cxx = (double)textMat[0] / outlineSize; - matrix.cxy = (double)textMat[1] / outlineSize; - matrix.cyx = (double)textMat[2] / outlineSize; - matrix.cyy = (double)textMat[3] / outlineSize; - // t1lib doesn't seem to handle small sizes correctly here, so set - // the size to 1000, and scale the resulting coordinates later - outlineMul = (float)(outlineSize / 65536000.0); - outlineSize = 1000; - T1_TransformFont(outlineID, &matrix); - } - - path = new SplashPath(); - if ((outline = T1_GetCharOutline(outlineID, c, outlineSize, NULL))) { - x = 0; - y = 0; - needClose = gFalse; - for (seg = outline; seg; seg = seg->link) { - switch (seg->type) { - case T1_PATHTYPE_MOVE: - if (needClose) { - path->close(); - needClose = gFalse; - } - x += seg->dest.x * outlineMul; - y += seg->dest.y * outlineMul; - path->moveTo(x, -y); - break; - case T1_PATHTYPE_LINE: - x += seg->dest.x * outlineMul; - y += seg->dest.y * outlineMul; - path->lineTo(x, -y); - needClose = gTrue; - break; - case T1_PATHTYPE_BEZIER: - bez = (T1_BEZIERSEGMENT *)seg; - x1 = x + (SplashCoord)(bez->dest.x * outlineMul); - y1 = y + (SplashCoord)(bez->dest.y * outlineMul); - path->curveTo(x + (SplashCoord)(bez->B.x * outlineMul), - -(y + (SplashCoord)(bez->B.y * outlineMul)), - x + (SplashCoord)(bez->C.x * outlineMul), - -(y + (SplashCoord)(bez->C.y * outlineMul)), - x1, -y1); - x = x1; - y = y1; - needClose = gTrue; - break; - } - } - if (needClose) { - path->close(); - } - T1_FreeOutline(outline); - } - - return path; -} - -#endif // HAVE_T1LIB_H diff --git a/kpdf/xpdf/splash/SplashT1Font.h b/kpdf/xpdf/splash/SplashT1Font.h deleted file mode 100644 index 129c6ad5..00000000 --- a/kpdf/xpdf/splash/SplashT1Font.h +++ /dev/null @@ -1,57 +0,0 @@ -//======================================================================== -// -// SplashT1Font.h -// -//======================================================================== - -#ifndef SPLASHT1FONT_H -#define SPLASHT1FONT_H - -#include <aconf.h> - -#if HAVE_T1LIB_H - -#ifdef USE_GCC_PRAGMAS -#pragma interface -#endif - -#include "SplashFont.h" - -class SplashT1FontFile; - -//------------------------------------------------------------------------ -// SplashT1Font -//------------------------------------------------------------------------ - -class SplashT1Font: public SplashFont { -public: - - SplashT1Font(SplashT1FontFile *fontFileA, SplashCoord *matA, - SplashCoord *textMatA); - - virtual ~SplashT1Font(); - - // Munge xFrac and yFrac before calling SplashFont::getGlyph. - virtual GBool getGlyph(int c, int xFrac, int yFrac, - SplashGlyphBitmap *bitmap, int x0, int y0, SplashClip *clip, SplashClipResult *clipRes); - - // Rasterize a glyph. The <xFrac> and <yFrac> values are the same - // as described for getGlyph. - virtual GBool makeGlyph(int c, int xFrac, int yFrac, - SplashGlyphBitmap *bitmap, int x0, int y0, SplashClip *clip, SplashClipResult *clipRes); - - // Return the path for a glyph. - virtual SplashPath *getGlyphPath(int c); - -private: - - int t1libID; // t1lib font ID - int outlineID; // t1lib font ID for glyph outlines - float size; - float outlineSize; // size for glyph outlines - float outlineMul; -}; - -#endif // HAVE_T1LIB_H - -#endif diff --git a/kpdf/xpdf/splash/SplashT1FontEngine.cpp b/kpdf/xpdf/splash/SplashT1FontEngine.cpp deleted file mode 100644 index d17dc47c..00000000 --- a/kpdf/xpdf/splash/SplashT1FontEngine.cpp +++ /dev/null @@ -1,122 +0,0 @@ -//======================================================================== -// -// SplashT1FontEngine.cpp -// -//======================================================================== - -#include <aconf.h> - -#if HAVE_T1LIB_H - -#ifdef USE_GCC_PRAGMAS -#pragma implementation -#endif - -#include <stdlib.h> -#include <stdio.h> -#ifndef WIN32 -# include <unistd.h> -#endif -#include <t1lib.h> -#include "GString.h" -#include "gfile.h" -#include "FoFiType1C.h" -#include "SplashT1FontFile.h" -#include "SplashT1FontEngine.h" - -#ifdef VMS -#if (__VMS_VER < 70000000) -extern "C" int unlink(char *filename); -#endif -#endif - -//------------------------------------------------------------------------ - -int SplashT1FontEngine::t1libInitCount = 0; - -//------------------------------------------------------------------------ - -static void fileWrite(void *stream, char *data, int len) { - fwrite(data, 1, len, (FILE *)stream); -} - -//------------------------------------------------------------------------ -// SplashT1FontEngine -//------------------------------------------------------------------------ - -SplashT1FontEngine::SplashT1FontEngine(GBool aaA) { - aa = aaA; -} - -SplashT1FontEngine *SplashT1FontEngine::init(GBool aaA) { - // grayVals[i] = round(i * 255 / 16) - static unsigned long grayVals[17] = { - 0, 16, 32, 48, 64, 80, 96, 112, 128, 143, 159, 175, 191, 207, 223, 239, 255 - }; - - //~ for multithreading: need a mutex here - if (t1libInitCount == 0) { - T1_SetBitmapPad(8); - if (!T1_InitLib(NO_LOGFILE | IGNORE_CONFIGFILE | IGNORE_FONTDATABASE | - T1_NO_AFM)) { - return NULL; - } - if (aaA) { - T1_AASetBitsPerPixel(8); - T1_AASetLevel(T1_AA_HIGH); - T1_AAHSetGrayValues(grayVals); - } else { - T1_AANSetGrayValues(0, 1); - } - } - ++t1libInitCount; - - return new SplashT1FontEngine(aaA); -} - -SplashT1FontEngine::~SplashT1FontEngine() { - //~ for multithreading: need a mutex here - if (--t1libInitCount == 0) { - T1_CloseLib(); - } -} - -SplashFontFile *SplashT1FontEngine::loadType1Font(SplashFontFileID *idA, - SplashFontSrc *src, - char **enc) { - return SplashT1FontFile::loadType1Font(this, idA, fileName, deleteFile, enc); -} - -SplashFontFile *SplashT1FontEngine::loadType1CFont(SplashFontFileID *idA, - SplashFontSrc *src, - char **enc) { - FoFiType1C *ff; - GString *tmpFileName; - FILE *tmpFile; - SplashFontFile *ret; - SplashFontSrc *newsrc; - - if (src->isFile) - ff = FoFiType1C::load(src->fileName); - else - ff = new FoFiType1C(src->buf, src->bufLen, gFalse); - if (! ff) - return NULL; - } - tmpFileName = NULL; - if (!openTempFile(&tmpFileName, &tmpFile, "wb", NULL)) { - delete ff; - return NULL; - } - ff->convertToType1(NULL, NULL, gTrue, &fileWrite, tmpFile); - delete ff; - fclose(tmpFile); - newsrc = new SplashFontSrc; - newsrc->setFile(tmpFileName, gTrue); - delete tmpFileName; - ret = SplashT1FontFile::loadType1Font(this, idA, newsrc, enc); - newsrc->unref(); - return ret; -} - -#endif // HAVE_T1LIB_H diff --git a/kpdf/xpdf/splash/SplashT1FontEngine.h b/kpdf/xpdf/splash/SplashT1FontEngine.h deleted file mode 100644 index 57a04487..00000000 --- a/kpdf/xpdf/splash/SplashT1FontEngine.h +++ /dev/null @@ -1,53 +0,0 @@ -//======================================================================== -// -// SplashT1FontEngine.h -// -//======================================================================== - -#ifndef SPLASHT1FONTENGINE_H -#define SPLASHT1FONTENGINE_H - -#include <aconf.h> - -#if HAVE_T1LIB_H - -#ifdef USE_GCC_PRAGMAS -#pragma interface -#endif - -#include "gtypes.h" - -class SplashFontFile; -class SplashFontFileID; - -//------------------------------------------------------------------------ -// SplashT1FontEngine -//------------------------------------------------------------------------ - -class SplashT1FontEngine { -public: - - static SplashT1FontEngine *init(GBool aaA); - - ~SplashT1FontEngine(); - - // Load fonts. - SplashFontFile *loadType1Font(SplashFontFileID *idA, char *fileName, - GBool deleteFile, char **enc); - SplashFontFile *loadType1CFont(SplashFontFileID *idA, char *fileName, - GBool deleteFile, char **enc); - -private: - - SplashT1FontEngine(GBool aaA); - - static int t1libInitCount; - GBool aa; - - friend class SplashT1FontFile; - friend class SplashT1Font; -}; - -#endif // HAVE_T1LIB_H - -#endif diff --git a/kpdf/xpdf/splash/SplashT1FontFile.cpp b/kpdf/xpdf/splash/SplashT1FontFile.cpp deleted file mode 100644 index b9f3ed3c..00000000 --- a/kpdf/xpdf/splash/SplashT1FontFile.cpp +++ /dev/null @@ -1,117 +0,0 @@ -//======================================================================== -// -// SplashT1FontFile.cpp -// -//======================================================================== - -#include <aconf.h> - -#if HAVE_T1LIB_H - -#ifdef USE_GCC_PRAGMAS -#pragma implementation -#endif - -#include <string.h> -#include <t1lib.h> -#include "gmem.h" -#include "SplashT1FontEngine.h" -#include "SplashT1Font.h" -#include "SplashT1FontFile.h" - -//------------------------------------------------------------------------ -// SplashT1FontFile -//------------------------------------------------------------------------ - -SplashFontFile *SplashT1FontFile::loadType1Font(SplashT1FontEngine *engineA, - SplashFontFileID *idA, - SplashFontSrc *src, - char **encA) { - int t1libIDA; - char **encTmp; - char *encStrTmp; - int encStrSize; - char *encPtr; - int i; - - GString *fileNameA; - SplashFontSrc *newsrc = NULL; - SplashFontFile *ff; - - if (! src->isFile) { - GString *tmpFileName; - FILE *tmpFile; - if (!openTempFile(&tmpFileName, &tmpFile, "wb", NULL)) - return NULL; - fwrite(src->buf, 1, src->bufLen, tmpFile); - fclose(tmpFile); - newsrc = new SplashFontSrc; - newsrc->setFile(tmpFileName, gTrue); - src = newsrc; - delete tmpFileName; - } - fileNameA = src->fileName; - // load the font file - if ((t1libIDA = T1_AddFont(fileNameA)) < 0) { - delete newsrc; - return NULL; - } - T1_LoadFont(t1libIDA); - - // reencode it - encStrSize = 0; - for (i = 0; i < 256; ++i) { - if (encA[i]) { - encStrSize += strlen(encA[i]) + 1; - } - } - encTmp = (char **)gmallocn(257, sizeof(char *)); - encStrTmp = (char *)gmallocn(encStrSize, sizeof(char)); - encPtr = encStrTmp; - for (i = 0; i < 256; ++i) { - if (encA[i]) { - strcpy(encPtr, encA[i]); - encTmp[i] = encPtr; - encPtr += strlen(encPtr) + 1; - } else { - encTmp[i] = ".notdef"; - } - } - encTmp[256] = "custom"; - T1_ReencodeFont(t1libIDA, encTmp); - - ff = new SplashT1FontFile(engineA, idA, src, - t1libIDA, encTmp, encStrTmp); - if (newsrc) - newsrc->unref(); - return ff; -} - -SplashT1FontFile::SplashT1FontFile(SplashT1FontEngine *engineA, - SplashFontFileID *idA, - SplashFontSrc *srcA, - int t1libIDA, char **encA, char *encStrA): - SplashFontFile(idA, srcA) -{ - engine = engineA; - t1libID = t1libIDA; - enc = encA; - encStr = encStrA; -} - -SplashT1FontFile::~SplashT1FontFile() { - gfree(encStr); - gfree(enc); - T1_DeleteFont(t1libID); -} - -SplashFont *SplashT1FontFile::makeFont(SplashCoord *mat, - SplashCoord *textMat) { - SplashFont *font; - - font = new SplashT1Font(this, mat, textMat); - font->initCache(); - return font; -} - -#endif // HAVE_T1LIB_H diff --git a/kpdf/xpdf/splash/SplashT1FontFile.h b/kpdf/xpdf/splash/SplashT1FontFile.h deleted file mode 100644 index 4dc93cbf..00000000 --- a/kpdf/xpdf/splash/SplashT1FontFile.h +++ /dev/null @@ -1,58 +0,0 @@ -//======================================================================== -// -// SplashT1FontFile.h -// -//======================================================================== - -#ifndef SPLASHT1FONTFILE_H -#define SPLASHT1FONTFILE_H - -#include <aconf.h> - -#if HAVE_T1LIB_H - -#ifdef USE_GCC_PRAGMAS -#pragma interface -#endif - -#include "SplashFontFile.h" - -class SplashT1FontEngine; - -//------------------------------------------------------------------------ -// SplashT1FontFile -//------------------------------------------------------------------------ - -class SplashT1FontFile: public SplashFontFile { -public: - - static SplashFontFile *loadType1Font(SplashT1FontEngine *engineA, - SplashFontFileID *idA, - char *fileNameA, - char **encA); - - virtual ~SplashT1FontFile(); - - // Create a new SplashT1Font, i.e., a scaled instance of this font - // file. - virtual SplashFont *makeFont(SplashCoord *mat, - SplashCoord *textMat); - -private: - - SplashT1FontFile(SplashT1FontEngine *engineA, - SplashFontFileID *idA, - char *fileNameA, - int t1libIDA, char **encA, char *encStrA); - - SplashT1FontEngine *engine; - int t1libID; // t1lib font ID - char **enc; - char *encStr; - - friend class SplashT1Font; -}; - -#endif // HAVE_T1LIB_H - -#endif diff --git a/kpdf/xpdf/xpdf/GlobalParams.cpp b/kpdf/xpdf/xpdf/GlobalParams.cpp index f18026ee..d98a0ce5 100644 --- a/kpdf/xpdf/xpdf/GlobalParams.cpp +++ b/kpdf/xpdf/xpdf/GlobalParams.cpp @@ -713,7 +713,6 @@ GlobalParams::GlobalParams(char *cfgFileName) { fontDirs = new GList(); initialZoom = new GString("125"); continuousView = gFalse; - enableT1lib = gTrue; enableFreeType = gTrue; antialias = gTrue; vectorAntialias = gTrue; @@ -1073,8 +1072,6 @@ void GlobalParams::parseLine(char *buf, GString *fileName, int line) { parseInitialZoom(tokens, fileName, line); } else if (!cmd->cmp("continuousView")) { parseYesNo("continuousView", &continuousView, tokens, fileName, line); - } else if (!cmd->cmp("enableT1lib")) { - parseYesNo("enableT1lib", &enableT1lib, tokens, fileName, line); } else if (!cmd->cmp("enableFreeType")) { parseYesNo("enableFreeType", &enableFreeType, tokens, fileName, line); } else if (!cmd->cmp("antialias")) { @@ -1125,9 +1122,9 @@ void GlobalParams::parseLine(char *buf, GString *fileName, int line) { !cmd->cmp("displayNamedCIDFontX") || !cmd->cmp("displayCIDFontX")) { error(-1, "-- Xpdf no longer supports X fonts"); - } else if (!cmd->cmp("t1libControl") || !cmd->cmp("freetypeControl")) { - error(-1, "-- The t1libControl and freetypeControl options have been replaced"); - error(-1, " by the enableT1lib, enableFreeType, and antialias options"); + } else if (!cmd->cmp("freetypeControl")) { + error(-1, "-- The freetypeControl option has been replaced"); + error(-1, " by the enableFreeType, and antialias options"); } else if (!cmd->cmp("fontpath") || !cmd->cmp("fontmap")) { error(-1, "-- the config file format has changed since Xpdf 0.9x"); } @@ -2094,7 +2091,7 @@ DisplayFontParam *GlobalParams::getDisplayFont(GString *fontName) { if (res != FcResultMatch || !s) goto fin; ext = rindex((char*)s,'.'); if (!ext) goto fin; - if (!strncasecmp(ext,".ttf",4) || !strncasecmp(ext,".ttc",4)) { + if (!strncasecmp(ext,".ttf",4) || !strncasecmp(ext,".ttc",4) || !strncasecmp(ext,".otf",4)) { dfp = new DisplayFontParam(fontName->copy(), displayFontTT); dfp->tt.fileName = new GString((char*)s); FcPatternGetInteger(m, FC_INDEX, 0, &(dfp->tt.faceIndex)); @@ -2395,15 +2392,6 @@ GBool GlobalParams::getContinuousView() { return f; } -GBool GlobalParams::getEnableT1lib() { - GBool f; - - lockGlobalParams; - f = enableT1lib; - unlockGlobalParams; - return f; -} - GBool GlobalParams::getEnableFreeType() { GBool f; @@ -2827,15 +2815,6 @@ void GlobalParams::setContinuousView(GBool cont) { unlockGlobalParams; } -GBool GlobalParams::setEnableT1lib(char *s) { - GBool ok; - - lockGlobalParams; - ok = parseYesNo2(s, &enableT1lib); - unlockGlobalParams; - return ok; -} - GBool GlobalParams::setEnableFreeType(char *s) { GBool ok; diff --git a/kpdf/xpdf/xpdf/GlobalParams.h b/kpdf/xpdf/xpdf/GlobalParams.h index c0543eda..85b3c27d 100644 --- a/kpdf/xpdf/xpdf/GlobalParams.h +++ b/kpdf/xpdf/xpdf/GlobalParams.h @@ -242,7 +242,6 @@ public: GString *findFontFile(GString *fontName, char **exts); GString *getInitialZoom(); GBool getContinuousView(); - GBool getEnableT1lib(); GBool getEnableFreeType(); GBool getAntialias(); GBool getVectorAntialias(); @@ -294,7 +293,6 @@ public: void setTextKeepTinyChars(GBool keep); void setInitialZoom(char *s); void setContinuousView(GBool cont); - GBool setEnableT1lib(char *s); GBool setEnableFreeType(char *s); GBool setAntialias(char *s); GBool setVectorAntialias(char *s); @@ -424,7 +422,6 @@ private: GList *fontDirs; // list of font dirs [GString] GString *initialZoom; // initial zoom level GBool continuousView; // continuous view mode - GBool enableT1lib; // t1lib enable flag GBool enableFreeType; // FreeType enable flag GBool antialias; // font anti-aliasing enable flag GBool vectorAntialias; // vector anti-aliasing enable flag diff --git a/kpdf/xpdf/xpdf/SplashOutputDev.cpp b/kpdf/xpdf/xpdf/SplashOutputDev.cpp index 2de19e73..20898701 100644 --- a/kpdf/xpdf/xpdf/SplashOutputDev.cpp +++ b/kpdf/xpdf/xpdf/SplashOutputDev.cpp @@ -694,9 +694,6 @@ void SplashOutputDev::startDoc(XRef *xrefA) { delete fontEngine; } fontEngine = new SplashFontEngine( -#if HAVE_T1LIB_H - globalParams->getEnableT1lib(), -#endif #if HAVE_FREETYPE_FREETYPE_H || HAVE_FREETYPE_H globalParams->getEnableFreeType(), #endif diff --git a/kpdf/xpdf/xpdf/xpdf_config.h b/kpdf/xpdf/xpdf/xpdf_config.h index 81d4dd07..f00a6381 100644 --- a/kpdf/xpdf/xpdf/xpdf_config.h +++ b/kpdf/xpdf/xpdf/xpdf_config.h @@ -74,7 +74,7 @@ // default maximum size of color cube to allocate #define defaultRGBCube 5 -// number of fonts (combined t1lib, FreeType, X server) to cache +// number of fonts (combined FreeType, X server) to cache #define xOutFontCacheSize 64 // number of Type 3 fonts to cache |