summaryrefslogtreecommitdiff
path: root/lib-contact/ct-list/src/CtListLoadingPopup.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib-contact/ct-list/src/CtListLoadingPopup.cpp')
-rw-r--r--lib-contact/ct-list/src/CtListLoadingPopup.cpp89
1 files changed, 89 insertions, 0 deletions
diff --git a/lib-contact/ct-list/src/CtListLoadingPopup.cpp b/lib-contact/ct-list/src/CtListLoadingPopup.cpp
new file mode 100644
index 0000000..937f647
--- /dev/null
+++ b/lib-contact/ct-list/src/CtListLoadingPopup.cpp
@@ -0,0 +1,89 @@
+/*
+ * Copyright (c) 2009-2015 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+//#include <efl_assist.h>
+#include "WControl.h"
+#include "ContactsDebug.h"
+#include "ContactsCommon.h"
+#include "CtListLoadingPopup.h"
+#include "CtPath.h"
+#include "CtString.h"
+#include "CtThemeMgr.h"
+
+#define __ITEM_HEIGHT 96
+
+
+CtListLoadingPopup::CtListLoadingPopup()
+{
+
+}
+
+const char* CtListLoadingPopup::getClassName()
+{
+ return "CtListLoadingPopup";
+}
+
+Evas_Object* CtListLoadingPopup::__createContent(Evas_Object *parent)
+{
+ WHIT();
+
+ std::string contactsEdjePath;
+ ContactsCommon::getAppEdjePath(CONTACTS_EDJ, contactsEdjePath);
+ Evas_Object *layout = elm_layout_add(parent);
+ CtThemeMgr::getInstance()->setObjectTheme(layout);
+ elm_layout_file_set(layout, contactsEdjePath.c_str(), "processing_view");
+
+ evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+
+ // TODO: use string id for Progressing
+ elm_object_part_text_set(layout, "elm.text", "Progressing...");
+// elm_object_domain_translatable_part_text_set(layout, "elm.text", t_title_text.domain, t_title_text.id);
+
+ Evas_Object *progress = elm_progressbar_add(layout);
+ elm_object_style_set(progress, "process_small");
+ elm_progressbar_pulse_set(progress, EINA_TRUE);
+ elm_progressbar_pulse(progress, EINA_TRUE);
+ evas_object_show(progress);
+
+ evas_object_size_hint_align_set(progress, EVAS_HINT_FILL, 0.5);
+ evas_object_size_hint_weight_set(progress, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ elm_object_part_content_set(layout, "processing", progress);
+ elm_object_content_set(parent, layout);
+
+ return layout;
+}
+
+Evas_Object* CtListLoadingPopup::onCreate( Evas_Object* parent, void* viewParam)
+{
+ WHIT();
+
+ setContent([this](Evas_Object* parent)->Evas_Object* {
+ return __createContent(parent);
+ });
+
+ return WPopup::onCreate(parent, viewParam);
+}
+
+void CtListLoadingPopup::onDestroy()
+{
+
+}
+
+CtListLoadingPopup::~CtListLoadingPopup()
+{
+
+}