~ubuntu-branches/ubuntu/oneiric/kdepim/oneiric-updates

« back to all changes in this revision

Viewing changes to examples/coisceim/coisceim-mobile/ItemViewer.qml

  • Committer: Package Import Robot
  • Author(s): Philip Muškovac
  • Date: 2011-06-28 19:33:24 UTC
  • mfrom: (0.2.13) (0.1.13 sid)
  • Revision ID: package-import@ubuntu.com-20110628193324-8yvjs8sdv9rdoo6c
Tags: 4:4.7.0-0ubuntu1
* New upstream release
  - update install files
  - add missing kdepim-doc package to control file
  - Fix Vcs lines
  - kontact breaks/replaces korganizer << 4:4.6.80
  - tighten the dependency of kdepim-dev on libkdepim4 to fix lintian error

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
    This file is part of Akonadi.
 
3
 
 
4
    Copyright (c) 2011 Stephen Kelly <steveire@gmail.com>
 
5
 
 
6
    This program is free software; you can redistribute it and/or modify
 
7
    it under the terms of the GNU General Public License as published by
 
8
    the Free Software Foundation; either version 2 of the License, or
 
9
    (at your option) any later version.
 
10
 
 
11
    This program is distributed in the hope that it will be useful,
 
12
    but WITHOUT ANY WARRANTY; without even the implied warranty of
 
13
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 
14
    GNU General Public License for more details.
 
15
 
 
16
    You should have received a copy of the GNU General Public License
 
17
    along with this program; if not, write to the Free Software
 
18
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
 
19
    USA.
 
20
*/
 
21
 
 
22
import Qt 4.7
 
23
import org.kde.kcal 4.5 as KCal
 
24
import org.kde.messageviewer 4.5 as MessageViewer
 
25
 
 
26
Item {
 
27
 
 
28
  KCal.IncidenceView {
 
29
    id: eventView
 
30
    anchors.fill: parent
 
31
 
 
32
    visible : triplist.currentItem.trip ? triplist.currentItem.trip.todoSelection ? triplist.currentItem.trip.todoSelection.hasSelection : false : false
 
33
 
 
34
    itemId: triplist.currentItem.trip ? triplist.currentItem.trip.itemSelection.id : -1
 
35
  }
 
36
 
 
37
  NoteView {
 
38
    id: noteView
 
39
    objectName : "noteView"
 
40
    visible : triplist.currentItem.trip ? triplist.currentItem.trip.notesSelection ? triplist.currentItem.trip.notesSelection.hasSelection : false : false
 
41
    anchors.fill: parent
 
42
 
 
43
    itemSelection : triplist.currentItem.trip ? triplist.currentItem.trip.itemSelection : null
 
44
 
 
45
    Rectangle {
 
46
      anchors.top : noteView.top
 
47
      anchors.bottom : noteView.bottom
 
48
      anchors.right : noteView.left
 
49
      width : noteView.anchors.leftMargin
 
50
      color : "#FAFAFA"
 
51
    }
 
52
  }
 
53
 
 
54
  MessageViewer.MessageView {
 
55
    id: messageView
 
56
    visible : triplist.currentItem.trip ? triplist.currentItem.trip.mailSelection ? triplist.currentItem.trip.mailSelection.hasSelection : false : false
 
57
    anchors.fill: parent
 
58
    itemId: triplist.currentItem.trip ? triplist.currentItem.trip.itemSelection.id : -1
 
59
  }
 
60
 
 
61
  Rectangle {
 
62
    id : backToMessageListButton
 
63
    visible: triplist.currentItem.trip.itemSelection.id != -1
 
64
    anchors.right : parent.right
 
65
    anchors.rightMargin : 70
 
66
    anchors.bottom : parent.bottom
 
67
    anchors.bottomMargin : 100
 
68
    Image {
 
69
      source : KDE.locate( "data", "mobileui/back-to-list-button.png" );
 
70
      MouseArea {
 
71
        anchors.fill : parent;
 
72
        onClicked : {
 
73
          console.log(triplist.currentItem.trip, triplist.currentItem.trip.itemSelection)
 
74
          triplist.currentItem.trip.itemSelection.clear()
 
75
        }
 
76
      }
 
77
    }
 
78
  }
 
79
 
 
80
 
 
81
}