userguide/src/HelpContentsView.cpp
changeset 23 99b096216bc8
parent 18 375271912456
equal deleted inserted replaced
18:375271912456 23:99b096216bc8
    44     mBrowser = mBuilder.findWidget<BrowserWrapper*>(DOCML_BROWSER_CONTENTS);
    44     mBrowser = mBuilder.findWidget<BrowserWrapper*>(DOCML_BROWSER_CONTENTS);
    45     mBrowser->init();
    45     mBrowser->init();
    46 
    46 
    47     connect(mBrowser, SIGNAL(linkClicked(const QUrl&)), this, SLOT(onLinkClicked(const QUrl&)));
    47     connect(mBrowser, SIGNAL(linkClicked(const QUrl&)), this, SLOT(onLinkClicked(const QUrl&)));
    48     connect(mBrowser, SIGNAL(urlChanged(const QUrl&)), this, SLOT(onUrlChanged(const QUrl&)));
    48     connect(mBrowser, SIGNAL(urlChanged(const QUrl&)), this, SLOT(onUrlChanged(const QUrl&)));
    49     connect(mainWindow(), SIGNAL(currentViewChanged(HbView*)), this, SLOT(onCurrentViewChanged(HbView*)));
    49     connect(mainWindow(), SIGNAL(viewReady()), this, SLOT(onViewReady()));
    50 }
    50 }
    51 
    51 
    52 void HelpContentsView::initDocMl()
    52 void HelpContentsView::initDocMl()
    53 {
    53 {
    54 	initBaseDocMl();
    54 	initBaseDocMl();
    99 }
    99 }
   100 
   100 
   101 void HelpContentsView::openHelpContent(const QUrl& url)
   101 void HelpContentsView::openHelpContent(const QUrl& url)
   102 {
   102 {
   103     QString html;
   103     QString html;
   104     QString baseUrl = url.toString();
   104     QString urlStr = url.toString();
   105     HelpDataProvider::instance()->getHelpContentData(html, baseUrl);
   105     HelpDataProvider::instance()->getHelpContentData(html, urlStr);
   106 	mBrowser->setHtml(html, baseUrl);
   106 	mBrowser->setHtml(html, urlStr);
   107 }
   107 }
   108 
   108 
   109 ////////////////////////////////////////////////////////////////////////////////////////////
   109 ////////////////////////////////////////////////////////////////////////////////////////////
   110 
   110 
   111 void HelpContentsView::onCurrentViewChanged(HbView *view)
   111 void HelpContentsView::onViewReady()
   112 {
   112 {
   113     if(this == view)
   113     if(isVisible())
   114     {
   114     {
   115 		setVisible(true);
       
   116         setNavigationAction(mSoftKeyAction);
   115         setNavigationAction(mSoftKeyAction);
   117         openHelpContent();
   116         openHelpContent();
   118     }
   117     }
   119     else
   118     else
   120     {
   119     {