The API changed for rotations, requiring another argument for positions.
[contacts_plasmoid.git] / appui.h
blob5de51aa7d91ba424783b4d6b8db27dc4c80ae6b6
1 /*********************************************************************/
2 /* */
3 /* Copyright (C) 2009 Adenilson Cavalcanti <> */
4 /* */
5 /* This program is free software; you can redistribute it and/or */
6 /* modify it under the terms of the GNU General Public License */
7 /* as published by the Free Software Foundation; either version 2 */
8 /* of the License, or (at your option) any later version. */
9 /* */
10 /* This program is distributed in the hope that it will be useful, */
11 /* but WITHOUT ANY WARRANTY; without even the implied warranty of */
12 /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
13 /* GNU General Public License for more details. */
14 /* */
15 /* You should have received a copy of the GNU General Public License */
16 /* along with this program; if not, write to the Free Software */
17 /* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA */
18 /* 02110-1301, USA. */
19 /*********************************************************************/
21 #ifndef APPUI_H
22 #define APPUI_H
24 #include <QGraphicsWidget>
25 #include <QGraphicsLinearLayout>
27 class OmniAnimation;
28 class OmniWidget;
29 class ContactButton;
30 class ContactWidget;
32 class QPropertyAnimation;
33 class QSequentialAnimationGroup;
35 class QtKineticListController;
37 class AppUI: public QGraphicsWidget/*, public KineticScrolling */{
38 Q_OBJECT
40 public:
41 AppUI(QGraphicsItem *parent = 0);
43 virtual ~AppUI();
45 void buildWorld( QString background );
47 private:
48 void rotateAnimation();
49 void resetRotateAnimation();
51 private:
52 QRectF *previousDim;
53 QGraphicsWidget *mGraphicsWidget;
54 QGraphicsLinearLayout *mLayout;
55 QGraphicsLinearLayout *mGraphicsLayout;
56 OmniWidget *mOmniWidget;
57 OmniAnimation *mOmniAnimation;
58 ContactButton *mOmniButton;
59 ContactButton *mHomeButton;
60 QtKineticListController *controller;
61 ContactWidget *mContactWidget;
62 QPropertyAnimation *yRotationAnim;
63 QPropertyAnimation *omniButtonAnim;
64 QPropertyAnimation *homeButtonAnim;
65 QPropertyAnimation *yWidgetRotationAnim;
66 QSequentialAnimationGroup *seqAnimation;
68 public Q_SLOTS:
69 void makeVisible();
70 void hideWidget();
71 void backwardAnimation();
72 void forwardAnimation();
75 protected:
76 QSizeF sizeHint( Qt::SizeHint which, const QSizeF & constraint = QSizeF() ) const;
77 void resizeEvent( QGraphicsSceneResizeEvent * event );
79 protected:
80 void animation();
83 #endif