45 Q_ENUMS(HbViewFlag) |
45 Q_ENUMS(HbViewFlag) |
46 Q_FLAGS(HbViewFlags) |
46 Q_FLAGS(HbViewFlags) |
47 Q_PROPERTY(QString title READ title WRITE setTitle) |
47 Q_PROPERTY(QString title READ title WRITE setTitle) |
48 Q_PROPERTY(HbIcon icon READ icon WRITE setIcon) |
48 Q_PROPERTY(HbIcon icon READ icon WRITE setIcon) |
49 Q_PROPERTY(bool contentFullScreen READ isContentFullScreen WRITE setContentFullScreen) |
49 Q_PROPERTY(bool contentFullScreen READ isContentFullScreen WRITE setContentFullScreen) |
|
50 Q_PROPERTY(HbViewFlags viewFlags READ viewFlags WRITE setViewFlags) |
50 |
51 |
51 public: |
52 public: |
52 |
53 |
53 enum HbViewFlag |
54 enum HbViewFlag { |
54 { |
|
55 ViewFlagNone = 0, |
55 ViewFlagNone = 0, |
56 ViewTitleBarMinimizable = 0x01, |
56 ViewTitleBarMinimizable = 0x01, |
57 ViewTitleBarMinimized = 0x02, |
57 ViewTitleBarMinimized = 0x02, |
58 ViewTitleBarHidden = 0x04, |
58 ViewTitleBarHidden = 0x04, |
59 ViewTitleBarTransparent = 0x08, |
59 ViewTitleBarTransparent = 0x08, |
60 ViewTitleBarFloating = 0x10, |
60 ViewTitleBarFloating = 0x10, |
61 ViewStatusBarHidden = 0x20, |
61 ViewStatusBarHidden = 0x20, |
62 ViewStatusBarTransparent = 0x40, |
62 ViewStatusBarTransparent = 0x40, |
63 ViewStatusBarFloating = 0x80 |
63 ViewStatusBarFloating = 0x80, |
|
64 ViewDisableRelayout = 0x100 |
64 }; |
65 }; |
65 Q_DECLARE_FLAGS(HbViewFlags, HbViewFlag) |
66 Q_DECLARE_FLAGS(HbViewFlags, HbViewFlag) |
66 |
67 |
67 explicit HbView(QGraphicsItem *parent = 0); |
68 explicit HbView(QGraphicsItem *parent = 0); |
68 virtual ~HbView(); |
69 virtual ~HbView(); |
72 HbIcon icon() const; |
73 HbIcon icon() const; |
73 void setIcon(const HbIcon &icon); |
74 void setIcon(const HbIcon &icon); |
74 |
75 |
75 HbMenu *menu() const; |
76 HbMenu *menu() const; |
76 void setMenu(HbMenu *menu); |
77 void setMenu(HbMenu *menu); |
77 HbMenu* takeMenu(); |
78 HbMenu *takeMenu(); |
78 |
79 |
79 HbToolBar *toolBar() const; |
80 HbToolBar *toolBar() const; |
80 void setToolBar(HbToolBar *toolBar); |
81 void setToolBar(HbToolBar *toolBar); |
81 HbToolBar* takeToolBar(); |
82 HbToolBar *takeToolBar(); |
82 |
83 |
83 HbDockWidget *dockWidget() const; |
84 HbDockWidget *dockWidget() const; |
84 void setDockWidget(HbDockWidget *dockWidget); |
85 void setDockWidget(HbDockWidget *dockWidget); |
85 |
86 |
86 QGraphicsWidget *widget() const; |
87 QGraphicsWidget *widget() const; |
97 HbViewFlags viewFlags() const; |
98 HbViewFlags viewFlags() const; |
98 void setTitleBarVisible(bool visible); |
99 void setTitleBarVisible(bool visible); |
99 void setStatusBarVisible(bool visible); |
100 void setStatusBarVisible(bool visible); |
100 |
101 |
101 enum { Type = Hb::ItemType_View }; |
102 enum { Type = Hb::ItemType_View }; |
102 int type() const { return Type; } |
103 int type() const { |
|
104 return Type; |
|
105 } |
103 |
106 |
104 enum ActionContainer{ |
107 enum ActionContainer { |
105 NotSpecified, |
108 NotSpecified, |
106 OptionsMenu, |
109 OptionsMenu, |
107 ToolBar |
110 ToolBar |
108 }; |
111 }; |
109 using HbWidget::addAction; |
112 using HbWidget::addAction; |
124 void visibleItemsChanged(); |
127 void visibleItemsChanged(); |
125 void contentFullScreenChanged(); |
128 void contentFullScreenChanged(); |
126 void dockWidgetChanged(); |
129 void dockWidgetChanged(); |
127 |
130 |
128 protected: |
131 protected: |
129 HbView( HbViewPrivate &dd, QGraphicsItem *parent ); |
132 HbView(HbViewPrivate &dd, QGraphicsItem *parent); |
130 |
133 |
131 bool event(QEvent *event); |
134 bool event(QEvent *event); |
|
135 void changeEvent(QEvent *event); |
132 |
136 |
133 private slots: |
137 private slots: |
134 #ifdef HB_EFFECTS |
138 #ifdef HB_EFFECTS |
135 void titleBarEffectFinished(const HbEffect::EffectStatus &status); |
139 void titleBarEffectFinished(const HbEffect::EffectStatus &status); |
136 void statusBarEffectFinished(const HbEffect::EffectStatus &status); |
140 void statusBarEffectFinished(const HbEffect::EffectStatus &status); |