class NoContentListViewItem;
class SettingsBlockListFrame
- : public FrameController {
+ : public FrameController
+ , private IListViewListener {
public:
enum BlockListType {
void onRestoreClicked(MoreOption &obj);
void onDeleteClicked(MoreOption &obj);
+ // IListViewListener:
+ void onListItemSelected(ListItem &listItem) override;
+
void prepareMainLayout();
void prepareMoreOption();
void prepareSelectViews();
--- /dev/null
+/*
+ * Copyright 2016 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 SettingsBlockedMsgDetailFrame_h_
+#define SettingsBlockedMsgDetailFrame_h_
+
+#include "FrameController.h"
+
+namespace Msg {
+ class MoreOption;
+ class DefaultLayout;
+
+ class SettingsBlockedMsgDetailFrame
+ : public FrameController {
+ public:
+ SettingsBlockedMsgDetailFrame(NaviFrameController &parent);
+ virtual ~SettingsBlockedMsgDetailFrame();
+
+ protected:
+ // NaviFrameItem:
+ void onAttached(ViewItem &item) override;
+
+ private:
+ // More option:
+ void onRestoreClicked(MoreOption &obj);
+ void onDeleteClicked(MoreOption &obj);
+
+ void prepareMainLayout();
+ void prepareMoreOption();
+
+ private:
+ DefaultLayout *m_pLayout;
+ MoreOption *m_pMoreOption;
+ };
+}
+
+#endif // SettingsBlockedMsgDetailFrame_h_
#include "BlockedNumberListItem.h"
#include "BlockedMsgListItem.h"
#include "NoContentListViewItem.h"
+#include "SettingsBlockedMsgDetailFrame.h"
using namespace Msg;
m_pList = new ListView(getParent(), App::getInst().getWindow().getCircleSurface());
m_pList->setHomogeneous(false);
m_pList->setMultiSelection(false);
+ m_pList->setListener(this);
m_pLayout->setContent(*m_pList);
fillList();
}
if (!m_pMoreOption) {
m_pMoreOption = new MoreOption(*m_pLayout);
m_pMoreOption->setDirection(EEXT_MORE_OPTION_DIRECTION_RIGHT);
- m_pMoreOption->appendItem(msgt("WDS_MSG_OPT_NEW_MESSAGE_ABB"), NEW_MSG_MORE_ICON, makeCbLast(&SettingsBlockListFrame::onRestoreClicked), this);
+ m_pMoreOption->appendItem(msgt("WDS_MSG_OPT_RESTORE_ABB"), RESTORE_MORE_ICON, makeCbLast(&SettingsBlockListFrame::onRestoreClicked), this);
m_pMoreOption->appendItem(msgt("WDS_MSG_OPT_DELETE_ABB"), DELETEG_MORE_ICON, makeCbLast(&SettingsBlockListFrame::onDeleteClicked), this);
m_pLayout->setMoreOption(*m_pMoreOption);
}
MSG_LOG("");
}
-
+void SettingsBlockListFrame::onListItemSelected(ListItem &listItem)
+{
+ MSG_LOG("");
+ auto *frame = new SettingsBlockedMsgDetailFrame(getParent());
+ getParent().push(*frame);
+}
--- /dev/null
+/*
+ * Copyright 2016 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.
+ */
+
+#include "SettingsBlockedMsgDetailFrame.h"
+#include "LangUtils.h"
+#include "DefaultLayout.h"
+#include "MoreOption.h"
+#include "IconTextPopup.h"
+
+using namespace Msg;
+
+SettingsBlockedMsgDetailFrame::SettingsBlockedMsgDetailFrame(NaviFrameController &parent)
+ : FrameController(parent)
+ , m_pLayout(nullptr)
+ , m_pMoreOption(nullptr)
+{
+ prepareMainLayout();
+ prepareMoreOption();
+}
+
+SettingsBlockedMsgDetailFrame::~SettingsBlockedMsgDetailFrame()
+{
+}
+
+void SettingsBlockedMsgDetailFrame::onAttached(ViewItem &item)
+{
+ MSG_LOG("");
+ FrameController::onAttached(item);
+ setContent(*m_pLayout);
+}
+
+void SettingsBlockedMsgDetailFrame::prepareMainLayout()
+{
+ if (!m_pLayout) {
+ m_pLayout = new DefaultLayout(getParent());
+ m_pLayout->showMoreOption(true);
+ }
+}
+
+void SettingsBlockedMsgDetailFrame::prepareMoreOption()
+{
+ if (!m_pMoreOption) {
+ m_pMoreOption = new MoreOption(*m_pLayout);
+ m_pMoreOption->setDirection(EEXT_MORE_OPTION_DIRECTION_RIGHT);
+ m_pMoreOption->appendItem(msgt("WDS_MSG_OPT_RESTORE_ABB"), RESTORE_MORE_ICON, makeCbLast(&SettingsBlockedMsgDetailFrame::onRestoreClicked), this);
+ m_pMoreOption->appendItem(msgt("WDS_MSG_OPT_DELETE_ABB"), DELETEG_MORE_ICON, makeCbLast(&SettingsBlockedMsgDetailFrame::onDeleteClicked), this);
+ m_pLayout->setMoreOption(*m_pMoreOption);
+ }
+}
+
+void SettingsBlockedMsgDetailFrame::onRestoreClicked(MoreOption &obj)
+{
+ MSG_LOG("");
+ auto *popup = new IconTextPopup;
+ popup->setIcon(IconTextPopup::CheckIcon);
+ popup->setText(msgt("WDS_MSG_TPOP_MESSAGE_RESTORED_ABB"));
+ popup->setTimeOut();
+ popup->show();
+}
+
+void SettingsBlockedMsgDetailFrame::onDeleteClicked(MoreOption &obj)
+{
+ MSG_LOG("");
+}