Пример #1
0
void DocumentationViewer::back()
{
	if(backEnable()) {
		--m_hpos;
		openUrl(KUrl(m_history[m_hpos]));
		emit updateStatus(backEnable() , forwardEnable());
	}
}
Пример #2
0
void DocumentationViewer::forward()
{
	if(forwardEnable()) {
		++m_hpos;
		openUrl(QUrl::fromLocalFile(m_history[m_hpos]));
		emit updateStatus(backEnable(), forwardEnable());
	}
}
Пример #3
0
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());
}