File indexing completed on 2024-12-15 04:01:00

0001 /*
0002  * SPDX-FileCopyrightText: 2019-2023 Mattia Basaglia <dev@dragon.best>
0003  *
0004  * SPDX-License-Identifier: GPL-3.0-or-later
0005  */
0006 
0007 #ifndef TIMELINE_SLIDER_HPP
0008 #define TIMELINE_SLIDER_HPP
0009 
0010 #include <QAbstractSlider>
0011 
0012 namespace glaxnimate::android {
0013 
0014 class TimelineSlider : public QAbstractSlider
0015 {
0016     Q_OBJECT
0017 
0018 public:
0019     using QAbstractSlider::QAbstractSlider;
0020 
0021     void set_slider_size(int size);
0022 
0023 protected:
0024     void mousePressEvent(QMouseEvent *ev) override;
0025     void mouseMoveEvent(QMouseEvent *ev) override;
0026     void mouseReleaseEvent(QMouseEvent *ev) override;
0027     void paintEvent(QPaintEvent* ev) override;
0028 
0029     int slider_size = 80;
0030 };
0031 
0032 
0033 } // namespace glaxnimate::android
0034 
0035 #endif // TIMELINE_SLIDER_HPP