~zsombi/ubuntu-ui-toolkit/50-custom-delegates

« back to all changes in this revision

Viewing changes to modules/Ubuntu/Components/InputHandler.qml

prereq sync

Show diffs side-by-side

added added

removed removed

Lines of Context:
50
50
 
51
51
    // signal triggered when popup should be opened
52
52
    signal pressAndHold(int pos)
 
53
    signal tap(int pos)
 
54
    property string oldText: ""
 
55
    signal textModified()
53
56
 
54
57
    function activateInput() {
55
58
        if (!input.activeFocus) {
307
310
    Connections {
308
311
        target: input
309
312
        onCursorRectangleChanged: ensureVisible()
310
 
        onTextChanged: textChanged = true;
 
313
        onTextChanged: {
 
314
            textChanged = true;
 
315
            if (oldText != input.text) {
 
316
                textModified()
 
317
                oldText = text
 
318
            }
 
319
        }
311
320
        // make sure we show the OSK
312
321
        onActiveFocusChanged: showInputPanel()
313
322
    }
369
378
        if (event.button === Qt.RightButton) {
370
379
            // open the popover
371
380
            inputHandler.pressAndHold(input.cursorPosition);
 
381
        } else {
 
382
            inputHandler.tap(input.cursorPosition);
372
383
        }
373
384
    }
374
385
    function handleMove(event, touch ) {