1 /* |
1 /* |
2 * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). |
2 * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). |
3 * All rights reserved. |
3 * All rights reserved. |
4 * This component and the accompanying materials are made available |
4 * This component and the accompanying materials are made available |
5 * under the terms of "Eclipse Public License v1.0" |
5 * under the terms of "Eclipse Public License v1.0" |
6 * which accompanies this distribution, and is available |
6 * which accompanies this distribution, and is available |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
8 * |
8 * |
9 * Initial Contributors: |
9 * Initial Contributors: |
10 * Nokia Corporation - initial contribution. |
10 * Nokia Corporation - initial contribution. |
11 * |
11 * |
12 * Contributors: |
12 * Contributors: |
13 * |
13 * |
14 * Description: Step 3 Number mode |
14 * Description: Step 3 Number mode |
15 * |
15 * |
16 */ |
16 */ |
17 |
17 |
18 #ifndef WPSWIZARDSTEPTHREENUMBER_H_ |
18 #ifndef WPSWIZARDSTEPTHREENUMBER_H_ |
19 #define WPSWIZARDSTEPTHREENUMBER_H_ |
19 #define WPSWIZARDSTEPTHREENUMBER_H_ |
20 |
20 |
21 |
|
22 // System includes |
21 // System includes |
23 #include <QObject> |
22 #include <QObject> |
|
23 #include <HbDocumentLoader> |
24 |
24 |
25 // User includes |
25 // User includes |
26 #include "wpswizardpage.h" |
26 #include "wpswizardpage.h" |
27 |
27 |
28 // Forward declarations |
28 // Forward declarations |
32 class WpsWizardPrivate; |
32 class WpsWizardPrivate; |
33 |
33 |
34 // External data types |
34 // External data types |
35 // Constants |
35 // Constants |
36 |
36 |
|
37 /*! |
|
38 * @addtogroup group_wps_wizard_plugin |
|
39 * @{ |
|
40 */ |
|
41 |
37 // Class declaration |
42 // Class declaration |
38 class WpsPageStepThreeNumber : public WpsWizardPage |
43 class WpsPageStepThreeNumber : public WpsWizardPage |
39 { |
44 { |
40 Q_OBJECT |
45 Q_OBJECT |
41 public: |
46 |
42 WpsPageStepThreeNumber(WpsWizardPrivate* parent); |
47 public: |
|
48 explicit WpsPageStepThreeNumber(WpsWizardPrivate* parent); |
43 ~WpsPageStepThreeNumber(); |
49 ~WpsPageStepThreeNumber(); |
44 public: |
50 |
45 /*! |
51 public: |
46 * Creates a visualization of the page. |
|
47 */ |
|
48 HbWidget* initializePage(); |
52 HbWidget* initializePage(); |
49 /*! |
53 |
50 * Returns id of next page. updates settings EapWizard. |
|
51 */ |
|
52 int nextId(bool &removeFromStack) const; |
54 int nextId(bool &removeFromStack) const; |
53 /*! |
55 |
54 * Returns how many steps should be gone backwards. |
56 int previousTriggered(); |
55 */ |
57 |
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(); |
58 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 |
59 |
71 private: |
60 bool showPage(); |
72 /*! |
61 |
73 * This method computes a random number based on current syste time |
62 private: |
74 */ |
|
75 int computeRandNumber(); |
63 int computeRandNumber(); |
76 /*! |
64 |
77 * This method computes the check sum on the input number |
|
78 */ |
|
79 int computeCheckSum(int aPin); |
65 int computeCheckSum(int aPin); |
80 |
66 |
81 private slots: |
67 signals: |
82 |
68 |
83 private: // data |
69 public slots: |
|
70 void loadDocmlSection(Qt::Orientation orientation); |
|
71 |
|
72 protected: |
|
73 |
|
74 protected slots: |
|
75 |
|
76 private: |
84 Q_DISABLE_COPY(WpsPageStepThreeNumber) |
77 Q_DISABLE_COPY(WpsPageStepThreeNumber) |
85 HbWidget *mWidget; |
|
86 HbRadioButtonList *mRadio; |
|
87 HbLabel *mTitle; |
|
88 HbLabel *mHeading; |
|
89 bool mValid; |
|
90 }; |
|
91 |
78 |
92 /*! @} */ |
79 private slots: |
|
80 |
|
81 private: //data |
|
82 //! Pointer to the widget object. |
|
83 HbWidget *mWidget; |
|
84 //! Label object used for displaying the heading. |
|
85 HbLabel *mHeading; |
|
86 //! Document loader object |
|
87 HbDocumentLoader *mLoader; |
|
88 }; |
93 |
89 |
94 #endif /* WPSWIZARDSTEPTHREENUMBER_H_ */ |
90 #endif /* WPSWIZARDSTEPTHREENUMBER_H_ */ |