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

« back to all changes in this revision

Viewing changes to mobile/mail/kmail-composer.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 Volker Krause <vkrause@kde.org>
 
3
 
 
4
    This library is free software; you can redistribute it and/or modify it
 
5
    under the terms of the GNU Library General Public License as published by
 
6
    the Free Software Foundation; either version 2 of the License, or (at your
 
7
    option) any later version.
 
8
 
 
9
    This library is distributed in the hope that it will be useful, but WITHOUT
 
10
    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 
11
    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public
 
12
    License for more details.
 
13
 
 
14
    You should have received a copy of the GNU Library General Public License
 
15
    along with this library; see the file COPYING.LIB.  If not, write to the
 
16
    Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 
17
    02110-1301, USA.
 
18
*/
 
19
 
 
20
import Qt 4.7
 
21
import org.kde 4.5
 
22
import org.kde.pim.mobileui 4.5 as KPIM
 
23
import org.kde.messagecomposer 4.5 as MessageComposer
 
24
 
 
25
KPIM.MainView {
 
26
 
 
27
  KPIM.DecoratedFlickable {
 
28
    id: flick
 
29
    anchors.fill: parent
 
30
    contentHeight: editorView.contentHeight;
 
31
 
 
32
    content.children: [
 
33
      EditorView {
 
34
        id: editorView
 
35
        enabled: !window.busy
 
36
        anchors.fill: parent
 
37
      }
 
38
    ]
 
39
  }
 
40
 
 
41
  SlideoutPanelContainer {
 
42
    enabled: !window.busy
 
43
    anchors.fill: parent
 
44
 
 
45
    SlideoutPanel {
 
46
      anchors.fill: parent
 
47
      id: folderPanel
 
48
      titleText: KDE.i18n( "Recipients" )
 
49
      handleHeight: 150
 
50
      handlePosition: 40
 
51
      content: [
 
52
          KPIM.DecoratedFlickable {
 
53
              id: flickablerecipients
 
54
              anchors.fill: parent
 
55
              contentHeight: recipientsEditor.height;
 
56
 
 
57
              content.children: [
 
58
                Item {
 
59
                    id: recipientswrapper
 
60
                    anchors.top: parent.top
 
61
                    anchors.left: parent.left
 
62
                    anchors.right: parent.right
 
63
 
 
64
                    MessageComposer.RecipientsEditor {
 
65
                        id: recipientsEditor
 
66
                        anchors.top: parent.top
 
67
                        anchors.left: parent.left
 
68
                        anchors.right: parent.right
 
69
                    }
 
70
                }
 
71
              ]
 
72
          }
 
73
      ]
 
74
    }
 
75
 
 
76
    SlideoutPanel {
 
77
      anchors.fill: parent
 
78
      id: actionPanel
 
79
      titleText: KDE.i18n( "Actions" )
 
80
      handleHeight: 150
 
81
      handlePosition: folderPanel.handlePosition + folderPanel.handleHeight
 
82
 
 
83
      Component.onCompleted: {
 
84
        kmailComposerActions.showOnlyCategory( "composer" )
 
85
        actionPanel.expanded.connect( kmailComposerActions, kmailComposerActions.refresh );
 
86
      }
 
87
 
 
88
      content: [
 
89
          KMailComposerActions {
 
90
            id : kmailComposerActions
 
91
            anchors.fill : parent
 
92
 
 
93
            scriptActions : [
 
94
 
 
95
            KPIM.ScriptAction {
 
96
              name: "composer_configure_identity"
 
97
              script: {
 
98
                actionPanel.collapse();
 
99
                window.configureIdentity();
 
100
              }
 
101
            },
 
102
            KPIM.ScriptAction {
 
103
              name: "composer_configure_transport"
 
104
              script: {
 
105
                actionPanel.collapse();
 
106
                window.configureTransport();
 
107
              }
 
108
            },
 
109
            KPIM.ScriptAction {
 
110
              name: "composer_close"
 
111
              script: {
 
112
                actionPanel.collapse();
 
113
                window.close();
 
114
              }
 
115
            }
 
116
            ]
 
117
            onDoCollapse : {
 
118
              actionPanel.collapse();
 
119
            }
 
120
          }
 
121
      ]
 
122
    }
 
123
 
 
124
    SlideoutPanel {
 
125
      anchors.fill: parent
 
126
      id: attachmentPanel
 
127
      handleHeight: 100
 
128
      handlePosition: actionPanel.handlePosition + actionPanel.handleHeight
 
129
      titleIcon: KDE.iconPath( "mail-attachment", 48 );
 
130
      contentWidth: attachmentEditorView.width
 
131
      content: [
 
132
        AttachmentEditor {
 
133
          id: attachmentEditorView
 
134
          anchors.fill: parent
 
135
        }
 
136
      ]
 
137
    }
 
138
  }
 
139
 
 
140
  // ### Make it a general processing screen?
 
141
  Rectangle {
 
142
      id: busyView
 
143
      visible: window.busy;
 
144
      z: 99
 
145
 
 
146
      KPIM.Spinner {
 
147
          anchors.centerIn: parent
 
148
      }
 
149
 
 
150
      color: "grey"
 
151
      opacity: 0.5
 
152
      anchors.fill: parent
 
153
  }
 
154
}