summaryrefslogtreecommitdiff
path: root/library/mimetype.cpp
Unidiff
Diffstat (limited to 'library/mimetype.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--library/mimetype.cpp64
1 files changed, 64 insertions, 0 deletions
diff --git a/library/mimetype.cpp b/library/mimetype.cpp
index ef5d619..d0a578e 100644
--- a/library/mimetype.cpp
+++ b/library/mimetype.cpp
@@ -131,4 +131,22 @@ MimeType::Private& MimeType::data()
131} 131}
132 132
133/*!
134 \class MimeType mimetype.h
135 \brief The MimeType class provides MIME type information.
136
137 A MimeType object is a light-weight value which
138 provides information about a MIME type.
139
140 \ingroup qtopiaemb
141*/
142
143/*!
144 Constructs a MimeType.
145 Normally, \a ext_or_id is a MIME type,
146 but if \a ext_or_id starts with / or contains no /,
147 it is interpretted as a filename and the
148 extension (eg. .txt) is used as the
149 MIME type.
150*/
133MimeType::MimeType( const QString& ext_or_id ) 151MimeType::MimeType( const QString& ext_or_id )
134{ 152{
@@ -136,4 +154,7 @@ MimeType::MimeType( const QString& ext_or_id )
136} 154}
137 155
156/*!
157 Constructs a MimeType from the type() of \a lnk.
158*/
138MimeType::MimeType( const DocLnk& lnk ) 159MimeType::MimeType( const DocLnk& lnk )
139{ 160{
@@ -141,4 +162,7 @@ MimeType::MimeType( const DocLnk& lnk )
141} 162}
142 163
164/*!
165 Returns the MIME type identifier.
166*/
143QString MimeType::id() const 167QString MimeType::id() const
144{ 168{
@@ -146,4 +170,8 @@ QString MimeType::id() const
146} 170}
147 171
172/*!
173 Returns a description of the MIME Type. This is usually based
174 on the application() associated with the type.
175*/
148QString MimeType::description() const 176QString MimeType::description() const
149{ 177{
@@ -152,4 +180,7 @@ QString MimeType::description() const
152} 180}
153 181
182/*!
183 Returns a small QPixmap appropriate for the MIME type.
184*/
154QPixmap MimeType::pixmap() const 185QPixmap MimeType::pixmap() const
155{ 186{
@@ -158,4 +189,8 @@ QPixmap MimeType::pixmap() const
158} 189}
159 190
191/*!
192 \internal
193 This function is not generally available.
194*/
160QString MimeType::extension() const 195QString MimeType::extension() const
161{ 196{
@@ -163,4 +198,9 @@ QString MimeType::extension() const
163} 198}
164 199
200
201/*!
202 \internal
203 This function is not generally available.
204*/
165QStringList MimeType::extensions() const 205QStringList MimeType::extensions() const
166{ 206{
@@ -169,4 +209,7 @@ QStringList MimeType::extensions() const
169} 209}
170 210
211/*!
212 Returns a larger QPixmap appropriate for the MIME type.
213*/
171QPixmap MimeType::bigPixmap() const 214QPixmap MimeType::bigPixmap() const
172{ 215{
@@ -175,4 +218,13 @@ QPixmap MimeType::bigPixmap() const
175} 218}
176 219
220/*!
221 Returns the AppLnk defining the application associated
222 with this MIME type, or 0 if none is associated.
223
224 The caller must not retain the pointer,
225 but of course you can dereference it to take a copy if needed.
226
227 \sa Service::binding()
228*/
177const AppLnk* MimeType::application() const 229const AppLnk* MimeType::application() const
178{ 230{
@@ -190,4 +242,7 @@ static QString serviceBinding(const QString& service)
190} 242}
191 243
244/*!
245 \internal
246*/
192void MimeType::registerApp( const AppLnk& lnk ) 247void MimeType::registerApp( const AppLnk& lnk )
193{ 248{
@@ -214,4 +269,7 @@ void MimeType::registerApp( const AppLnk& lnk )
214} 269}
215 270
271/*!
272 \internal
273*/
216void MimeType::clear() 274void MimeType::clear()
217{ 275{
@@ -287,4 +345,7 @@ MimeTypeData* MimeType::data(const QString& id)
287} 345}
288 346
347/*!
348 Returns a Qtopia folder containing application definitions.
349*/
289QString MimeType::appsFolderName() 350QString MimeType::appsFolderName()
290{ 351{
@@ -292,4 +353,7 @@ QString MimeType::appsFolderName()
292} 353}
293 354
355/*!
356 Reloads application definitions.
357*/
294void MimeType::updateApplications() 358void MimeType::updateApplications()
295{ 359{