1
0
mirror of https://github.com/KDE/latte-dock.git synced 2025-01-08 01:18:21 +03:00
latte-dock/app/view/parabolic.h
2021-05-27 15:01:00 +00:00

57 lines
1.0 KiB
C++

/*
SPDX-FileCopyrightText: 2020 Michail Vourlakos <mvourlakos@gmail.com>
SPDX-License-Identifier: GPL-2.0-or-later
*/
#ifndef VIEWPARABOLIC_H
#define VIEWPARABOLIC_H
// Qt
#include <QEvent>
#include <QObject>
#include <QQuickItem>
#include <QPointer>
#include <QPointF>
#include <QTimer>
namespace Latte {
class View;
}
namespace Latte {
namespace ViewPart {
class Parabolic: public QObject
{
Q_OBJECT
Q_PROPERTY(QQuickItem *currentItem READ currentParabolicItem WRITE setCurrentParabolicItem NOTIFY currentParabolicItemChanged)
public:
Parabolic(Latte::View *parent);
virtual ~Parabolic();
QQuickItem *currentParabolicItem() const;
void setCurrentParabolicItem(QQuickItem *item);
signals:
void currentParabolicItemChanged();
private slots:
void onCurrentParabolicItemChanged();
void onEvent(QEvent *e);
private:
QPointer<Latte::View> m_view;
QPointer<QQuickItem> m_currentParabolicItem;
QPointF m_lastOrphanParabolicMove;
QTimer m_parabolicItemNullifier;
};
}
}
#endif