|
1 /** |
|
2 * Copyright (c) 2010 Sasken Communication Technologies Ltd. |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of the "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html" |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Chandradeep Gandhi, Sasken Communication Technologies Ltd - Initial contribution |
|
11 * |
|
12 * Contributors: |
|
13 * Manasij Roy, Nalina Hariharan |
|
14 * |
|
15 * Description: |
|
16 * The comment class represents a comment (on a picture or a music track etc) |
|
17 * |
|
18 */ |
|
19 |
|
20 #ifndef SMFCOMMENT_H_ |
|
21 #define SMFCOMMENT_H_ |
|
22 |
|
23 #include <QDateTime> |
|
24 #include <qdatastream.h> |
|
25 #include <QSharedData> |
|
26 #include <smfclientglobal.h> |
|
27 |
|
28 class SmfCommentPrivate; |
|
29 |
|
30 /** |
|
31 * @ingroup smf_common_group |
|
32 * The comment class represents a comment (on a picture or a music track etc) |
|
33 */ |
|
34 class SMFCLIENT_EXPORT SmfComment : public QObject |
|
35 { |
|
36 Q_OBJECT |
|
37 public: |
|
38 /** |
|
39 * Constructor with default argument |
|
40 * @param aParent The parent object |
|
41 */ |
|
42 SmfComment( QObject *aParent = 0 ); |
|
43 |
|
44 /** |
|
45 * Copy Constructor |
|
46 * @param aOther The reference object |
|
47 */ |
|
48 SmfComment( const SmfComment &aOther ); |
|
49 |
|
50 /** |
|
51 * Destructor |
|
52 */ |
|
53 ~SmfComment( ); |
|
54 |
|
55 /** |
|
56 * Method to get the comment text |
|
57 * @return The comment text |
|
58 */ |
|
59 QString text( ) const; |
|
60 |
|
61 /** |
|
62 * Method to get the comment time stamp |
|
63 * @return The comment time stamp value |
|
64 */ |
|
65 QDateTime timeStamp( ) const; |
|
66 |
|
67 /** |
|
68 * Method to get the id of the comment |
|
69 * @return The ID value |
|
70 */ |
|
71 QString id( ) const; |
|
72 |
|
73 /** |
|
74 * Method to set the comment text |
|
75 * @param aText The comment text to be set |
|
76 */ |
|
77 void setText( const QString &aText ); |
|
78 |
|
79 private: |
|
80 QSharedDataPointer<SmfCommentPrivate> d; |
|
81 |
|
82 friend QDataStream &operator<<( QDataStream &aDataStream, |
|
83 const SmfComment &aComment ); |
|
84 |
|
85 friend QDataStream &operator>>( QDataStream &aDataStream, |
|
86 SmfComment &aComment ); |
|
87 |
|
88 }; |
|
89 |
|
90 |
|
91 /** |
|
92 * Method for Externalization. Writes the SmfComment object to |
|
93 * the stream and returns a reference to the stream. |
|
94 * @param aDataStream Stream to be written |
|
95 * @param aComment The SmfComment object to be externalized |
|
96 * @return reference to the written stream |
|
97 */ |
|
98 QDataStream &operator<<( QDataStream &aDataStream, |
|
99 const SmfComment &aComment ); |
|
100 |
|
101 /** |
|
102 * Method for Internalization. Reads a SmfComment object from |
|
103 * the stream and returns a reference to the stream. |
|
104 * @param aDataStream Stream to be read |
|
105 * @param aComment The SmfComment object to be internalized |
|
106 * @return reference to the stream |
|
107 */ |
|
108 QDataStream &operator>>( QDataStream &aDataStream, |
|
109 SmfComment &aComment); |
|
110 |
|
111 #endif /* SMFCOMMENT_H_ */ |