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: Buttons controller for storing and getting |
|
15 * buttons' states |
|
16 * |
|
17 */ |
|
18 |
|
19 #ifndef PHONEUIQTBUTTONSCONTROLLER_H |
|
20 #define PHONEUIQTBUTTONSCONTROLLER_H |
|
21 |
|
22 #include <QObject> |
|
23 |
|
24 class PhoneUIQtButtonsController : public QObject |
|
25 { |
|
26 Q_OBJECT |
|
27 |
|
28 public: |
|
29 |
|
30 enum PhoneButtonFlag |
|
31 { |
|
32 Hold = 0x02, // Hold |
|
33 Ihf = 0x04, // Ihf |
|
34 Wired = 0x08, // Wired |
|
35 Btaa = 0x10, // Btaa |
|
36 DisableJoin = 0x20 // Should join option be disabled |
|
37 }; |
|
38 Q_DECLARE_FLAGS(PhoneButtonFlags, PhoneButtonFlag) |
|
39 |
|
40 /** |
|
41 * Constructor |
|
42 */ |
|
43 PhoneUIQtButtonsController (); |
|
44 |
|
45 /** |
|
46 * Destructor |
|
47 */ |
|
48 virtual ~PhoneUIQtButtonsController (); |
|
49 |
|
50 /*! |
|
51 \fn void PhoneUIQtButtonsController::setButtonFlags (PhoneButtonFlags flag,bool set) |
|
52 |
|
53 This method is called when audio path or hold status is changed |
|
54 */ |
|
55 void setButtonFlags (PhoneButtonFlags flag,bool set); |
|
56 |
|
57 /*! |
|
58 \fn bool PhoneUIQtButtonsController::getButtonFlags (PhoneButtonFlags flag) |
|
59 |
|
60 This method is called when audio path or hold status is enquired |
|
61 */ |
|
62 inline bool getButtonFlags (PhoneButtonFlags flag) {return m_buttonFlags & flag;}; |
|
63 |
|
64 private: |
|
65 PhoneButtonFlags m_buttonFlags; |
|
66 }; |
|
67 |
|
68 Q_DECLARE_OPERATORS_FOR_FLAGS(PhoneUIQtButtonsController::PhoneButtonFlags) |
|
69 |
|
70 #endif // PHONEUIQTBUTTONSCONTROLLER_H |
|