| 65 | } |
| 66 | |
| 67 | void DateEditor::setNote(qint32 lid, Note n) { |
| 68 | createdDate.setNote(lid, n.created, NOTE_CREATED_DATE); |
| 69 | updatedDate.setNote(lid, n.updated, NOTE_UPDATED_DATE); |
| 70 | NoteAttributes attributes; |
| 71 | if (n.attributes.isSet()) |
| 72 | attributes = n.attributes; |
| 73 | if (attributes.subjectDate.isSet() && attributes.subjectDate > 0) |
| 74 | subjectDate.setNote(lid, attributes.subjectDate, NOTE_ATTRIBUTE_SUBJECT_DATE); |
| 75 | else |
| 76 | subjectDate.setNote(lid, n.updated, NOTE_ATTRIBUTE_SUBJECT_DATE); |
| 77 | |
| 78 | QString author; |
| 79 | if (attributes.author.isSet()) |
| 80 | author = attributes.author; |
| 81 | authorEditor.setAuthor(lid, author.trimmed()); |
| 82 | |
| 83 | double longitude=0, altitude=0, latitude=0; |
| 84 | QString placeName = ""; |
| 85 | if (attributes.longitude.isSet()) |
| 86 | longitude = attributes.longitude; |
| 87 | if (attributes.latitude.isSet()) |
| 88 | latitude = attributes.latitude; |
| 89 | if (attributes.altitude.isSet()) |
| 90 | altitude = attributes.altitude; |
| 91 | if (attributes.placeName.isSet()) |
| 92 | placeName = attributes.placeName; |
| 93 | locationEditor.setGeography(lid, longitude,latitude, altitude, placeName); |
| 94 | } |
| 95 | |
| 96 | void DateEditor::hideEvent(QHideEvent* event) { |
| 97 | Q_UNUSED(event); // suppress unused |
no test coverage detected