File indexing completed on 2024-05-12 16:02:14
0001 /* SPDX-FileCopyrightText: 2008 Peter Simonsson <peter.simonsson@gmail.com> 0002 * 0003 * SPDX-License-Identifier: LGPL-2.0-or-later 0004 */ 0005 0006 #ifndef KOZOOMINPUT_H 0007 #define KOZOOMINPUT_H 0008 0009 #include <QStackedWidget> 0010 0011 class KoZoomInput : public QStackedWidget 0012 { 0013 Q_OBJECT 0014 public: 0015 explicit KoZoomInput(QWidget* parent = 0); 0016 ~KoZoomInput() override; 0017 0018 bool isFlat() const; 0019 void setFlat(bool flat); 0020 0021 void setZoomLevels(const QStringList& levels); 0022 void setCurrentZoomLevel(const QString& level); 0023 0024 bool eventFilter(QObject* watched, QEvent* event) override; 0025 0026 Q_SIGNALS: 0027 void zoomLevelChanged(const QString& level); 0028 0029 protected: 0030 void enterEvent(QEvent* event) override; 0031 void leaveEvent(QEvent* event) override; 0032 void keyPressEvent(QKeyEvent* event) override; 0033 0034 private: 0035 class Private; 0036 Private* const d; 0037 }; 0038 0039 #endif //KOZOOMINPUT_H