示例#1
0
//////////////////////////////////////////////////////////////////////
// Function Name:		
// Description:		
// Parameters:		
// Data IN/OUT:		
// Return:		
// Notes:		
//////////////////////////////////////////////////////////////////////
void CListFrame::scrollLineUp(const int lines)
{
	//TRACE("[CListFrame]->scrollLineUp \r\n");
	if( !(m_nMode & SCROLL)) return;
	if( m_nNrOfLines <= 1) return;

	if(m_nSelectedLine - lines >= 0) {
		m_nSelectedLine -= lines;
		// check if the cursor moves out of the window
		if(m_nSelectedLine < m_nCurrentLine ) {
			// yes, scroll to next page
			//TRACE("[CListFrame]  m_nSelectedLine: %d, \r\n",m_nSelectedLine);
			scrollPageUp();
		} else {
			refreshLine(m_nSelectedLine+lines);
			refreshLine(m_nSelectedLine);
		}
	} else {
		setSelectedLine(m_nNrOfLines - 1);
	}
}
void TContainerLine::focusOutEvent(QFocusEvent *e) {    
    XYZContainer::focusInEvent(e);
    if (cs != 0 && ce != 0)
        setSelectedLine(QPoint(0,0));
}