Revision: 201017
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Fri, 14 May 2010 15:42:52 +0300
changeset 18 375271912456
parent 15 c0dfc135a46c
child 19 d67f854a44b4
child 23 99b096216bc8
Revision: 201017 Kit: 201019
userguide/Userguide.pro
userguide/inc/HelpBaseView.h
userguide/inc/HelpCategoryView.h
userguide/inc/HelpCommon.h
userguide/inc/HelpContentsView.h
userguide/inc/HelpKeywordView.h
userguide/inc/HelpMainWindow.h
userguide/resources/Userguide.qrc
userguide/resources/xml/baseView.docml
userguide/resources/xml/categoryView.docml
userguide/resources/xml/contentsView.docml
userguide/resources/xml/keywordView.docml
userguide/resources/xml/toolbar.docml
userguide/src/BrowserWrapper.cpp
userguide/src/HelpBaseView.cpp
userguide/src/HelpCategoryView.cpp
userguide/src/HelpContentsView.cpp
userguide/src/HelpDataProvider.cpp
userguide/src/HelpDocumentLoader.cpp
userguide/src/HelpKeywordView.cpp
userguide/src/HelpMainWindow.cpp
--- a/userguide/Userguide.pro	Mon May 03 12:24:47 2010 +0300
+++ b/userguide/Userguide.pro	Fri May 14 15:42:52 2010 +0300
@@ -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,7 +49,9 @@
 			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
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/userguide/inc/HelpBaseView.h	Fri May 14 15:42:52 2010 +0300
@@ -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();
+
+private slots:
+	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/HelpCategoryView.h	Mon May 03 12:24:47 2010 +0300
+++ b/userguide/inc/HelpCategoryView.h	Fri May 14 15:42:52 2010 +0300
@@ -18,19 +18,14 @@
 #ifndef HELPCATEGORYVIEW_H
 #define HELPCATEGORYVIEW_H
 
-#include <hbview.h>
+#include <HelpBaseView.h>
 
-#include "HelpCommon.h"
 #include "HelpDocumentLoader.h"
 
 class HbTreeView;
-class HbListView;
-class HbSearchPanel;
 class QStandardItem;
-class HbStaticVkbHost;
-class HbGroupBox;
 
-class HelpCategoryView : public HbView
+class HelpCategoryView : public HelpBaseView
 {
 	Q_OBJECT
 	
@@ -42,64 +37,20 @@
 private:
 	void initDocMl();
 	void initAllList();
-	void initSearchList();
-	void initSearchPanel();
-	void initBackAction();
-	void initEmptyLabel();
-	void initVirtualKeyboard();
-	
-private:
-	HbGroupBox* groupBox();
-
-public:
-    enum ViewMode
-    {
-        ViewModeNull = 0, 
-        ViewModeAll, 
-        ViewModeSearch
-    };
-    void switchViewMode(ViewMode viewMode);
-
-signals:
-    void activateView(HelpViewName viewName);
-    
-private:
-	void updateVisibleItems(bool visible);
-	void ResetSearchPanel();	
 
 private:
 	void expandCollapseAllList(QStandardItem* item, bool expand);
-
-private slots: // handle system event
-    void onCurrentViewChanged(HbView *view);
-
-private slots: // handle button action
-    void onBackAction();
+	void updateExpandCollapseAction(bool expand);
     
 private slots: // handle list event
     void onAllListActivated(const QModelIndex& index);
-    void onSearchListActivated(const QModelIndex& index);
 
-private slots: // handle search panel event
-	void onSearchPanelExitClicked();
-	void onSearchPanelCriteriaChanged(const QString &criteria);
-
-private slots:
-	void onExpandAll();
-	void onCollapseAll();
-
-private slots: // handle virtual keyboard event
-    void onHandleKeypadOpen();
-    void onHandleKeypadClose();
+private slots: // handle menu event
+	void onExpandOrCollapseAll();
 
 private:
-    ViewMode			mViewMode;
-	HbTreeView*			mListAll;
-	HbListView*			mListSearch;
-	HbSearchPanel*		mSearchPanel;
-	HbAction*			mSoftKeyAction;
-	HbStaticVkbHost*	mVirtualKeyboard;
-	HelpUIBuilder		mBuilder;
+	HbTreeView*	mListAll;
+	int			mExpandCount;
 };
 
 #endif //HELPCATEGORYVIEW_H
--- a/userguide/inc/HelpCommon.h	Mon May 03 12:24:47 2010 +0300
+++ b/userguide/inc/HelpCommon.h	Fri May 14 15:42:52 2010 +0300
@@ -50,29 +50,33 @@
 const char* const TXT_BUTTON_LINK_SUPPORT = "txt_user_guide_button_link_to_nokiacomsupport";
 const char* const TXT_SETLABEL_SEARCH = "txt_user_guide_setlabel_search";
 const char* const TXT_SETLABEL_SEARCH_RESULTS = "txt_user_guide_setlabel_search_results";
+const char* const TXT_APPLICATIONS = "txt_user_guide_list_applications";
+const char* const TXT_COLLAPSE_ALL = "txt_user_guide_opt_collapse_all";
+const char* const TXT_EXPAND_ALL = "txt_user_guide_opt_expand_all";
 
 // docml
+const char* const QRC_DOCML_BASE = ":/xml/baseView.docml";
 const char* const QRC_DOCML_CATEGORY = ":/xml/categoryView.docml";
+const char* const QRC_DOCML_KEYWORD = ":/xml/keywordView.docml";
 const char* const QRC_DOCML_CONTENTS = ":/xml/contentsView.docml";
 const char* const QRC_DOCML_TOOLBAR = ":/xml/toolbar.docml";
+const char* const DOCML_VIEW_NAME = "view_help";
 const char* const DOCML_ACTION_ALL = "action_all";
 const char* const DOCML_ACTION_SEARCH = "action_find";
 const char* const DOCML_ACTION_LINK_NOKIA = "action_online_support";
-const char* const DOCML_VIEW_CATEGORY = "view_category";
-const char* const DOCML_VIEW_CONTENTS = "view_contents";
 const char* const DOCML_LIST_CATEGORY_ALL = "list_category_all";
-const char* const DOCML_LIST_CATEGORY_SEARCH = "list_category_search";
-const char* const DOCML_SEARCH_PANEL_CATEGORY = "search_panel_category";
+const char* const DOCML_LIST_SEARCH = "list_search";
+const char* const DOCML_SEARCH_PANEL = "search_panel";
 const char* const DOCML_TOOLBAR = "toolbar";
 const char* const DOCML_BROWSER_CONTENTS = "browser_contents";
 const char* const DOCML_BROWSER = "browser";
-const char* const DOCML_LAYOUT_CATEGORY_ALL = "layout_category_all";
-const char* const DOCML_LAYOUT_CATEGORY_SEARCH = "layout_category_find";
-const char* const DOCML_LAYOUT_CATEGORY_SEARCH_NO_SRHPAL = "layout_category_find_no_searchpanel";
+const char* const DOCML_LAYOUT_SEARCH = "layout_find";
+const char* const DOCML_LAYOUT_SEARCH_NO_SRHPAL = "layout_find_no_searchpanel";
 const char* const DOCML_GROUPBOX = "groupBox";
-const char* const DOCML_LAYOUT_CATEGORY_SEARCH_NO_MATCH = "layout_category_find_no_match";
-const char* const DOCML_LAYOUT_CATEGORY_SEARCH_NO_SRHPAL_NO_MATCH = "layout_category_find_no_searchpanel_no_match";
+const char* const DOCML_LAYOUT_SEARCH_NO_MATCH = "layout_find_no_match";
+const char* const DOCML_LAYOUT_SEARCH_NO_SRHPAL_NO_MATCH = "layout_find_no_searchpanel_no_match";
 const char* const DOCML_NO_MATCH_LABEL = "no_match_label";
+const char* const DOCML_ACTION_EXPAND_COLLAPSE_ALL = "action_expand_collapse_all";
 
 
 // enum
@@ -80,7 +84,9 @@
 enum HelpViewName
 {
     HelpViewCategory = 0,
-    HelpViewContents
+	HelpViewKeyword,
+    HelpViewContents,
+	PreviousView = 100
 };
 
 enum HelpItemRole
--- a/userguide/inc/HelpContentsView.h	Mon May 03 12:24:47 2010 +0300
+++ b/userguide/inc/HelpContentsView.h	Fri May 14 15:42:52 2010 +0300
@@ -20,14 +20,13 @@
 
 #include <QUrl>
 
-#include <hbview.h>
+#include <HelpBaseView.h>
 
-#include "HelpCommon.h"
 #include "HelpDocumentLoader.h"
 
 class BrowserWrapper;
 
-class HelpContentsView : public HbView
+class HelpContentsView : public HelpBaseView
 {
 	Q_OBJECT
 	
@@ -40,11 +39,8 @@
 	
 private:
 	void initDocMl();
-    void initBackAction();
-	
-signals:
-    void activateView(HelpViewName viewName);
-    
+    void initBackAction();	
+ 
 private:
 	bool openApplication(const QUrl& url);
 	bool openExternalLink(const QUrl& url);
@@ -63,7 +59,6 @@
 private:
     BrowserWrapper*     mBrowser;
     HbAction* mSoftKeyAction;
-	HelpUIBuilder mBuilder;
 };
 
 #endif //HELPCONTENTSVIEW_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/userguide/inc/HelpKeywordView.h	Fri May 14 15:42:52 2010 +0300
@@ -0,0 +1,79 @@
+/*
+* 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 HELPKEYWORDVIEW_H
+#define HELPKEYWORDVIEW_H
+
+#include <HelpBaseView.h>
+
+#include "HelpDocumentLoader.h"
+
+class HbListView;
+class HbSearchPanel;
+class HbStaticVkbHost;
+class HbGroupBox;
+
+class HelpKeywordView : public HelpBaseView
+{
+	Q_OBJECT
+	
+public:
+	HelpKeywordView();
+	~HelpKeywordView();
+	void init();
+	void loadAllContent();
+
+private:
+	void initDocMl();
+	void initSearchList();
+	void initSearchPanel();
+	void initBackAction();
+	void initEmptyLabel();
+	void initVirtualKeyboard();
+	
+private:
+	HbGroupBox* groupBox();
+    
+private:
+	void updateVisibleItems(bool visible);
+	void ResetSearchPanel();	
+
+private slots: // handle system event
+    void onCurrentViewChanged(HbView *view);
+
+private slots: // handle button action
+    void onBackAction();
+    
+private slots: // handle list event
+    void onSearchListActivated(const QModelIndex& index);
+
+private slots: // handle search panel event
+	void onSearchPanelExitClicked();
+	void onSearchPanelCriteriaChanged(const QString &criteria);
+
+private slots: // handle virtual keyboard event
+    void onHandleKeypadOpen();
+    void onHandleKeypadClose();
+
+private:
+	HbListView*			mListSearch;
+	HbSearchPanel*		mSearchPanel;
+	HbAction*			mSoftKeyAction;
+	HbStaticVkbHost*	mVirtualKeyboard;
+};
+
+#endif //HELPKEYWORDVIEW_H
--- a/userguide/inc/HelpMainWindow.h	Mon May 03 12:24:47 2010 +0300
+++ b/userguide/inc/HelpMainWindow.h	Fri May 14 15:42:52 2010 +0300
@@ -23,9 +23,10 @@
 #include "HelpCommon.h"
 #include "HelpDocumentLoader.h"
 
+class HelpBaseView;
 class HelpCategoryView;
+class HelpKeywordView;
 class HelpContentsView;
-class HbToolBar;
 
 class HelpMainWindow : public HbMainWindow
 {
@@ -40,30 +41,21 @@
 
 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/resources/Userguide.qrc	Mon May 03 12:24:47 2010 +0300
+++ b/userguide/resources/Userguide.qrc	Fri May 14 15:42:52 2010 +0300
@@ -2,8 +2,9 @@
 
 	<qresource prefix="/xml">
 		<file alias="categoryView.docml">xml/categoryView.docml</file>
+		<file alias="keywordView.docml">xml/keywordView.docml</file>		
 		<file alias="contentsView.docml">xml/contentsView.docml</file>
-    <file alias="toolbar.docml">xml/toolbar.docml</file>    
+    <file alias="baseView.docml">xml/baseView.docml</file>    
   </qresource>
 	
 	<qresource prefix= "/images">
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/userguide/resources/xml/baseView.docml	Fri May 14 15:42:52 2010 +0300
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<hbdocument version="0.9">
+  <object name="help_config" type="QObject">
+	  <object name="action_all" type="HbAction">
+		  <icon name="icon" iconName=":/images/show_all.svg" />
+	  </object>
+	  <object name="action_find" type="HbAction">
+		  <icon name="icon" iconName="qtg_mono_search" />
+	  </object>
+    <object name="action_online_support" type="HbAction">
+      <icon name="icon" iconName=":/images/link_nokia.svg" />
+    </object>
+  </object>
+
+  <widget name="view_help" type="HbView">
+    <widget name="toolbar" type="HbToolBar" role="HbView:toolBar">
+      <ref object="action_all" role="HbToolBar:addAction" />
+      <ref object="action_find" role="HbToolBar:addAction" />
+      <ref object="action_online_support" role="HbToolBar:addAction" />
+    </widget>
+  </widget>
+
+  <connect sender="action_all" signal="triggered(bool)" receiver="view_help" slot="onToolbarAll()" />
+  <connect sender="action_find" signal="triggered(bool)" receiver="view_help" slot="onToolbarFind()" />
+  <connect sender="action_online_support" signal="triggered(bool)" receiver="view_help" slot="onToolbarOnlineSupport()" />
+  
+</hbdocument>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/userguide/resources/xml/categoryView.docml	Fri May 14 15:42:52 2010 +0300
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<hbdocument version="1.0">
+    <object name="action_expand_collapse_all" type="HbAction">
+        <string locid="txt_user_guide_opt_expand_all" name="text" value="Action01"/>
+    </object>
+  
+    <widget name="view_help" type="HbView">
+        <widget name="content" role="HbView:widget" type="HbWidget">
+            <widget name="list_category_all" type="HbTreeView">
+                <widget name="treeItemPrototype" role="HbAbstractView:prototype" type="HbTreeViewItem"/>
+                <sizehint height="47.7612un" type="PREFERRED" width="35.8209un"/>
+            </widget>
+            <real name="z" value="0"/>
+            <layout orientation="Vertical" type="linear">
+                <contentsmargins bottom="0px" left="0px" right="0px" top="0px"/>
+                <linearitem itemname="list_category_all"/>
+            </layout>
+        </widget>
+        <widget name="menu" type="HbMenu" role="HbView:menu">
+            <ref object="action_expand_collapse_all" role="HbMenu:addAction" />
+        </widget>
+        <string locid="txt_user_guide_title_user_guide" name="title" value="View"/>
+    </widget>
+
+  <connect sender="action_expand_collapse_all" signal="triggered(bool)" receiver="view_help" slot="onExpandOrCollapseAll()" />
+  
+</hbdocument>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/userguide/resources/xml/contentsView.docml	Fri May 14 15:42:52 2010 +0300
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<hbdocument version="1.0">
+  
+    <widget name="view_help" type="HbView">
+        <widget name="content" role="HbView:widget" type="HbWidget">
+            <widget name="browser_contents" type="BrowserWrapper">      
+                <sizehint height="47.7612un" type="PREFERRED" width="35.8209un"/>
+                <sizepolicy horizontalPolicy="Preferred" horizontalStretch="0" verticalPolicy="Expanding" verticalStretch="0"/>
+            </widget>
+            <real name="z" value="0"/>
+            <layout orientation="Vertical" type="linear">
+                <contentsmargins bottom="0px" left="0px" right="0px" top="0px"/>
+                <linearitem itemname="browser_contents"/>
+            </layout>
+        </widget>
+        <string locid="txt_user_guide_title_user_guide" name="title" value="View"/>
+    </widget>
+  
+</hbdocument>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/userguide/resources/xml/keywordView.docml	Fri May 14 15:42:52 2010 +0300
@@ -0,0 +1,126 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<hbdocument version="1.0">
+  
+  <widget name="view_help" type="HbView">
+    <widget name="content" role="HbView:widget" type="HbWidget">
+      <widget name="no_match_label" type="HbLabel">
+        <rect height="83.33582un" name="geometry" width="51.04478un" x="1.34328un" y="1.34328un"/>
+        <string locid="txt_user_guide_list_no_match_found" name="plainText" value="Label"/>
+        <enums name="alignment" value="AlignVCenter|AlignHCenter"/>
+        <sizepolicy horizontalPolicy="Preferred" horizontalStretch="0" verticalPolicy="Expanding" verticalStretch="0"/>
+      </widget>
+      <widget name="groupBox" type="HbGroupBox">
+        <bool name="collapsable" value="FALSE"/>
+        <string locid="txt_user_guide_setlabel_search" name="heading" value="Group Box"/>
+      </widget>
+      <widget name="list_search" type="HbListView">
+        <widget name="listItemPrototype" role="HbAbstractView:prototype" type="HbListViewItem"/>
+      </widget>
+      <widget name="search_panel" type="HbSearchPanel"/>
+    </widget>
+    <string locid="txt_user_guide_title_user_guide" name="title" value="View"/>
+  </widget>
+  
+  <section name="layout_find">
+    <widget name="view_help" type="HbView">
+      <widget name="content" role="HbView:widget" type="HbWidget">
+        <widget name="groupBox" type="HbGroupBox">
+          <bool name="visible" value="TRUE"/>
+        </widget>
+        <widget name="no_match_label" type="HbLabel">
+          <bool name="visible" value="FALSE"/>
+        </widget>
+        <widget name="list_search" type="HbListView">
+          <bool name="visible" value="TRUE"/>
+        </widget>
+        <widget name="search_panel" type="HbSearchPanel">
+          <bool name="visible" value="TRUE"/>
+        </widget>
+        <real name="z" value="0"/>
+        <layout orientation="Vertical" type="linear">
+          <contentsmargins bottom="0px" left="0px" right="0px" top="0px"/>
+          <linearitem itemname="groupBox"/>
+          <linearitem itemname="list_search"/>
+          <linearitem itemname="search_panel"/>
+        </layout>
+      </widget>
+    </widget>
+  </section>
+
+  <section name="layout_find_no_searchpanel">
+    <widget name="view_help" type="HbView">
+      <widget name="content" role="HbView:widget" type="HbWidget">
+        <widget name="groupBox" type="HbGroupBox">
+          <bool name="visible" value="TRUE"/>
+        </widget>
+        <widget name="no_match_label" type="HbLabel">
+          <bool name="visible" value="FALSE"/>
+        </widget>
+        <widget name="list_search" type="HbListView">
+          <bool name="visible" value="TRUE"/>
+        </widget>
+        <widget name="search_panel" type="HbSearchPanel">
+          <bool name="visible" value="FALSE"/>
+        </widget>
+        <real name="z" value="0"/>
+        <layout orientation="Vertical" type="linear">
+          <contentsmargins bottom="0px" left="0px" right="0px" top="0px"/>
+          <linearitem itemname="groupBox"/>
+          <linearitem itemname="list_search"/>
+        </layout>
+      </widget>
+    </widget>
+  </section>
+
+  <section name="layout_find_no_match">
+    <widget name="view_help" type="HbView">
+      <widget name="content" role="HbView:widget" type="HbWidget">
+        <widget name="groupBox" type="HbGroupBox">
+          <bool name="visible" value="TRUE"/>
+        </widget>
+        <widget name="no_match_label" type="HbLabel">
+          <bool name="visible" value="TRUE"/>
+        </widget>
+        <widget name="list_search" type="HbListView">
+          <bool name="visible" value="FALSE"/>
+        </widget>
+        <widget name="search_panel" type="HbSearchPanel">
+          <bool name="visible" value="TRUE"/>
+        </widget>
+        <real name="z" value="0"/>
+        <layout orientation="Vertical" type="linear">
+          <contentsmargins bottom="0px" left="0px" right="0px" top="0px"/>
+          <linearitem itemname="groupBox"/>
+          <linearitem itemname="no_match_label"/>
+          <linearitem itemname="search_panel"/>
+        </layout>
+      </widget>
+    </widget>
+  </section>
+
+  <section name="layout_find_no_searchpanel_no_match">
+    <widget name="view_help" type="HbView">
+      <widget name="content" role="HbView:widget" type="HbWidget">
+        <widget name="groupBox" type="HbGroupBox">
+          <bool name="visible" value="TRUE"/>
+        </widget>
+        <widget name="no_match_label" type="HbLabel">
+          <bool name="visible" value="TRUE"/>
+        </widget>
+        <widget name="list_search" type="HbListView">
+          <bool name="visible" value="FALSE"/>
+        </widget>
+        <widget name="search_panel" type="HbSearchPanel">
+          <bool name="visible" value="FALSE"/>
+        </widget>
+        <real name="z" value="0"/>
+        <layout orientation="Vertical" type="linear">
+          <contentsmargins bottom="0px" left="0px" right="0px" top="0px"/>
+          <linearitem itemname="groupBox"/>
+          <linearitem itemname="no_match_label"/>
+         </layout>
+      </widget>
+    </widget>
+  </section>
+  
+</hbdocument>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/userguide/resources/xml/toolbar.docml	Fri May 14 15:42:52 2010 +0300
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<hbdocument version="0.9">
+  <object name="help_config" type="QObject">
+	<object name="action_all" type="HbAction">
+		<icon name="icon" iconName=":/images/show_all.svg" />
+	</object>
+	<object name="action_find" type="HbAction">
+		<icon name="icon" iconName="qtg_mono_search" />
+	</object>
+    <object name="action_online_support" type="HbAction">
+      <icon name="icon" iconName=":/images/link_nokia.svg" />
+    </object>
+  </object>
+
+  <widget name="toolbar" type="HbToolBar">
+    <ref object="action_all" role="HbToolBar:addAction" />
+    <ref object="action_find" role="HbToolBar:addAction" />
+    <ref object="action_online_support" role="HbToolBar:addAction" />
+  </widget>
+
+</hbdocument>
\ No newline at end of file
--- a/userguide/src/BrowserWrapper.cpp	Mon May 03 12:24:47 2010 +0300
+++ b/userguide/src/BrowserWrapper.cpp	Fri May 14 15:42:52 2010 +0300
@@ -36,6 +36,10 @@
 	mWebView = new QGraphicsWebView();
     mWebView->setZoomFactor(1.5);
     mWebView->page()->setLinkDelegationPolicy(QWebPage::DelegateAllLinks);
+	mWebView->settings()->setAttribute(QWebSettings::PluginsEnabled, true);
+	mWebView->settings()->setAttribute(QWebSettings::JavascriptEnabled, true);
+    mWebView->settings()->setAttribute(QWebSettings::DeveloperExtrasEnabled, true);
+    mWebView->settings()->setAttribute(QWebSettings::JavascriptCanOpenWindows, true);
     connect(mWebView, SIGNAL(linkClicked(const QUrl&)), this, SIGNAL(linkClicked(const QUrl&)));
     
     QGraphicsLinearLayout* vLayout = new QGraphicsLinearLayout(this);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/userguide/src/HelpBaseView.cpp	Fri May 14 15:42:52 2010 +0300
@@ -0,0 +1,78 @@
+/*
+* 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: 
+*
+*/
+
+#include <hbtoolbar.h>
+#include <hbnotificationdialog.h>
+#include <hbaction.h>
+
+#include "HelpBaseView.h"
+
+//////////////////////////////////////////////////////////////////////////////////////////////
+
+HelpBaseView::HelpBaseView()
+{
+}
+
+HelpBaseView::~HelpBaseView()
+{
+}
+
+
+////////////////////////////////////////////////////////////////////////////////////////////
+
+void HelpBaseView::initBaseDocMl()
+{
+ // Create widget hierarchy
+    setObjectName( DOCML_VIEW_NAME );
+
+    // List existing root elements - this allows us to refer to objects in the XML 
+    // which are created outside the document.
+    QObjectList roots;
+    roots.append( this );
+
+	mBuilder.setObjectTree(roots);
+
+	mBuilder.load(QRC_DOCML_BASE);
+}
+
+void HelpBaseView::onToolbarOnlineSupport()
+{
+    HbNotificationDialog *notificationDialog = new HbNotificationDialog();
+    notificationDialog->setParent(this);
+    notificationDialog->setTitle(URL_LINK_SUPPORT);
+    notificationDialog->show();
+}
+
+void HelpBaseView::onOrientationChanged(Qt::Orientation orientation)
+{
+    RefreshToolbarText(orientation);
+}
+
+void HelpBaseView::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());
+
+    tollbarAction = mBuilder.findObject<HbAction*>(DOCML_ACTION_SEARCH);
+    tollbarAction->setText(isLandscape ? qtTrId(TXT_BUTTON_FIND) : QString());
+
+    tollbarAction = mBuilder.findObject<HbAction*>(DOCML_ACTION_LINK_NOKIA);
+    tollbarAction->setText(isLandscape ? qtTrId(TXT_BUTTON_LINK_SUPPORT) : QString());
+}
+
+// end of file
--- a/userguide/src/HelpCategoryView.cpp	Mon May 03 12:24:47 2010 +0300
+++ b/userguide/src/HelpCategoryView.cpp	Fri May 14 15:42:52 2010 +0300
@@ -21,20 +21,12 @@
 #include <hbmainwindow.h>
 #include <hbapplication.h>
 #include <hbaction.h>
-#include <hbtoolbar.h>
-#include <hblabel.h>
 
 #include <hbtreeview.h>
-#include <hblistview.h>
-#include <hbsearchpanel.h>
 #include <hbscrollbar.h>
-#include <hblineedit.h>
 #include <hbmenu.h>
-#include <hbstaticvkbhost.h>
-#include <hbgroupbox.h>
 
 #include "HelpDataProvider.h"
-#include "HelpProxyModel.h"
 
 #include "HelpCategoryView.h"
 
@@ -42,10 +34,8 @@
 //////////////////////////////////////////////////////////////////////////////////////////////
 
 HelpCategoryView::HelpCategoryView() : 
-mViewMode(ViewModeNull), 
-mListAll(NULL), 
-mListSearch(NULL), 
-mSearchPanel(NULL)
+mListAll(NULL),
+mExpandCount(0)
 {
 }
 
@@ -59,39 +49,15 @@
 void HelpCategoryView::init()
 {
 	initDocMl();
-    initBackAction();
     initAllList();
-    initSearchList();
-    initSearchPanel();
-	initVirtualKeyboard();
-	initEmptyLabel();
-
-    switchViewMode(ViewModeAll);
-    
-    connect(mainWindow(), SIGNAL(currentViewChanged(HbView*)), this, SLOT(onCurrentViewChanged(HbView*)));
 }
 
 void HelpCategoryView::initDocMl()
 {
- // Create widget hierarchy
-    setObjectName( DOCML_VIEW_CATEGORY );
-
-    // List existing root elements - this allows us to refer to objects in the XML 
-    // which are created outside the document.
-    QObjectList roots;
-    roots.append( this );
-
-	mBuilder.setObjectTree(roots);
-
+	initBaseDocMl();
     mBuilder.load(QRC_DOCML_CATEGORY);
 }
 
-void HelpCategoryView::initBackAction()
-{
-    mSoftKeyAction = new HbAction(Hb::BackAction);
-    connect(mSoftKeyAction, SIGNAL(triggered()), this, SLOT(onBackAction()));
-}
-
 void HelpCategoryView::initAllList()
 {
     mListAll = mBuilder.findWidget<HbTreeView*>(DOCML_LIST_CATEGORY_ALL);
@@ -100,57 +66,6 @@
     connect(mListAll, SIGNAL(activated(const QModelIndex&)), this, SLOT(onAllListActivated(const QModelIndex&)));
 }
 
-void HelpCategoryView::initSearchList()
-{
-    mListSearch = mBuilder.findWidget<HbListView*>(DOCML_LIST_CATEGORY_SEARCH);
-    mListSearch->setHorizontalScrollBarPolicy(HbScrollArea::ScrollBarAlwaysOff);
-    mListSearch->setModel(HelpDataProvider::instance()->getSearchData());
-    connect(mListSearch, SIGNAL(activated(const QModelIndex&)), this, SLOT(onSearchListActivated(const QModelIndex&)));
-}
-void HelpCategoryView::initSearchPanel()
-{
-    mSearchPanel = mBuilder.findWidget<HbSearchPanel*>(DOCML_SEARCH_PANEL_CATEGORY);
-    connect(mSearchPanel, SIGNAL(exitClicked()), this, SLOT(onSearchPanelExitClicked()));
-    connect(mSearchPanel, SIGNAL(criteriaChanged(const QString&)), this, SLOT(onSearchPanelCriteriaChanged(const QString&)));
-}
-
-void HelpCategoryView::initVirtualKeyboard()
-{
-	mVirtualKeyboard = new HbStaticVkbHost(this);
-    connect(mVirtualKeyboard, SIGNAL(keypadOpened()), this, SLOT(onHandleKeypadOpen()));
-    connect(mVirtualKeyboard, SIGNAL(keypadClosed()), this, SLOT(onHandleKeypadClose()));
-}
-
-void HelpCategoryView::initEmptyLabel()
-{
-	HbLabel* label = mBuilder.findWidget<HbLabel*>(DOCML_NO_MATCH_LABEL);
-	label->setFontSpec(HbFontSpec(HbFontSpec::Primary));
-}
-
-HbGroupBox* HelpCategoryView::groupBox()
-{
-	return mBuilder.findWidget<HbGroupBox*>(DOCML_GROUPBOX);
-}
-
-////////////////////////////////////////////////////////////////////////////////////////////
-
-void HelpCategoryView::switchViewMode(ViewMode viewMode)
-{
-    if(ViewModeNull == viewMode) return;
-    
-    mViewMode = viewMode;
-    if(ViewModeAll == viewMode)
-    {
-        mBuilder.load(QRC_DOCML_CATEGORY, DOCML_LAYOUT_CATEGORY_ALL);
-		toolBar()->show();
-    }
-    else if(ViewModeSearch == viewMode)
-    {
-//        mBuilder.load(QRC_DOCML_CATEGORY, DOCML_LAYOUT_CATEGORY_SEARCH);
-		ResetSearchPanel();
-    }
-}
-
 ////////////////////////////////////////////////////////////////////////////////////////////
 
 void HelpCategoryView::expandCollapseAllList(QStandardItem* item, bool expand)
@@ -166,66 +81,13 @@
 	}
 }
 
-////////////////////////////////////////////////////////////////////////////////////////////
-
-void HelpCategoryView::updateVisibleItems(bool visible)
-{
-	static Hb::SceneItems items = Hb::TitleBarItem | Hb::StatusBarItem;
-	if(visible)
-	{
-		showItems(items);
-	}
-	else
-	{
-		hideItems(items);
-	}
-}
-
-void HelpCategoryView::ResetSearchPanel()
+void HelpCategoryView::updateExpandCollapseAction(bool expand)
 {
-    foreach(QGraphicsItem *obj, mSearchPanel->childItems())
-    {
-        QGraphicsWidget *const widget = static_cast<QGraphicsWidget*>(obj);
-        if(widget != NULL)
-        {
-            HbLineEdit *const lineEdit = qobject_cast<HbLineEdit*>(widget);
-            if(lineEdit != NULL)
-            {
-                lineEdit->setText("");
-                break;
-            }
-        }
-    }
+	HbAction* allAction = mBuilder.findObject<HbAction*>(DOCML_ACTION_EXPAND_COLLAPSE_ALL);
+	allAction->setText(expand ? hbTrId(TXT_EXPAND_ALL) : hbTrId(TXT_COLLAPSE_ALL));
 }
 
 ////////////////////////////////////////////////////////////////////////////////////////////
-// handle system event
-
-void HelpCategoryView::onCurrentViewChanged(HbView *view)
-{
-    if(this == view)
-    {
-        setNavigationAction(mSoftKeyAction);        
-    }
-}
-
-///////////////////////////////////////////////////////////////////////////////////////
-// handle button back action
-
-void HelpCategoryView::onBackAction()
-{
-	if(ViewModeSearch == mViewMode)
-	{
-		switchViewMode(ViewModeAll);
-	}
-	else
-	{
-		HbApplication::exit();
-	}
-}
-
-
-////////////////////////////////////////////////////////////////////////////////////////////
 // handle list event
 
 void HelpCategoryView::onAllListActivated(const QModelIndex& index)
@@ -233,6 +95,20 @@
     if(!index.isValid() ||          // invalid
        index.child(0,0).isValid())  // this is a node
     {
+		if(index.parent().isValid())
+		{
+			return;
+		}
+		
+		if(mListAll->isExpanded(index))
+		{
+			mExpandCount++;
+		}
+		else
+		{
+			mExpandCount--;
+		}
+		updateExpandCollapseAction(mExpandCount == 0);
         return;
     }
 
@@ -242,96 +118,15 @@
     emit activateView(HelpViewContents);
 }
 
-void HelpCategoryView::onSearchListActivated(const QModelIndex& index)
+////////////////////////////////////////////////////////////////////////////////////////////
+// handle menu event
+void HelpCategoryView::onExpandOrCollapseAll()
 {
-    if(!index.isValid() ||          // invalid
-       index.child(0,0).isValid())  // this is a node
-    {
-        return;
-    }
-    
-    QString uid = mListSearch->model()->data(index, UidRole).toString();
-    QString href = mListSearch->model()->data(index, HrefRole).toString();
-    HelpDataProvider::instance()->setHelpContentUrl(uid, href);
-    emit activateView(HelpViewContents);
-}
-
-
-////////////////////////////////////////////////////////////////////////////////////////////
-// handle search panel event
-
-void HelpCategoryView::onSearchPanelExitClicked()
-{
-	if(mListSearch->model()->rowCount() == 0)
-	{
-		mBuilder.load(QRC_DOCML_CATEGORY, DOCML_LAYOUT_CATEGORY_SEARCH_NO_SRHPAL_NO_MATCH);
-	}
-	else
-	{
-		mBuilder.load(QRC_DOCML_CATEGORY, DOCML_LAYOUT_CATEGORY_SEARCH_NO_SRHPAL);
-	}
-	toolBar()->show();
+	bool needExpand = (mExpandCount == 0);
+	QStandardItemModel* model = (QStandardItemModel*)(mListAll->model());
+	expandCollapseAllList(model->invisibleRootItem(),needExpand);
+	mExpandCount = needExpand ?  model->invisibleRootItem()->rowCount() : 0;
+	updateExpandCollapseAction(mExpandCount == 0);
 }
 
-void HelpCategoryView::onSearchPanelCriteriaChanged(const QString &criteria)
-{
-    HelpDataProvider::instance()->getSearchData(criteria);
-	if(mListSearch->model()->rowCount() == 0)
-	{
-		mBuilder.load(QRC_DOCML_CATEGORY, DOCML_LAYOUT_CATEGORY_SEARCH_NO_MATCH);
-	}
-	else
-	{
-		mBuilder.load(QRC_DOCML_CATEGORY, DOCML_LAYOUT_CATEGORY_SEARCH);
-	}
-
-	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);
-	}
-}
-
-////////////////////////////////////////////////////////////////////////////////////////////
-// handle virtual keyboard event
-
-void HelpCategoryView::onHandleKeypadOpen()
-{
-	updateVisibleItems(false);
-    qreal heightToSet = mainWindow()->layoutRect().height() - mVirtualKeyboard->keyboardArea().height();
-    this->setMaximumHeight(heightToSet);
-}
-
-void HelpCategoryView::onHandleKeypadClose()
-{	
-	updateVisibleItems(true);
-	qreal mainHeight  = mainWindow()->layoutRect().height();
-	qreal toolbarHeight = toolBar()->size().height();
-	qreal height = mainHeight - (toolBar()->isVisible() ? toolbarHeight : 0);
-	this->setMaximumHeight(height);
-}
-
-////////////////////////////////////////////////////////////////////////////////////////////
-// handle menu event
-void HelpCategoryView::onExpandAll()
-{
-	QStandardItemModel* model = (QStandardItemModel*)(mListAll->model());
-	expandCollapseAllList(model->invisibleRootItem(),true);
-}
-
-void HelpCategoryView::onCollapseAll()
-{
-	QStandardItemModel* model = (QStandardItemModel*)(mListAll->model());
-	expandCollapseAllList(model->invisibleRootItem(),false);
-}
-
-
 // end of file
--- a/userguide/src/HelpContentsView.cpp	Mon May 03 12:24:47 2010 +0300
+++ b/userguide/src/HelpContentsView.cpp	Fri May 14 15:42:52 2010 +0300
@@ -51,22 +51,13 @@
 
 void HelpContentsView::initDocMl()
 {
- // Create widget hierarchy
-    setObjectName( DOCML_VIEW_CONTENTS );
-
-    // List existing root elements - this allows us to refer to objects in the XML 
-    // which are created outside the document.
-    QObjectList roots;
-    roots.append( this );
-
-	mBuilder.setObjectTree(roots);
-
+	initBaseDocMl();
     mBuilder.load(QRC_DOCML_CONTENTS);
 }
 
 void HelpContentsView::initBackAction()
 {
-    mSoftKeyAction = new HbAction(Hb::BackAction);
+    mSoftKeyAction = new HbAction(Hb::BackNaviAction  );
     connect(mSoftKeyAction, SIGNAL(triggered()), this, SLOT(onBackAction()));
 }
 
@@ -112,7 +103,7 @@
     QString html;
     QString baseUrl = url.toString();
     HelpDataProvider::instance()->getHelpContentData(html, baseUrl);
-    mBrowser->setHtml(html, baseUrl);
+	mBrowser->setHtml(html, baseUrl);
 }
 
 ////////////////////////////////////////////////////////////////////////////////////////////
@@ -121,6 +112,7 @@
 {
     if(this == view)
     {
+		setVisible(true);
         setNavigationAction(mSoftKeyAction);
         openHelpContent();
     }
@@ -140,7 +132,7 @@
 	}
 	else
 	{
-		emit activateView(HelpViewCategory);
+		emit activateView(PreviousView);
 	}
 }
 
--- a/userguide/src/HelpDataProvider.cpp	Mon May 03 12:24:47 2010 +0300
+++ b/userguide/src/HelpDataProvider.cpp	Fri May 14 15:42:52 2010 +0300
@@ -217,7 +217,6 @@
 		if(item)
 		{
 			mHelpModel->appendRow(item);
-//			constructKeywordModel(uid);
 		}
 	}
 	file.close();
@@ -322,10 +321,9 @@
 		{
 			if(!itemApp)
 			{
-				itemApp = new HelpStandardItem("Applications");
+				itemApp = new HelpStandardItem(qtTrId(TXT_APPLICATIONS));
 			}
 			itemApp->appendRow(item);
-//			constructKeywordModel(pathTemp);
 		}
 		file.close();
 	}
--- a/userguide/src/HelpDocumentLoader.cpp	Mon May 03 12:24:47 2010 +0300
+++ b/userguide/src/HelpDocumentLoader.cpp	Fri May 14 15:42:52 2010 +0300
@@ -32,7 +32,7 @@
         object->setObjectName(name);
         return object;
     }
-        
+ 
     return HbDocumentLoader::createObject(type, name);
 }
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/userguide/src/HelpKeywordView.cpp	Fri May 14 15:42:52 2010 +0300
@@ -0,0 +1,253 @@
+/*
+* 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: 
+*
+*/
+
+#include <QStandardItemModel>
+#include <QDebug>
+
+#include <hbmainwindow.h>
+#include <hbapplication.h>
+#include <hbaction.h>
+#include <hbtoolbar.h>
+#include <hblabel.h>
+
+#include <hbtreeview.h>
+#include <hblistview.h>
+#include <hbsearchpanel.h>
+#include <hbscrollbar.h>
+#include <hblineedit.h>
+#include <hbmenu.h>
+#include <hbstaticvkbhost.h>
+#include <hbgroupbox.h>
+
+#include "HelpDataProvider.h"
+#include "HelpProxyModel.h"
+
+#include "HelpKeywordView.h"
+
+
+//////////////////////////////////////////////////////////////////////////////////////////////
+
+HelpKeywordView::HelpKeywordView() : 
+mListSearch(NULL), 
+mSearchPanel(NULL)
+{
+}
+
+HelpKeywordView::~HelpKeywordView()
+{
+}
+
+
+////////////////////////////////////////////////////////////////////////////////////////////
+
+void HelpKeywordView::init()
+{
+	initDocMl();
+    initBackAction();
+    initSearchList();
+    initSearchPanel();
+	initVirtualKeyboard();
+	initEmptyLabel();
+    
+    connect(mainWindow(), SIGNAL(currentViewChanged(HbView*)), this, SLOT(onCurrentViewChanged(HbView*)));
+}
+
+void HelpKeywordView::initDocMl()
+{
+	initBaseDocMl(); 
+	mBuilder.load(QRC_DOCML_KEYWORD);
+}
+
+void HelpKeywordView::initBackAction()
+{
+    mSoftKeyAction = new HbAction(Hb::BackNaviAction);
+    connect(mSoftKeyAction, SIGNAL(triggered()), this, SLOT(onBackAction()));
+}
+
+void HelpKeywordView::initSearchList()
+{
+    mListSearch = mBuilder.findWidget<HbListView*>(DOCML_LIST_SEARCH);
+    mListSearch->setHorizontalScrollBarPolicy(HbScrollArea::ScrollBarAlwaysOff);
+    mListSearch->setModel(HelpDataProvider::instance()->getSearchData());
+    connect(mListSearch, SIGNAL(activated(const QModelIndex&)), this, SLOT(onSearchListActivated(const QModelIndex&)));
+}
+void HelpKeywordView::initSearchPanel()
+{
+    mSearchPanel = mBuilder.findWidget<HbSearchPanel*>(DOCML_SEARCH_PANEL);
+    connect(mSearchPanel, SIGNAL(exitClicked()), this, SLOT(onSearchPanelExitClicked()));
+    connect(mSearchPanel, SIGNAL(criteriaChanged(const QString&)), this, SLOT(onSearchPanelCriteriaChanged(const QString&)));
+}
+
+void HelpKeywordView::initVirtualKeyboard()
+{
+	mVirtualKeyboard = new HbStaticVkbHost(this);
+    connect(mVirtualKeyboard, SIGNAL(keypadOpened()), this, SLOT(onHandleKeypadOpen()));
+    connect(mVirtualKeyboard, SIGNAL(keypadClosed()), this, SLOT(onHandleKeypadClose()));
+}
+
+void HelpKeywordView::initEmptyLabel()
+{
+	HbLabel* label = mBuilder.findWidget<HbLabel*>(DOCML_NO_MATCH_LABEL);
+	label->setFontSpec(HbFontSpec(HbFontSpec::Primary));
+}
+
+void HelpKeywordView::loadAllContent()
+{
+	mBuilder.load(QRC_DOCML_KEYWORD, DOCML_LAYOUT_SEARCH);
+	ResetSearchPanel();
+	toolBar()->hide();
+}
+
+HbGroupBox* HelpKeywordView::groupBox()
+{
+	return mBuilder.findWidget<HbGroupBox*>(DOCML_GROUPBOX);
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////
+
+void HelpKeywordView::updateVisibleItems(bool visible)
+{
+	static Hb::SceneItems items = Hb::TitleBarItem | Hb::StatusBarItem;
+	if(visible)
+	{
+		showItems(items);
+	}
+	else
+	{
+		hideItems(items);
+	}
+}
+
+void HelpKeywordView::ResetSearchPanel()
+{
+    foreach(QGraphicsItem *obj, mSearchPanel->childItems())
+    {
+        QGraphicsWidget *const widget = static_cast<QGraphicsWidget*>(obj);
+        if(widget != NULL)
+        {
+            HbLineEdit *const lineEdit = qobject_cast<HbLineEdit*>(widget);
+            if(lineEdit != NULL)
+            {
+                lineEdit->setText("");
+                break;
+            }
+        }
+    }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////
+// handle system event
+
+void HelpKeywordView::onCurrentViewChanged(HbView *view)
+{
+	 if(this == view)
+    {
+		setVisible(true);
+		setNavigationAction(mSoftKeyAction);  
+	}
+}
+
+///////////////////////////////////////////////////////////////////////////////////////
+// handle button back action
+
+void HelpKeywordView::onBackAction()
+{
+	emit activateView(HelpViewCategory);
+}
+
+
+////////////////////////////////////////////////////////////////////////////////////////////
+// handle list event
+
+void HelpKeywordView::onSearchListActivated(const QModelIndex& index)
+{
+    if(!index.isValid() ||          // invalid
+       index.child(0,0).isValid())  // this is a node
+    {
+        return;
+    }
+    
+    QString uid = mListSearch->model()->data(index, UidRole).toString();
+    QString href = mListSearch->model()->data(index, HrefRole).toString();
+    HelpDataProvider::instance()->setHelpContentUrl(uid, href);
+    emit activateView(HelpViewContents);
+}
+
+
+////////////////////////////////////////////////////////////////////////////////////////////
+// handle search panel event
+
+void HelpKeywordView::onSearchPanelExitClicked()
+{
+	if(mListSearch->model()->rowCount() == 0)
+	{
+		mBuilder.load(QRC_DOCML_KEYWORD, DOCML_LAYOUT_SEARCH_NO_SRHPAL_NO_MATCH);
+	}
+	else
+	{
+		mBuilder.load(QRC_DOCML_KEYWORD, DOCML_LAYOUT_SEARCH_NO_SRHPAL);
+	}	
+	toolBar()->show();
+}
+
+void HelpKeywordView::onSearchPanelCriteriaChanged(const QString &criteria)
+{
+    HelpDataProvider::instance()->getSearchData(criteria);
+	if(mListSearch->model()->rowCount() == 0)
+	{
+		mBuilder.load(QRC_DOCML_KEYWORD, DOCML_LAYOUT_SEARCH_NO_MATCH);
+	}
+	else
+	{
+		mBuilder.load(QRC_DOCML_KEYWORD, DOCML_LAYOUT_SEARCH);
+	}
+
+	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);
+	}
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////
+// handle virtual keyboard event
+
+void HelpKeywordView::onHandleKeypadOpen()
+{
+	updateVisibleItems(false);
+    qreal heightToSet = mainWindow()->layoutRect().height() - mVirtualKeyboard->keyboardArea().height();
+    this->setMaximumHeight(heightToSet);
+}
+
+void HelpKeywordView::onHandleKeypadClose()
+{	
+	updateVisibleItems(true);
+	qreal mainHeight  = mainWindow()->layoutRect().height();
+	qreal toolbarHeight = toolBar()->size().height();
+	qreal height = mainHeight - (toolBar()->isVisible() ? toolbarHeight : 0);
+	this->setMaximumHeight(height);
+}
+
+// end of file
--- a/userguide/src/HelpMainWindow.cpp	Mon May 03 12:24:47 2010 +0300
+++ b/userguide/src/HelpMainWindow.cpp	Fri May 14 15:42:52 2010 +0300
@@ -19,7 +19,9 @@
 #include <hbnotificationdialog.h>
 #include <hbaction.h>
 
+#include "HelpBaseView.h"
 #include "HelpCategoryView.h"
+#include "HelpKeywordView.h"
 #include "HelpContentsView.h"
 
 #include "HelpMainWindow.h"
@@ -27,10 +29,9 @@
 
 HelpMainWindow::HelpMainWindow() : 
 mCategoryView(NULL),
+mKeywordView(NULL),
 mContentsView(NULL)
 {
-	connect(this, SIGNAL(orientationChanged(Qt::Orientation)), this, SLOT(onOrientationChanged(Qt::Orientation)));
-	initToolbar();
     activateCategoryView();
 }
 
@@ -39,20 +40,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 +47,17 @@
 	    case HelpViewCategory:
             activateCategoryView();
 			break;
-
+	    case HelpViewKeyword:
+            activateKeywordView();
+			break;
 	    case HelpViewContents:
             activateContentsView();
 			break;
-
+		case PreviousView:
+			{
+				onActivateView(mPreviousViewName);
+			}
+			break;
 	    default:
 	        break;
 	}
@@ -77,74 +70,63 @@
         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::onToolbarOnlineSupport()
-{
-    HbNotificationDialog *notificationDialog = new HbNotificationDialog();
-    notificationDialog->setParent(this);
-    notificationDialog->setTitle(URL_LINK_SUPPORT);
-    notificationDialog->show();
-}
-
-void HelpMainWindow::onOrientationChanged(Qt::Orientation orientation)
-{
-    RefreshToolbarText(orientation);
-}
-
-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());
-
-    tollbarAction = mBuilder.findObject<HbAction*>(DOCML_ACTION_SEARCH);
-    tollbarAction->setText(isLandscape ? qtTrId(TXT_BUTTON_FIND) : QString());
-
-    tollbarAction = mBuilder.findObject<HbAction*>(DOCML_ACTION_LINK_NOKIA);
-    tollbarAction->setText(isLandscape ? qtTrId(TXT_BUTTON_LINK_SUPPORT) : QString());
+void HelpMainWindow::onShowFindList()
+{	
+    activateKeywordView();
+	mKeywordView->loadAllContent();
 }
 
 // end of file