summaryrefslogtreecommitdiffstats
path: root/framework/qml/MailViewer.qml
diff options
context:
space:
mode:
Diffstat (limited to 'framework/qml/MailViewer.qml')
-rw-r--r--framework/qml/MailViewer.qml189
1 files changed, 96 insertions, 93 deletions
diff --git a/framework/qml/MailViewer.qml b/framework/qml/MailViewer.qml
index d16fde7c..329ef217 100644
--- a/framework/qml/MailViewer.qml
+++ b/framework/qml/MailViewer.qml
@@ -46,7 +46,7 @@ Rectangle {
46 46
47 Shortcut { 47 Shortcut {
48 sequence: "V" 48 sequence: "V"
49 onActivated: debugPopup.open() 49 onActivated: debugPopupComponent.createObject(root).open()
50 enabled: root.current 50 enabled: root.current
51 } 51 }
52 52
@@ -390,106 +390,109 @@ Rectangle {
390 } 390 }
391 } 391 }
392 392
393 Kube.Popup { 393 Component {
394 id: debugPopup 394 id: debugPopupComponent
395 modal: true 395 Kube.Popup {
396 parent: ApplicationWindow.overlay 396 id: debugPopup
397 closePolicy: Popup.CloseOnEscape | Popup.CloseOnPressOutsideParent 397 modal: true
398 x: (parent.width - width)/2 398 parent: ApplicationWindow.overlay
399 y: Kube.Units.largeSpacing 399 closePolicy: Popup.CloseOnEscape | Popup.CloseOnPressOutsideParent
400 width: parent.width / 2 400 x: (parent.width - width)/2
401 height: parent.height - Kube.Units.largeSpacing * 2 401 y: Kube.Units.largeSpacing
402 clip: true 402 width: parent.width / 2
403 403 height: parent.height - Kube.Units.largeSpacing * 2
404 Flickable { 404 clip: true
405 id: flickable 405
406 anchors.fill: parent 406 Flickable {
407 ScrollBar.vertical: ScrollBar {} 407 id: flickable
408 contentHeight: content.height 408 anchors.fill: parent
409 contentWidth: parent.width 409 ScrollBar.vertical: ScrollBar {}
410 Column { 410 contentHeight: content.height
411 id: content 411 contentWidth: parent.width
412 width: flickable.width 412 Column {
413 height: childrenRect.height 413 id: content
414 414 width: flickable.width
415 TextEdit { 415 height: childrenRect.height
416 id: rawContent 416
417 width: parent.width 417 TextEdit {
418 readOnly: true 418 id: rawContent
419 selectByMouse: true 419 width: parent.width
420 textFormat: TextEdit.PlainText 420 readOnly: true
421 wrapMode: TextEdit.Wrap 421 selectByMouse: true
422 height: implicitHeight 422 textFormat: TextEdit.PlainText
423 text: messageParser.rawContent 423 wrapMode: TextEdit.Wrap
424 } 424 height: implicitHeight
425 Rectangle { 425 text: messageParser.rawContent
426 color: "black"
427 height: 2
428 }
429 Controls1.TreeView {
430 id: mailStructure
431 width: parent.width
432 height: implicitHeight
433 Controls1.TableViewColumn {
434 role: "type"
435 title: "Type"
436 }
437 Controls1.TableViewColumn {
438 role: "embeded"
439 title: "Embeded"
440 }
441 Controls1.TableViewColumn {
442 role: "securityLevel"
443 title: "SecurityLevel"
444 } 426 }
445 Controls1.TableViewColumn { 427 Rectangle {
446 role: "content" 428 color: "black"
447 title: "Content" 429 height: 2
448 } 430 }
449 model: messageParser.parts 431 Controls1.TreeView {
450 itemDelegate: Item { 432 id: mailStructure
451 property variant currentData: styleData.value 433 width: parent.width
452 Text { 434 height: implicitHeight
453 anchors.fill: parent 435 Controls1.TableViewColumn {
454 color: styleData.textColor 436 role: "type"
455 elide: Text.ElideRight 437 title: "Type"
456 text: styleData.value ? styleData.value : "" 438 }
457 textFormat: Text.PlainText 439 Controls1.TableViewColumn {
440 role: "embeded"
441 title: "Embeded"
442 }
443 Controls1.TableViewColumn {
444 role: "securityLevel"
445 title: "SecurityLevel"
458 } 446 }
459 MouseArea { 447 Controls1.TableViewColumn {
460 anchors.fill: parent 448 role: "content"
461 onClicked: { 449 title: "Content"
462 textEdit.text = styleData.value 450 }
451 model: messageParser.parts
452 itemDelegate: Item {
453 property variant currentData: styleData.value
454 Text {
455 anchors.fill: parent
456 color: styleData.textColor
457 elide: Text.ElideRight
458 text: styleData.value ? styleData.value : ""
459 textFormat: Text.PlainText
460 }
461 MouseArea {
462 anchors.fill: parent
463 onClicked: {
464 textEdit.text = styleData.value
465 }
463 } 466 }
464 } 467 }
465 } 468 }
466 } 469 Controls1.TreeView {
467 Controls1.TreeView { 470 id: attachmentsTree
468 id: attachmentsTree 471 width: parent.width
469 width: parent.width 472 height: implicitHeight
470 height: implicitHeight 473 Controls1.TableViewColumn {
471 Controls1.TableViewColumn { 474 role: "type"
472 role: "type" 475 title: "Type"
473 title: "Type" 476 }
474 } 477 Controls1.TableViewColumn {
475 Controls1.TableViewColumn { 478 role: "name"
476 role: "name" 479 title: "Name"
477 title: "Name" 480 }
481 Controls1.TableViewColumn {
482 role: "size"
483 title: "Size"
484 }
485 model: messageParser.attachments
478 } 486 }
479 Controls1.TableViewColumn { 487 TextEdit {
480 role: "size" 488 id: textEdit
481 title: "Size" 489 width: parent.width
490 readOnly: true
491 selectByMouse: true
492 textFormat: TextEdit.PlainText
493 wrapMode: TextEdit.Wrap
494 height: implicitHeight
482 } 495 }
483 model: messageParser.attachments
484 }
485 TextEdit {
486 id: textEdit
487 width: parent.width
488 readOnly: true
489 selectByMouse: true
490 textFormat: TextEdit.PlainText
491 wrapMode: TextEdit.Wrap
492 height: implicitHeight
493 } 496 }
494 } 497 }
495 } 498 }