mirror of https://github.com/status-im/nimqml.git
feat: Adding support for copying and downloading an Image
This commit is contained in:
parent
b3309ae7c9
commit
03c8072f89
|
@ -137,6 +137,8 @@ proc dos_qapplication_icon(filename: cstring) {.cdecl, dynlib: dynLibName, impor
|
|||
proc dos_qapplication_delete() {.cdecl, dynlib: dynLibName, importc.}
|
||||
proc dos_qapplication_clipboard_setText(content: cstring) {.cdecl, dynlib: dynLibName, importc.}
|
||||
proc dos_qapplication_installEventFilter(engine: DosStatusEventObject) {.cdecl, dynlib: dynLibName, importc.}
|
||||
proc dos_qapplication_clipboard_setImage(content: cstring) {.cdecl, dynlib: dynLibName, importc.}
|
||||
proc dos_qapplication_download_image(imageSource: cstring, filePath: cstring) {.cdecl, dynlib: dynLibName, importc.}
|
||||
|
||||
# QGuiApplication
|
||||
proc dos_qguiapplication_create() {.cdecl, dynlib: dynLibName, importc.}
|
||||
|
|
|
@ -20,6 +20,12 @@ proc setClipboardText*(text: string = "") =
|
|||
proc installEventFilter*(application: QApplication, event: StatusEventObject) =
|
||||
dos_qapplication_installEventFilter(event.vptr)
|
||||
|
||||
proc setClipboardImage*(text: string = "") =
|
||||
dos_qapplication_clipboard_setImage(text.cstring)
|
||||
|
||||
proc downloadImage*(imageSource: string = "", filePath = "") =
|
||||
dos_qapplication_download_image(imageSource.cstring, filePath.cstring)
|
||||
|
||||
proc delete*(application: QApplication) =
|
||||
## Delete the given QApplication
|
||||
if application.deleted:
|
||||
|
|
Loading…
Reference in New Issue