201023
authorhgs
Tue, 08 Jun 2010 18:34:07 +0800
changeset 26 97d7f0705d0a
parent 25 57d77d90783b
child 27 0a93cba9d57a
201023
userguide/Userguide.pro
userguide/inc/HelpBaseView.h
userguide/inc/HelpDataProvider.h
userguide/inc/HelpKeywordView.h
userguide/inc/HelpMainWindow.h
userguide/inc/HelpUtils.h
userguide/resources/xml/keywordView.docml
userguide/src/HelpDataProvider.cpp
userguide/src/HelpKeywordView.cpp
userguide/src/HelpMainWindow.cpp
userguide/src/HelpUtils.cpp
--- a/userguide/Userguide.pro	Tue Jun 01 23:20:16 2010 +0300
+++ b/userguide/Userguide.pro	Tue Jun 08 18:34:07 2010 +0800
@@ -36,7 +36,9 @@
 			inc/HelpDataProvider.h \
 			inc/HelpUtils.h \
 			inc/HelpProxyModel.h \
-			inc/HelpStandardItem.h
+			inc/HelpStandardItem.h \
+			inc/HelpKeywordView.h \
+			inc/HelpBaseView.h
 
 SOURCES += 	src/main.cpp \
 			src/HelpMainWindow.cpp \
@@ -47,13 +49,17 @@
 			src/HelpDataProvider.cpp \
 			src/HelpUtils.cpp \
 			src/HelpProxyModel.cpp \
-			src/HelpStandardItem.cpp
+			src/HelpStandardItem.cpp \
+			src/HelpKeywordView.cpp \
+			src/HelpBaseView.cpp
 
 symbian {
 	TARGET.UID3 = 0x10005234
   	TARGET.CAPABILITY = CAP_APPLICATION
   	TARGET.EPOCHEAPSIZE = 0x020000 0x1000000
 
+    CONFIG += mobility
+    MOBILITY = systeminfo
   	LIBS += -lezip -lxqservice -lxqserviceutil
   	include(rom/userguide.pri)
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/userguide/inc/HelpBaseView.h	Tue Jun 08 18:34:07 2010 +0800
@@ -0,0 +1,62 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#ifndef HELPBATHVIEW_H
+#define HELPBATHVIEW_H
+
+#include <hbview.h>
+
+#include "HelpCommon.h"
+#include "HelpDocumentLoader.h"
+
+class HbToolBar;
+
+class HelpBaseView : public HbView
+{
+	Q_OBJECT
+	
+public:
+	HelpBaseView();
+	~HelpBaseView();
+
+signals:
+    void activateView(HelpViewName viewName);
+
+signals: // from tollbar event
+    void showAllList();
+    void showFindList();
+
+private slots: // handle tollbar event
+    void onToolbarAll()		{ emit showAllList(); };
+    void onToolbarFind()	{ emit showFindList(); };
+    void onToolbarOnlineSupport();
+
+protected slots:
+	virtual void onOrientationChanged(Qt::Orientation orientation);
+
+protected:
+	void initBaseDocMl();
+
+protected:
+	HelpUIBuilder	mBuilder;
+	HbToolBar*		mToolBar;
+	
+private:
+	void RefreshToolbarText(Qt::Orientation orientation);
+};
+
+#endif //HELPBATHVIEW_H
--- a/userguide/inc/HelpDataProvider.h	Tue Jun 01 23:20:16 2010 +0300
+++ b/userguide/inc/HelpDataProvider.h	Tue Jun 08 18:34:07 2010 +0800
@@ -61,7 +61,7 @@
 	//parse xml
 	void parseCategoryIndexXml(const QString& path, QStringList& uidList, QStringList& titleList);
 	void parseCategory2IndexXml(const QString& path, QStringList& hrefList, QStringList& titleList);
-	void parseBuiltInMetaxml(const QString& path, int& featureId, int& priority);
+	void parseBuiltInMetaxml(const QString& path, int& priority);
 	void parseAppMetaxml(const QString& path, QString& title);	
 
 private:
--- a/userguide/inc/HelpKeywordView.h	Tue Jun 01 23:20:16 2010 +0300
+++ b/userguide/inc/HelpKeywordView.h	Tue Jun 08 18:34:07 2010 +0800
@@ -25,7 +25,7 @@
 class HbListView;
 class HbSearchPanel;
 class HbStaticVkbHost;
-class HbGroupBox;
+class HbLabel;
 
 class HelpKeywordView : public HelpBaseView
 {
@@ -42,15 +42,18 @@
 	void initSearchList();
 	void initSearchPanel();
 	void initBackAction();
-	void initEmptyLabel();
 	void initVirtualKeyboard();
-	
+
 private:
-	HbGroupBox* groupBox();
+	void onOrientationChanged(Qt::Orientation orientation);
+
+private:
+	HbLabel* label();
     
 private:
 	void updateVisibleItems(bool visible);
 	void ResetSearchPanel();	
+	void updateLabelPos();
 
 private slots: // handle system event
     void onViewReady();
--- a/userguide/inc/HelpMainWindow.h	Tue Jun 01 23:20:16 2010 +0300
+++ b/userguide/inc/HelpMainWindow.h	Tue Jun 08 18:34:07 2010 +0800
@@ -23,9 +23,10 @@
 #include "HelpCommon.h"
 #include "HelpDocumentLoader.h"
 
+class HelpBaseView;
 class HelpCategoryView;
+class HelpKeywordView;
 class HelpContentsView;
-class HbToolBar;
 
 class HelpMainWindow : public HbMainWindow
 {
@@ -37,33 +38,25 @@
 
 private slots:
     void onActivateView(HelpViewName viewName);
+    void saveActivity();
 
 private: // activate views
 	void activateCategoryView();
+	void activateKeywordView();
 	void activateContentsView();
-	void initToolbar();
-	void RefreshToolbarText(Qt::Orientation orientation);
 	
 private:
-	void connectViewSignal(const QObject *object);
+	void connectViewSignal(const HelpBaseView *view);
 
-signals:
-	void backActionSignal();
-	
-private slots: // handle tollbar event
-    void onToolbarAll();
-    void onToolbarFind();
-    void onToolbarOnlineSupport();
-
-private slots:
-	void onOrientationChanged(Qt::Orientation orientation);
+private slots: // handle view event
+    void onShowAllList();
+    void onShowFindList();
 
 private:
 	HelpCategoryView* mCategoryView;
+	HelpKeywordView* mKeywordView;
 	HelpContentsView* mContentsView;
-	HbToolBar*         mToolBar;
-	HelpUIBuilder mBuilder;
-
+	HelpViewName mPreviousViewName;
 };
 
 #endif //HELPMAINWINDOW_H
--- a/userguide/inc/HelpUtils.h	Tue Jun 01 23:20:16 2010 +0300
+++ b/userguide/inc/HelpUtils.h	Tue Jun 08 18:34:07 2010 +0800
@@ -25,6 +25,7 @@
 public:
 	static void loadHtmlFromZipFile(const QString& path, const QString& htmlFile, QString& htmlContent);
 	static int launchApplication(const QString& appUid);
+	static bool suppportFeatureID(int featureID);
 	static QString rootPath();
 	static QString UILocaleFromQtToSymbian();
 	static Qt::Orientation defaultOrientation();
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/userguide/resources/xml/keywordView.docml	Tue Jun 08 18:34:07 2010 +0800
@@ -0,0 +1,99 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<hbdocument version="1.1">
+  <widget name="view_help" type="HbView">
+    <widget name="content" role="HbView:widget" type="HbWidget">
+      <widget name="list_search" type="HbListView">
+        <widget name="listItemPrototype" role="HbAbstractView:prototype" type="HbListViewItem"/>
+        <sizehint height="85.52239un" type="PREFERRED" width="45.8209un"/>
+        <rect height="63.20149un" name="geometry" width="51.04478un" x="1.64179un" y="11.79105un"/>
+        <bool name="visible" value="FALSE"/>
+      </widget>
+      <widget name="search_panel" type="HbSearchPanel">
+        <rect height="9.3806un" name="geometry" width="51.04478un" x="1.79104un" y="75.22388un"/>
+        <bool name="visible" value="FALSE"/>
+      </widget>
+      <widget name="no_match_label" type="HbLabel">
+        <real name="z" value="1"/>
+        <string locid="txt_user_guide_list_no_match_found" name="plainText" value="Label"/>
+        <enums name="alignment" value="AlignTop|AlignHCenter"/>
+        <fontspec name="fontSpec" role="Primary" textheight="26.8"/>
+        <bool name="visible" value="FALSE"/>
+      </widget>
+    </widget>
+    <string locid="txt_user_guide_title_user_guide" name="title" value="View"/>
+  </widget>
+  <section name="layout_find">
+    <widget name="list_search" type="HbListView">
+      <bool name="visible" value="TRUE"/>
+    </widget>
+    <widget name="content" role="HbView:widget" type="HbWidget">
+      <layout orientation="Vertical" type="linear">
+        <linearitem itemname="list_search"/>
+        <linearitem itemname="search_panel"/>
+      </layout>
+    </widget>
+    <widget name="search_panel" type="HbSearchPanel">
+      <bool name="visible" value="TRUE"/>
+    </widget>
+    <widget name="no_match_label" type="HbLabel">
+      <bool name="visible" value="FALSE"/>
+    </widget>
+  </section>
+  <section name="layout_find_no_searchpanel">
+    <widget name="list_search" type="HbListView">
+      <bool name="visible" value="TRUE"/>
+    </widget>
+    <widget name="content" role="HbView:widget" type="HbWidget">
+      <layout orientation="Vertical" type="linear">
+        <linearitem itemname="list_search"/>
+      </layout>
+    </widget>
+    <widget name="search_panel" type="HbSearchPanel">
+      <bool name="visible" value="FALSE"/>
+    </widget>
+    <widget name="no_match_label" type="HbLabel">
+      <bool name="visible" value="FALSE"/>
+    </widget>
+  </section>
+  <section name="layout_find_no_match">
+    <widget name="list_search" type="HbListView">
+      <bool name="visible" value="FALSE"/>
+    </widget>
+    <widget name="content" role="HbView:widget" type="HbWidget">
+      <layout orientation="Vertical" type="linear">
+        <linearitem itemname="no_match_label"/>
+        <linearitem itemname="search_panel"/>
+      </layout>
+    </widget>
+    <widget name="search_panel" type="HbSearchPanel">
+      <bool name="visible" value="TRUE"/>
+    </widget>
+    <widget name="no_match_label" type="HbLabel">
+      <bool name="visible" value="TRUE"/>
+    </widget>
+  </section>
+  <section name="layout_find_no_searchpanel_no_match">
+    <widget name="list_search" type="HbListView">
+      <bool name="visible" value="FALSE"/>
+    </widget>
+    <widget name="content" role="HbView:widget" type="HbWidget">
+      <layout orientation="Vertical" type="linear">
+        <linearitem itemname="no_match_label"/>
+      </layout>
+    </widget>
+    <widget name="search_panel" type="HbSearchPanel">
+      <bool name="visible" value="FALSE"/>
+    </widget>
+    <widget name="no_match_label" type="HbLabel">
+      <bool name="visible" value="TRUE"/>
+    </widget>
+  </section>
+  <metadata activeUIState="search_no_match_no_panel" display="NHD-3.2-inch_portrait" unit="un">
+    <uistate name="Common ui state" sections="#common"/>
+    <uistate name="search" sections="#common layout_find"/>
+    <uistate name="search_no_panel" sections="#common layout_find_no_searchpanel"/>
+    <uistate name="search_no_match" sections="#common layout_find_no_match"/>
+    <uistate name="search_no_match_no_panel" sections="#common layout_find_no_searchpanel_no_match"/>
+    <dummydata objectName="list_search" section="#common" value="app_list_template5"/>
+  </metadata>
+</hbdocument>
--- a/userguide/src/HelpDataProvider.cpp	Tue Jun 01 23:20:16 2010 +0300
+++ b/userguide/src/HelpDataProvider.cpp	Tue Jun 08 18:34:07 2010 +0800
@@ -255,9 +255,8 @@
 
 void HelpDataProvider::constructBuiltInCategoryItem(const QString& uid, const QString& title)
 {
-	int featureId;
 	int priority;
-	parseBuiltInMetaxml(uid, featureId, priority);
+	parseBuiltInMetaxml(uid, priority);
 	
 	HelpStandardItem* item = NULL;
 	item = new HelpStandardItem(title);
@@ -346,6 +345,33 @@
 	{
 		return;
 	}
+
+	QStringList featureIdLst;
+
+	query.setQuery("doc($inputdoc)/collections/collection/number(@FeatureId)");
+	if(!query.isValid())
+	{
+		return;
+	}
+	if(!query.evaluateTo(&featureIdLst))
+	{
+		return;
+	}
+
+	if(featureIdLst.count() != uidList.count())
+	{
+		return;
+	}
+
+	for(int i = featureIdLst.count()  - 1; i <= 0; i--)
+	{
+		int featureID = featureIdLst.at(i).toInt();
+		if(!HelpUtils::suppportFeatureID(featureID))
+		{
+			uidList.removeAt(i);
+			titleList.removeAt(i);
+		}
+	}
 }
 
 void HelpDataProvider::parseCategory2IndexXml(const QString& path, QStringList& hrefList, QStringList& titleList)
@@ -361,7 +387,6 @@
 
 	//parse index xml to a stringlist, each string include href and navtitle and seperate by "specilchar"
 	QXmlQuery query;
-	QXmlItem xmlItem(SPECIALCHAR);
 	query.bindVariable("inputdoc", &file);
 
 	query.setQuery("doc($inputdoc)/topics/topicref/xs:string(@href)");	
@@ -383,15 +408,41 @@
 	{
 		return;
 	}
+
+	QStringList featureIdLst;
+
+	query.setQuery("doc($inputdoc)/topics/topicref/number(@FeatureId)");
+	if(!query.isValid())
+	{
+		return;
+	}
+	if(!query.evaluateTo(&featureIdLst))
+	{
+		return;
+	}
+
+	if(featureIdLst.count() != hrefList.count())
+	{
+		return;
+	}
+
+	for(int i = featureIdLst.count()  - 1; i <= 0; i--)
+	{
+		int featureID = featureIdLst.at(i).toInt();
+		if(!HelpUtils::suppportFeatureID(featureID))
+		{
+			hrefList.removeAt(i);
+			titleList.removeAt(i);
+		}
+	}
 }
 
-void HelpDataProvider::parseBuiltInMetaxml(const QString& path, int& featureId, int& priority)
+void HelpDataProvider::parseBuiltInMetaxml(const QString& path, int& priority)
 {
 	QString pathMetaxml(path);
 	pathMetaxml.append(BACKSLASH);
 	pathMetaxml.append(METAXML);
 
-	featureId = -1;
 	priority = -1;
 
 	QFile file(pathMetaxml);
@@ -404,12 +455,6 @@
 	QString str;
 	query.bindVariable("inputdoc", &file);
 
-	query.setQuery("doc($inputdoc)/meta/title/number(@FeatureId)");
-	if(query.isValid() && query.evaluateTo(&str))
-	{
-		featureId = str.toInt();
-	}
-
 	query.setQuery("doc($inputdoc)/meta/number(priority)");	
 	if(query.isValid() && query.evaluateTo(&str))
 	{
--- a/userguide/src/HelpKeywordView.cpp	Tue Jun 01 23:20:16 2010 +0300
+++ b/userguide/src/HelpKeywordView.cpp	Tue Jun 08 18:34:07 2010 +0800
@@ -31,7 +31,6 @@
 #include <hblineedit.h>
 #include <hbmenu.h>
 #include <hbstaticvkbhost.h>
-#include <hbgroupbox.h>
 
 #include "HelpDataProvider.h"
 #include "HelpProxyModel.h"
@@ -61,7 +60,6 @@
     initSearchList();
     initSearchPanel();
 	initVirtualKeyboard();
-	initEmptyLabel();
     
     connect(mainWindow(), SIGNAL(viewReady()), this, SLOT(onViewReady()));
 }
@@ -99,22 +97,17 @@
     connect(mVirtualKeyboard, SIGNAL(keypadClosed()), this, SLOT(onHandleKeypadClose()));
 }
 
-void HelpKeywordView::initEmptyLabel()
+HbLabel* HelpKeywordView::label()
 {
-	HbLabel* label = mBuilder.findWidget<HbLabel*>(DOCML_NO_MATCH_LABEL);
-	label->setFontSpec(HbFontSpec(HbFontSpec::Primary));
+	return mBuilder.findWidget<HbLabel*>(DOCML_NO_MATCH_LABEL);
 }
 
 void HelpKeywordView::loadAllContent()
 {
+	toolBar()->hide();
 	mBuilder.load(QRC_DOCML_KEYWORD, DOCML_LAYOUT_SEARCH);
 	ResetSearchPanel();
-	toolBar()->hide();
-}
-
-HbGroupBox* HelpKeywordView::groupBox()
-{
-	return mBuilder.findWidget<HbGroupBox*>(DOCML_GROUPBOX);
+	
 }
 
 ////////////////////////////////////////////////////////////////////////////////////////////
@@ -150,6 +143,35 @@
     }
 }
 
+void HelpKeywordView::updateLabelPos()
+{
+	HbDeviceProfile profile = HbDeviceProfile::profile(mainWindow());
+	qreal unValue = profile.unitValue();
+	if(mainWindow()->orientation() == Qt::Vertical)
+	{
+		if(mVirtualKeyboard->keypadStatus() == HbVkbHost::HbVkbStatusClosed)
+		{
+			label()->setContentsMargins(0,30 * unValue,0,0);
+		}
+		else
+		{
+			label()->setContentsMargins(0,10 * unValue,0,0);
+		}
+	}
+	else
+	{
+		if(mVirtualKeyboard->keypadStatus() == HbVkbHost::HbVkbStatusClosed)
+		{
+			label()->setContentsMargins(0,10 * unValue,0,0);
+		}
+		else
+		{
+            label()->setContentsMargins(0,0,0,0);
+			label()->setAlignment(label()->alignment() | Qt::AlignVCenter);
+		}
+	}
+}
+
 ////////////////////////////////////////////////////////////////////////////////////////////
 // handle system event
 
@@ -217,18 +239,6 @@
 	}
 
 	toolBar()->hide();
-
-	if(criteria.isEmpty())
-	{
-		groupBox()->setHeading(hbTrId(TXT_SETLABEL_SEARCH));
-	}
-	else
-	{
-		QString heading = qtTrId(TXT_SETLABEL_SEARCH_RESULTS);
-		heading.append(COLON);
-		heading.append(criteria);
-		groupBox()->setHeading(heading);
-	}
 }
 
 ////////////////////////////////////////////////////////////////////////////////////////////
@@ -239,6 +249,7 @@
 	updateVisibleItems(false);
     qreal heightToSet = mainWindow()->layoutRect().height() - mVirtualKeyboard->keyboardArea().height();
     this->setMaximumHeight(heightToSet);
+	updateLabelPos();
 }
 
 void HelpKeywordView::onHandleKeypadClose()
@@ -248,6 +259,13 @@
 	qreal toolbarHeight = toolBar()->size().height();
 	qreal height = mainHeight - (toolBar()->isVisible() ? toolbarHeight : 0);
 	this->setMaximumHeight(height);
+	updateLabelPos();
+}
+
+void HelpKeywordView::onOrientationChanged(Qt::Orientation orientation)
+{
+	HelpBaseView::onOrientationChanged(orientation);
+	updateLabelPos();
 }
 
 // end of file
--- a/userguide/src/HelpMainWindow.cpp	Tue Jun 01 23:20:16 2010 +0300
+++ b/userguide/src/HelpMainWindow.cpp	Tue Jun 08 18:34:07 2010 +0800
@@ -18,8 +18,12 @@
 #include <hbtoolbar.h>
 #include <hbnotificationdialog.h>
 #include <hbaction.h>
+#include <hbapplication.h>
+#include <hbactivitymanager.h>
 
+#include "HelpBaseView.h"
 #include "HelpCategoryView.h"
+#include "HelpKeywordView.h"
 #include "HelpContentsView.h"
 
 #include "HelpMainWindow.h"
@@ -27,10 +31,10 @@
 
 HelpMainWindow::HelpMainWindow() : 
 mCategoryView(NULL),
+mKeywordView(NULL),
 mContentsView(NULL)
 {
-	connect(this, SIGNAL(orientationChanged(Qt::Orientation)), this, SLOT(onOrientationChanged(Qt::Orientation)));
-	initToolbar();
+    QObject::connect(qApp, SIGNAL(aboutToQuit()), this, SLOT(saveActivity()));
     activateCategoryView();
 }
 
@@ -39,20 +43,6 @@
     HelpDataProvider::destroyInstance();
 }
 
-void HelpMainWindow::initToolbar()
-{
-	mBuilder.load(QRC_DOCML_TOOLBAR);
-	mToolBar = mBuilder.findWidget<HbToolBar*>(DOCML_TOOLBAR);
-
-    HbAction* allAction = mBuilder.findObject<HbAction*>(DOCML_ACTION_ALL);
-    HbAction* findAction = mBuilder.findObject<HbAction*>(DOCML_ACTION_SEARCH);
-	HbAction* onLineSupportAction = mBuilder.findObject<HbAction*>(DOCML_ACTION_LINK_NOKIA);
-
-	connect(allAction, SIGNAL(triggered()), this, SLOT(onToolbarAll()));
-	connect(findAction, SIGNAL(triggered()), this, SLOT(onToolbarFind()));
-	connect(onLineSupportAction, SIGNAL(triggered()), this, SLOT(onToolbarOnlineSupport()));
-}
-
 void HelpMainWindow::onActivateView(HelpViewName viewName)
 {
 	switch(viewName)
@@ -60,11 +50,17 @@
 	    case HelpViewCategory:
             activateCategoryView();
 			break;
-
+	    case HelpViewKeyword:
+            activateKeywordView();
+			break;
 	    case HelpViewContents:
             activateContentsView();
 			break;
-
+		case PreviousView:
+			{
+				onActivateView(mPreviousViewName);
+			}
+			break;
 	    default:
 	        break;
 	}
@@ -77,74 +73,91 @@
         mCategoryView = new HelpCategoryView();
         addView(mCategoryView);
         mCategoryView->init();
-		mCategoryView->setToolBar(mToolBar);
         emit currentViewChanged(mCategoryView);
 		connectViewSignal(mCategoryView);
     }
 
+	mPreviousViewName = HelpViewCategory;
     setCurrentView(mCategoryView);
 }
 
+void HelpMainWindow::activateKeywordView()
+{
+    if(!mKeywordView)
+    {
+        mKeywordView = new HelpKeywordView();
+		addView(mKeywordView);
+        mKeywordView->init();
+		connectViewSignal(mKeywordView);
+    }
+
+	mPreviousViewName = HelpViewKeyword;	
+    setCurrentView(mKeywordView);	
+}
+
 void HelpMainWindow::activateContentsView()
 {
     if(!mContentsView)
     {
 		mContentsView = new HelpContentsView();
-        addView(mContentsView);
+		addView(mContentsView);
         mContentsView->init();
-		mContentsView->setToolBar(mToolBar);
 
         connectViewSignal(mContentsView);
     }
-
     setCurrentView(mContentsView);
 }
 
-void HelpMainWindow::connectViewSignal(const QObject *object)
+void HelpMainWindow::connectViewSignal(const HelpBaseView *view)
 {
-    connect(object, SIGNAL(activateView(HelpViewName)), this, SLOT(onActivateView(HelpViewName)));
+	connect(this, SIGNAL(orientationChanged(Qt::Orientation)), view, SLOT(onOrientationChanged(Qt::Orientation)));
+    connect(view, SIGNAL(activateView(HelpViewName)), this, SLOT(onActivateView(HelpViewName)));
+    
+    connect(view, SIGNAL(showAllList()), this, SLOT(onShowAllList()));
+    connect(view, SIGNAL(showFindList()), this, SLOT(onShowFindList()));
 }
 
 
 ////////////////////////////////////////////////////////////////////////////////////
 // handle view event
 
-void HelpMainWindow::onToolbarAll()
+void HelpMainWindow::onShowAllList()
 {
     activateCategoryView();
-    mCategoryView->switchViewMode(HelpCategoryView::ViewModeAll);
 }
 
-void HelpMainWindow::onToolbarFind()
-{
-    activateCategoryView();
-    mCategoryView->switchViewMode(HelpCategoryView::ViewModeSearch);
+void HelpMainWindow::onShowFindList()
+{	
+    activateKeywordView();
+	mKeywordView->loadAllContent();
 }
 
-void HelpMainWindow::onToolbarOnlineSupport()
-{
-    HbNotificationDialog *notificationDialog = new HbNotificationDialog();
-    notificationDialog->setParent(this);
-    notificationDialog->setTitle(URL_LINK_SUPPORT);
-    notificationDialog->show();
-}
-
-void HelpMainWindow::onOrientationChanged(Qt::Orientation orientation)
+void HelpMainWindow::saveActivity()
 {
-    RefreshToolbarText(orientation);
-}
+  HbActivityManager* activityManager = qobject_cast<HbApplication*>(qApp)->activityManager();
+
+  // clean up any previous versions of this activity from the activity manager.
+  bool ok = activityManager->removeActivity("UserGuideMainView");
+  if ( !ok )
+      {
+      //qFatal("Remove failed" );
+      }
 
-void HelpMainWindow::RefreshToolbarText(Qt::Orientation orientation)
-{
-	bool isLandscape = (Qt::Horizontal==orientation);
-    HbAction* tollbarAction = mBuilder.findObject<HbAction*>(DOCML_ACTION_ALL);
-    tollbarAction->setText(isLandscape ? qtTrId(TXT_BUTTON_ALL) : QString());
+  // get a screenshot for saving to the activity manager
+  QVariantHash metadata;
+  metadata.insert("screenshot", QPixmap::grabWidget(this, rect()));
 
-    tollbarAction = mBuilder.findObject<HbAction*>(DOCML_ACTION_SEARCH);
-    tollbarAction->setText(isLandscape ? qtTrId(TXT_BUTTON_FIND) : QString());
+  // save any data necessary to save the state
+  QByteArray serializedActivity;
+  QDataStream stream(&serializedActivity, QIODevice::WriteOnly | QIODevice::Append);
+  stream << "whatever data you need to save the state adequately";
 
-    tollbarAction = mBuilder.findObject<HbAction*>(DOCML_ACTION_LINK_NOKIA);
-    tollbarAction->setText(isLandscape ? qtTrId(TXT_BUTTON_LINK_SUPPORT) : QString());
+  // add the activity to the activity manager
+  ok = activityManager->addActivity("UserGuideMainView", serializedActivity, metadata);
+  if ( !ok )
+      {
+      qFatal("Add failed" );
+      }
 }
 
 // end of file
--- a/userguide/src/HelpUtils.cpp	Tue Jun 01 23:20:16 2010 +0300
+++ b/userguide/src/HelpUtils.cpp	Tue Jun 08 18:34:07 2010 +0800
@@ -28,8 +28,10 @@
 
 #ifdef Q_OS_SYMBIAN
 
+#include <qsysteminfo.h>
+#include <xqappmgr.h>
+
 #include <e32const.h>
-#include <xqappmgr.h>
 #include <eikenv.h>
 #include <zipfile.h>
 
@@ -230,6 +232,9 @@
 
     QString uriStr("appto://");
     uriStr.append(appUid);
+  /*  uriStr.append("?");
+    uriStr.append("activityname");
+    uriStr.append("=MainView&key1=data1&key2=data2");*/
     QUrl uri(uriStr); 
     
     XQApplicationManager appmgr;
@@ -249,6 +254,21 @@
     return 0;
 }
 
+bool HelpUtils::suppportFeatureID(int featureID)
+{
+#ifdef Q_OS_SYMBIAN
+	if(featureID == -1)
+	{
+		return true;
+	}
+    QtMobility::QSystemInfo sysInfo;
+	return sysInfo.hasFeatureSupported((QtMobility::QSystemInfo::Feature)featureID);
+#else
+	Q_UNUSED(featureID);
+	return true;
+#endif
+}
+
 Qt::Orientation HelpUtils::defaultOrientation()
 {
 	return Qt::Vertical;