libkpl  5.0
A Library for Graphical Presentation of Data Sets and Functions
Functions
Utils Namespace Reference

Utility namespace. More...

Functions

Q_DECL_EXPORT bool download (const QUrl &src, QString &target, QWidget *window=0)
 Downloads file.
 
Q_DECL_EXPORT QStringList funcNames (const QString &libPath)
 Generates sorted list of function names.
 
Q_DECL_EXPORT bool getFuncAddr (const QString &path, const QString &name, QLibrary **lib, QFunctionPointer *fkt)
 Gets module handle and address of a shared library function.
 
Q_DECL_EXPORT bool move (const QString &src, const QUrl &dest, QWidget *window=0)
 Moves file to remote location.
 
Q_DECL_EXPORT QString tempFileName (const QString &suffix=".tmp")
 Generates unique temporary file name.
 
Q_DECL_EXPORT QUrl url (const QString &s)
 Returns URL for given user input, assuming local file.
 

Detailed Description

Utility namespace.

Provides utility functions in a namespace.

Author
Werner Stille

Function Documentation

◆ download()

Q_DECL_EXPORT bool Utils::download ( const QUrl &  src,
QString &  target,
QWidget *  window = 0 
)

Downloads file.

Parameters
srcsource file.
targetlocal destination.
windowparent widget.
Returns
true for success.

◆ funcNames()

Q_DECL_EXPORT QStringList Utils::funcNames ( const QString &  libPath)

Generates sorted list of function names.

Parameters
libPathpath of function library.
Returns
list of names.

◆ getFuncAddr()

Q_DECL_EXPORT bool Utils::getFuncAddr ( const QString &  path,
const QString &  name,
QLibrary **  lib,
QFunctionPointer *  fkt 
)

Gets module handle and address of a shared library function.

Parameters
pathpath of the library.
namefunction name.
libpointer to library.
fktpointer to function address.

◆ move()

Q_DECL_EXPORT bool Utils::move ( const QString &  src,
const QUrl &  dest,
QWidget *  window = 0 
)

Moves file to remote location.

Parameters
srctemporary source file.
destremote destination.
windowparent widget.
Returns
true for success.

◆ tempFileName()

Q_DECL_EXPORT QString Utils::tempFileName ( const QString &  suffix = ".tmp")

Generates unique temporary file name.

Parameters
suffixfilename suffix.
Returns
full path of temporary file.

◆ url()

Q_DECL_EXPORT QUrl Utils::url ( const QString &  s)

Returns URL for given user input, assuming local file.

Parameters
suser input string.