/* * SPDX-FileCopyrightText: 2014 Hugo Pereira Da Costa * * SPDX-License-Identifier: GPL-2.0-or-later */ #pragma once #include "breezedialdata.h" #include "breezewidgetstateengine.h" namespace Breeze { //* stores dial hovered action and timeLine class DialEngine : public WidgetStateEngine { Q_OBJECT public: //* constructor explicit DialEngine(QObject *parent) : WidgetStateEngine(parent) { } //* destructor virtual ~DialEngine() { } //* register dial virtual bool registerWidget(QWidget *, AnimationModes); //* control rect virtual void setHandleRect(const QObject *object, const QRect &rect) { if (DataMap::Value data = this->data(object, AnimationHover)) { static_cast(data.data())->setHandleRect(rect); } } //* mouse position virtual QPoint position(const QObject *object) { if (DataMap::Value data = this->data(object, AnimationHover)) { return static_cast(data.data())->position(); } else { return QPoint(-1, -1); } } }; }