Setting panel UI control issue fix and minor changes
authorkarthik.scb <karthik.scb@samsung.com>
Mon, 1 Apr 2013 13:08:18 +0000 (18:38 +0530)
committerkarthik.scb <karthik.scb@samsung.com>
Mon, 1 Apr 2013 13:08:18 +0000 (18:38 +0530)
Change-Id: I84a2d92f7b13fe1cef435fdce792f1f999042fbd
Signed-off-by: karthik.scb <karthik.scb@samsung.com>
project/inc/PowerPanel.h
project/res/screen-size-normal/IDC_ALARM_PANEL.xml
project/res/screen-size-normal/IDC_VIBRATOR_PANEL.xml
project/src/AlarmPanel.cpp
project/src/DevicePanel.cpp
project/src/PowerPanel.cpp
project/src/RuntimePanel.cpp
project/src/SettingPanel.cpp
project/src/SystemTimePanel.cpp
project/src/VibratorPanel.cpp

index fcb17d5..c88f36b 100644 (file)
@@ -29,6 +29,7 @@ class PowerPanel
        , public Tizen::Ui::Scenes::ISceneEventListener
        , public Tizen::System::IChargingEventListener
        , public Tizen::System::IBatteryEventListener
+       , public Tizen::System::IScreenEventListener
 {
 public:
                PowerPanel(void);
@@ -51,6 +52,11 @@ public:
                virtual void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId,
                                                                                const Tizen::Ui::Scenes::SceneId& nextSceneId);
 
+               // IScreenEventListener
+               virtual void OnScreenOn(void);
+               virtual void OnScreenOff(void);
+               virtual void OnScreenBrightnessChanged(int brightness);
+
 private:
                Tizen::Ui::Controls::Button* __pButtonKeepScreenOn;
                Tizen::Ui::Controls::Button* __pButtonKeepScreenOff;
index 934bb86..fe70764 100644 (file)
@@ -21,7 +21,7 @@
         <layout height="72.0" mode="Landscape" width="422.0" x="78.0" y="0.0"/>
     </Button>
     <Button id="IDC_BUTTON_REPEATED_ALARM" parent="IDC_ALARM_PANEL">
-        <property DisabledBitmapX="0.0" DisabledBitmapY="0.0" NormalBitmapX="0.0" NormalBitmapY="0.0" PressedBitmapX="0.0" PressedBitmapY="0.0" accessibilityHint="" disableTextColor="" disabledBGBitmapPath="" disabledBitmapPath="" disabledColor="" disabledColorOpacity="100" highlightedBGBitmapPath="" highlightedBitmapPath="" highlightedBitmapX="0.0" highlightedBitmapY="0.0" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" horizontalAlign="ALIGN_CENTER" normalBGBitmapPath="" normalBitmapPath="" normalColor="" normalColorOpacity="100" normalTextColor="" pressedBGBitmapPath="" pressedBitmapPath="" pressedColor="" pressedColorOpacity="100" pressedTextColor="" text="Strat repeated alarm" textSize="30.0" verticalAlign="ALIGN_MIDDLE"/>
+        <property DisabledBitmapX="0.0" DisabledBitmapY="0.0" NormalBitmapX="0.0" NormalBitmapY="0.0" PressedBitmapX="0.0" PressedBitmapY="0.0" accessibilityHint="" disableTextColor="" disabledBGBitmapPath="" disabledBitmapPath="" disabledColor="" disabledColorOpacity="100" highlightedBGBitmapPath="" highlightedBitmapPath="" highlightedBitmapX="0.0" highlightedBitmapY="0.0" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" horizontalAlign="ALIGN_CENTER" normalBGBitmapPath="" normalBitmapPath="" normalColor="" normalColorOpacity="100" normalTextColor="" pressedBGBitmapPath="" pressedBitmapPath="" pressedColor="" pressedColorOpacity="100" pressedTextColor="" text="Start repeated alarm" textSize="30.0" verticalAlign="ALIGN_MIDDLE"/>
         <layout height="74.0" mode="Portrait" width="440.0" x="20.0" y="400.0"/>
         <layout height="72.0" mode="Landscape" width="422.0" x="88.0" y="0.0"/>
     </Button>
index 2e8549b..a7a1398 100644 (file)
@@ -11,7 +11,7 @@
         <layout height="300.0" mode="Landscape" type="NONE" width="93.0" x="0.0" y="0.0"/>
     </Panel>
     <Label id="IDC_LABEL_VIBRATOR_TIME" parent="IDC_VIBRATOR_PANEL">
-        <property accessibilityHint="" backgroundBitmapPath="" backgroundColor="" backgroundColorOpacity="0" horizontalAlign="ALIGN_CENTER" leftMargin="16" text="Vibration time" textColor="" textSize="30.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_MIDDLE"/>
+        <property accessibilityHint="" backgroundBitmapPath="" backgroundColor="" backgroundColorOpacity="0" horizontalAlign="ALIGN_CENTER" leftMargin="16" text="Vibration time (Seconds)" textColor="" textSize="30.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_MIDDLE"/>
         <layout height="84.0" mode="Portrait" width="440.0" x="23.0" y="14.0"/>
         <layout height="71.0" mode="Landscape" width="388.0" x="0.0" y="41.0"/>
     </Label>
index 68a1ec4..0aa10f2 100644 (file)
@@ -129,7 +129,7 @@ AlarmPanel::OnTerminating(void)
 }
 
 void
-AlarmPanel::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
+AlarmPanel::OnActionPerformed(const Control& source, int actionId)
 {
        result r = E_SUCCESS;
 
@@ -227,8 +227,8 @@ AlarmPanel::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
 }
 // ISceneEventListener
 void
-AlarmPanel::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
-                                                         const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs)
+AlarmPanel::OnSceneActivatedN(const SceneId& previousSceneId, const SceneId& currentSceneId,
+                                                               IList* pArgs)
 {
        const Form* pForm = dynamic_cast< Form* >(GetParent());
        AppAssert(pForm);
@@ -238,8 +238,7 @@ AlarmPanel::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
 }
 
 void
-AlarmPanel::OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                                                          const Tizen::Ui::Scenes::SceneId& nextSceneId)
+AlarmPanel::OnSceneDeactivated(const SceneId& currentSceneId, const SceneId& nextSceneId)
 {
 }
 
index 8c5ebf5..646e545 100644 (file)
 
 #include "DevicePanel.h"
 
+using namespace Tizen::Base;
+using namespace Tizen::Base::Collection;
 using namespace Tizen::Graphics;
+using namespace Tizen::System;
 using namespace Tizen::Ui;
 using namespace Tizen::Ui::Controls;
 using namespace Tizen::Ui::Scenes;
-using namespace Tizen::Base;
-using namespace Tizen::System;
 
 const int ID_FORMAT_CUSTOM = 503;
 const int LIST_X_POSITION = 26;
@@ -102,14 +103,14 @@ DevicePanel::OnTerminating(void)
 }
 
 void
-DevicePanel::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
+DevicePanel::OnActionPerformed(const Control& source, int actionId)
 {
        RequestRedraw();
 }
 // ISceneEventListener
 void
-DevicePanel::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
-                                                          const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs)
+DevicePanel::OnSceneActivatedN(const SceneId& previousSceneId, const SceneId& currentSceneId,
+                                                               IList* pArgs)
 {
        const Form* pForm = dynamic_cast< Form* >(GetParent());
        AppAssert(pForm);
@@ -119,14 +120,13 @@ DevicePanel::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId
 }
 
 void
-DevicePanel::OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                                                               const Tizen::Ui::Scenes::SceneId& nextSceneId)
+DevicePanel::OnSceneDeactivated(const SceneId& currentSceneId, const SceneId& nextSceneId)
 {
 
 }
 
 void
-DevicePanel::OnDeviceStateChanged(Tizen::System::DeviceType deviceType, const Tizen::Base::String& state)
+DevicePanel::OnDeviceStateChanged(DeviceType deviceType, const String& state)
 {
        String deviceStateDescription;
 
@@ -216,27 +216,21 @@ DevicePanel::OnDeviceStateChanged(Tizen::System::DeviceType deviceType, const Ti
 }
 
 void
-DevicePanel::OnListViewContextItemStateChanged(Tizen::Ui::Controls::ListView& listView,
-                                                                                          int index,
-                                                                                          int elementId,
-                                                                                          Tizen::Ui::Controls::ListContextItemStatus state)
+DevicePanel::OnListViewContextItemStateChanged(ListView& listView, int index, int elementId,
+                                                                                          ListContextItemStatus state)
 {
 
 }
 
 void
-DevicePanel::OnListViewItemStateChanged(Tizen::Ui::Controls::ListView& listView,
-                                                                               int index,
-                                                                               int elementId,
-                                                                               Tizen::Ui::Controls::ListItemStatus status)
+DevicePanel::OnListViewItemStateChanged(ListView& listView, int index, int elementId,
+                                                                                       ListItemStatus status)
 {
 
 }
 
 void
-DevicePanel::OnListViewItemSwept(Tizen::Ui::Controls::ListView& listView,
-                                                                int index,
-                                                                Tizen::Ui::Controls::SweepDirection direction)
+DevicePanel::OnListViewItemSwept(ListView& listView, int index, SweepDirection direction)
 {
 
 }
@@ -354,7 +348,7 @@ DevicePanel::CreateItem(int index, int itemWidth)
 }
 
 bool
-DevicePanel::DeleteItem(int index, Tizen::Ui::Controls::ListItemBase* pItem, int itemWidth)
+DevicePanel::DeleteItem(int index, ListItemBase* pItem, int itemWidth)
 {
        __listElements[index] = null;
 
index f650e3c..b13254a 100644 (file)
 
 #include "PowerPanel.h"
 
-using namespace Tizen::Graphics;
-using namespace Tizen::Ui::Controls;
-using namespace Tizen::Ui::Scenes;
 using namespace Tizen::Base;
+using namespace Tizen::Base::Collection;
+using namespace Tizen::Graphics;
+using namespace Tizen::System;
 using namespace Tizen::Ui;
 using namespace Tizen::Ui::Controls;
-using namespace Tizen::System;
+using namespace Tizen::Ui::Scenes;
 
 const int ID_BUTTON_BRIGHTNESS = 101;
 const int ID_BUTTON_RESTORE_BRIGHTNESS = 102;
@@ -65,6 +65,7 @@ PowerPanel::OnInitializing(void)
 
        PowerManager::SetBatteryEventListener((IBatteryEventListener*) this);
        PowerManager::SetChargingEventListener(*((IChargingEventListener*) this));
+       PowerManager::AddScreenEventListener(*((IScreenEventListener*) this));
 
        // Get system brightenss
        this->__appBrightness = PowerManager::GetScreenBrightness();
@@ -235,8 +236,7 @@ PowerPanel::OnTerminating(void)
 }
 
 void
-PowerPanel::OnActionPerformed(const Tizen::Ui::Control& source,
-                                                         int actionId)
+PowerPanel::OnActionPerformed(const Control& source, int actionId)
 {
        switch (actionId)
        {
@@ -366,9 +366,8 @@ PowerPanel::OnBatteryLevelChangedInPercentage(int percentage)
 
 // ISceneEventListener
 void
-PowerPanel::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
-                                                         const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                                                         Tizen::Base::Collection::IList* pArgs)
+PowerPanel::OnSceneActivatedN(const SceneId& previousSceneId, const SceneId& currentSceneId,
+                                                         IList* pArgs)
 {
        const Form* pForm = dynamic_cast< Form* >(GetParent());
        AppAssert(pForm);
@@ -378,8 +377,25 @@ PowerPanel::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
 }
 
 void
-PowerPanel::OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                                                          const Tizen::Ui::Scenes::SceneId& nextSceneId)
+PowerPanel::OnSceneDeactivated(const SceneId& currentSceneId, const SceneId& nextSceneId)
+{
+
+}
+
+// IScreenEventListener
+void
+PowerPanel::OnScreenOn(void)
+{
+
+}
+void
+PowerPanel::OnScreenOff(void)
+{
+
+}
+void
+PowerPanel::OnScreenBrightnessChanged(int brightness)
 {
+       // During restore callback is not hitting...
 
 }
index b0c28b1..1d29e65 100644 (file)
 
 #include "RuntimePanel.h"
 
+using namespace Tizen::Base;
+using namespace Tizen::Base::Collection;
 using namespace Tizen::Graphics;
+using namespace Tizen::System;
 using namespace Tizen::Ui;
 using namespace Tizen::Ui::Controls;
 using namespace Tizen::Ui::Scenes;
-using namespace Tizen::Base;
-using namespace Tizen::System;
 
 const int ID_FORMAT_CUSTOM = 603;
 const int LIST_ITEM_HEIGHT = 112;
@@ -84,14 +85,14 @@ RunTimePanel::OnTerminating(void)
 }
 
 void
-RunTimePanel::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
+RunTimePanel::OnActionPerformed(const Control& source, int actionId)
 {
        RequestRedraw();
 }
 // ISceneEventListener
 void
-RunTimePanel::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
-                                                               const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs)
+RunTimePanel::OnSceneActivatedN(const SceneId& previousSceneId, const SceneId& currentSceneId,
+                                                                       IList* pArgs)
 {
        const Form* pForm = dynamic_cast< Form* >(GetParent());
        AppAssert(pForm);
@@ -101,34 +102,27 @@ RunTimePanel::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneI
 }
 
 void
-RunTimePanel::OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                                                                const Tizen::Ui::Scenes::SceneId& nextSceneId)
+RunTimePanel::OnSceneDeactivated(const SceneId& currentSceneId, const SceneId& nextSceneId)
 {
 
 }
 
 void
-RunTimePanel::OnListViewContextItemStateChanged(Tizen::Ui::Controls::ListView& listView,
-                                                                                               int index,
-                                                                                               int elementId,
-                                                                                               Tizen::Ui::Controls::ListContextItemStatus state)
+RunTimePanel::OnListViewContextItemStateChanged(ListView& listView, int index, int elementId,
+                                                                                               ListContextItemStatus state)
 {
 
 }
 
 void
-RunTimePanel::OnListViewItemStateChanged(Tizen::Ui::Controls::ListView& listView,
-                                                                                int index,
-                                                                                int elementId,
-                                                                                Tizen::Ui::Controls::ListItemStatus status)
+RunTimePanel::OnListViewItemStateChanged(ListView& listView, int index, int elementId,
+                                                                                ListItemStatus status)
 {
 
 }
 
 void
-RunTimePanel::OnListViewItemSwept(Tizen::Ui::Controls::ListView& listView,
-                                                                 int index,
-                                                                 Tizen::Ui::Controls::SweepDirection direction)
+RunTimePanel::OnListViewItemSwept(ListView& listView, int index, SweepDirection direction)
 {
 
 }
@@ -246,7 +240,7 @@ RunTimePanel::CreateItem(int index, int itemWidth)
 }
 
 bool
-RunTimePanel::DeleteItem(int index, Tizen::Ui::Controls::ListItemBase* pItem, int itemWidth)
+RunTimePanel::DeleteItem(int index, ListItemBase* pItem, int itemWidth)
 {
        __listElements[index] = null;
 
index 9cfd857..ee526c5 100644 (file)
@@ -1434,7 +1434,7 @@ SettingPanel::CreateItem(int index, int itemWidth)
 
                pItem->AddControl(*pKeyRangeSlider);
                pItem->AddControl(*pSetIntegerValueButton);
-
+               pItem->SetIndividualSelectionEnabled(pKeyRangeSlider, true);
        }
        else if (isBoolean)
        {
@@ -1451,6 +1451,7 @@ SettingPanel::CreateItem(int index, int itemWidth)
 
                pItem->AddControl(*pBooleanValueLabel);
                pItem->AddControl(*pCheckButton);
+               pItem->SetIndividualSelectionEnabled(pCheckButton, true);
        }
        else if (index == screenBacklightTimeIndex)
        {
@@ -1513,6 +1514,7 @@ SettingPanel::CreateItem(int index, int itemWidth)
                }
                }
                pItem->AddControl(*pScreenBacklightTimeBar);
+               pItem->SetIndividualSelectionEnabled(pScreenBacklightTimeBar, true);
        }
        else
        {
index 472a068..ee93a57 100644 (file)
 
 #include "SystemTimePanel.h"
 
+using namespace Tizen::Base;
+using namespace Tizen::Base::Collection;
+using namespace Tizen::Base::Runtime;
 using namespace Tizen::Graphics;
+using namespace Tizen::System;
 using namespace Tizen::Ui;
 using namespace Tizen::Ui::Controls;
 using namespace Tizen::Ui::Scenes;
-using namespace Tizen::Base;
-using namespace Tizen::Base::Runtime;
-using namespace Tizen::System;
 
 const int ID_FORMAT_CUSTOM = 703;
 const int LIST_X_POSITION = 26;
@@ -89,7 +90,7 @@ SystemTimePanel::OnTerminating(void)
 }
 
 void
-SystemTimePanel::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
+SystemTimePanel::OnActionPerformed(const Control& source, int actionId)
 {
        RequestRedraw();
 }
@@ -103,8 +104,8 @@ SystemTimePanel::OnTimerExpired(Timer& timer)
 
 // ISceneEventListener
 void
-SystemTimePanel::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
-                                                                  const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs)
+SystemTimePanel::OnSceneActivatedN(const SceneId& previousSceneId, const SceneId& currentSceneId,
+                                                                               IList* pArgs)
 {
        const Form* pForm = dynamic_cast< Form* >(GetParent());
        AppAssert(pForm);
@@ -115,34 +116,27 @@ SystemTimePanel::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSce
 }
 
 void
-SystemTimePanel::OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId,
-                                                                       const Tizen::Ui::Scenes::SceneId& nextSceneId)
+SystemTimePanel::OnSceneDeactivated(const SceneId& currentSceneId, const SceneId& nextSceneId)
 {
 
 }
 
 void
-SystemTimePanel::OnListViewContextItemStateChanged(Tizen::Ui::Controls::ListView& listView,
-                                                                                                  int index,
-                                                                                                  int elementId,
-                                                                                                  Tizen::Ui::Controls::ListContextItemStatus state)
+SystemTimePanel::OnListViewContextItemStateChanged(ListView& listView, int index, int elementId,
+                                                                                                  ListContextItemStatus state)
 {
 
 }
 
 void
-SystemTimePanel::OnListViewItemStateChanged(Tizen::Ui::Controls::ListView& listView,
-                                                                                       int index,
-                                                                                       int elementId,
-                                                                                       Tizen::Ui::Controls::ListItemStatus status)
+SystemTimePanel::OnListViewItemStateChanged(ListView& listView, int index, int elementId,
+                                                                                       ListItemStatus status)
 {
 
 }
 
 void
-SystemTimePanel::OnListViewItemSwept(Tizen::Ui::Controls::ListView& listView,
-                                                                        int index,
-                                                                        Tizen::Ui::Controls::SweepDirection direction)
+SystemTimePanel::OnListViewItemSwept(ListView& listView, int index, SweepDirection direction)
 {
 
 }
@@ -239,7 +233,7 @@ SystemTimePanel::CreateItem(int index, int itemWidth)
 }
 
 bool
-SystemTimePanel::DeleteItem(int index, Tizen::Ui::Controls::ListItemBase* pItem, int itemWidth)
+SystemTimePanel::DeleteItem(int index, ListItemBase* pItem, int itemWidth)
 {
        __listElements[index] = null;
 
index 70606de..fb056d5 100644 (file)
@@ -18,6 +18,7 @@
 #include "VibratorPanel.h"
 
 using namespace Tizen::Base;
+using namespace Tizen::Base::Collection;
 using namespace Tizen::Base::Runtime;
 using namespace Tizen::Graphics;
 using namespace Tizen::System;
@@ -200,7 +201,7 @@ VibratorPanel::OnTimerExpired(Timer& timer)
 // ISceneEventListener
 void
 VibratorPanel::OnSceneActivatedN(const SceneId& previousSceneId,
-                                                                const SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs)
+                                                                const SceneId& currentSceneId, IList* pArgs)
 {
        const Form* pForm = dynamic_cast< Form* >(GetParent());
        AppAssert(pForm);
@@ -210,8 +211,7 @@ VibratorPanel::OnSceneActivatedN(const SceneId& previousSceneId,
 }
 
 void
-VibratorPanel::OnSceneDeactivated(const SceneId& currentSceneId,
-                                                                 const SceneId& nextSceneId)
+VibratorPanel::OnSceneDeactivated(const SceneId& currentSceneId, const SceneId& nextSceneId)
 {
 
 }