# HG changeset patch # User Dremov Kirill (Nokia-D-MSW/Tampere) # Date 1278414397 -10800 # Node ID 4533d75b8d4e5b3e8ed45d48cd7d486012ba74f1 # Parent 1038206aa0cb0f59746d75549bfe567ba00db9de Revision: 201025 Kit: 2010127 diff -r 1038206aa0cb -r 4533d75b8d4e userguide/Userguide.pro --- a/userguide/Userguide.pro Wed Jun 23 18:03:20 2010 +0300 +++ b/userguide/Userguide.pro Tue Jul 06 14:06:37 2010 +0300 @@ -60,11 +60,11 @@ CONFIG += mobility MOBILITY = systeminfo - LIBS += -lezip -lxqservice -lxqserviceutil + LIBS += -lezip -lxqservice -lxqserviceutil -lcone -leikcore -lmediaclientaudio -leikcoctl -leiksrv -lapparc -lavkon -lefsrv -lcharconv -lws32 -lhal -lgdi -lapgrfx include(rom/userguide.pri) + SKINICON = qtg_large_help } - -ICON = resources/qtg_large_help.svg + RESOURCES += resources/Userguide.qrc debug: DESTDIR = ./debug diff -r 1038206aa0cb -r 4533d75b8d4e userguide/inc/HelpBaseView.h --- a/userguide/inc/HelpBaseView.h Wed Jun 23 18:03:20 2010 +0300 +++ b/userguide/inc/HelpBaseView.h Tue Jul 06 14:06:37 2010 +0300 @@ -45,18 +45,12 @@ 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 diff -r 1038206aa0cb -r 4533d75b8d4e userguide/inc/HelpDataProvider.h --- a/userguide/inc/HelpDataProvider.h Wed Jun 23 18:03:20 2010 +0300 +++ b/userguide/inc/HelpDataProvider.h Tue Jul 06 14:06:37 2010 +0300 @@ -35,14 +35,13 @@ static void destroyInstance(); public: + void createHelpCategory(); QAbstractItemModel* getCategoryData(); QAbstractItemModel* getSearchData(const QString& key=QString()); void setHelpContentUrl(const QString& uid, const QString& href); void getHelpContentData(QString& content, QString& url); private: - void createHelpCategory(); - //construct 1st category void constructCategory(); //construct help category in rom diff -r 1038206aa0cb -r 4533d75b8d4e userguide/inc/HelpKeywordView.h --- a/userguide/inc/HelpKeywordView.h Wed Jun 23 18:03:20 2010 +0300 +++ b/userguide/inc/HelpKeywordView.h Tue Jul 06 14:06:37 2010 +0300 @@ -45,15 +45,16 @@ void initVirtualKeyboard(); private: - void onOrientationChanged(Qt::Orientation orientation); - -private: HbLabel* label(); private: void updateVisibleItems(bool visible); void ResetSearchPanel(); void updateLabelPos(); + void showToolBar(bool visible); + +private slots: + void onOrientationChanged(Qt::Orientation orientation); private slots: // handle system event void onViewReady(); diff -r 1038206aa0cb -r 4533d75b8d4e userguide/resources/Userguide.qrc --- a/userguide/resources/Userguide.qrc Wed Jun 23 18:03:20 2010 +0300 +++ b/userguide/resources/Userguide.qrc Tue Jul 06 14:06:37 2010 +0300 @@ -6,10 +6,4 @@ xml/contentsView.docml xml/baseView.docml - - - images/qtg_mono_show_all.svg - images/qtg_mono_link_nokia.svg - - \ No newline at end of file diff -r 1038206aa0cb -r 4533d75b8d4e userguide/resources/qtg_large_help.svg --- a/userguide/resources/qtg_large_help.svg Wed Jun 23 18:03:20 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r 1038206aa0cb -r 4533d75b8d4e userguide/src/HelpBaseView.cpp --- a/userguide/src/HelpBaseView.cpp Wed Jun 23 18:03:20 2010 +0300 +++ b/userguide/src/HelpBaseView.cpp Tue Jul 06 14:06:37 2010 +0300 @@ -57,22 +57,5 @@ 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(DOCML_ACTION_ALL); - tollbarAction->setText(isLandscape ? qtTrId(TXT_BUTTON_ALL) : QString()); - - tollbarAction = mBuilder.findObject(DOCML_ACTION_SEARCH); - tollbarAction->setText(isLandscape ? qtTrId(TXT_BUTTON_FIND) : QString()); - - tollbarAction = mBuilder.findObject(DOCML_ACTION_LINK_NOKIA); - tollbarAction->setText(isLandscape ? qtTrId(TXT_BUTTON_LINK_SUPPORT) : QString()); -} // end of file diff -r 1038206aa0cb -r 4533d75b8d4e userguide/src/HelpCategoryView.cpp --- a/userguide/src/HelpCategoryView.cpp Wed Jun 23 18:03:20 2010 +0300 +++ b/userguide/src/HelpCategoryView.cpp Tue Jul 06 14:06:37 2010 +0300 @@ -25,6 +25,7 @@ #include #include #include +#include #include "HelpDataProvider.h" diff -r 1038206aa0cb -r 4533d75b8d4e userguide/src/HelpDataProvider.cpp --- a/userguide/src/HelpDataProvider.cpp Wed Jun 23 18:03:20 2010 +0300 +++ b/userguide/src/HelpDataProvider.cpp Tue Jul 06 14:06:37 2010 +0300 @@ -72,11 +72,6 @@ QAbstractItemModel* HelpDataProvider::getCategoryData() { - if(!mHelpModel->rowCount()) - { - createHelpCategory(); - } - return mHelpModel; } @@ -89,6 +84,7 @@ mLastSrhKey = key; mSearhResultModel->setFilterRegExp(key); + return mSearhResultModel; } @@ -187,7 +183,6 @@ void HelpDataProvider::constructBuiltInCategory(const QString& path, const QStringList& uidList, const QStringList& titleList) { -// constructCategory2(title, uid); if(uidList.count() != titleList.count()) { //ToDo @@ -363,7 +358,7 @@ return; } - for(int i = featureIdLst.count() - 1; i <= 0; i--) + for(int i = featureIdLst.count() - 1; i >= 0; i--) { int featureID = featureIdLst.at(i).toInt(); if(!HelpUtils::suppportFeatureID(featureID)) @@ -426,7 +421,7 @@ return; } - for(int i = featureIdLst.count() - 1; i <= 0; i--) + for(int i = featureIdLst.count() - 1; i >= 0; i--) { int featureID = featureIdLst.at(i).toInt(); if(!HelpUtils::suppportFeatureID(featureID)) diff -r 1038206aa0cb -r 4533d75b8d4e userguide/src/HelpKeywordView.cpp --- a/userguide/src/HelpKeywordView.cpp Wed Jun 23 18:03:20 2010 +0300 +++ b/userguide/src/HelpKeywordView.cpp Tue Jul 06 14:06:37 2010 +0300 @@ -104,7 +104,7 @@ void HelpKeywordView::loadAllContent() { - toolBar()->hide(); + showToolBar(false); mBuilder.load(QRC_DOCML_KEYWORD, DOCML_LAYOUT_SEARCH); ResetSearchPanel(); @@ -172,6 +172,19 @@ } } +void HelpKeywordView::showToolBar(bool visible) +{ + Hb::SceneItems items = Hb::ToolBarItem; + if(visible) + { + showItems(items); + } + else + { + hideItems(items); + } +} + //////////////////////////////////////////////////////////////////////////////////////////// // handle system event @@ -223,7 +236,7 @@ { mBuilder.load(QRC_DOCML_KEYWORD, DOCML_LAYOUT_SEARCH_NO_SRHPAL); } - toolBar()->show(); + showToolBar(true); } void HelpKeywordView::onSearchPanelCriteriaChanged(const QString &criteria) @@ -237,8 +250,7 @@ { mBuilder.load(QRC_DOCML_KEYWORD, DOCML_LAYOUT_SEARCH); } - - toolBar()->hide(); + showToolBar(false); } //////////////////////////////////////////////////////////////////////////////////////////// @@ -257,14 +269,14 @@ updateVisibleItems(true); qreal mainHeight = mainWindow()->layoutRect().height(); qreal toolbarHeight = toolBar()->size().height(); - qreal height = mainHeight - (toolBar()->isVisible() ? toolbarHeight : 0); + qreal height = mainHeight - ( toolBar()->isVisible() ? toolbarHeight : 0); this->setMaximumHeight(height); updateLabelPos(); } void HelpKeywordView::onOrientationChanged(Qt::Orientation orientation) { - HelpBaseView::onOrientationChanged(orientation); + Q_UNUSED(orientation); updateLabelPos(); } diff -r 1038206aa0cb -r 4533d75b8d4e userguide/src/HelpMainWindow.cpp --- a/userguide/src/HelpMainWindow.cpp Wed Jun 23 18:03:20 2010 +0300 +++ b/userguide/src/HelpMainWindow.cpp Tue Jul 06 14:06:37 2010 +0300 @@ -35,6 +35,7 @@ mContentsView(NULL) { QObject::connect(qApp, SIGNAL(aboutToQuit()), this, SLOT(saveActivity())); + HelpDataProvider::instance()->createHelpCategory(); activateCategoryView(); } @@ -62,6 +63,7 @@ } break; default: + HbApplication::exit(); break; } } @@ -134,30 +136,29 @@ void HelpMainWindow::saveActivity() { - HbActivityManager* activityManager = qobject_cast(qApp)->activityManager(); + HbActivityManager* activityManager = qobject_cast(qApp)->activityManager(); - // clean up any previous versions of this activity from the activity manager. - bool ok = activityManager->removeActivity("UserGuideMainView"); - if ( !ok ) - { - //qFatal("Remove failed" ); - } + // clean up any previous versions of this activity from the activity manager. + bool ok = activityManager->removeActivity("UserGuideMainView"); + if ( !ok ) + { + //qFatal("Remove failed" ); + } - // get a screenshot for saving to the activity manager - QVariantHash metadata; - metadata.insert("screenshot", QPixmap::grabWidget(this, rect())); + // get a screenshot for saving to the activity manager + QVariantHash metadata; + metadata.insert("screenshot", QPixmap::grabWidget(this, rect())); - // 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"; + // save any data necessary to save the state + QByteArray serializedActivity; + QDataStream stream(&serializedActivity, QIODevice::WriteOnly | QIODevice::Append); - // add the activity to the activity manager - ok = activityManager->addActivity("UserGuideMainView", serializedActivity, metadata); - if ( !ok ) - { - qFatal("Add failed" ); - } + // add the activity to the activity manager + ok = activityManager->addActivity("UserGuideMainView", serializedActivity, metadata); + if ( !ok ) + { + qFatal("Add failed" ); + } } // end of file diff -r 1038206aa0cb -r 4533d75b8d4e userguide/src/HelpUtils.cpp --- a/userguide/src/HelpUtils.cpp Wed Jun 23 18:03:20 2010 +0300 +++ b/userguide/src/HelpUtils.cpp Tue Jul 06 14:06:37 2010 +0300 @@ -232,9 +232,6 @@ QString uriStr("appto://"); uriStr.append(appUid); - /* uriStr.append("?"); - uriStr.append("activityname"); - uriStr.append("=MainView&key1=data1&key2=data2");*/ QUrl uri(uriStr); XQApplicationManager appmgr;