|
1 /**************************************************************************** |
|
2 ** |
|
3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). |
|
4 ** All rights reserved. |
|
5 ** Contact: Nokia Corporation (qt-info@nokia.com) |
|
6 ** |
|
7 ** This file is part of the Qt Mobility Components. |
|
8 ** |
|
9 ** $QT_BEGIN_LICENSE:LGPL$ |
|
10 ** No Commercial Usage |
|
11 ** This file contains pre-release code and may not be distributed. |
|
12 ** You may use this file in accordance with the terms and conditions |
|
13 ** contained in the Technology Preview License Agreement accompanying |
|
14 ** this package. |
|
15 ** |
|
16 ** GNU Lesser General Public License Usage |
|
17 ** Alternatively, this file may be used under the terms of the GNU Lesser |
|
18 ** General Public License version 2.1 as published by the Free Software |
|
19 ** Foundation and appearing in the file LICENSE.LGPL included in the |
|
20 ** packaging of this file. Please review the following information to |
|
21 ** ensure the GNU Lesser General Public License version 2.1 requirements |
|
22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. |
|
23 ** |
|
24 ** In addition, as a special exception, Nokia gives you certain additional |
|
25 ** rights. These rights are described in the Nokia Qt LGPL Exception |
|
26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. |
|
27 ** |
|
28 ** If you have questions regarding the use of this file, please contact |
|
29 ** Nokia at qt-info@nokia.com. |
|
30 ** |
|
31 ** |
|
32 ** |
|
33 ** |
|
34 ** |
|
35 ** |
|
36 ** |
|
37 ** |
|
38 ** $QT_END_LICENSE$ |
|
39 ** |
|
40 ****************************************************************************/ |
|
41 #ifndef MESSAGINGEX_H |
|
42 #define MESSAGINGEX_H |
|
43 |
|
44 #include <QtGui> |
|
45 |
|
46 #include "ui_messagingex.h" |
|
47 #include "ui_smsreceiveddialog.h" |
|
48 #include "ui_accountdialog.h" |
|
49 #include "ui_mmsreceiveddialog.h" |
|
50 |
|
51 #include "qmessageservice.h" |
|
52 #include "qmessagemanager.h" |
|
53 #include "qmessage.h" |
|
54 #include "qmessageaccount.h" |
|
55 |
|
56 QTM_USE_NAMESPACE |
|
57 |
|
58 class MessagingEx : public QMainWindow, public Ui::MessagingExMainWindow |
|
59 { |
|
60 Q_OBJECT |
|
61 |
|
62 public: |
|
63 MessagingEx(QWidget* parent = 0); |
|
64 void createMenus(); |
|
65 |
|
66 private Q_SLOTS: |
|
67 void send(); |
|
68 void on_sendSmsButton_clicked(); |
|
69 void on_sendMmsButton_clicked(); |
|
70 void on_sendEmailButton_clicked(); |
|
71 void messageReceived(const QMessageId& aId); |
|
72 void messageRemoved(const QMessageId& aId); |
|
73 void messageUpdated(const QMessageId& aId); |
|
74 void accountSelected(int index); |
|
75 void addAttachment(); |
|
76 void removeAttachment(); |
|
77 void queryMessages(); |
|
78 void composeSMS(); |
|
79 void composeMMS(); |
|
80 void composeEmail(); |
|
81 void addMessage(); |
|
82 |
|
83 void sortType(); |
|
84 void sortSender(); |
|
85 void sortRecipient(); |
|
86 void sortSubject(); |
|
87 void sortTimestamp(); |
|
88 void sortReceptiontimestamp(); |
|
89 void sortStatus(); |
|
90 void sortParentAccountId(); |
|
91 void sortStandardFolder(); |
|
92 void findMessages(); |
|
93 |
|
94 void messagesFound(const QMessageIdList &ids); |
|
95 |
|
96 private: |
|
97 QMessageService m_service; |
|
98 QMessageManager m_manager; |
|
99 |
|
100 QAction* m_createEmail; |
|
101 QAction* m_createSms; |
|
102 QAction* m_createMms; |
|
103 QAction* m_sortMessages; |
|
104 QList<QAction*> m_accountActions; |
|
105 QStringList m_attachments; |
|
106 QString m_fileNames; |
|
107 |
|
108 QMenu *filterMenu; |
|
109 QMenu *composeMenu; |
|
110 QAction* m_composeSMS; |
|
111 QAction* m_composeMMS; |
|
112 QAction* m_composeEmail; |
|
113 QAction* m_sortId; |
|
114 QAction* m_sortType; |
|
115 QAction* m_sortSender; |
|
116 QAction* m_sortRecipient; |
|
117 QAction* m_sortSubject; |
|
118 QAction* m_sortTimestamp; |
|
119 QAction* m_sortReceptiontimestamp; |
|
120 QAction* m_sortStatus; |
|
121 QAction* m_sortParentAccountId; |
|
122 QAction* m_sortStandardFolder; |
|
123 QAction* m_result; |
|
124 |
|
125 QList<QMessageAccountId> m_accountList; |
|
126 QMessageAccount m_account; |
|
127 }; |
|
128 |
|
129 class SMSReceivedDialog : public QDialog, public Ui::SMSReceivedDialog |
|
130 { |
|
131 Q_OBJECT |
|
132 |
|
133 public: |
|
134 SMSReceivedDialog(const QMessage& aMessage, QWidget* parent = 0); |
|
135 |
|
136 }; |
|
137 |
|
138 class MMSReceivedDialog : public QDialog, public Ui::MMSReceivedDialog |
|
139 { |
|
140 Q_OBJECT |
|
141 |
|
142 public: |
|
143 MMSReceivedDialog(const QMessage& aMessage, QWidget* parent = 0); |
|
144 |
|
145 }; |
|
146 |
|
147 class AccountDialog : public QDialog, public Ui::AccountDialog |
|
148 { |
|
149 Q_OBJECT |
|
150 |
|
151 public: |
|
152 AccountDialog(const QMessageAccount& account, QWidget* parent = 0); |
|
153 }; |
|
154 |
|
155 #endif // MESSAGINGEX_H |
|
156 |
|
157 // End of file |