Debian Codegraph @

qt5/demos/navigationtoolbar.h

raw
1 /*
2 * Copyright (C) 2008-2009, Pino Toscano <[email protected]>
3 * Copyright (C) 2013, Fabio D'Urso <[email protected]>
4 * Copyright (C) 2019, 2021, Albert Astals Cid <[email protected]>
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
28 class QAction;
29 class QComboBox;
30
31 class NavigationToolBar : public QToolBar, public DocumentObserver
32 {
33 Q_OBJECT
34
35 public:
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
43 Q_SIGNALS:
44 void zoomChanged(qreal value); // NOLINT(readability-inconsistent-declaration-parameter-name)
45 void rotationChanged(int rotation); // NOLINT(readability-inconsistent-declaration-parameter-name)
46
47 private:
48 void slotGoFirst();
49 void slotGoPrev();
50 void slotGoNext();
51 void slotGoLast();
52 void slotComboActivated(int index);
53 void slotZoomComboChanged(const QString &text);
54 void slotRotationComboChanged(int idx);
55
56 QAction *m_firstAct;
57 QAction *m_prevAct;
58 QComboBox *m_pageCombo;
59 QAction *m_nextAct;
60 QAction *m_lastAct;
61 QComboBox *m_zoomCombo;
62 QComboBox *m_rotationCombo;
63 };
64
65 #endif