mirror of
https://gitgud.io/wackyideas/aerothemeplasma-kde6.git
synced 2024-08-15 00:43:45 +00:00
51 lines
1,006 B
C
51 lines
1,006 B
C
|
//////////////////////////////////////////////////////////////////////////////
|
||
|
// breezestackedwidgetdata.h
|
||
|
// data container for QStackedWidget transition
|
||
|
// -------------------
|
||
|
//
|
||
|
// SPDX-FileCopyrightText: 2009 Hugo Pereira Da Costa <hugo.pereira@free.fr>
|
||
|
//
|
||
|
// SPDX-License-Identifier: MIT
|
||
|
//////////////////////////////////////////////////////////////////////////////
|
||
|
|
||
|
#pragma once
|
||
|
|
||
|
#include "breezetransitiondata.h"
|
||
|
|
||
|
#include <QStackedWidget>
|
||
|
|
||
|
namespace Breeze
|
||
|
{
|
||
|
//* generic data
|
||
|
class StackedWidgetData : public TransitionData
|
||
|
{
|
||
|
Q_OBJECT
|
||
|
|
||
|
public:
|
||
|
//* constructor
|
||
|
StackedWidgetData(QObject *, QStackedWidget *, int);
|
||
|
|
||
|
protected Q_SLOTS:
|
||
|
|
||
|
//* initialize animation
|
||
|
bool initializeAnimation() override;
|
||
|
|
||
|
//* animate
|
||
|
bool animate() override;
|
||
|
|
||
|
//* finish animation
|
||
|
void finishAnimation();
|
||
|
|
||
|
//* called when target is destroyed
|
||
|
void targetDestroyed();
|
||
|
|
||
|
private:
|
||
|
//* target
|
||
|
WeakPointer<QStackedWidget> _target;
|
||
|
|
||
|
//* current index
|
||
|
int _index;
|
||
|
};
|
||
|
|
||
|
}
|