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. More...
 
Q_DECL_EXPORT QStringList funcNames (const QString &libPath)
 Generates sorted list of function names. More...
 
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. More...
 
Q_DECL_EXPORT bool move (const QString &src, const QUrl &dest, QWidget *window=0)
 Moves file to remote location. More...
 
Q_DECL_EXPORT QString tempFileName (const QString &suffix=".tmp")
 Generates unique temporary file name. More...
 
Q_DECL_EXPORT QUrl url (const QString &s)
 Returns URL for given user input, assuming local file. More...
 

Detailed Description

Utility namespace.

Provides utility functions in a namespace.

Author
Werner Stille

Function Documentation

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.
Q_DECL_EXPORT QStringList Utils::funcNames ( const QString libPath)

Generates sorted list of function names.

Parameters
libPathpath of function library.
Returns
list of names.
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.
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.
Q_DECL_EXPORT QString Utils::tempFileName ( const QString suffix = ".tmp")

Generates unique temporary file name.

Parameters
suffixfilename suffix.
Returns
full path of temporary file.
Q_DECL_EXPORT QUrl Utils::url ( const QString s)

Returns URL for given user input, assuming local file.

Parameters
suser input string.