|
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: |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef HS_INPUT_DIALOG_H |
|
19 #define HS_INPUT_DIALOG_H |
|
20 |
|
21 #include <hbinputdialog.h> |
|
22 |
|
23 #include "hsmenustates_global.h" |
|
24 HS_STATES_TEST_CLASS(MenuStatesTest) |
|
25 |
|
26 class HsCollectionNameDialog: public HbInputDialog |
|
27 { |
|
28 Q_OBJECT |
|
29 |
|
30 HS_STATES_TEST_FRIEND_CLASS(MenuStatesTest) |
|
31 |
|
32 public: |
|
33 |
|
34 HsCollectionNameDialog(const int &itemId = 0); |
|
35 |
|
36 virtual ~HsCollectionNameDialog(); |
|
37 |
|
38 HbAction *exec(); |
|
39 |
|
40 QString newName(const QString &name, bool addLastName = false); |
|
41 |
|
42 private: |
|
43 |
|
44 /** |
|
45 * Connects edit line signals to slots. |
|
46 */ |
|
47 void makeConnect(); |
|
48 |
|
49 /** |
|
50 * Disconnects edit line signals from slots. |
|
51 */ |
|
52 void makeDisconnect(); |
|
53 |
|
54 private slots: |
|
55 |
|
56 /** |
|
57 * This slot is received whenever the text changes. |
|
58 * The text argument is the new text. |
|
59 * This slot is also received when the text is |
|
60 * changed programmatically, |
|
61 * for example, by calling setText(). |
|
62 */ |
|
63 void onTextChanged(const QString &text); |
|
64 |
|
65 void onContentsChanged(); |
|
66 |
|
67 private: |
|
68 |
|
69 /* |
|
70 * Collections names list from data model. |
|
71 */ |
|
72 QStringList mCollectionsNames; |
|
73 |
|
74 /* |
|
75 * Last found collection name. |
|
76 */ |
|
77 QString mLastCollectionName; |
|
78 |
|
79 }; |
|
80 |
|
81 #endif /* HS_INPUT_DIALOG_H */ |