|
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: Step 3 Number mode |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef WPSWIZARDSTEPTHREENUMBER_H_ |
|
19 #define WPSWIZARDSTEPTHREENUMBER_H_ |
|
20 |
|
21 |
|
22 // System includes |
|
23 #include <QObject> |
|
24 |
|
25 // User includes |
|
26 #include "wpswizardpage.h" |
|
27 |
|
28 // Forward declarations |
|
29 class HbRadioButtonList; |
|
30 class HbWidget; |
|
31 class HbLabel; |
|
32 class WpsWizardPrivate; |
|
33 |
|
34 // External data types |
|
35 // Constants |
|
36 |
|
37 // Class declaration |
|
38 class WpsPageStepThreeNumber : public WpsWizardPage |
|
39 { |
|
40 Q_OBJECT |
|
41 public: |
|
42 WpsPageStepThreeNumber(WpsWizardPrivate* parent); |
|
43 ~WpsPageStepThreeNumber(); |
|
44 public: |
|
45 /*! |
|
46 * Creates a visualization of the page. |
|
47 */ |
|
48 HbWidget* initializePage(); |
|
49 /*! |
|
50 * Returns id of next page. updates settings EapWizard. |
|
51 */ |
|
52 int nextId(bool &removeFromStack) const; |
|
53 /*! |
|
54 * Returns how many steps should be gone backwards. |
|
55 */ |
|
56 int stepsBackwards(); |
|
57 /*! |
|
58 * This method is called when Previous button has been pressed. |
|
59 */ |
|
60 void previousTriggered(); |
|
61 /*! |
|
62 * This method is called when Cancel button has been pressed. |
|
63 */ |
|
64 void cancelTriggered(); |
|
65 /*! |
|
66 * This method is called when a visualization is displayed to detect |
|
67 * whether next button should be enabled or not. |
|
68 */ |
|
69 bool validate() const; |
|
70 |
|
71 private: |
|
72 /*! |
|
73 * This method computes a random number based on current syste time |
|
74 */ |
|
75 int computeRandNumber(); |
|
76 /*! |
|
77 * This method computes the check sum on the input number |
|
78 */ |
|
79 int computeCheckSum(int aPin); |
|
80 |
|
81 private slots: |
|
82 |
|
83 private: // data |
|
84 Q_DISABLE_COPY(WpsPageStepThreeNumber) |
|
85 HbWidget *mWidget; |
|
86 HbRadioButtonList *mRadio; |
|
87 HbLabel *mTitle; |
|
88 HbLabel *mHeading; |
|
89 bool mValid; |
|
90 }; |
|
91 |
|
92 /*! @} */ |
|
93 |
|
94 #endif /* WPSWIZARDSTEPTHREENUMBER_H_ */ |