|
1 /* |
|
2 * Copyright (c) 2002 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: |
|
15 * Dialog which shows topics, which are not yet |
|
16 * in the topic list view. Enables topics adding manually. |
|
17 * |
|
18 * |
|
19 */ |
|
20 |
|
21 |
|
22 #ifndef __CCBSADDFROMINDEXDIALOG_H |
|
23 #define __CCBSADDFROMINDEXDIALOG_H |
|
24 |
|
25 // INCLUDES |
|
26 #include <eikdialg.h> |
|
27 #include <CbsCommon.h> |
|
28 #include "CbsUiConstants.h" |
|
29 |
|
30 |
|
31 // FORWARD DECLARATIONS |
|
32 class MCbs; |
|
33 class CEikColumnListBox; |
|
34 class CAknNavigationDecorator; |
|
35 |
|
36 |
|
37 // CLASS DECLARATION |
|
38 |
|
39 |
|
40 /** |
|
41 * Class CCbsUiAddFromIndexDialog is used to add topics. Topics |
|
42 * are shown in listbox. User can select topics which will be added. |
|
43 */ |
|
44 class CCbsUiAddFromIndexDialog: public CEikDialog |
|
45 { |
|
46 public: // Constructors and destructor |
|
47 |
|
48 /** |
|
49 * C++ constructor. |
|
50 * |
|
51 * @param aServer Reference to cbs server. |
|
52 */ |
|
53 CCbsUiAddFromIndexDialog( MCbs& aServer ); |
|
54 |
|
55 /** |
|
56 * Destructor. |
|
57 */ |
|
58 virtual ~CCbsUiAddFromIndexDialog(); |
|
59 |
|
60 private: // From CEikDialog |
|
61 |
|
62 /** |
|
63 * Creates the controls, which are shown in this dialog. |
|
64 */ |
|
65 void PreLayoutDynInitL(); |
|
66 |
|
67 /** |
|
68 * Checks if the user has selected the ok softkey. In that case, |
|
69 * the marked topics are send to AddTopicL member function. |
|
70 * |
|
71 * @param aKeycode pressed key code |
|
72 * @return ETrue, to close the dialog |
|
73 */ |
|
74 TBool OkToExitL( TInt aKeycode ); |
|
75 |
|
76 private: // New functions |
|
77 |
|
78 /** |
|
79 * Parses IndexNumber from TopicInfo. |
|
80 * |
|
81 * @param aTopicInfo Topic information |
|
82 * @param aIndexNumber the pared index number |
|
83 * @return none |
|
84 */ |
|
85 void GetIndexNumber( |
|
86 const TCbsTopicInfo& aTopicInfo , |
|
87 TBuf<KTopicNumberWidth>& aIndexNumber) const; |
|
88 |
|
89 /** |
|
90 * Adds a Topic to the server. |
|
91 * |
|
92 * @param aTopicInfo Topic information |
|
93 * @return error code |
|
94 */ |
|
95 TInt AddTopicL( const TCbsTopicInfo aTopicInfo ); |
|
96 |
|
97 /** |
|
98 * Sets the icons to the listbox. |
|
99 */ |
|
100 void SetIconsL() const; |
|
101 |
|
102 /** |
|
103 * Sets the topics to the listbox. Set Topic reads topic informations |
|
104 * from cbsserver. |
|
105 */ |
|
106 void SetTopicsL(); |
|
107 |
|
108 /** |
|
109 * Creates a title pane. |
|
110 */ |
|
111 void CreateAddFromIndexTitlePaneL() const; |
|
112 |
|
113 private: // Data |
|
114 |
|
115 // List of handles |
|
116 typedef CArrayFixFlat< TCbsTopicInfo > TCbsTopicInfoHandleList; |
|
117 |
|
118 // pointer to a handle list |
|
119 TCbsTopicInfoHandleList* iHandles; |
|
120 |
|
121 // Server |
|
122 MCbs& iServer; |
|
123 |
|
124 // ListBox |
|
125 CEikColumnListBox* iListBox; |
|
126 |
|
127 /// Own: Navi pane control |
|
128 CAknNavigationDecorator* iNaviDecorator; |
|
129 }; |
|
130 |
|
131 #endif // __CCBSADDFROMINDEXDIALOG_H |
|
132 |
|
133 |
|
134 // End of File |