1
#ifndef oxygenbaseengine_h
2
#define oxygenbaseengine_h
4
//////////////////////////////////////////////////////////////////////////////
9
// Copyright (c) 2009 Hugo Pereira Da Costa <hugo.pereira@free.fr>
11
// Permission is hereby granted, free of charge, to any person obtaining a copy
12
// of this software and associated documentation files (the "Software"), to
13
// deal in the Software without restriction, including without limitation the
14
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
15
// sell copies of the Software, and to permit persons to whom the Software is
16
// furnished to do so, subject to the following conditions:
18
// The above copyright notice and this permission notice shall be included in
19
// all copies or substantial portions of the Software.
21
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
26
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
28
//////////////////////////////////////////////////////////////////////////////
30
#include <QtCore/QObject>
31
#include <QtCore/QSet>
32
#include <QtCore/QWeakPointer>
37
//! base class for all animation engines
38
/*! it is used to store configuration values used by all animations stored in the engine */
39
class BaseEngine: public QObject
46
typedef QWeakPointer<BaseEngine> Pointer;
49
BaseEngine( QObject* parent ):
56
virtual ~BaseEngine( void )
60
virtual void setEnabled( bool value )
64
virtual bool enabled( void ) const
68
virtual void setDuration( int value )
69
{ _duration = value; }
72
virtual int duration( void ) const
76
virtual bool unregisterWidget( QObject* object ) = 0;
79
typedef QSet<QWidget*> WidgetList;
81
//! returns registered widgets
82
virtual WidgetList registeredWidgets( void ) const
83
{ return WidgetList(); }
90
//! animation duration