File indexing completed on 2025-01-05 03:59:25

0001 // SPDX-License-Identifier: LGPL-2.1-or-later
0002 //
0003 // SPDX-FileCopyrightText: 2013 Mohammed Nafees <nafees.technocool@gmail.com>
0004 //
0005 
0006 #ifndef NAVIGATIONBUTTON_H
0007 #define NAVIGATIONBUTTON_H
0008 
0009 #include <QAbstractButton>
0010 
0011 namespace Marble
0012 {
0013 
0014 class NavigationButton : public QAbstractButton
0015 {
0016     Q_OBJECT
0017 public:
0018     explicit NavigationButton( QWidget *parent = nullptr );
0019 
0020 Q_SIGNALS:
0021     void repaintNeeded();
0022 
0023 protected:
0024     void mousePressEvent ( QMouseEvent *mouseEvent ) override;
0025     void mouseReleaseEvent ( QMouseEvent *mouseEvent ) override;
0026 
0027 #if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
0028 
0029     void enterEvent( QEnterEvent * e) override;
0030 
0031 #else
0032 
0033     void enterEvent( QEvent * e) override;
0034 
0035 #endif
0036 
0037     void leaveEvent( QEvent * e) override;
0038     void changeEvent( QEvent *e ) override;
0039     void paintEvent( QPaintEvent * ) override;
0040 
0041 private:
0042     QIcon::Mode m_iconMode;
0043 };
0044 
0045 }
0046 
0047 #endif