2
Copyright (C) 2010 Klarälvdalens Datakonsult AB,
3
a KDAB Group company, info@kdab.net,
4
author Stephen Kelly <stephen@kdab.com>
6
This library is free software; you can redistribute it and/or modify it
7
under the terms of the GNU Library General Public License as published by
8
the Free Software Foundation; either version 2 of the License, or (at your
9
option) any later version.
11
This library is distributed in the hope that it will be useful, but WITHOUT
12
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
14
License for more details.
16
You should have received a copy of the GNU Library General Public License
17
along with this library; see the file COPYING.LIB. If not, write to the
18
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
26
color: "#00000000" // Set a transparant color.
27
property int currentNoteRow : -1
30
onCurrentNoteRowChanged : {
31
titleInput.text = application.noteTitle( currentNoteRow );
32
contentEdit.text = application.noteContent( currentNoteRow );
37
application.saveNote(titleInput.text, contentEdit.text);
41
border { color: "grey"; width: 2; }
44
anchors.top : parent.top
45
anchors.left : parent.left
46
anchors.right : parent.right
51
color : "#000001" // yes, not exactly black, since QML maps black to white on the N900...
52
anchors.left : parent.left
53
anchors.right: parent.right
54
anchors.verticalCenter: parent.verticalCenter
55
anchors.leftMargin : 10
56
anchors.rightMargin : 10
60
application.saveCurrentNoteContent(contentEdit.text);
67
border { color: "grey"; width: 2; }
69
anchors.top : titleWrapper.bottom
70
anchors.left : parent.left
71
anchors.right : parent.right
72
anchors.bottom : parent.bottom
80
anchors.bottomMargin : 8
81
anchors.leftMargin : 10
82
anchors.rightMargin : 10
86
function ensureVisible(r)
90
else if (contentX+width <= r.x+r.width)
91
contentX = r.x+r.width-width;
94
else if (contentY+height <= r.y+r.height)
95
contentY = r.y+r.height-height;
100
color : "#000001" // yes, not exactly black, since QML maps black to white on the N900...
101
anchors.fill : parent
103
wrapMode: TextEdit.Wrap
104
onCursorRectangleChanged: flick.ensureVisible(cursorRectangle)