feat: export from local file

This commit is contained in:
Michael Bradley, Jr 2021-09-15 14:25:15 -05:00
parent a431a8bb75
commit e8dcf0a7e2
2 changed files with 14 additions and 7 deletions

View File

@ -61,5 +61,8 @@ proc url_host*(host: string): string =
proc url_replaceHostAndAddPath*(url: string, newHost: string, protocol: string = "", pathPrefix: string = ""): string =
result = $(dos_qurl_replaceHostAndAddPath(url.cstring, protocol.cstring, newHost.cstring, pathPrefix.cstring))
proc url_toLocalFile*(url: string): string =
result = $(dos_to_local_file(url.cstring))
proc url_toLocalFile*(fileUrl: string): string =
result = $(dos_to_local_file(fileUrl.cstring))
proc url_fromLocalFile*(filePath: string): string =
result = $(dos_from_local_file(filePath.cstring))

View File

@ -34,7 +34,7 @@ type
DosQAbstractListModel = distinct pointer
DosStatusEventObject = distinct pointer
DosStatusOSNotificationObject = DosQObject
DosParameterDefinition = object
name: cstring
metaType: cint
@ -348,12 +348,16 @@ proc dos_statusevent_create_osThemeEvent(engine: DosQQmlApplicationEngine): DosS
proc dos_statusevent_delete(vptr: DosStatusEventObject) {.cdecl, dynlib: dynLibName, importc.}
# DosStatusOSNotificationObject
proc dos_statusosnotification_create(): DosStatusOSNotificationObject
proc dos_statusosnotification_create(): DosStatusOSNotificationObject
{.cdecl, dynlib: dynLibName, importc.}
proc dos_statusosnotification_show_notification(vptr: DosStatusOSNotificationObject,
title: cstring, messsage: cstring, identifier: cstring)
title: cstring, messsage: cstring, identifier: cstring)
{.cdecl, dynlib: dynLibName, importc.}
proc dos_statusosnotification_delete(vptr: DosStatusOSNotificationObject)
proc dos_statusosnotification_delete(vptr: DosStatusOSNotificationObject)
{.cdecl, dynlib: dynLibName, importc.}
proc dos_to_local_file(filpath: cstring): cstring {.cdecl, dynlib: dynLibName, importc.}
proc dos_to_local_file(fileUrl: cstring): cstring
{.cdecl, dynlib: dynLibName, importc.}
proc dos_from_local_file(filePath: cstring): cstring
{.cdecl, dynlib: dynLibName, importc.}