|
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: |
|
15 * Data item for representing "Add Destination" button in UI. |
|
16 */ |
|
17 |
|
18 #ifndef CPADDDESTINATIONENTRYITEMDATA_H |
|
19 #define CPADDDESTINATIONENTRYITEMDATA_H |
|
20 |
|
21 // System includes |
|
22 #include <cpsettingformentryitemdata.h> |
|
23 |
|
24 // User includes |
|
25 |
|
26 // Forward declarations |
|
27 class CpDestinationGroup; |
|
28 class CmManagerShim; |
|
29 class HbInputDialog; |
|
30 class HbAction; |
|
31 |
|
32 // External data types |
|
33 |
|
34 // Constants |
|
35 |
|
36 // Class declaration |
|
37 class CpAddDestinationEntryItemData : public CpSettingFormEntryItemData |
|
38 { |
|
39 Q_OBJECT |
|
40 public: |
|
41 explicit CpAddDestinationEntryItemData( |
|
42 CpItemDataHelper &itemDataHelper, |
|
43 CpDestinationGroup *parent = 0); |
|
44 |
|
45 virtual ~CpAddDestinationEntryItemData(); |
|
46 |
|
47 signals: |
|
48 |
|
49 public slots: |
|
50 void setNewDestinationName(); |
|
51 |
|
52 protected: |
|
53 |
|
54 protected slots: |
|
55 |
|
56 private: |
|
57 virtual CpBaseSettingView *createSettingView() const; |
|
58 bool isDestinationNameValid(const QString dest, CmManagerShim *cmm) const; |
|
59 void showErrorNote(); |
|
60 |
|
61 private slots: |
|
62 |
|
63 void onLaunchView(); |
|
64 |
|
65 private: // data |
|
66 |
|
67 //! Parent object |
|
68 CpDestinationGroup *mParent; |
|
69 //! New Destination name query dialog |
|
70 HbInputDialog *mDialog; |
|
71 //! New Destination name query's OK action |
|
72 HbAction *mOkAction; |
|
73 |
|
74 //! Maximun length for destination name |
|
75 static const int DestinationNameMaxLength = 30; |
|
76 |
|
77 }; |
|
78 |
|
79 #endif //CPADDDESTINATIONENTRYITEMDATA_H |