From 90d9ab5ba2ae41d218a2dbfac62bf616ff38aa4e Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Sat, 1 Apr 2006 22:54:26 +0000 Subject: [PATCH] improve a bit svn path=/branches/work/kde4/playground/graphics/okular/; revision=525403 --- ui/presentationwidget.cpp | 11 +++++++---- ui/presentationwidget.h | 4 ++-- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/ui/presentationwidget.cpp b/ui/presentationwidget.cpp index b954439bd..1ba4593e3 100644 --- a/ui/presentationwidget.cpp +++ b/ui/presentationwidget.cpp @@ -18,7 +18,7 @@ #include #include #include -#include +#include #include #include #include @@ -178,6 +178,7 @@ bool PresentationWidget::event ( QEvent * e ) { if (e -> type() == QEvent::WindowDeactivate) KWin::clearState(winId(), NET::StaysOnTop); else if (e -> type() == QEvent::WindowActivate) KWin::setState(winId(), NET::StaysOnTop); +#warning this is making the presentation mode crash return QDialog::event(e); } @@ -297,7 +298,9 @@ void PresentationWidget::paintEvent( QPaintEvent * pe ) KIconLoader *il = KGlobal::iconLoader(); // create top toolbar - m_topBar = new KToolBar( this, "presentationBar" ); + m_topBar = new QToolBar( this ); + m_topBar->setObjectName( "presentationBar" ); + m_topBar->setIconSize( QSize( 32, 32 ) ); m_topBar->addAction( QIcon(il->loadIcon("1leftarrow", K3Icon::Toolbar)), i18n("Previous Page"), this, SLOT( slotPrevPage() ) ); m_topBar->addAction( QIcon(il->loadIcon("1rightarrow", K3Icon::Toolbar)), i18n("Next Page"), this, SLOT( slotNextPage() ) ); QWidget *spacer = new QWidget(m_topBar); @@ -525,8 +528,8 @@ void PresentationWidget::generateIntroPage( QPainter & p ) p.fillRect( 0, i, m_width, 1, QColor( k, k, k ) ); } - // draw kpdf logo in the four corners - QPixmap logo = DesktopIcon( "kpdf", 64 ); + // draw oKular logo in the four corners + QPixmap logo = DesktopIcon( "oKular", 64 ); if ( !logo.isNull() ) { p.drawPixmap( 5, 5, logo ); diff --git a/ui/presentationwidget.h b/ui/presentationwidget.h index 64907b835..00242bc0a 100644 --- a/ui/presentationwidget.h +++ b/ui/presentationwidget.h @@ -17,7 +17,7 @@ #include "core/observer.h" #include "core/pagetransition.h" -class KToolBar; +class QToolBar; class QTimer; class KPDFDocument; @@ -88,7 +88,7 @@ class PresentationWidget : public QDialog, public DocumentObserver QVector< PresentationFrame * > m_frames; int m_frameIndex; QStringList m_metaStrings; - KToolBar * m_topBar; + QToolBar * m_topBar; private slots: void slotNextPage();