//
// Copyright (c) 2012 Samsung Electronics Co., Ltd.
//
-// Licensed under the Flora License, Version 1.0 (the License);
+// Licensed under the Flora License, Version 1.1 (the License);
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
using namespace Tizen::Ui;
using namespace Tizen::Ui::Controls;
-GlProgressBar::GlProgressBar(IActionEventListener* listener)
+GlProgressBar::GlProgressBar(IActionEventListener* listener, IPropagatedKeyEventListener* propagatedListener)
: __totalVal(1)
, __curVal(1)
, __pFileProgressingPopup(null)
, __pFileProgressingProgress(null)
, __pFileProgressingHeaderLabel(null)
, __pFileProgressingLabel(null)
+ , __pFileCounterLabel(null)
, __pFileProgressingCancelButton(null)
, __pActionListener(listener)
+ , __pPropagatedListener(propagatedListener)
{
AppLogDebug("ENTER");
AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
if (__pFileProgressingPopup != null && r == E_SUCCESS)
{
+
+ __pFileProgressingPopup->SetPropagatedKeyEventListener(__pPropagatedListener);
+
__pFileProgressingCancelButton = static_cast<Button*>(__pFileProgressingPopup->GetControl(L"IDC_CANCEL_BUTTON", true));
if (__pFileProgressingCancelButton != null)
__pFileProgressingLabel->SetName(L"IDC_FILE_COUNT_LABEL");
__pFileProgressingLabel->SetShowState(true);
}
+
+ __pFileCounterLabel = static_cast<Label*>(__pFileProgressingPopup->GetControl(L"IDC_COUNTER_LABEL", true));
+
+ if (__pFileCounterLabel != null)
+ {
+ __pFileCounterLabel->SetText(L"");
+ __pFileCounterLabel->SetTextColor(CUSTOM_COLOR_GREY);
+ __pFileCounterLabel->SetShowState(true);
+ }
+
}
AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
return r;
GlProgressBar::IncProgress(const int count)
{
AppLogDebug("ENTER");
+ String counter;
__curVal = count;
__pFileProgressingProgress->SetValue(count);
+
+ counter.Append(count);
+ counter.Append(L"/");
+ counter.Append(__totalVal);
+
+ if (__pFileCounterLabel != null)
+ {
+ __pFileCounterLabel->SetText(counter);
+ __pFileCounterLabel->Invalidate(true);
+ }
+
__pFileProgressingPopup->SetShowState(true);
__pFileProgressingPopup->Show();
AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));