Zwrotomat/codedisplay.cpp
/**
 * @brief CodeDisplay::lineNumberAreaWidth Calculte lenght of Number Area
 * @returns int number of pixels
 */
@brief CodeDisplay::lineNumberAreaWidth Calculte lenght of Number Area
@returns int number of pixels
@brief CodeDisplay :: lineNumberAreaWidth Calculte lenght of Number Area @returns int number of pixels
int CodeDisplay::lineNumberAreaWidth()
{
    int digits = 1;
    int max = qMax(1, blockCount());
    while (max >= 10) {
        max /= 10;
        ++digits;
    }
    int space = 5 + fontMetrics().horizontalAdvance(QLatin1Char('9')) * digits;
    return space;
}
int CodeDisplay :: lineNumberAreaWidth ( ) { int digits = 1 ; int max = qMax ( 1 , blockCount ( ) ) ; while ( max >= 10 ) { max /= 10 ; ++ digits ; } int space = 5 + fontMetrics ( ) . horizontalAdvance ( QLatin1Char ( ' ' ) ) * digits ; return space ; }
@brief CodeDisplay::lineNumberAreaWidth Calculte lenght of Number Area
 @returns int number of pixels
@brief CodeDisplay :: lineNumberAreaWidth Calculte lenght of Number Area @returns int number of pixels