1/*
2 * Copyright (C) 2008-2009, Pino Toscano <pino@kde.org>
3 * Copyright (C) 2013, Fabio D'Urso <fabiodurso@hotmail.it>
4 * Copyright (C) 2019, 2021, Albert Astals Cid <aacid@kde.org>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option)
9 * any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
19 */
20
21#ifndef NAVIGATIONTOOLBAR_H
22#define NAVIGATIONTOOLBAR_H
23
24#include <QtWidgets/QToolBar>
25
26#include "documentobserver.h"
27
28class QAction;
29class QComboBox;
30
31class NavigationToolBar : public QToolBar, public DocumentObserver
32{
33 Q_OBJECT
34
35public:
36 explicit NavigationToolBar(QWidget *parent = nullptr);
37 ~NavigationToolBar() override;
38
39 void documentLoaded() override;
40 void documentClosed() override;
41 void pageChanged(int page) override;
42
43Q_SIGNALS:
44 void zoomChanged(qreal value); // NOLINT(readability-inconsistent-declaration-parameter-name)
45 void rotationChanged(int rotation); // NOLINT(readability-inconsistent-declaration-parameter-name)
46
47private Q_SLOTS:
48 void slotGoFirst();
49 void slotGoPrev();
50 void slotGoNext();
51 void slotGoLast();
52 void slotComboActivated(int index);
53 void slotZoomComboActivated(int index);
54 void slotRotationComboChanged(int idx);
55
56private:
57 QAction *m_firstAct;
58 QAction *m_prevAct;
59 QComboBox *m_pageCombo;
60 QAction *m_nextAct;
61 QAction *m_lastAct;
62 QComboBox *m_zoomCombo;
63 QComboBox *m_rotationCombo;
64};
65
66#endif
67

source code of poppler/qt6/demos/navigationtoolbar.h