summaryrefslogtreecommitdiff
path: root/alarm-app/inc
diff options
context:
space:
mode:
authorSergei Kobec <s.kobec@samsung.com>2017-01-30 15:10:14 +0200
committerSergey Kobec <s.kobec@samsung.com>2017-01-31 03:37:37 -0800
commit1df61619d2b2003dbc4ba79e38adaa4974cf7b6f (patch)
treec6f3d11b3d8d234ff665d836aeb8bf4dddf08bfe /alarm-app/inc
parentf409fa33755760219a9487c4bc289385b76105df (diff)
downloadalarm-1df61619d2b2003dbc4ba79e38adaa4974cf7b6f.tar.gz
alarm-1df61619d2b2003dbc4ba79e38adaa4974cf7b6f.tar.bz2
alarm-1df61619d2b2003dbc4ba79e38adaa4974cf7b6f.zip
Create base alarms list view
Change-Id: If0b941169171aec330d8eb058ee68ee932ecbf45 Signed-off-by: Sergei Kobec <s.kobec@samsung.com>
Diffstat (limited to 'alarm-app/inc')
-rw-r--r--alarm-app/inc/List/AddAlarmItem.h42
-rw-r--r--alarm-app/inc/List/AlarmItem.h65
-rw-r--r--alarm-app/inc/List/AlarmsView.h50
-rw-r--r--alarm-app/inc/List/TitleItem.h39
4 files changed, 196 insertions, 0 deletions
diff --git a/alarm-app/inc/List/AddAlarmItem.h b/alarm-app/inc/List/AddAlarmItem.h
new file mode 100644
index 0000000..6a273a8
--- /dev/null
+++ b/alarm-app/inc/List/AddAlarmItem.h
@@ -0,0 +1,42 @@
+/*
+ * Copyright 2017 Samsung Electronics Co., Ltd
+ *
+ * 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
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
+
+#ifndef LIST_ADD_ALARM_ITEM_H
+#define LIST_ADD_ALARM_ITEM_H
+
+#include "Ui/GenItem.h"
+
+namespace List
+{
+ class AddAlarmItem: public Ui::GenItem
+ {
+ protected:
+ /**
+ * @see GenItem::getItemClass()
+ */
+ virtual Elm_Gen_Item_Class *getItemClass() const override;
+
+ /**
+ * @see GenItem::getContent()
+ */
+ virtual Evas_Object *getContent(Evas_Object *parent, const char *part) override;
+
+ private:
+ void onClicked(Evas_Object *obj, void *eventInfo);
+ };
+}
+
+#endif /* LIST_ADD_ALARM_ITEM_H */
diff --git a/alarm-app/inc/List/AlarmItem.h b/alarm-app/inc/List/AlarmItem.h
new file mode 100644
index 0000000..af1f2dc
--- /dev/null
+++ b/alarm-app/inc/List/AlarmItem.h
@@ -0,0 +1,65 @@
+/*
+ * Copyright 2017 Samsung Electronics Co., Ltd
+ *
+ * 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
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
+
+#ifndef LIST_ALARM_ITEM_H
+#define LIST_ALARM_ITEM_H
+
+#include "Ux/SelectItem.h"
+
+namespace Common
+{
+ namespace Model
+ {
+ class Alarm;
+ }
+}
+
+namespace List
+{
+ class AlarmItem: public Ux::SelectItem
+ {
+ public:
+ explicit AlarmItem(Common::Model::Alarm *alarm);
+
+ protected:
+ /**
+ * @see SelectItem::getDefaultResult()
+ */
+ virtual Ux::SelectResult getDefaultResult() const override;
+
+ /**
+ * @see GenItem::getItemClass()
+ */
+ virtual Elm_Gen_Item_Class *getItemClass() const override;
+
+ /**
+ * @see GenItem::getText()
+ */
+ virtual char *getText(Evas_Object *parent, const char *part) override;
+
+ /**
+ * @see GenItem::getContent()
+ */
+ virtual Evas_Object *getContent(Evas_Object *parent, const char *part) override;
+
+ private:
+ bool is24HourFormat() const;
+
+ Common::Model::Alarm *m_Alarm;
+ };
+}
+
+#endif /* LIST_ALARM_ITEM_H */
diff --git a/alarm-app/inc/List/AlarmsView.h b/alarm-app/inc/List/AlarmsView.h
new file mode 100644
index 0000000..e751145
--- /dev/null
+++ b/alarm-app/inc/List/AlarmsView.h
@@ -0,0 +1,50 @@
+/*
+ * Copyright 2017 Samsung Electronics Co., Ltd
+ *
+ * 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
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
+
+#ifndef LIST_ALARMS_VIEW_H
+#define LIST_ALARMS_VIEW_H
+
+#include "Ux/SelectView.h"
+#include <system_settings.h>
+
+namespace Ui
+{
+ class Genlist;
+}
+
+namespace List
+{
+ class AlarmsView: public Ux::SelectView
+ {
+ public:
+ AlarmsView();
+ virtual ~AlarmsView() override;
+
+ virtual Evas_Object *onCreate(Evas_Object *parent) override;
+ virtual void onCreated() override;
+ virtual void onPageAttached(Ui::NavigatorPage *page) override;
+ virtual void onNavigation(bool isCurrent) override;
+
+ Evas_Object *createGenlist(Evas_Object *parent);
+
+ private:
+ void onFormatChanged(system_settings_key_e key);
+
+ Ui::Genlist *m_Genlist;
+ };
+}
+
+#endif /* LIST_ALARMS_VIEW_H */
diff --git a/alarm-app/inc/List/TitleItem.h b/alarm-app/inc/List/TitleItem.h
new file mode 100644
index 0000000..0bd8df0
--- /dev/null
+++ b/alarm-app/inc/List/TitleItem.h
@@ -0,0 +1,39 @@
+/*
+ * Copyright 2017 Samsung Electronics Co., Ltd
+ *
+ * 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
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
+
+#ifndef UI_TITLE_ITEM_H
+#define UI_TITLE_ITEM_H
+
+#include "Ui/GenItem.h"
+
+namespace List
+{
+ class TitleItem: public Ui::GenItem
+ {
+ protected:
+ /**
+ * @see GenItem::getItemClass()
+ */
+ virtual Elm_Gen_Item_Class *getItemClass() const override;
+
+ /**
+ * @see GenItem::getText()
+ */
+ virtual char *getText(Evas_Object *parent, const char *part) override;
+ };
+}
+
+#endif /* UI_TITLE_ITEM_H */