Zwrotomat/codedisplay.cpp
/**
 * @brief CodeDisplay::loadSelectedLines
 * Painting lines given by numbers(indexes) from multiFileComment for given file
 * @param multiFileComment &multiFileComment comment containing lines to select
 * @param selectedFile selectedFile
 */
@brief CodeDisplay::loadSelectedLines
Painting lines given by numbers(indexes) from multiFileComment for given file
@param multiFileComment &multiFileComment comment containing lines to select
@param selectedFile selectedFile
@brief CodeDisplay :: loadSelectedLines Painting lines given by numbers ( indexes ) from multiFileComment for given file @param multiFileComment &multiFileComment comment containing lines to select @param selectedFile selectedFile
void CodeDisplay::loadSelectedLines(MultiFileComment &multiFileComment, QString selectedFile)
{
    for(int i : *multiFileComment.getLinesByName(selectedFile)) {
        QTextCursor coursor(this->document()->findBlockByLineNumber(i));
        QTextBlockFormat frmt = coursor.blockFormat();
        frmt.setBackground(QBrush(Qt::gray));
        coursor.setBlockFormat(frmt);
    }
}
void CodeDisplay :: loadSelectedLines ( MultiFileComment & multiFileComment , QString selectedFile ) { for ( int i : * multiFileComment . getLinesByName ( selectedFile ) ) { QTextCursor coursor ( this -> document ( ) -> findBlockByLineNumber ( i ) ) ; QTextBlockFormat frmt = coursor . blockFormat ( ) ; frmt . setBackground ( QBrush ( Qt :: gray ) ) ; coursor . setBlockFormat ( frmt ) ; } }
@brief CodeDisplay::loadSelectedLines
 Painting lines given by numbers(indexes) from multiFileComment for given file
 @param multiFileComment &multiFileComment comment containing lines to select
 @param selectedFile selectedFile
@brief CodeDisplay :: loadSelectedLines Painting lines given by numbers ( indexes ) from multiFileComment for given file @param multiFileComment &multiFileComment comment containing lines to select @param selectedFile selectedFile