diff --git a/ui/annotationpropertiesdialog.cpp b/ui/annotationpropertiesdialog.cpp index 31c29ee9b..5bf3d0d4f 100644 --- a/ui/annotationpropertiesdialog.cpp +++ b/ui/annotationpropertiesdialog.cpp @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include @@ -36,15 +37,15 @@ AnnotsPropertiesDialog::AnnotsPropertiesDialog( QWidget *parent, Okular::Documen setCaptionTextbyAnnotType(); if ( canEditAnnotations ) { - setButtons( Ok | Apply | Cancel ); - enableButton( Apply, false ); + setStandardButtons( QDialogButtonBox::Ok | QDialogButtonBox::Apply | QDialogButtonBox::Cancel ); + button( QDialogButtonBox::Apply )->setEnabled( false ); connect( this, SIGNAL(applyClicked()), this, SLOT(slotapply()) ); connect( this, SIGNAL(okClicked()), this, SLOT(slotapply()) ); } else { - setButtons( Close ); - setDefaultButton( Close ); + setStandardButtons( QDialogButtonBox::Close ); + button( QDialogButtonBox::Close )->setDefault( true ); } m_annotWidget = AnnotationWidgetFactory::widgetFor( ann ); @@ -153,13 +154,13 @@ void AnnotsPropertiesDialog::setCaptionTextbyAnnotType() captiontext = i18n( "Annotation Properties" ); break; } - setCaption( captiontext ); + setWindowTitle( captiontext ); } void AnnotsPropertiesDialog::setModified() { modified = true; - enableButton( Apply, true ); + button( QDialogButtonBox::Apply )->setEnabled( true ); } void AnnotsPropertiesDialog::slotapply() @@ -178,7 +179,7 @@ void AnnotsPropertiesDialog::slotapply() m_modifyDateLabel->setText( i18n( "Modified: %1", KGlobal::locale()->formatDateTime( m_annot->modificationDate(), KLocale::LongDate, true ) ) ); modified = false; - enableButton( Apply, false ); + button( QDialogButtonBox::Apply )->setEnabled( false ); } #include "moc_annotationpropertiesdialog.cpp" diff --git a/ui/pagepainter.cpp b/ui/pagepainter.cpp index 55a56c3a7..9273420cf 100644 --- a/ui/pagepainter.cpp +++ b/ui/pagepainter.cpp @@ -36,7 +36,9 @@ #include "settings_core.h" #include "core/document_p.h" -K_GLOBAL_STATIC_WITH_ARGS( QPixmap, busyPixmap, ( KIconLoader::global()->loadIcon("okular", KIconLoader::NoGroup, 32, KIconLoader::DefaultState, QStringList(), 0, true) ) ) +#pragma message("KF5: enable busyPixmap again") +QPixmap *busyPixmap = new QPixmap(); +//K_GLOBAL_STATIC_WITH_ARGS( QPixmap, busyPixmap, ( KIconLoader::global()->loadIcon("okular", KIconLoader::NoGroup, 32, KIconLoader::DefaultState, QStringList(), 0, true) ) ) #define TEXTANNOTATION_ICONSIZE 24 diff --git a/ui/pageview.cpp b/ui/pageview.cpp index 34aa1defe..214d5819a 100644 --- a/ui/pageview.cpp +++ b/ui/pageview.cpp @@ -200,8 +200,8 @@ public: KAction * aMouseMagnifier; KToggleAction * aToggleAnnotator; KSelectAction * aZoom; - KAction * aZoomIn; - KAction * aZoomOut; + QAction * aZoomIn; + QAction * aZoomOut; KToggleAction * aZoomFitWidth; KToggleAction * aZoomFitPage; KToggleAction * aZoomAutoFit; @@ -554,8 +554,8 @@ void PageView::setupActions( KActionCollection * ac ) { d->actionCollection = ac; - d->aZoomIn->setShortcut( KStandardShortcut::zoomIn() ); - d->aZoomOut->setShortcut( KStandardShortcut::zoomOut() ); + d->aZoomIn->setShortcut( QKeySequence(QKeySequence::ZoomIn) ); + d->aZoomOut->setShortcut( QKeySequence(QKeySequence::ZoomOut) ); // Mouse-Mode actions d->aMouseSelect = new KAction(KIcon( "select-rectangular" ), i18n("&Selection Tool"), this); @@ -654,8 +654,8 @@ void PageView::setupActions( KActionCollection * ac ) toggleFormWidgets( false ); // Setup undo and redo actions - KAction *kundo = KStandardAction::create( KStandardAction::Undo, d->document, SLOT(undo()), ac ); - KAction *kredo = KStandardAction::create( KStandardAction::Redo, d->document, SLOT(redo()), ac ); + QAction *kundo = KStandardAction::create( KStandardAction::Undo, d->document, SLOT(undo()), ac ); + QAction *kredo = KStandardAction::create( KStandardAction::Redo, d->document, SLOT(redo()), ac ); connect(d->document, SIGNAL(canUndoChanged(bool)), kundo, SLOT(setEnabled(bool))); connect(d->document, SIGNAL(canRedoChanged(bool)), kredo, SLOT(setEnabled(bool))); kundo->setEnabled(false); diff --git a/ui/presentationwidget.cpp b/ui/presentationwidget.cpp index e82869d1f..282472406 100644 --- a/ui/presentationwidget.cpp +++ b/ui/presentationwidget.cpp @@ -39,6 +39,7 @@ #include #include #include +#include #include #include @@ -1454,7 +1455,8 @@ void PresentationWidget::togglePencilMode( bool on ) annElem.setAttribute( "color", colorstring ); annElem.setAttribute( "width", "2" ); m_drawingEngine = new SmoothPathEngine( root ); - setCursor( KCursor( "pencil", Qt::ArrowCursor ) ); +#pragma message("KF5 fix cursor") + // setCursor( QCursor( "pencil", Qt::ArrowCursor ) ); } else { diff --git a/ui/propertiesdialog.cpp b/ui/propertiesdialog.cpp index 46c2e24fa..5aed4573d 100644 --- a/ui/propertiesdialog.cpp +++ b/ui/propertiesdialog.cpp @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include @@ -42,8 +43,8 @@ PropertiesDialog::PropertiesDialog(QWidget *parent, Okular::Document *doc) m_fontScanStarted( false ) { setFaceType( Tabbed ); - setCaption( i18n( "Unknown File" ) ); - setButtons( Ok ); + setWindowTitle( i18n( "Unknown File" ) ); + setStandardButtons( QDialogButtonBox::Ok ); // PROPERTIES QFrame *page = new QFrame(); @@ -62,7 +63,7 @@ PropertiesDialog::PropertiesDialog(QWidget *parent, Okular::Document *doc) // mime name based on mimetype id QString mimeName = info->get( "mimeType" ).section( '/', -1 ).toUpper(); - setCaption( i18n( "%1 Properties", mimeName ) ); + setWindowTitle( i18n( "%1 Properties", mimeName ) ); QDomElement docElement = info->documentElement(); @@ -148,8 +149,9 @@ PropertiesDialog::PropertiesDialog(QWidget *parent, Okular::Document *doc) m_fontPage = addPage(page2, i18n("&Fonts")); m_fontPage->setIcon( KIcon( "preferences-desktop-font" ) ); page2Layout = new QVBoxLayout(page2); - page2Layout->setMargin(marginHint()); - page2Layout->setSpacing(spacingHint()); +#pragma message("KF5 fix margin/spacing") +// page2Layout->setMargin(marginHint()); +// page2Layout->setSpacing(spacingHint()); // add a tree view QTreeView *view = new QTreeView(page2); view->setContextMenuPolicy(Qt::CustomContextMenu);