Changeset View
Changeset View
Standalone View
Standalone View
lib/mimetypeutils.h
Show First 20 Lines • Show All 53 Lines • ▼ Show 20 Line(s) | 47 | enum Kind { | |||
---|---|---|---|---|---|
54 | KIND_VIDEO = 1 << 6 | 54 | KIND_VIDEO = 1 << 6 | ||
55 | }; | 55 | }; | ||
56 | Q_DECLARE_FLAGS(Kinds, Kind) | 56 | Q_DECLARE_FLAGS(Kinds, Kind) | ||
57 | 57 | | |||
58 | GWENVIEWLIB_EXPORT Kind fileItemKind(const KFileItem&); | 58 | GWENVIEWLIB_EXPORT Kind fileItemKind(const KFileItem&); | ||
59 | GWENVIEWLIB_EXPORT Kind urlKind(const QUrl&); | 59 | GWENVIEWLIB_EXPORT Kind urlKind(const QUrl&); | ||
60 | GWENVIEWLIB_EXPORT Kind mimeTypeKind(const QString& mimeType); | 60 | GWENVIEWLIB_EXPORT Kind mimeTypeKind(const QString& mimeType); | ||
61 | 61 | | |||
62 | enum MimeTarget { | ||||
63 | ClipboardTarget, | ||||
64 | DropTarget | ||||
65 | }; | ||||
66 | | ||||
62 | /** | 67 | /** | ||
63 | * Returns the image data (and also the URL, unless the image | 68 | * Returns the image data (and also the URL, unless the image | ||
64 | * is edited/unsaved) if there is a single image selected. | 69 | * is edited/unsaved) if there is a single image selected. | ||
65 | * Otherwise, returns a list of URLs for all selected images. | 70 | * Otherwise, returns a list of URLs for all selected images. | ||
66 | */ | 71 | */ | ||
67 | GWENVIEWLIB_EXPORT QMimeData* selectionMimeData(const KFileItemList& selectedFiles); | 72 | GWENVIEWLIB_EXPORT QMimeData* selectionMimeData(const KFileItemList& selectedFiles, const MimeTarget& mimeTarget); | ||
68 | 73 | | |||
69 | } // namespace MimeTypeUtils | 74 | } // namespace MimeTypeUtils | ||
70 | 75 | | |||
71 | } // namespace Gwenview | 76 | } // namespace Gwenview | ||
72 | 77 | | |||
73 | Q_DECLARE_OPERATORS_FOR_FLAGS(Gwenview::MimeTypeUtils::Kinds) | 78 | Q_DECLARE_OPERATORS_FOR_FLAGS(Gwenview::MimeTypeUtils::Kinds) | ||
74 | 79 | | |||
75 | #endif /* MIMETYPEUTILS_H */ | 80 | #endif /* MIMETYPEUTILS_H */ |