4ae31e022c4d35109e33d97a3276d201c701567d
[apps/osp/Internet.git] / inc / IntBrightnessForm.h
1
2 // Copyright   2012 Samsung Electronics Co., Ltd.
3 //
4 // Licensed under the Apache License, Version 1.1 (the License);
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 //     http://www.apache.org/licenses/LICENSE-2.0
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 //
16 //!Internet IntBrightness class
17 /*@file:        IntBrightness.h
18  *@brief:       This class defines IntBrightness used to change the brightness
19  *
20  */
21
22 #ifndef _INT_BRIGHTNESS_FORM_H_
23 #define _INT_BRIGHTNESS_FORM_H_
24
25 #include <FBase.h>
26 #include <FSystem.h>
27 #include <FUi.h>
28
29
30 class BrightnessForm
31         : public Tizen::Ui::Controls::Form
32         , public Tizen::Ui::IActionEventListener
33         , public Tizen::Ui::Controls::IFormBackEventListener
34         , public Tizen::Ui::IOrientationEventListener
35         , public Tizen::Ui::Scenes::ISceneEventListener
36         , public Tizen::Ui::Controls::ISliderEventListener
37
38 {
39 public:
40         /**
41          * @brief The Default Constructor
42          *
43          * @return
44          */
45         BrightnessForm(void);
46
47         /**
48          * @brief The Default Destructor
49          *
50          * @return
51          */
52         virtual ~BrightnessForm(void);
53
54         /**
55          * @brief Initializes this Brightness Form.
56          *
57          * @return              An error code
58          * @param[in]   void
59          * @exception   true                            The method is successful.
60          * @exception   false                           An error occurred.
61          */
62         bool Initialize(void);
63
64         /**
65          * @brief Initializes the controls of the UI for Brightness.
66          *
67          * @return              An error code
68          * @exception   E_SUCCESS                       The method is successful.
69          * @exception   E_INVALID_STATE         This instance has already been constructed.
70          * @exception   E_INVALID_ARG       A specified input parameter is invalid.
71          * @exception   E_OUT_OF_MEMORY     The memory is insufficient.
72          * @exception   E_SYSTEM                        A system error has occurred.
73          *
74          */
75         result OnInitializing(void);
76
77 protected:
78
79         //IActionEventListener
80         virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
81
82         //IFormBackEventListener
83         virtual void OnFormBackRequested(Tizen::Ui::Controls::Form& source);
84
85         //IOrientationEventListener
86         virtual void OnOrientationChanged(const Tizen::Ui::Control& source, Tizen::Ui::OrientationStatus orientationStatus);
87
88         //ISceenEventListener
89         virtual void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId, const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs);
90         virtual void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId, const Tizen::Ui::Scenes::SceneId& nextSceneId);
91
92         //ISliderEventListener
93         virtual void OnSliderBarMoved(Tizen::Ui::Controls::Slider& source, int value);
94
95 private:
96         bool __manualBrightness;
97         Tizen::Ui::Controls::Slider* __pBrightnessSlider;
98         Tizen::Ui::Controls::Label* __pLabel;
99 };
100
101 #endif /* _INT_BRIGHTNESS_FORM_H_ */