2024-02-17 22:51:19 +00:00
|
|
|
/*
|
|
|
|
* SPDX-FileCopyrightText: 2014 Hugo Pereira Da Costa <hugo.pereira@free.fr>
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
*/
|
|
|
|
|
2024-08-09 01:20:25 +00:00
|
|
|
#pragma once
|
2024-02-17 22:51:19 +00:00
|
|
|
|
|
|
|
#include "breezewidgetstatedata.h"
|
|
|
|
|
|
|
|
namespace Breeze
|
|
|
|
{
|
|
|
|
//* dial data
|
|
|
|
class DialData : public WidgetStateData
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
//* constructor
|
2024-08-09 01:20:25 +00:00
|
|
|
DialData(QObject *parent, QObject *target, int duration);
|
2024-02-17 22:51:19 +00:00
|
|
|
|
|
|
|
//* event filter
|
|
|
|
bool eventFilter(QObject *, QEvent *) override;
|
|
|
|
|
|
|
|
//* subcontrol rect
|
|
|
|
void setHandleRect(const QRect &rect)
|
|
|
|
{
|
|
|
|
_handleRect = rect;
|
|
|
|
}
|
|
|
|
|
|
|
|
//* mouse position
|
|
|
|
QPoint position() const
|
|
|
|
{
|
|
|
|
return _position;
|
|
|
|
}
|
|
|
|
|
|
|
|
private:
|
|
|
|
//* hoverMoveEvent
|
|
|
|
void hoverMoveEvent(QObject *, QEvent *);
|
|
|
|
|
|
|
|
//* hoverMoveEvent
|
|
|
|
void hoverLeaveEvent(QObject *, QEvent *);
|
|
|
|
|
|
|
|
//* rect
|
|
|
|
QRect _handleRect;
|
|
|
|
|
|
|
|
//* mouse position
|
|
|
|
QPoint _position;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|