1 /***************************************************************************
2 * Copyright (C) 2005 by Enrico Ros <eros.kde@email.it> *
3 * Copyright (C) 2006 by Albert Astals Cid <aacid@kde.org> *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) any later version. *
9 ***************************************************************************/
11 #ifndef _OKULAR_MINIBAR_H_
12 #define _OKULAR_MINIBAR_H_
15 #include "core/observer.h"
25 * @short A widget to display page number and change current page.
27 class MiniBar
: public QWidget
, public Okular::DocumentObserver
31 MiniBar( QWidget
*parent
, Okular::Document
* document
);
34 // [INHERITED] from DocumentObserver
35 uint
observerId() const { return MINIBAR_ID
; }
36 void notifySetup( const QVector
< Okular::Page
* > & pages
, int setupFlags
);
37 void notifyViewportChanged( bool smoothMove
);
45 void slotChangePage();
46 void slotEmitNextPage();
47 void slotEmitPrevPage();
50 void resizeForPage( int pages
);
52 Okular::Document
* m_document
;
53 PagesEdit
* m_pagesEdit
;
54 HoverButton
* m_prevButton
;
55 HoverButton
* m_pagesButton
;
56 HoverButton
* m_nextButton
;
61 * @short A small progress bar.
63 class ProgressWidget
: public QWidget
, public Okular::DocumentObserver
67 ProgressWidget( QWidget
* parent
, Okular::Document
* document
);
70 // [INHERITED] from DocumentObserver
71 uint
observerId() const { return PROGRESSWIDGET_ID
; }
72 void notifyViewportChanged( bool smoothMove
);
74 void slotGotoNormalizedPage( float index
);
81 void setProgress( float percentage
);
83 void mouseMoveEvent( QMouseEvent
* e
);
84 void mousePressEvent( QMouseEvent
* e
);
85 void wheelEvent( QWheelEvent
* e
);
86 void paintEvent( QPaintEvent
* e
);
89 Okular::Document
* m_document
;
91 float m_progressPercentage
;