18 */ |
18 */ |
19 |
19 |
20 #ifndef SMFSUBTITLE_H_ |
20 #ifndef SMFSUBTITLE_H_ |
21 #define SMFSUBTITLE_H_ |
21 #define SMFSUBTITLE_H_ |
22 |
22 |
23 #include <QObject> |
|
24 #include <qdatastream.h> |
23 #include <qdatastream.h> |
25 #include <QDateTime> |
24 #include <QDateTime> |
26 #include <QSharedData> |
25 #include <QSharedData> |
27 #include <smfclientglobal.h> |
26 #include <smfclientglobal.h> |
28 |
27 |
41 |
40 |
42 /** |
41 /** |
43 * @ingroup smf_common_group |
42 * @ingroup smf_common_group |
44 * The subtitle class represents information about a track's subtitle |
43 * The subtitle class represents information about a track's subtitle |
45 */ |
44 */ |
46 class SMFCLIENT_EXPORT SmfSubtitle : public QObject |
45 class SMFCLIENT_EXPORT SmfSubtitle |
47 { |
46 { |
48 Q_OBJECT |
|
49 public: |
47 public: |
50 /** |
48 /** |
51 * Constructor with default argument |
49 * Constructor with default argument |
52 * @param aParent The parent object |
|
53 */ |
50 */ |
54 SmfSubtitle( QObject *aParent = 0 ); |
51 SmfSubtitle( ); |
55 |
52 |
56 /** |
53 /** |
57 * Copy Constructor |
54 * Copy Constructor |
58 * @param aOther The reference object |
55 * @param aOther The reference object |
59 */ |
56 */ |
60 SmfSubtitle( const SmfSubtitle &aOther ); |
57 SmfSubtitle( const SmfSubtitle &aOther ); |
|
58 |
|
59 /** |
|
60 * Overloaded = operator |
|
61 * @param aOther The reference object |
|
62 */ |
|
63 SmfSubtitle& operator=( const SmfSubtitle &aOther ); |
61 |
64 |
62 /** |
65 /** |
63 * Destructor |
66 * Destructor |
64 */ |
67 */ |
65 ~SmfSubtitle( ); |
68 ~SmfSubtitle( ); |
98 * Method to get the id of the subtitle |
101 * Method to get the id of the subtitle |
99 * @return The ID value |
102 * @return The ID value |
100 */ |
103 */ |
101 QString id( ) const; |
104 QString id( ) const; |
102 |
105 |
|
106 /** |
|
107 * Method to set the subtitle as a bytearray |
|
108 * @param aSubtitle The subtitle content |
|
109 */ |
|
110 void setSubtitle( const QByteArray &aSubtitle ); |
|
111 |
|
112 /** |
|
113 * Method to set the language |
|
114 * @param aLang The language |
|
115 */ |
|
116 void setLanguage( const QString &aLang ); |
|
117 |
|
118 /** |
|
119 * Method to set the frame rate |
|
120 * @param aFramerate the frame rate |
|
121 */ |
|
122 void setFrameRate( const double &aFramerate ); |
|
123 |
|
124 /** |
|
125 * Method to set the duration |
|
126 * @param aDuration the duration |
|
127 */ |
|
128 void setDuration( const double &aDuration ); |
|
129 |
|
130 /** |
|
131 * Method to set the release year |
|
132 * @param aRelYear The release year |
|
133 */ |
|
134 void setReleaseYear( const QDateTime &aRelYear ); |
|
135 |
|
136 /** |
|
137 * Method to set the id of the subtitle |
|
138 * @param aId The ID value |
|
139 */ |
|
140 void setId( const QString &aId ); |
|
141 |
103 private: |
142 private: |
104 QSharedDataPointer<SmfSubtitlePrivate> d; |
143 QSharedDataPointer<SmfSubtitlePrivate> d; |
105 |
144 |
106 friend QDataStream &operator<<( QDataStream &aDataStream, |
145 friend QDataStream &operator<<( QDataStream &aDataStream, |
107 const SmfSubtitle &aSubtitle ); |
146 const SmfSubtitle &aSubtitle ); |
130 * @return reference to the stream |
169 * @return reference to the stream |
131 */ |
170 */ |
132 QDataStream &operator>>( QDataStream &aDataStream, |
171 QDataStream &operator>>( QDataStream &aDataStream, |
133 SmfSubtitle &aSubtitle); |
172 SmfSubtitle &aSubtitle); |
134 |
173 |
|
174 |
135 // Make the class SmfSubtitle known to QMetaType, so that as to register it. |
175 // Make the class SmfSubtitle known to QMetaType, so that as to register it. |
136 Q_DECLARE_METATYPE(SmfSubtitle) |
176 Q_DECLARE_METATYPE(SmfSubtitle) |
137 |
177 |
|
178 |
138 #endif /* SMFSUBTITLE_H_ */ |
179 #endif /* SMFSUBTITLE_H_ */ |