mirror of
https://invent.kde.org/graphics/okular
synced 2024-11-05 18:34:53 +00:00
e65c7058c3
number, the total number of pages and a little grahical 'progress' indicator. Moved 'next page' and 'prev page' buttons from the main toolbar to the MiniBar. Minibar lets you edit the page number, click or wheel on progress, go to next/prev page, show the gotoPage dialog. Added rmb popup when clicking on thumbnails. When clicking, the ThumbnailList only emits the same signal emitted by PageView so the same context menu is displayed. Misc fixes: [MEM] enabled allocated pages raising in queue when displayed again, [ThumbnailList] enabled PageUp/PageDown. svn path=/trunk/kdegraphics/kpdf/; revision=382597
59 lines
1.8 KiB
C++
59 lines
1.8 KiB
C++
/***************************************************************************
|
|
* Copyright (C) 2005 by Enrico Ros <eros.kde@email.it> *
|
|
* *
|
|
* This program is free software; you can redistribute it and/or modify *
|
|
* it under the terms of the GNU General Public License as published by *
|
|
* the Free Software Foundation; either version 2 of the License, or *
|
|
* (at your option) any later version. *
|
|
***************************************************************************/
|
|
|
|
#ifndef _KPDF_MINIBAR_H_
|
|
#define _KPDF_MINIBAR_H_
|
|
|
|
#include <qframe.h>
|
|
#include "core/observer.h"
|
|
|
|
class KPDFDocument;
|
|
class PagesEdit;
|
|
class HoverButton;
|
|
class ProgressWidget;
|
|
|
|
/**
|
|
* @short A widget to display page number and change current page.
|
|
*/
|
|
class MiniBar : public QFrame, public DocumentObserver
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
MiniBar( QWidget *parent, KPDFDocument * document );
|
|
|
|
// [INHERITED] from DocumentObserver
|
|
uint observerId() const { return MINIBAR_ID; }
|
|
void notifySetup( const QValueVector< KPDFPage * > & pages, bool );
|
|
void notifyViewportChanged();
|
|
|
|
signals:
|
|
void gotoPage();
|
|
void prevPage();
|
|
void nextPage();
|
|
|
|
public slots:
|
|
void slotChangePage();
|
|
void slotGotoNormalizedPage( float normIndex );
|
|
void slotEmitNextPage();
|
|
void slotEmitPrevPage();
|
|
|
|
protected:
|
|
void resizeEvent( QResizeEvent * );
|
|
|
|
private:
|
|
KPDFDocument * m_document;
|
|
PagesEdit * m_pagesEdit;
|
|
HoverButton * m_prevButton;
|
|
HoverButton * m_pagesButton;
|
|
HoverButton * m_nextButton;
|
|
ProgressWidget * m_progressWidget;
|
|
int m_currentPage;
|
|
};
|
|
|
|
#endif
|