File indexing completed on 2025-01-05 03:59:26
0001 // SPDX-License-Identifier: LGPL-2.1-or-later 0002 // 0003 // SPDX-FileCopyrightText: 2013 Mohammed Nafees <nafees.technocool@gmail.com> 0004 // 0005 0006 #ifndef NAVIGATIONSLIDER_H 0007 #define NAVIGATIONSLIDER_H 0008 0009 #include <QAbstractSlider> 0010 #include <QPixmap> 0011 0012 namespace Marble 0013 { 0014 0015 class NavigationSlider : public QAbstractSlider 0016 { 0017 Q_OBJECT 0018 public: 0019 explicit NavigationSlider( QWidget *parent = nullptr ); 0020 ~NavigationSlider() override; 0021 0022 Q_SIGNALS: 0023 void repaintNeeded(); 0024 0025 protected: 0026 0027 #if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)) 0028 0029 void enterEvent( QEnterEvent * ) override; 0030 0031 #else 0032 0033 void enterEvent( QEvent * ) override; 0034 0035 #endif 0036 0037 void mouseMoveEvent( QMouseEvent * mouseEvent) override; 0038 void mousePressEvent( QMouseEvent * ) override; 0039 void mouseReleaseEvent( QMouseEvent * ) override; 0040 void leaveEvent( QEvent * ) override; 0041 void paintEvent( QPaintEvent * ) override; 0042 void repaint(); 0043 0044 private: 0045 static QPixmap pixmap(const QString &id ); 0046 QString m_handleImagePath; 0047 }; 0048 0049 } 0050 0051 #endif