QMimeData
description
Hierarchy
↳ QMimeData
Index
Constructors
Properties
Methods
- clear
- hasColor
- hasHtml
- hasImage
- hasText
- hasUrls
- html
- removeFormat
- setHtml
- setNodeParent
- setText
- setUrls
- text
- urls
Constructors
constructor
+ new QMimeData(arg?: NativeElement): QMimeData
Overrides Component.constructor
Parameters:
| Name | Type |
|---|---|
arg? | NativeElement |
Returns: QMimeData
Properties
native
• native: NativeElement
nodeChildren
• nodeChildren: Set‹Component›
Inherited from Component.nodeChildren
Optional nodeParent
• nodeParent? : Component
Inherited from Component.nodeParent
Methods
clear
â–¸ clear(): void
Removes all the MIME type and data entries in the object.
Returns: void
hasColor
â–¸ hasColor(): boolean
Returns true if the object can return a color (MIME type application/x-color); otherwise returns false.
Returns: boolean
hasHtml
â–¸ hasHtml(): boolean
Returns true if the object can return HTML (MIME type text/html); otherwise returns false.
Returns: boolean
hasImage
â–¸ hasImage(): boolean
Returns true if the object can return an image; otherwise returns false.
Returns: boolean
hasText
â–¸ hasText(): boolean
Returns true if the object can return plain text (MIME type text/plain); otherwise returns false.
Returns: boolean
hasUrls
â–¸ hasUrls(): boolean
Returns true if the object can return a list of urls; otherwise returns false.
Returns: boolean
html
â–¸ html(): string
Returns a string if the data stored in the object is HTML (MIME type text/html); otherwise returns an empty string.
Returns: string
removeFormat
â–¸ removeFormat(mimeType: string): void
Removes the data entry for mimeType in the object.
Parameters:
| Name | Type |
|---|---|
mimeType | string |
Returns: void
setHtml
â–¸ setHtml(html: string): void
Sets html as the HTML (MIME type text/html) used to represent the data.
Parameters:
| Name | Type |
|---|---|
html | string |
Returns: void
setNodeParent
â–¸ setNodeParent(parent?: Component): void
Inherited from Component.setNodeParent
Parameters:
| Name | Type |
|---|---|
parent? | Component |
Returns: void
setText
â–¸ setText(text: string): void
Sets text as the plain text (MIME type text/plain) used to represent the data.
Parameters:
| Name | Type |
|---|---|
text | string |
Returns: void
setUrls
â–¸ setUrls(urls: [QUrl]): void
Sets the URLs stored in the MIME data object to those specified by urls.
Parameters:
| Name | Type |
|---|---|
urls | [QUrl] |
Returns: void
text
â–¸ text(): string
Returns a plain text (MIME type text/plain) representation of the data.
Returns: string
urls
â–¸ urls(): [QUrl]
Returns a list of URLs contained within the MIME data object.
URLs correspond to the MIME type text/uri-list.
Returns: [QUrl]