diff --git a/dviRenderer.cpp b/dviRenderer.cpp index 718729a01..699f9c265 100644 --- a/dviRenderer.cpp +++ b/dviRenderer.cpp @@ -163,9 +163,9 @@ void dviRenderer::drawPage(RenderedDocumentPagePixmap* page) int pageWidth = page->width(); int pageHeight = page->height(); - + QImage img(pageWidth, pageHeight, QImage::Format_RGB32); - foreGroundPainter = new QPainter(&img); + foreGroundPainter = new QPainter(&img); if (foreGroundPainter != 0) { errorMsg = QString::null; draw_page(); @@ -177,7 +177,7 @@ void dviRenderer::drawPage(RenderedDocumentPagePixmap* page) kDebug(kvs::dvi) << "painter creation failed." << endl; } page->setImage(img); - + page->isEmpty = false; if (errorMsg.isEmpty() != true) { KMessageBox::detailedError(parentWidget, @@ -232,9 +232,10 @@ void dviRenderer::showThatSourceInformationIsPresent() bool showMsg = config->readEntry( "KDVI-info_on_source_specials", true); if (showMsg) { - KDialogBase dialog(i18n("KDVI: Information"), KDialogBase::Yes, KDialogBase::Yes, KDialogBase::Yes, - parentWidget, "information", true, true, KStdGuiItem::ok()); - + KDialog dialog(parentWidget); + dialog.setCaption( i18n("KDVI: Information") ); + dialog.setButtons( KDialog::Yes ); + dialog.setButtonGuiItem( KDialog::Yes, KStdGuiItem::ok() ); KVBox *topcontents = new KVBox (&dialog); topcontents->setSpacing(KDialog::spacingHint()*2); topcontents->setMargin(KDialog::marginHint()*2); @@ -261,7 +262,7 @@ void dviRenderer::showThatSourceInformationIsPresent() dialog.enableLinkedHelp(true); dialog.setMainWidget(topcontents); dialog.enableButtonSeparator(false); - dialog.incInitialSize( extraSize ); + dialog.setInitialSize( extraSize ); dialog.exec(); showMsg = !checkbox->isChecked(); diff --git a/fontprogress.cpp b/fontprogress.cpp index 641a9e364..c4770a78f 100644 --- a/fontprogress.cpp +++ b/fontprogress.cpp @@ -23,16 +23,20 @@ * name 'name' and widget flags set to 'f' */ fontProgressDialog::fontProgressDialog(const QString& helpIndex, const QString& label, const QString& abortTip, const QString& whatsThis, const QString& ttip, QWidget* parent, const QString& name, bool progressbar) - : KDialogBase( parent, "Font Generation Progress Dialog", true, name, Cancel, Cancel, true ), + : KDialog( parent), TextLabel2(0), TextLabel1(0), ProgressBar1(0), progress(0), process(0) { + setCaption( i18n( "Font Generation Progress Dialog" ) ); + setModal( true ); + setButtons( Cancel ); + setDefaultButton( Cancel ); setCursor(QCursor(Qt::WaitCursor)); - setButtonCancel(KGuiItem(i18n("Abort"), "stop", abortTip)); + setButtonGuiItem(Cancel, KGuiItem(i18n("Abort"), "stop", abortTip)); if (helpIndex.isEmpty() == false) { setHelp(helpIndex, "kdvi"); @@ -41,7 +45,8 @@ fontProgressDialog::fontProgressDialog(const QString& helpIndex, const QString& } else enableLinkedHelp(false); - KVBox* page = makeVBoxMainWidget(); + KVBox* page = new KVBox( this ); + setMainWidget( page ); TextLabel1 = new QLabel(label, page); TextLabel1->setAlignment(Qt::AlignCenter); diff --git a/fontprogress.h b/fontprogress.h index 236b6e71b..6102ff8f5 100644 --- a/fontprogress.h +++ b/fontprogress.h @@ -8,7 +8,7 @@ #ifndef FONT_GENERATION_H #define FONT_GENERATION_H -#include +#include #include @@ -29,7 +29,7 @@ class QProcess; * * **/ -class fontProgressDialog : public KDialogBase +class fontProgressDialog : public KDialog { Q_OBJECT diff --git a/infodialog.cpp b/infodialog.cpp index c8f92b12a..f7896801b 100644 --- a/infodialog.cpp +++ b/infodialog.cpp @@ -22,7 +22,7 @@ infoDialog::infoDialog( QWidget* parent ) - : KDialogBase( Tabbed, "Document Info", Ok, Ok, parent, "Document Info", false, false), + : KPageDialog( parent), TextLabel1(0), TextLabel2(0), TextLabel3(0), @@ -30,7 +30,12 @@ infoDialog::infoDialog( QWidget* parent ) headline(QString::null), pool(QString::null) { - QFrame *page1 = addPage( i18n("DVI File") ); + setCaption( i18n( "Document Info" ) ); + setButtons( Ok ); + setModal( false ); + setFaceType( KPageDialog::Tabbed ); + QFrame *page1 = new QFrame( this ); + addPage( page1, i18n("DVI File") ); QVBoxLayout *topLayout1 = new QVBoxLayout( page1 ); topLayout1->setSpacing( 6 ); topLayout1->setMargin( 0 ); @@ -39,7 +44,9 @@ infoDialog::infoDialog( QWidget* parent ) TextLabel1->setToolTip( i18n("Information on the currently loaded DVI-file.") ); topLayout1->addWidget( TextLabel1 ); - QFrame *page2 = addPage( i18n("Fonts") ); + + QFrame *page2 = new QFrame( this ); + addPage( page2, i18n("Fonts") ); QVBoxLayout *topLayout2 = new QVBoxLayout( page2 ); topLayout2->setSpacing( 6 ); topLayout2->setMargin( 0 ); @@ -52,7 +59,8 @@ infoDialog::infoDialog( QWidget* parent ) "This is useful for experts who want to locate problems in the setup of TeX or KDVI.") ); topLayout2->addWidget( TextLabel2 ); - QFrame *page3 = addPage( i18n("External Programs") ); + QFrame *page3 = new QFrame( this ); + addPage( page3, i18n("External Programs") ); QVBoxLayout *topLayout3 = new QVBoxLayout( page3 ); topLayout3->setSpacing( 6 ); topLayout3->setMargin( 0 ); diff --git a/infodialog.h b/infodialog.h index 129476d89..cc4cf9c6d 100644 --- a/infodialog.h +++ b/infodialog.h @@ -7,7 +7,7 @@ #ifndef INFO_KDVI_H #define INFO_KDVI_H -#include +#include #include @@ -17,7 +17,7 @@ class QTextEdit; class QWidget; -class infoDialog : public KDialogBase +class infoDialog : public KPageDialog { Q_OBJECT