|
1 /* |
|
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 #include <QPropertyAnimation> |
|
19 #include "hspropertyanimationwrapper.h" |
|
20 |
|
21 /*! |
|
22 \class HsMessageBoxWrapper |
|
23 \ingroup group_hsutils |
|
24 \brief |
|
25 */ |
|
26 struct HsPropertyAnimationWrapperImpl |
|
27 { |
|
28 public: |
|
29 bool running; |
|
30 bool forward; |
|
31 }; |
|
32 |
|
33 /*! |
|
34 |
|
35 */ |
|
36 HsPropertyAnimationWrapper::HsPropertyAnimationWrapper(QObject *parent) |
|
37 : QObject(parent),mImpl(new HsPropertyAnimationWrapperImpl) |
|
38 { |
|
39 mImpl->running = false; |
|
40 mImpl->forward = true; |
|
41 } |
|
42 |
|
43 /*! |
|
44 |
|
45 */ |
|
46 HsPropertyAnimationWrapper::~HsPropertyAnimationWrapper() |
|
47 { |
|
48 |
|
49 } |
|
50 |
|
51 /*! |
|
52 |
|
53 */ |
|
54 void HsPropertyAnimationWrapper::setTargetObject(QObject *target) |
|
55 { |
|
56 Q_UNUSED(target) |
|
57 } |
|
58 /*! |
|
59 |
|
60 */ |
|
61 void HsPropertyAnimationWrapper::setPropertyName(const QByteArray &propertyName) |
|
62 { |
|
63 Q_UNUSED(propertyName) |
|
64 } |
|
65 |
|
66 bool HsPropertyAnimationWrapper::isRunning() |
|
67 { |
|
68 return mImpl->running; |
|
69 } |
|
70 void HsPropertyAnimationWrapper::setEndValue(const QVariant &value) |
|
71 { |
|
72 Q_UNUSED(value) |
|
73 } |
|
74 void HsPropertyAnimationWrapper::setDuration(int msecs) |
|
75 { |
|
76 Q_UNUSED(msecs) |
|
77 } |
|
78 void HsPropertyAnimationWrapper::setForward() |
|
79 { |
|
80 mImpl->forward = true; |
|
81 } |
|
82 |
|
83 void HsPropertyAnimationWrapper::setBackward() |
|
84 { |
|
85 mImpl->forward = false; |
|
86 } |
|
87 |
|
88 bool HsPropertyAnimationWrapper::isForward() const |
|
89 { |
|
90 return mImpl->forward; |
|
91 } |
|
92 void HsPropertyAnimationWrapper::start() |
|
93 { |
|
94 mImpl->running = true; |
|
95 emit finished(); |
|
96 } |
|
97 /*! |
|
98 |
|
99 */ |
|
100 void HsPropertyAnimationWrapper::stop() |
|
101 { |
|
102 mImpl->running = false; |
|
103 } |