File indexing completed on 2024-05-19 04:07:52
0001 /* 0002 SPDX-FileCopyrightText: 2009 Stefan Majewsky <majewsky@gmx.net> 0003 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #ifndef PALAPELI_ZOOMWIDGET_H 0008 #define PALAPELI_ZOOMWIDGET_H 0009 0010 class QSlider; 0011 class QToolButton; 0012 #include <QWidget> 0013 0014 namespace Palapeli 0015 { 0016 class ZoomWidget : public QWidget 0017 { 0018 Q_OBJECT 0019 public: 0020 explicit ZoomWidget(QWidget* parent = nullptr); 0021 public Q_SLOTS: 0022 void setConstrained(bool constrained); 0023 void setLevel(int level); 0024 Q_SIGNALS: 0025 void constrainedChanged(bool constrained); 0026 void levelChanged(int level); 0027 void zoomInRequest(); 0028 void zoomOutRequest(); 0029 private: 0030 QToolButton* m_constrainedButton; 0031 QToolButton* m_zoomOutButton; 0032 QToolButton* m_zoomInButton; 0033 QSlider* m_slider; 0034 }; 0035 } 0036 0037 #endif // PALAPELI_ZOOMWIDGET_H