File indexing completed on 2024-05-19 05:28:49
0001 ////////////////////////////////////////////////////////////////////////////// 0002 // breezestackedwidgetdata.h 0003 // data container for QStackedWidget transition 0004 // ------------------- 0005 // 0006 // SPDX-FileCopyrightText: 2009 Hugo Pereira Da Costa <hugo.pereira@free.fr> 0007 // 0008 // SPDX-License-Identifier: MIT 0009 ////////////////////////////////////////////////////////////////////////////// 0010 0011 #pragma once 0012 0013 #include "breezetransitiondata.h" 0014 0015 #include <QStackedWidget> 0016 0017 namespace Breeze 0018 { 0019 //* generic data 0020 class StackedWidgetData : public TransitionData 0021 { 0022 Q_OBJECT 0023 0024 public: 0025 //* constructor 0026 StackedWidgetData(QObject *, QStackedWidget *, int); 0027 0028 protected Q_SLOTS: 0029 0030 //* initialize animation 0031 bool initializeAnimation() override; 0032 0033 //* animate 0034 bool animate() override; 0035 0036 //* finish animation 0037 void finishAnimation(); 0038 0039 //* called when target is destroyed 0040 void targetDestroyed(); 0041 0042 private: 0043 //* target 0044 WeakPointer<QStackedWidget> _target; 0045 0046 //* current index 0047 int _index; 0048 }; 0049 0050 }