Blame style/animations/adwaitastackedwidgetdata.h

Packit 8e9c33
#ifndef adwaitastackedwidget_datah
Packit 8e9c33
#define adwaitastackedwidget_datah
Packit 8e9c33
Packit 8e9c33
//////////////////////////////////////////////////////////////////////////////
Packit 8e9c33
// adwaitastackedwidgetdata.h
Packit 8e9c33
// data container for QStackedWidget transition
Packit 8e9c33
// -------------------
Packit 8e9c33
//
Packit 8e9c33
// Copyright (c) 2009 Hugo Pereira Da Costa <hugo.pereira@free.fr>
Packit 8e9c33
//
Packit 8e9c33
// Permission is hereby granted, free of charge, to any person obtaining a copy
Packit 8e9c33
// of this software and associated documentation files (the "Software"), to
Packit 8e9c33
// deal in the Software without restriction, including without limitation the
Packit 8e9c33
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
Packit 8e9c33
// sell copies of the Software, and to permit persons to whom the Software is
Packit 8e9c33
// furnished to do so, subject to the following conditions:
Packit 8e9c33
//
Packit 8e9c33
// The above copyright notice and this permission notice shall be included in
Packit 8e9c33
// all copies or substantial portions of the Software.
Packit 8e9c33
//
Packit 8e9c33
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
Packit 8e9c33
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
Packit 8e9c33
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
Packit 8e9c33
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
Packit 8e9c33
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
Packit 8e9c33
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
Packit 8e9c33
// IN THE SOFTWARE.
Packit 8e9c33
//////////////////////////////////////////////////////////////////////////////
Packit 8e9c33
Packit 8e9c33
#include "adwaitatransitiondata.h"
Packit 8e9c33
Packit 8e9c33
#include <QStackedWidget>
Packit 8e9c33
Packit 8e9c33
namespace Adwaita
Packit 8e9c33
{
Packit 8e9c33
Packit 8e9c33
    //! generic data
Packit 8e9c33
    class StackedWidgetData: public TransitionData
Packit 8e9c33
    {
Packit 8e9c33
Packit 8e9c33
        Q_OBJECT
Packit 8e9c33
Packit 8e9c33
        public:
Packit 8e9c33
Packit 8e9c33
        //! constructor
Packit 8e9c33
        StackedWidgetData( QObject*, QStackedWidget*, int );
Packit 8e9c33
Packit 8e9c33
        //! destructor
Packit 8e9c33
        virtual ~StackedWidgetData( void )
Packit 8e9c33
        {}
Packit 8e9c33
Packit 8e9c33
        protected Q_SLOTS:
Packit 8e9c33
Packit 8e9c33
        //! initialize animation
Packit 8e9c33
        virtual bool initializeAnimation( void );
Packit 8e9c33
Packit 8e9c33
        //! animate
Packit 8e9c33
        virtual bool animate( void );
Packit 8e9c33
Packit 8e9c33
        //! finish animation
Packit 8e9c33
        virtual void finishAnimation( void );
Packit 8e9c33
Packit 8e9c33
        //! called when target is destroyed
Packit 8e9c33
        virtual void targetDestroyed( void );
Packit 8e9c33
Packit 8e9c33
        private:
Packit 8e9c33
Packit 8e9c33
        //! target
Packit 8e9c33
        WeakPointer<QStackedWidget> _target;
Packit 8e9c33
Packit 8e9c33
        //! current index
Packit 8e9c33
        int _index;
Packit 8e9c33
Packit 8e9c33
    };
Packit 8e9c33
Packit 8e9c33
}
Packit 8e9c33
Packit 8e9c33
#endif