From ce8715fb8c5a0722a4325d2c0b6999286b4f7432 Mon Sep 17 00:00:00 2001 From: Laurent Montel Date: Mon, 13 Mar 2006 13:24:31 +0000 Subject: [PATCH] adapt to new kdelibs api svn path=/trunk/KDE/kdegraphics/kpdf/; revision=518219 --- core/document.cpp | 2 +- core/document.h | 4 ++-- core/generator.h | 4 ++-- core/generator_kimgio/generator_kimgio.cpp | 2 +- core/generator_kimgio/generator_kimgio.h | 2 +- core/generator_pdf/generator_pdf.cpp | 10 +++++----- core/generator_pdf/generator_pdf.h | 6 +++--- ui/propertiesdialog.cpp | 4 ++-- ui/toc.cpp | 14 +++++++------- ui/toc.h | 6 +++--- 10 files changed, 27 insertions(+), 27 deletions(-) diff --git a/core/document.cpp b/core/document.cpp index 68d2609fa..212f6c078 100644 --- a/core/document.cpp +++ b/core/document.cpp @@ -426,7 +426,7 @@ bool KPDFDocument::hasFonts() const return generator ? generator->hasFonts() : false; } -void KPDFDocument::putFontInfo(KListView *list) +void KPDFDocument::putFontInfo(K3ListView *list) { if (generator) generator->putFontInfo(list); } diff --git a/core/document.h b/core/document.h index d190c016f..ce6a26318 100644 --- a/core/document.h +++ b/core/document.h @@ -28,7 +28,7 @@ class DocumentInfo; class DocumentSynopsis; class Generator; class PixmapRequest; -class KListView; +class K3ListView; class KPrinter; class KUrl; @@ -83,7 +83,7 @@ class KPDFDocument : public QObject QString getMetaData( const QString & key, const QString & option = QString() ) const; bool supportsSearching() const; bool hasFonts() const; - void putFontInfo(KListView *list); + void putFontInfo(K3ListView *list); // perform actions on document / pages void setViewportPage( int page, int excludeId = -1, bool smoothMove = false ); diff --git a/core/generator.h b/core/generator.h index d0a5af779..030514601 100644 --- a/core/generator.h +++ b/core/generator.h @@ -14,7 +14,7 @@ #include #include #include "core/document.h" -class KListView; +class K3ListView; class KPrinter; class KPDFPage; class KPDFLink; @@ -64,7 +64,7 @@ class Generator : public QObject virtual bool hasFonts() const = 0; // font related - virtual void putFontInfo(KListView *list) = 0; + virtual void putFontInfo(K3ListView *list) = 0; // print document using already configured kprinter virtual bool print( KPrinter& /*printer*/ ) { return false; } diff --git a/core/generator_kimgio/generator_kimgio.cpp b/core/generator_kimgio/generator_kimgio.cpp index 46bcc7f3d..1adae27b2 100644 --- a/core/generator_kimgio/generator_kimgio.cpp +++ b/core/generator_kimgio/generator_kimgio.cpp @@ -60,7 +60,7 @@ bool KIMGIOGenerator::hasFonts() const return false; } -void KIMGIOGenerator::putFontInfo( KListView * ) +void KIMGIOGenerator::putFontInfo( K3ListView * ) { } diff --git a/core/generator_kimgio/generator_kimgio.h b/core/generator_kimgio/generator_kimgio.h index 46041f0ec..05847441b 100644 --- a/core/generator_kimgio/generator_kimgio.h +++ b/core/generator_kimgio/generator_kimgio.h @@ -31,7 +31,7 @@ class KIMGIOGenerator : public Generator bool hasFonts() const; // font related - void putFontInfo(KListView *list); + void putFontInfo(K3ListView *list); // [INHERITED] print document using already configured kprinter bool print( KPrinter& printer ); diff --git a/core/generator_pdf/generator_pdf.cpp b/core/generator_pdf/generator_pdf.cpp index 3c3936813..77109efb4 100644 --- a/core/generator_pdf/generator_pdf.cpp +++ b/core/generator_pdf/generator_pdf.cpp @@ -15,7 +15,7 @@ #include #include #include -#include +#include #include #include #include @@ -355,7 +355,7 @@ bool PDFGenerator::hasFonts() const return true; } -void PDFGenerator::putFontInfo(KListView *list) +void PDFGenerator::putFontInfo(K3ListView *list) { Page *page; Dict *resDict; @@ -537,7 +537,7 @@ static QString unicodeToQString(Unicode* u, int len) { return ret; } -void PDFGenerator::scanFonts(Dict *resDict, KListView *list, Ref **fonts, int &fontsLen, int &fontsSize) +void PDFGenerator::scanFonts(Dict *resDict, K3ListView *list, Ref **fonts, int &fontsLen, int &fontsSize) { Object obj1, obj2, xObjDict, xObj, resObj; Ref r; @@ -592,7 +592,7 @@ void PDFGenerator::scanFonts(Dict *resDict, KListView *list, Ref **fonts, int &f xObjDict.free(); } -void PDFGenerator::scanFont(GfxFont *font, KListView *list, Ref **fonts, int &fontsLen, int &fontsSize) +void PDFGenerator::scanFont(GfxFont *font, K3ListView *list, Ref **fonts, int &fontsLen, int &fontsSize) { Ref fontRef, embRef; Object fontObj, toUnicodeObj; @@ -651,7 +651,7 @@ void PDFGenerator::scanFont(GfxFont *font, KListView *list, Ref **fonts, int &fo sPath = i18n("-"); } sEmb = emb ? i18n("Yes") : i18n("No"); - new KListViewItem(list, sName, fontTypeNames[font->getType()], sEmb, sPath); + new K3ListViewItem(list, sName, fontTypeNames[font->getType()], sEmb, sPath); // add this font to the list if (fontsLen == fontsSize) diff --git a/core/generator_pdf/generator_pdf.h b/core/generator_pdf/generator_pdf.h index 3b3024892..d983511de 100644 --- a/core/generator_pdf/generator_pdf.h +++ b/core/generator_pdf/generator_pdf.h @@ -72,7 +72,7 @@ class PDFGenerator : public Generator bool hasFonts() const; // [INHERITED] font related - void putFontInfo(KListView *list); + void putFontInfo(K3ListView *list); // [INHERITED] print page using an already configured kprinter bool print( KPrinter& printer ); @@ -87,8 +87,8 @@ class PDFGenerator : public Generator // friend class to access private document related variables friend class PDFPixmapGeneratorThread; - void scanFonts(Dict *resDict, KListView *list, Ref **fonts, int &fontsLen, int &fontsSize); - void scanFont(GfxFont *font, KListView *list, Ref **fonts, int &fontsLen, int &fontsSize); + void scanFonts(Dict *resDict, K3ListView *list, Ref **fonts, int &fontsLen, int &fontsSize); + void scanFont(GfxFont *font, K3ListView *list, Ref **fonts, int &fontsLen, int &fontsSize); void fillViewportFromLink( DocumentViewport &viewport, LinkDest *destination ); diff --git a/ui/propertiesdialog.cpp b/ui/propertiesdialog.cpp index cefa2f262..49b97fc3f 100644 --- a/ui/propertiesdialog.cpp +++ b/ui/propertiesdialog.cpp @@ -10,7 +10,7 @@ // qt/kde includes #include #include -#include +#include #include #include #include @@ -76,7 +76,7 @@ PropertiesDialog::PropertiesDialog(QWidget *parent, KPDFDocument *doc) { QFrame *page2 = addPage(i18n("Fonts")); page2Layout = new QVBoxLayout(page2, 0, KDialog::spacingHint()); - KListView *lv = new KListView(page2); + K3ListView *lv = new K3ListView(page2); page2Layout->add(lv); doc->putFontInfo(lv); } diff --git a/ui/toc.cpp b/ui/toc.cpp index fde4998fa..62de29ab4 100644 --- a/ui/toc.cpp +++ b/ui/toc.cpp @@ -21,11 +21,11 @@ // they're slow when converted to page number. drop the 2nd column idea. //#define TOC_ENABLE_PAGE_COLUMN -class TOCItem : public KListViewItem +class TOCItem : public K3ListViewItem { public: - TOCItem( KListView *parent, TOCItem *after, const QDomElement & e ) - : KListViewItem( parent, after, e.tagName() ), m_element( e ) + TOCItem( K3ListView *parent, TOCItem *after, const QDomElement & e ) + : K3ListViewItem( parent, after, e.tagName() ), m_element( e ) { #ifdef TOC_ENABLE_PAGE_COLUMN if ( e.hasAttribute( "Page" ) ) @@ -34,8 +34,8 @@ class TOCItem : public KListViewItem setMultiLinesEnabled( true ); } - TOCItem( KListViewItem *parent, TOCItem *after, const QDomElement & e ) - : KListViewItem( parent, after, e.tagName() ), m_element( e ) + TOCItem( K3ListViewItem *parent, TOCItem *after, const QDomElement & e ) + : K3ListViewItem( parent, after, e.tagName() ), m_element( e ) { #ifdef TOC_ENABLE_PAGE_COLUMN if ( e.hasAttribute( "Page" ) ) @@ -53,7 +53,7 @@ class TOCItem : public KListViewItem QDomElement m_element; }; -TOC::TOC(QWidget *parent, KPDFDocument *document) : KListView(parent), m_document(document) +TOC::TOC(QWidget *parent, KPDFDocument *document) : K3ListView(parent), m_document(document) { addColumn( i18n("Topic") ); #ifdef TOC_ENABLE_PAGE_COLUMN @@ -102,7 +102,7 @@ void TOC::notifySetup( const QVector< KPDFPage * > & /*pages*/, bool documentCha emit hasTOC( true ); } -void TOC::addChildren( const QDomNode & parentNode, KListViewItem * parentItem ) +void TOC::addChildren( const QDomNode & parentNode, K3ListViewItem * parentItem ) { // keep track of the current listViewItem TOCItem * currentItem = 0; diff --git a/ui/toc.h b/ui/toc.h index 897822479..11443ec9a 100644 --- a/ui/toc.h +++ b/ui/toc.h @@ -11,13 +11,13 @@ #define _KPDF_TOC_H_ #include -#include +#include #include "core/document.h" #include "core/observer.h" class KPDFDocument; -class TOC : public KListView, public DocumentObserver +class TOC : public K3ListView, public DocumentObserver { Q_OBJECT public: @@ -35,7 +35,7 @@ Q_OBJECT void slotExecuted(Q3ListViewItem *i); private: - void addChildren( const QDomNode & parentNode, KListViewItem * parentItem = 0 ); + void addChildren( const QDomNode & parentNode, K3ListViewItem * parentItem = 0 ); DocumentViewport getViewport( const QDomElement &e ) const; KPDFDocument *m_document; };