LunaSysMgr
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DockModeWindow.h
Go to the documentation of this file.
1 /* @@@LICENSE
2 *
3 * Copyright (c) 2010-2012 Hewlett-Packard Development Company, L.P.
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 *
17 * LICENSE@@@ */
18 
19 
20 
21 
22 #ifndef DOCKMODEWINDOW_H
23 #define DOCKMODEWINDOW_H
24 
25 #include "Common.h"
26 
27 #include "Event.h"
28 #include "CardWindow.h"
29 #include "Timer.h"
30 #include "DockModeWindowManager.h"
31 #include <QGraphicsRotation>
32 #include <QPropertyAnimation>
33 #include <QSequentialAnimationGroup>
34 #include <QList>
35 #include <QPainterPath>
36 
37 class PIpcMessage;
38 class FlickGesture;
40 
41 
42 class DockModeWindow : public CardWindow
43 {
44  Q_OBJECT
45  Q_PROPERTY(qreal pulseOpacity READ pulseOpacity WRITE setPulseOpacity)
46 public:
47 
49  DockModeWindow(WindowType::Type type, const QPixmap& pixmap);
50  virtual ~DockModeWindow();
51 
52  virtual void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget);
53 
54  void setRotationAxis(bool x, bool y, bool z);
55  void setRotationAngle(double angle);
56 
57  virtual void setMaximized(bool enable);
58 
59  virtual void setPrepareAddedToWindowManager();
60  virtual void setAddedToWindowManager();
61 
62 protected:
64 
65  qreal pulseOpacity() const { return m_pulseOpacity; }
66  void setPulseOpacity(qreal opacity);
68 
69  QPixmap m_icon;
70 
71  QSequentialAnimationGroup m_pulseAnimation;
72  static unsigned int s_dockGlowRefCount;
73  static QPixmap* s_dockGlow;
74 
75  QPropertyAnimation m_fadeAnimation;
76  QGraphicsRotation m_rotation;
77  QList<QGraphicsTransform *> m_transformList;
79 
80 };
81 
82 #endif /* DOCKMODEWINDOW_H */