void DocumentationViewer::forward() { if(forwardEnable()) { ++m_hpos; openUrl(KUrl(m_history[m_hpos])); emit updateStatus(backEnable(), forwardEnable()); } }
void DocumentationViewer::back() { if(backEnable()) { --m_hpos; openUrl(QUrl::fromLocalFile(m_history[m_hpos])); emit updateStatus(backEnable() , forwardEnable()); } }
void DocumentationViewer::addToHistory(const QString& url) { if(m_history.count() > 0) { while(m_hpos < m_history.count() - 1) { m_history.pop_back(); } } if(!m_history.isEmpty()) { ++m_hpos; } m_history.append(url); m_hpos = m_history.count() - 1; emit updateStatus(backEnable(), forwardEnable()); }