*
*/
result OnInitializing(void);
+ void OnUserEventReceivedN (RequestId requestId, Tizen::Base::Collection::IList *pArgs);
protected:
static const int IDA_BUTTON_NO = 1000;
static const int IDA_BUTTON_YES = 1001;
+const int DEVICE_BRIGHTNESS_CHANGE_EVENT = 994;
const int UPDATE_LIST_COMPLETE = 995;
const int UPDATE_MAINFORM_FOOTER_ON_WINDOWCLOSED = 996;
const int APPCONTROL_LAUNCH_MAX_LIMIT_REACHED = 997;
<!--
This XML file was automatically generated by UiBuilder - do not modify by hand.
-->
-<ScenePanel Bversion="2.0.0.201307161751" Dversion="20120315">
+<!DOCTYPE ScenePanel SYSTEM "UIForm.dtd">
+
+<ScenePanel Bversion="2.0.0.201310211912" Dversion="20120315">
<LogicalCoordinate>720</LogicalCoordinate>
-<Panel id="IDL_FIND_ON_PAGE">
+ <Panel id="IDL_FIND_ON_PAGE">
<property backgroundColor="" backgroundColorOpacity="0" compositeEnabled="true" groupStyle="GROUP_STYLE_NONE"/>
<layout height="82.0" mode="Portrait" type="LAYOUT_RELATIVE" width="720.0" x="3.0" y="27.0"/>
<layout height="82.0" mode="Landscape" type="LAYOUT_RELATIVE" width="1280.0" x="3.0" y="142.0"/>
</Button>
<Panel id="IDC_PANEL1" parent="IDL_FIND_ON_PAGE">
<property backgroundColor="" backgroundColorOpacity="0" compositeEnabled="true" groupStyle="GROUP_STYLE_NONE"/>
- <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="true" height="72.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDC_FIND_NEXT" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_RIGHT" marginBottom="0.0" marginLeft="16.0" marginRight="16.0" marginTop="0.0" mode="Portrait" rightRelation="IDC_FIND_CANCEL" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_LEFT" topRelation="" topRelationType="" type="LAYOUT_RELATIVE" verticalFitPolicy="FIT_POLICY_FIXED" width="370.0" x="191.0" y="5.0"/>
+ <layout bottomRelation="IDL_FIND_ON_PAGE" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="true" height="72.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDC_FIND_NEXT" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_RIGHT" marginBottom="5.0" marginLeft="16.0" marginRight="16.0" marginTop="5.0" mode="Portrait" rightRelation="IDC_FIND_CANCEL" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_LEFT" topRelation="IDL_FIND_ON_PAGE" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" type="LAYOUT_RELATIVE" verticalFitPolicy="FIT_POLICY_FIXED" width="370.0" x="191.0" y="5.0"/>
<layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="true" height="72.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDC_FIND_NEXT" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_RIGHT" marginBottom="0.0" marginLeft="16.0" marginRight="16.0" marginTop="0.0" mode="Landscape" rightRelation="IDC_FIND_CANCEL" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_LEFT" topRelation="IDL_FIND_ON_PAGE" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" type="LAYOUT_RELATIVE" verticalFitPolicy="FIT_POLICY_FIXED" width="923.0" x="191.0" y="5.0"/>
</Panel>
<Label id="IDC_LABEL1" parent="IDC_PANEL1">
if (__pList != null)
{
__pList->SetBounds(__pList->GetX(),__pList->GetY(),GetClientAreaBounds().width,__listHeight);
- __pList->UpdateList();
+// __pList->UpdateList();
}
Invalidate(true);
}
}
}
}
+
+void
+BrightnessForm::OnUserEventReceivedN (RequestId requestId, Tizen::Base::Collection::IList *pArgs)
+{
+ if (requestId == DEVICE_BRIGHTNESS_CHANGE_EVENT)
+ {
+ String key = L"http://tizen.org/setting/screen.brightness" ;
+ int sliderValue = 10;
+ SettingInfo::GetValue(key,sliderValue);
+ __pBrightnessSlider->SetValue(sliderValue/10);
+ __pBrightnessSlider->Invalidate(true);
+ }
+}
else if (key == L"http://tizen.org/setting/screen.brightness" )
{
AppRegistry* pAppRegistry = App::GetInstance()->GetAppRegistry();
- String sliderKey("SliderValue");
+
int sliderValue = 10;
+ SettingInfo::GetValue(key,sliderValue);
+ String sliderKey("SliderValue");
+ result r = pAppRegistry->Set(sliderKey, sliderValue/10);
+ pAppRegistry->Save();
+
+ Form* pCurrentForm = null;
+ if(SceneManager::GetInstance()->GetCurrentScene() != null)
+ pCurrentForm = (SceneManager::GetInstance()->GetCurrentScene()->GetForm());
+ if (pCurrentForm)
+ {
+ AppLog("sending userevent for appcontrol");
+ pCurrentForm->SendUserEvent(DEVICE_BRIGHTNESS_CHANGE_EVENT, NULL);
+ }
- result r = pAppRegistry->Get(sliderKey, sliderValue);
- r = PowerManager::SetScreenBrightness(sliderValue);
+ r = PowerManager::SetScreenBrightness(sliderValue/10);
// r = PowerManager::RestoreScreenBrightness();
}