Skip to main content

QMimeData

description

Hierarchy

Index

Constructors

Properties

Methods

Constructors

constructor

+ new QMimeData(arg?: NativeElement): QMimeData

Overrides Component.constructor

Parameters:

NameType
arg?NativeElement

Returns: QMimeData

Properties

native

native: NativeElement | null

Inherited from Component.native

Methods

clear

clear(): void

Removes all the MIME type and data entries in the object.

Returns: void


data

data(): Buffer | null

Returns: Buffer | null


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:

NameType
mimeTypestring

Returns: void


setData

setData(mimeType: string, data: Buffer): void

Parameters:

NameType
mimeTypestring
dataBuffer

Returns: void


setHtml

setHtml(html: string): void

Sets html as the HTML (MIME type text/html) used to represent the data.

Parameters:

NameType
htmlstring

Returns: void


setText

setText(text: string): void

Sets text as the plain text (MIME type text/plain) used to represent the data.

Parameters:

NameType
textstring

Returns: void


setUrls

setUrls(urls: []): void

Sets the URLs stored in the MIME data object to those specified by urls.

Parameters:

NameType
urls[]

Returns: void


text

text(): string

Returns a plain text (MIME type text/plain) representation of the data.

Returns: string


urls

urls(): []

Returns a list of URLs contained within the MIME data object.

URLs correspond to the MIME type text/uri-list.

Returns: []