|
1 /* |
|
2 * Copyright (c) 2010 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: Implementation of HbToolBar |
|
15 * |
|
16 */ |
|
17 |
|
18 // Version : %version: 1 % |
|
19 |
|
20 |
|
21 #include <QGraphicsLinearLayout> |
|
22 |
|
23 #include "mpxvideo_debug.h" |
|
24 #include "hbtoolbar.h" |
|
25 #include "hbtoolbutton.h" |
|
26 |
|
27 // ------------------------------------------------------------------------------------------------- |
|
28 // HbToolBar::HbToolBar |
|
29 // ------------------------------------------------------------------------------------------------- |
|
30 // |
|
31 HbToolBar::HbToolBar() |
|
32 : mVisible( false ) |
|
33 , mEnabled( false ) |
|
34 { |
|
35 MPX_ENTER_EXIT(_L("HbToolBar::HbToolBar()")); |
|
36 |
|
37 mLayout = new QGraphicsLinearLayout(); |
|
38 setLayout( mLayout ); |
|
39 } |
|
40 |
|
41 // ------------------------------------------------------------------------------------------------- |
|
42 // HbToolBar::~HbToolBar |
|
43 // ------------------------------------------------------------------------------------------------- |
|
44 // |
|
45 HbToolBar::~HbToolBar() |
|
46 { |
|
47 MPX_DEBUG(_L("HbToolBar::HbToolBar") ); |
|
48 } |
|
49 |
|
50 // ------------------------------------------------------------------------------------------------- |
|
51 // HbToolBar::setEnabled |
|
52 // ------------------------------------------------------------------------------------------------- |
|
53 // |
|
54 void HbToolBar::setEnabled( bool enabled ) |
|
55 { |
|
56 MPX_DEBUG(_L("HbToolBar::setEnabled %d"), enabled ); |
|
57 |
|
58 mEnabled = enabled; |
|
59 } |
|
60 |
|
61 // ------------------------------------------------------------------------------------------------- |
|
62 // HbToolBar::setVisible |
|
63 // ------------------------------------------------------------------------------------------------- |
|
64 // |
|
65 void HbToolBar::setVisible( bool visible ) |
|
66 { |
|
67 MPX_DEBUG(_L("HbToolBar::setVisible %d"), visible ); |
|
68 |
|
69 mVisible = visible; |
|
70 } |
|
71 |
|
72 // ------------------------------------------------------------------------------------------------- |
|
73 // HbToolBar::setOrientation |
|
74 // ------------------------------------------------------------------------------------------------- |
|
75 // |
|
76 void HbToolBar::setOrientation( int orientation ) |
|
77 { |
|
78 MPX_DEBUG(_L("HbToolBar::setOrientation") ); |
|
79 Q_UNUSED( orientation ); |
|
80 } |
|
81 |
|
82 // ------------------------------------------------------------------------------------------------- |
|
83 // HbToolBar::clearActions |
|
84 // ------------------------------------------------------------------------------------------------- |
|
85 // |
|
86 void HbToolBar::clearActions() |
|
87 { |
|
88 MPX_DEBUG(_L("HbToolBar::clearActions") ); |
|
89 } |
|
90 |
|
91 // ------------------------------------------------------------------------------------------------- |
|
92 // HbToolBar::addAction |
|
93 // ------------------------------------------------------------------------------------------------- |
|
94 // |
|
95 void HbToolBar::addAction( HbAction *action ) |
|
96 { |
|
97 MPX_DEBUG(_L("HbToolBar::addAction") ); |
|
98 Q_UNUSED( action ); |
|
99 |
|
100 HbToolButton *button = new HbToolButton( action ); |
|
101 mLayout->addItem( button ); |
|
102 } |
|
103 |
|
104 // ------------------------------------------------------------------------------------------------- |
|
105 // HbToolBar::addAction |
|
106 // ------------------------------------------------------------------------------------------------- |
|
107 // |
|
108 QGraphicsLayout* HbToolBar::layout() |
|
109 { |
|
110 MPX_DEBUG(_L("HbToolBar::layout") ); |
|
111 |
|
112 return mLayout; |
|
113 } |
|
114 |
|
115 // End of file |