/* * Copyright (c) 2011 Nokia Corporation. */ import Qt 4.7 Item { id: textEditor property alias text: sourceText.text property alias codeTemplateModel: codeButtonList.model signal tryDemoClicked() signal backClicked() function flickToLine(line) { // Calculate the line position in pixels, we take 5 lines too up so that the selection // would be a little lower than the top of the window, it seems that the space between // rows is 3 pixels... var ypos = (line - 5) * (sourceText.font.pixelSize + 3) if(ypos < 0) { ypos = 0 } view.contentY = ypos } function getPosByLFCount(beginPos, lines) { var lineCount = 0 if(lines <= 0) { return beginPos } for (var i = beginPos; i