equal
deleted
inserted
replaced
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: Actions and associated translated texts. |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef PHONEACTION_H |
|
19 #define PHONEACTION_H |
|
20 |
|
21 #include <hbicon.h> |
|
22 |
|
23 #ifdef BUILD_PHONEUIQTVIEW |
|
24 #define PHONEACTION_EXPORT Q_DECL_EXPORT |
|
25 #else |
|
26 #define PHONEACTION_EXPORT Q_DECL_IMPORT |
|
27 #endif |
|
28 |
|
29 class PHONEACTION_EXPORT PhoneAction |
|
30 { |
|
31 |
|
32 public: |
|
33 |
|
34 enum ActionType { |
|
35 LeftButton = 1, |
|
36 RightButton, |
|
37 Text, |
|
38 ToolbarButton1, |
|
39 ToolbarButton2, |
|
40 ToolbarButton3, |
|
41 ToolbarButton4 |
|
42 }; |
|
43 |
|
44 enum ActionRole { |
|
45 None, // no specific role - default button |
|
46 Accept, // positive action - green button |
|
47 Decline // negative action - red button |
|
48 }; |
|
49 |
|
50 PhoneAction (); |
|
51 ~PhoneAction (); |
|
52 void setText (QString text); |
|
53 QString text () const; |
|
54 void setCommand (int command); |
|
55 int command () const; |
|
56 HbIcon icon () const; |
|
57 void setIcon (HbIcon icon); |
|
58 void setDisabled(bool disabled); |
|
59 bool isDisabled() const; |
|
60 void setActionRole(ActionRole role); |
|
61 ActionRole actionRole() const; |
|
62 |
|
63 private: |
|
64 |
|
65 QString m_text; |
|
66 int m_command; |
|
67 HbIcon m_icon; |
|
68 bool m_disabled; |
|
69 ActionRole m_role; |
|
70 }; |
|
71 |
|
72 #endif // PHONEACTION_H |
|