|
1 /* |
|
2 * Copyright (c) 2005-2007 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: UI control Command item for "Add to Top". |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CPBK2CMDITEMADDTOP_H_ |
|
20 #define CPBK2CMDITEMADDTOP_H_ |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32base.h> |
|
24 #include <MPbk2UiControlCmdItem.h> |
|
25 #include <pbk2doublelistboxcmditemextension.h> |
|
26 |
|
27 class MPbk2CmdItemVisibilityObserver; |
|
28 class CPbk2AddFavoritesVisibility; |
|
29 |
|
30 /** |
|
31 * UI control Command item for "Add to Top". |
|
32 */ |
|
33 NONSHARABLE_CLASS( CPbk2CmdItemAddTop ) : |
|
34 public CBase, |
|
35 public MPbk2UiControlCmdItem, |
|
36 public MPbk2DoubleListboxCmdItemExtension |
|
37 |
|
38 { |
|
39 public: // Construction & destruction |
|
40 |
|
41 static CPbk2CmdItemAddTop* NewLC(); |
|
42 |
|
43 ~CPbk2CmdItemAddTop(); |
|
44 |
|
45 private: // From MPbk2UiControlCmdItem |
|
46 TPtrC NameForUi() const; |
|
47 TBool IsEnabled() const; |
|
48 void SetEnabled( TBool aEnabled ); |
|
49 TInt CommandId() const; |
|
50 void SetVisibilityObserver(MPbk2CmdItemVisibilityObserver* aObserver); |
|
51 TAny* ControlCmdItemExtension( TUid aExtensionUid ); |
|
52 |
|
53 private: // From MPbk2DoubleListboxCmdItemExtension |
|
54 void FormatDataL( MPbk2DoubleListboxDataElement& aDataElement ); |
|
55 const MVPbkContactLink* Link(); |
|
56 |
|
57 private: |
|
58 CPbk2CmdItemAddTop(); |
|
59 void ConstructL(); |
|
60 |
|
61 private: // data |
|
62 // TBool iEnabled; |
|
63 CPbk2AddFavoritesVisibility* iAddFavoritesVisibility; // owned |
|
64 HBufC* iText; |
|
65 }; |
|
66 |
|
67 #endif /*CPBK2CMDITEMADDTOP_H_*/ |