From b12724c61ede30a0091fdf2b7ea221bc53e820c7 Mon Sep 17 00:00:00 2001 From: Wilfried Huss Date: Sat, 27 May 2006 16:34:28 +0000 Subject: [PATCH] qt3support-- kde3support-- svn path=/trunk/KDE/kdegraphics/kviewshell/plugins/dvi/; revision=545486 --- TeXFont_PFB.cpp | 3 +-- dviWidget.cpp | 6 +++--- dviWidget.h | 2 +- fontprogress.cpp | 8 ++++---- kdvi_multipage.cpp | 3 +-- optionDialogSpecialWidget.cpp | 6 +++--- 6 files changed, 13 insertions(+), 15 deletions(-) diff --git a/TeXFont_PFB.cpp b/TeXFont_PFB.cpp index 98c443dfe..5d9f5d31d 100644 --- a/TeXFont_PFB.cpp +++ b/TeXFont_PFB.cpp @@ -214,8 +214,7 @@ glyph* TeXFont_PFB::getGlyph(quint16 ch, bool generateCharacterPixmap, const QCo g->x2 = 0; g->y2 = 15; } else { - QImage imgi(slot->bitmap.width, slot->bitmap.rows, 32); - imgi.setAlphaBuffer(true); + QImage imgi(slot->bitmap.width, slot->bitmap.rows, QImage::Format_ARGB32); // Do QPixmaps fully support the alpha channel? If yes, we use // that. Otherwise, use other routines as a fallback diff --git a/dviWidget.cpp b/dviWidget.cpp index c83eb5168..dfc2c3037 100644 --- a/dviWidget.cpp +++ b/dviWidget.cpp @@ -22,7 +22,7 @@ #include -DVIWidget::DVIWidget(PageView* sv, DocumentPageCache* cache, const char* name) +DVIWidget::DVIWidget(PageView* sv, DocumentPageCache* cache) : DocumentWidget(sv, cache) { } @@ -48,7 +48,7 @@ void DVIWidget::mousePressEvent(QMouseEvent* e) // Check if the mouse is pressed on a source-hyperlink // source hyperlinks can be invoked with the Middle Mousebutton or alternatively // with Control+Left Mousebutton - if ((e->button() == Qt::MidButton || (e->button() == Qt::LeftButton && (e->state() & Qt::ControlModifier))) + if ((e->button() == Qt::MidButton || (e->button() == Qt::LeftButton && (e->modifiers() & Qt::ControlModifier))) && (pageData->sourceHyperLinkList.size() > 0)) { int minIndex = 0; int minimum = 0; @@ -85,7 +85,7 @@ void DVIWidget::mouseMoveEvent(QMouseEvent* e) DocumentWidget::mouseMoveEvent(e); // Analyze the mouse movement only if no mouse button was pressed - if ( e->state() == 0 ) { + if (e->buttons() == Qt::NoButton) { // Get a pointer to the page contents RenderedDviPagePixmap* pageData = dynamic_cast(documentCache->getPage(pageNumber)); if (pageData == 0) { diff --git a/dviWidget.h b/dviWidget.h index b36586347..051f9d590 100644 --- a/dviWidget.h +++ b/dviWidget.h @@ -25,7 +25,7 @@ class DVIWidget : public DocumentWidget Q_OBJECT public: - DVIWidget(PageView* sv, DocumentPageCache* cache, const char* name); + DVIWidget(PageView* sv, DocumentPageCache* cache); signals: void SRCLink(const QString&, const QPoint&, DocumentWidget*); diff --git a/fontprogress.cpp b/fontprogress.cpp index 835250b2c..641a9e364 100644 --- a/fontprogress.cpp +++ b/fontprogress.cpp @@ -43,8 +43,8 @@ fontProgressDialog::fontProgressDialog(const QString& helpIndex, const QString& KVBox* page = makeVBoxMainWidget(); - TextLabel1 = new QLabel( label, page, "TextLabel2" ); - TextLabel1->setAlignment( int( Qt::AlignCenter ) ); + TextLabel1 = new QLabel(label, page); + TextLabel1->setAlignment(Qt::AlignCenter); TextLabel1->setWhatsThis( whatsThis ); TextLabel1->setToolTip( ttip ); @@ -56,8 +56,8 @@ fontProgressDialog::fontProgressDialog(const QString& helpIndex, const QString& } else ProgressBar1 = NULL; - TextLabel2 = new QLabel( "", page, "TextLabel2" ); - TextLabel2->setAlignment( int( Qt::AlignCenter ) ); + TextLabel2 = new QLabel("", page); + TextLabel2->setAlignment(Qt::AlignCenter); TextLabel2->setWhatsThis( whatsThis ); TextLabel2->setToolTip( ttip ); diff --git a/kdvi_multipage.cpp b/kdvi_multipage.cpp index cb9346e37..5ad0dfbaf 100644 --- a/kdvi_multipage.cpp +++ b/kdvi_multipage.cpp @@ -53,7 +53,6 @@ KDVIMultiPage::KDVIMultiPage(QObject *parent, const QStringList& args) // Points to the same object as renderer to avoid downcasting. // FIXME: Remove when the API of the Renderer-class is finished. - DVIRenderer.setName("DVI renderer"); setRenderer(&DVIRenderer); docInfoAction = new KAction(KIcon("info"), i18n("Document &Info"), actionCollection(), "info_dvi"); @@ -402,7 +401,7 @@ void KDVIMultiPage::showTipOnStart() DocumentWidget* KDVIMultiPage::createDocumentWidget(PageView *parent, DocumentPageCache *cache) { - DVIWidget* documentWidget = new DVIWidget(parent, cache, "singlePageWidget"); + DVIWidget* documentWidget = new DVIWidget(parent, cache); // Handle source links connect(documentWidget, SIGNAL(SRCLink(const QString&, const QPoint&, DocumentWidget*)), getRenderer(), diff --git a/optionDialogSpecialWidget.cpp b/optionDialogSpecialWidget.cpp index bcf62295b..f1ca666f3 100644 --- a/optionDialogSpecialWidget.cpp +++ b/optionDialogSpecialWidget.cpp @@ -56,7 +56,7 @@ optionDialogSpecialWidget::optionDialogSpecialWidget( QWidget* parent, const ch editorDescriptionString += i18n("Click 'Help' to learn how to set up XEmacs."); for(int i=0; iinsertItem(editorNameString[i]); + editorChoice->insertItem(i, editorNameString[i]); // Set the proper editor on the "Rendering-Page", try to recognize // the editor command from the config-file. If the editor command is // not recognized, switch to "User defined editor". That way, kdvi @@ -101,8 +101,8 @@ void optionDialogSpecialWidget::slotUserDefdEditorCommand( const QString &text ) void optionDialogSpecialWidget::slotComboBox(int item) { - if (item != editorChoice->currentItem()) - editorChoice->setCurrentItem(item); + if (item != editorChoice->currentIndex()) + editorChoice->setCurrentIndex(item); editorDescription->setText(editorDescriptionString[item]);