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

« back to all changes in this revision

Viewing changes to mobile/lib/calendar/incidence-editor.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
    Copyright (c) 2010 Bertjan Broeksema <broeksema@kde.org>
 
3
    Copyright (C) 2010 Artur Duque de Souza <asouza@kde.org>
 
4
    Copyright (C) 2010 Anselmo Lacerda Silveira de Melo <anselmolsm@gmail.com>
 
5
 
 
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.
 
10
 
 
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.
 
15
 
 
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
 
19
    02110-1301, USA.
 
20
*/
 
21
 
 
22
import Qt 4.7
 
23
import org.kde 4.5
 
24
import org.kde.pim.mobileui 4.5 as KPIM
 
25
import org.kde.incidenceeditors 4.5 as IncidenceEditors
 
26
 
 
27
KPIM.MainView {
 
28
  id: mainview
 
29
 
 
30
  Connections {
 
31
    target: _incidenceview
 
32
    onShowCalendarWidget: {
 
33
       calendarWidget.expand()
 
34
       calendarWidget.okEnabled = false
 
35
 
 
36
       calendarWidget.day = day;
 
37
       calendarWidget.month = month;
 
38
       calendarWidget.year = year;
 
39
    }
 
40
  }
 
41
 
 
42
  Connections {
 
43
    target: _incidenceview
 
44
    onShowClockWidget: {
 
45
       clockWidget.expand()
 
46
       clockWidget.okEnabled = false
 
47
 
 
48
       // set the initial values
 
49
       clockWidget.hours = hour;
 
50
       clockWidget.minutes = minute;
 
51
    }
 
52
  }
 
53
 
 
54
  Connections {
 
55
    target: clockWidget
 
56
    onTimeChanged: {
 
57
      _incidenceview.setNewTime( hour, minute );
 
58
    }
 
59
  }
 
60
 
 
61
  Connections {
 
62
    target: calendarWidget
 
63
    onDateChanged: {
 
64
      _incidenceview.setNewDate( day, month, year );
 
65
    }
 
66
  }
 
67
 
 
68
  KPIM.MorePanel {
 
69
    anchors.fill: parent
 
70
  }
 
71
 
 
72
  KPIM.CalendarDialog {
 
73
    id: calendarWidget
 
74
    anchors.fill: parent
 
75
  }
 
76
 
 
77
  KPIM.ClockDialog {
 
78
    id: clockWidget
 
79
    anchors.fill: parent
 
80
  }
 
81
 
 
82
  KPIM.DecoratedFlickable {
 
83
    anchors.top: parent.top
 
84
    anchors.bottom: collectionCombo.top
 
85
    anchors.left: parent.left
 
86
    anchors.right: parent.right
 
87
 
 
88
    anchors.topMargin: 40
 
89
    anchors.leftMargin: 40;
 
90
 
 
91
    contentHeight: generalEditor.height;
 
92
 
 
93
    content.children: [
 
94
      Item {
 
95
        IncidenceEditors.GeneralEditor {
 
96
          id: generalEditor;
 
97
          anchors.fill: parent
 
98
        }
 
99
      }
 
100
    ]
 
101
  }
 
102
 
 
103
  IncidenceEditors.CollectionCombo {
 
104
    id: collectionCombo
 
105
    anchors.bottom: parent.bottom;
 
106
    anchors.right: cancelButton.left;
 
107
    anchors.left: parent.left;
 
108
 
 
109
    height: parent.height / 6;
 
110
  }
 
111
 
 
112
  KPIM.Button2 {
 
113
    id: cancelButton
 
114
    anchors.bottom: parent.bottom;
 
115
    anchors.right: okButton.left;
 
116
    width: height * 1.5;
 
117
    height: collectionCombo.height
 
118
    icon: KDE.iconPath( "dialog-cancel", 64 );
 
119
    onClicked: window.cancel();
 
120
  }
 
121
 
 
122
  KPIM.Button2 {
 
123
    id: okButton;
 
124
    anchors.bottom: parent.bottom;
 
125
    anchors.right: parent.right;
 
126
    width: height * 1.5;
 
127
    height: collectionCombo.height
 
128
    icon: KDE.iconPath( "document-save", 64 );
 
129
    onClicked: window.save();
 
130
  }
 
131
}