mirror of
https://github.com/KDE/latte-dock.git
synced 2025-03-09 16:58:16 +03:00
view:separate parabolic c++ code from view
--The parabolic effect c++ part of View now leaves in its own class
This commit is contained in:
parent
5a9d84f383
commit
ba9233684e
@ -5,6 +5,7 @@ set(lattedock-app_SRCS
|
|||||||
${CMAKE_CURRENT_SOURCE_DIR}/effects.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/effects.cpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/padding.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/padding.cpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/panelshadows.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/panelshadows.cpp
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/parabolic.cpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/positioner.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/positioner.cpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/tasksmodel.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/tasksmodel.cpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/view.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/view.cpp
|
||||||
|
128
app/view/parabolic.cpp
Normal file
128
app/view/parabolic.cpp
Normal file
@ -0,0 +1,128 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2020 Michail Vourlakos <mvourlakos@gmail.com>
|
||||||
|
*
|
||||||
|
* This file is part of Latte-Dock
|
||||||
|
*
|
||||||
|
* Latte-Dock is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU General Public License as
|
||||||
|
* published by the Free Software Foundation; either version 2 of
|
||||||
|
* the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* Latte-Dock is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "parabolic.h"
|
||||||
|
|
||||||
|
// local
|
||||||
|
#include "view.h"
|
||||||
|
|
||||||
|
// Qt
|
||||||
|
#include <QMetaObject>
|
||||||
|
|
||||||
|
namespace Latte {
|
||||||
|
namespace ViewPart {
|
||||||
|
|
||||||
|
Parabolic::Parabolic(Latte::View *parent)
|
||||||
|
: QObject(parent),
|
||||||
|
m_view(parent)
|
||||||
|
{
|
||||||
|
m_parabolicItemNullifier.setInterval(100);
|
||||||
|
m_parabolicItemNullifier.setSingleShot(true);
|
||||||
|
connect(&m_parabolicItemNullifier, &QTimer::timeout, this, [&]() {
|
||||||
|
setCurrentParabolicItem(nullptr);
|
||||||
|
});
|
||||||
|
|
||||||
|
connect(this, &Parabolic::currentParabolicItemChanged, this, &Parabolic::onCurrentParabolicItemChanged);
|
||||||
|
|
||||||
|
connect(m_view, &View::eventTriggered, this, &Parabolic::onEvent);
|
||||||
|
}
|
||||||
|
|
||||||
|
Parabolic::~Parabolic()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
QQuickItem *Parabolic::currentParabolicItem() const
|
||||||
|
{
|
||||||
|
return m_currentParabolicItem;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Parabolic::setCurrentParabolicItem(QQuickItem *item)
|
||||||
|
{
|
||||||
|
if (m_currentParabolicItem == item) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (item && m_currentParabolicItem) {
|
||||||
|
QMetaObject::invokeMethod(item, "parabolicExited", Qt::QueuedConnection);
|
||||||
|
}
|
||||||
|
|
||||||
|
m_currentParabolicItem = item;
|
||||||
|
emit currentParabolicItemChanged();
|
||||||
|
}
|
||||||
|
|
||||||
|
void Parabolic::onEvent(QEvent *e)
|
||||||
|
{
|
||||||
|
if (!e) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (e->type()) {
|
||||||
|
|
||||||
|
case QEvent::Leave:
|
||||||
|
setCurrentParabolicItem(nullptr);
|
||||||
|
break;
|
||||||
|
case QEvent::MouseMove:
|
||||||
|
if (auto me = dynamic_cast<QMouseEvent *>(e)) {
|
||||||
|
if (m_currentParabolicItem) {
|
||||||
|
QPointF internal = m_currentParabolicItem->mapFromScene(me->windowPos());
|
||||||
|
|
||||||
|
if (m_currentParabolicItem->contains(internal)) {
|
||||||
|
m_parabolicItemNullifier.stop();
|
||||||
|
//! sending move event to parabolic item
|
||||||
|
QMetaObject::invokeMethod(m_currentParabolicItem,
|
||||||
|
"parabolicMove",
|
||||||
|
Qt::QueuedConnection,
|
||||||
|
Q_ARG(qreal, internal.x()),
|
||||||
|
Q_ARG(qreal, internal.y()));
|
||||||
|
} else {
|
||||||
|
m_lastOrphanParabolicMove = me->windowPos();
|
||||||
|
//! clearing parabolic item
|
||||||
|
m_parabolicItemNullifier.start();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
m_lastOrphanParabolicMove = me->windowPos();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void Parabolic::onCurrentParabolicItemChanged()
|
||||||
|
{
|
||||||
|
m_parabolicItemNullifier.stop();
|
||||||
|
|
||||||
|
if (m_currentParabolicItem != nullptr) {
|
||||||
|
QPointF internal = m_currentParabolicItem->mapFromScene(m_lastOrphanParabolicMove);
|
||||||
|
|
||||||
|
if (m_currentParabolicItem->contains(internal)) {
|
||||||
|
//! sending enter event to parabolic item
|
||||||
|
QMetaObject::invokeMethod(m_currentParabolicItem,
|
||||||
|
"parabolicEntered",
|
||||||
|
Qt::QueuedConnection,
|
||||||
|
Q_ARG(qreal, internal.x()),
|
||||||
|
Q_ARG(qreal, internal.y()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
69
app/view/parabolic.h
Normal file
69
app/view/parabolic.h
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2020 Michail Vourlakos <mvourlakos@gmail.com>
|
||||||
|
*
|
||||||
|
* This file is part of Latte-Dock
|
||||||
|
*
|
||||||
|
* Latte-Dock is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU General Public License as
|
||||||
|
* published by the Free Software Foundation; either version 2 of
|
||||||
|
* the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* Latte-Dock is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef VIEWPARABOLIC_H
|
||||||
|
#define VIEWPARABOLIC_H
|
||||||
|
|
||||||
|
// Qt
|
||||||
|
#include <QEvent>
|
||||||
|
#include <QObject>
|
||||||
|
#include <QQuickItem>
|
||||||
|
#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;
|
||||||
|
|
||||||
|
QPointF m_lastOrphanParabolicMove;
|
||||||
|
QQuickItem *m_currentParabolicItem{nullptr};
|
||||||
|
|
||||||
|
QTimer m_parabolicItemNullifier;
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
@ -79,7 +79,8 @@ View::View(Plasma::Corona *corona, QScreen *targetScreen, bool byPassWM)
|
|||||||
m_contextMenu(new ViewPart::ContextMenu(this)),
|
m_contextMenu(new ViewPart::ContextMenu(this)),
|
||||||
m_effects(new ViewPart::Effects(this)),
|
m_effects(new ViewPart::Effects(this)),
|
||||||
m_interface(new ViewPart::ContainmentInterface(this)),
|
m_interface(new ViewPart::ContainmentInterface(this)),
|
||||||
m_padding(new ViewPart::Padding(this))
|
m_padding(new ViewPart::Padding(this)),
|
||||||
|
m_parabolic(new ViewPart::Parabolic(this))
|
||||||
{
|
{
|
||||||
//! needs to be created after Effects because it catches some of its signals
|
//! needs to be created after Effects because it catches some of its signals
|
||||||
//! and avoid a crash from View::winId() at the same time
|
//! and avoid a crash from View::winId() at the same time
|
||||||
@ -112,12 +113,6 @@ View::View(Plasma::Corona *corona, QScreen *targetScreen, bool byPassWM)
|
|||||||
|
|
||||||
connect(m_contextMenu, &ViewPart::ContextMenu::menuChanged, this, &View::updateTransientWindowsTracking);
|
connect(m_contextMenu, &ViewPart::ContextMenu::menuChanged, this, &View::updateTransientWindowsTracking);
|
||||||
|
|
||||||
m_parabolicItemNullifier.setInterval(100);
|
|
||||||
m_parabolicItemNullifier.setSingleShot(true);
|
|
||||||
connect(&m_parabolicItemNullifier, &QTimer::timeout, this, [&]() {
|
|
||||||
setCurrentParabolicItem(nullptr);
|
|
||||||
});
|
|
||||||
|
|
||||||
connect(this, &View::containmentChanged
|
connect(this, &View::containmentChanged
|
||||||
, this, [ &, byPassWM]() {
|
, this, [ &, byPassWM]() {
|
||||||
qDebug() << "dock view c++ containment changed 1...";
|
qDebug() << "dock view c++ containment changed 1...";
|
||||||
@ -325,8 +320,6 @@ void View::init(Plasma::Containment *plasma_containment)
|
|||||||
|
|
||||||
connect(m_interface, &ViewPart::ContainmentInterface::hasExpandedAppletChanged, this, &View::verticalUnityViewHasFocus);
|
connect(m_interface, &ViewPart::ContainmentInterface::hasExpandedAppletChanged, this, &View::verticalUnityViewHasFocus);
|
||||||
|
|
||||||
connect(this, &View::currentParabolicItemChanged, this, &View::onCurrentParabolicItemChanged);
|
|
||||||
|
|
||||||
//! View sends this signal in order to avoid crashes from ViewPart::Indicator when the view is recreated
|
//! View sends this signal in order to avoid crashes from ViewPart::Indicator when the view is recreated
|
||||||
connect(m_corona->indicatorFactory(), &Latte::Indicator::Factory::indicatorChanged, this, [&](const QString &indicatorId) {
|
connect(m_corona->indicatorFactory(), &Latte::Indicator::Factory::indicatorChanged, this, [&](const QString &indicatorId) {
|
||||||
emit indicatorPluginChanged(indicatorId);
|
emit indicatorPluginChanged(indicatorId);
|
||||||
@ -1281,25 +1274,6 @@ void View::setColorizer(QQuickItem *colorizer)
|
|||||||
emit colorizerChanged();
|
emit colorizerChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
QQuickItem *View::currentParabolicItem() const
|
|
||||||
{
|
|
||||||
return m_currentParabolicItem;
|
|
||||||
}
|
|
||||||
|
|
||||||
void View::setCurrentParabolicItem(QQuickItem *item)
|
|
||||||
{
|
|
||||||
if (m_currentParabolicItem == item) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (item && m_currentParabolicItem) {
|
|
||||||
QMetaObject::invokeMethod(item, "parabolicExited", Qt::QueuedConnection);
|
|
||||||
}
|
|
||||||
|
|
||||||
m_currentParabolicItem = item;
|
|
||||||
emit currentParabolicItemChanged();
|
|
||||||
}
|
|
||||||
|
|
||||||
ViewPart::Effects *View::effects() const
|
ViewPart::Effects *View::effects() const
|
||||||
{
|
{
|
||||||
return m_effects;
|
return m_effects;
|
||||||
@ -1325,6 +1299,11 @@ ViewPart::Padding *View::padding() const
|
|||||||
return m_padding;
|
return m_padding;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ViewPart::Parabolic *View::parabolic() const
|
||||||
|
{
|
||||||
|
return m_parabolic;
|
||||||
|
}
|
||||||
|
|
||||||
ViewPart::Positioner *View::positioner() const
|
ViewPart::Positioner *View::positioner() const
|
||||||
{
|
{
|
||||||
return m_positioner;
|
return m_positioner;
|
||||||
@ -1379,7 +1358,6 @@ bool View::event(QEvent *e)
|
|||||||
case QEvent::Leave:
|
case QEvent::Leave:
|
||||||
m_containsMouse = false;
|
m_containsMouse = false;
|
||||||
setContainsDrag(false);
|
setContainsDrag(false);
|
||||||
setCurrentParabolicItem(nullptr);
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case QEvent::DragEnter:
|
case QEvent::DragEnter:
|
||||||
@ -1435,27 +1413,6 @@ bool View::event(QEvent *e)
|
|||||||
|
|
||||||
case QEvent::MouseMove:
|
case QEvent::MouseMove:
|
||||||
if (auto me = dynamic_cast<QMouseEvent *>(e)) {
|
if (auto me = dynamic_cast<QMouseEvent *>(e)) {
|
||||||
|
|
||||||
if (m_currentParabolicItem) {
|
|
||||||
QPointF internal = m_currentParabolicItem->mapFromScene(me->windowPos());
|
|
||||||
|
|
||||||
if (m_currentParabolicItem->contains(internal)) {
|
|
||||||
m_parabolicItemNullifier.stop();
|
|
||||||
//! sending move event to parabolic item
|
|
||||||
QMetaObject::invokeMethod(m_currentParabolicItem,
|
|
||||||
"parabolicMove",
|
|
||||||
Qt::QueuedConnection,
|
|
||||||
Q_ARG(qreal, internal.x()),
|
|
||||||
Q_ARG(qreal, internal.y()));
|
|
||||||
} else {
|
|
||||||
m_lastOrphanParabolicMove = me->windowPos();
|
|
||||||
//! clearing parabolic item
|
|
||||||
m_parabolicItemNullifier.start();
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
m_lastOrphanParabolicMove = me->windowPos();
|
|
||||||
}
|
|
||||||
|
|
||||||
//! adjust event by taking into account paddings
|
//! adjust event by taking into account paddings
|
||||||
if (m_padding
|
if (m_padding
|
||||||
&& !m_padding->isEmpty()
|
&& !m_padding->isEmpty()
|
||||||
@ -1586,24 +1543,6 @@ bool View::event(QEvent *e)
|
|||||||
return ContainmentView::event(adjustedevent);
|
return ContainmentView::event(adjustedevent);
|
||||||
}
|
}
|
||||||
|
|
||||||
void View::onCurrentParabolicItemChanged()
|
|
||||||
{
|
|
||||||
m_parabolicItemNullifier.stop();
|
|
||||||
|
|
||||||
if (m_currentParabolicItem != nullptr) {
|
|
||||||
QPointF internal = m_currentParabolicItem->mapFromScene(m_lastOrphanParabolicMove);
|
|
||||||
|
|
||||||
if (m_currentParabolicItem->contains(internal)) {
|
|
||||||
//! sending enter event to parabolic item
|
|
||||||
QMetaObject::invokeMethod(m_currentParabolicItem,
|
|
||||||
"parabolicEntered",
|
|
||||||
Qt::QueuedConnection,
|
|
||||||
Q_ARG(qreal, internal.x()),
|
|
||||||
Q_ARG(qreal, internal.y()));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void View::updateSinkedEventsGeometry()
|
void View::updateSinkedEventsGeometry()
|
||||||
{
|
{
|
||||||
if (m_inDelete || !m_padding) {
|
if (m_inDelete || !m_padding) {
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
#include "containmentinterface.h"
|
#include "containmentinterface.h"
|
||||||
#include "effects.h"
|
#include "effects.h"
|
||||||
#include "padding.h"
|
#include "padding.h"
|
||||||
|
#include "parabolic.h"
|
||||||
#include "positioner.h"
|
#include "positioner.h"
|
||||||
#include "visibilitymanager.h"
|
#include "visibilitymanager.h"
|
||||||
#include "indicator/indicator.h"
|
#include "indicator/indicator.h"
|
||||||
@ -117,13 +118,13 @@ class View : public PlasmaQuick::ContainmentView
|
|||||||
Q_PROPERTY(float offset READ offset WRITE setOffset NOTIFY offsetChanged)
|
Q_PROPERTY(float offset READ offset WRITE setOffset NOTIFY offsetChanged)
|
||||||
|
|
||||||
Q_PROPERTY(QQuickItem *colorizer READ colorizer WRITE setColorizer NOTIFY colorizerChanged)
|
Q_PROPERTY(QQuickItem *colorizer READ colorizer WRITE setColorizer NOTIFY colorizerChanged)
|
||||||
Q_PROPERTY(QQuickItem *currentParabolicItem READ currentParabolicItem WRITE setCurrentParabolicItem NOTIFY currentParabolicItemChanged)
|
|
||||||
|
|
||||||
Q_PROPERTY(Latte::Layout::GenericLayout *layout READ layout WRITE setLayout NOTIFY layoutChanged)
|
Q_PROPERTY(Latte::Layout::GenericLayout *layout READ layout WRITE setLayout NOTIFY layoutChanged)
|
||||||
Q_PROPERTY(Latte::ViewPart::Effects *effects READ effects NOTIFY effectsChanged)
|
Q_PROPERTY(Latte::ViewPart::Effects *effects READ effects NOTIFY effectsChanged)
|
||||||
Q_PROPERTY(Latte::ViewPart::ContainmentInterface *extendedInterface READ extendedInterface NOTIFY extendedInterfaceChanged)
|
Q_PROPERTY(Latte::ViewPart::ContainmentInterface *extendedInterface READ extendedInterface NOTIFY extendedInterfaceChanged)
|
||||||
Q_PROPERTY(Latte::ViewPart::Indicator *indicator READ indicator NOTIFY indicatorChanged)
|
Q_PROPERTY(Latte::ViewPart::Indicator *indicator READ indicator NOTIFY indicatorChanged)
|
||||||
Q_PROPERTY(Latte::ViewPart::Padding *padding READ padding NOTIFY paddingChanged)
|
Q_PROPERTY(Latte::ViewPart::Padding *padding READ padding NOTIFY paddingChanged)
|
||||||
|
Q_PROPERTY(Latte::ViewPart::Parabolic *parabolic READ parabolic NOTIFY parabolicChanged)
|
||||||
Q_PROPERTY(Latte::ViewPart::Positioner *positioner READ positioner NOTIFY positionerChanged)
|
Q_PROPERTY(Latte::ViewPart::Positioner *positioner READ positioner NOTIFY positionerChanged)
|
||||||
Q_PROPERTY(Latte::ViewPart::VisibilityManager *visibility READ visibility NOTIFY visibilityChanged)
|
Q_PROPERTY(Latte::ViewPart::VisibilityManager *visibility READ visibility NOTIFY visibilityChanged)
|
||||||
Q_PROPERTY(Latte::ViewPart::WindowsTracker *windowsTracker READ windowsTracker NOTIFY windowsTrackerChanged)
|
Q_PROPERTY(Latte::ViewPart::WindowsTracker *windowsTracker READ windowsTracker NOTIFY windowsTrackerChanged)
|
||||||
@ -232,9 +233,6 @@ public:
|
|||||||
QQuickItem *colorizer() const;
|
QQuickItem *colorizer() const;
|
||||||
void setColorizer(QQuickItem *colorizer);
|
void setColorizer(QQuickItem *colorizer);
|
||||||
|
|
||||||
QQuickItem *currentParabolicItem() const;
|
|
||||||
void setCurrentParabolicItem(QQuickItem *item);
|
|
||||||
|
|
||||||
QQuickView *configView();
|
QQuickView *configView();
|
||||||
|
|
||||||
ViewPart::Effects *effects() const;
|
ViewPart::Effects *effects() const;
|
||||||
@ -242,6 +240,7 @@ public:
|
|||||||
ViewPart::ContainmentInterface *extendedInterface() const;
|
ViewPart::ContainmentInterface *extendedInterface() const;
|
||||||
ViewPart::Indicator *indicator() const;
|
ViewPart::Indicator *indicator() const;
|
||||||
ViewPart::Padding *padding() const;
|
ViewPart::Padding *padding() const;
|
||||||
|
ViewPart::Parabolic *parabolic() const;
|
||||||
ViewPart::Positioner *positioner() const;
|
ViewPart::Positioner *positioner() const;
|
||||||
ViewPart::VisibilityManager *visibility() const;
|
ViewPart::VisibilityManager *visibility() const;
|
||||||
ViewPart::WindowsTracker *windowsTracker() const;
|
ViewPart::WindowsTracker *windowsTracker() const;
|
||||||
@ -302,7 +301,6 @@ signals:
|
|||||||
void configWindowGeometryChanged(); // is called from config windows
|
void configWindowGeometryChanged(); // is called from config windows
|
||||||
void containsDragChanged();
|
void containsDragChanged();
|
||||||
void contextMenuIsShownChanged();
|
void contextMenuIsShownChanged();
|
||||||
void currentParabolicItemChanged();
|
|
||||||
void dockLocationChanged();
|
void dockLocationChanged();
|
||||||
void editThicknessChanged();
|
void editThicknessChanged();
|
||||||
void effectsChanged();
|
void effectsChanged();
|
||||||
@ -328,6 +326,7 @@ signals:
|
|||||||
void offsetChanged();
|
void offsetChanged();
|
||||||
void onPrimaryChanged();
|
void onPrimaryChanged();
|
||||||
void paddingChanged();
|
void paddingChanged();
|
||||||
|
void parabolicChanged();
|
||||||
void positionerChanged();
|
void positionerChanged();
|
||||||
void screenEdgeMarginChanged();
|
void screenEdgeMarginChanged();
|
||||||
void screenEdgeMarginEnabledChanged();
|
void screenEdgeMarginEnabledChanged();
|
||||||
@ -362,8 +361,6 @@ private slots:
|
|||||||
void addTransientWindow(QWindow *window);
|
void addTransientWindow(QWindow *window);
|
||||||
void removeTransientWindow(const bool &visible);
|
void removeTransientWindow(const bool &visible);
|
||||||
|
|
||||||
void onCurrentParabolicItemChanged();
|
|
||||||
|
|
||||||
void updateSinkedEventsGeometry();
|
void updateSinkedEventsGeometry();
|
||||||
|
|
||||||
//! workaround in order for top panels to be always on top
|
//! workaround in order for top panels to be always on top
|
||||||
@ -434,15 +431,10 @@ private:
|
|||||||
int m_releaseGrab_x;
|
int m_releaseGrab_x;
|
||||||
int m_releaseGrab_y;
|
int m_releaseGrab_y;
|
||||||
|
|
||||||
QTimer m_parabolicItemNullifier;
|
|
||||||
|
|
||||||
Layout::GenericLayout *m_layout{nullptr};
|
Layout::GenericLayout *m_layout{nullptr};
|
||||||
|
|
||||||
QQuickItem *m_colorizer{nullptr};
|
QQuickItem *m_colorizer{nullptr};
|
||||||
|
|
||||||
QPointF m_lastOrphanParabolicMove;
|
|
||||||
QQuickItem *m_currentParabolicItem{nullptr};
|
|
||||||
|
|
||||||
QPointer<PlasmaQuick::ConfigView> m_appletConfigView;
|
QPointer<PlasmaQuick::ConfigView> m_appletConfigView;
|
||||||
QPointer<ViewPart::PrimaryConfigView> m_primaryConfigView;
|
QPointer<ViewPart::PrimaryConfigView> m_primaryConfigView;
|
||||||
|
|
||||||
@ -451,6 +443,7 @@ private:
|
|||||||
QPointer<ViewPart::Indicator> m_indicator;
|
QPointer<ViewPart::Indicator> m_indicator;
|
||||||
QPointer<ViewPart::ContainmentInterface> m_interface;
|
QPointer<ViewPart::ContainmentInterface> m_interface;
|
||||||
QPointer<ViewPart::Padding> m_padding;
|
QPointer<ViewPart::Padding> m_padding;
|
||||||
|
QPointer<ViewPart::Parabolic> m_parabolic;
|
||||||
QPointer<ViewPart::Positioner> m_positioner;
|
QPointer<ViewPart::Positioner> m_positioner;
|
||||||
QPointer<ViewPart::VisibilityManager> m_visibility;
|
QPointer<ViewPart::VisibilityManager> m_visibility;
|
||||||
QPointer<ViewPart::WindowsTracker> m_windowsTracker;
|
QPointer<ViewPart::WindowsTracker> m_windowsTracker;
|
||||||
|
@ -33,5 +33,5 @@ Ability.ParabolicEffectPrivate {
|
|||||||
restoreZoomIsBlocked: (view && view.contextMenuIsShown)
|
restoreZoomIsBlocked: (view && view.contextMenuIsShown)
|
||||||
|| (applets.parabolic.restoreZoomIsBlocked)
|
|| (applets.parabolic.restoreZoomIsBlocked)
|
||||||
|
|
||||||
currentParabolicItem: view ? view.currentParabolicItem : null
|
currentParabolicItem: view ? view.parabolic.currentItem : null
|
||||||
}
|
}
|
||||||
|
@ -65,9 +65,13 @@ AbilityHost.ParabolicEffect {
|
|||||||
parabolic.startRestoreZoomTimer();
|
parabolic.startRestoreZoomTimer();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
onCurrentParabolicItemChanged: {
|
Connections {
|
||||||
if (!parabolic.view.currentParabolicItem) {
|
target: view ? view.parabolic : null
|
||||||
|
ignoreUnknownSignals : true
|
||||||
|
onCurrentItemChanged: {
|
||||||
|
if (!view.parabolic.currentItem) {
|
||||||
parabolic.startRestoreZoomTimer();
|
parabolic.startRestoreZoomTimer();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -90,7 +94,7 @@ AbilityHost.ParabolicEffect {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function setCurrentParabolicItem(item) {
|
function setCurrentParabolicItem(item) {
|
||||||
parabolic.view.currentParabolicItem = item;
|
view.parabolic.currentItem = item;
|
||||||
}
|
}
|
||||||
|
|
||||||
function applyParabolicEffect(index, currentMousePosition, center) {
|
function applyParabolicEffect(index, currentMousePosition, center) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user