libkpl  5.0
A Library for Graphical Presentation of Data Sets and Functions
utils.h
1 /***************************************************************************
2  utils.h - description
3  -------------------
4  begin : Sun Jan 7 2001
5  copyright : (C) 2017 by Werner Stille
6  email : kpl@werner-stille.de
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 
18 #ifndef UTILS_H
19 #define UTILS_H
20 
21 class QLibrary;
22 class QString;
23 class QWidget;
24 class QUrl;
25 
30 namespace Utils {
38  Q_DECL_EXPORT bool download(const QUrl& src, QString& target, QWidget* window = 0);
44  Q_DECL_EXPORT QStringList funcNames(const QString& libPath);
52  Q_DECL_EXPORT bool getFuncAddr(const QString& path, const QString& name,
53  QLibrary** lib, QFunctionPointer* fkt);
61  Q_DECL_EXPORT bool move(const QString& src, const QUrl& dest, QWidget* window = 0);
67  Q_DECL_EXPORT QString tempFileName(const QString& suffix = ".tmp");
72  Q_DECL_EXPORT QUrl url(const QString& s);
73 }
74 
75 #endif
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.
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 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.
Utility namespace.
Definition: utils.h:30
Q_DECL_EXPORT bool move(const QString &src, const QUrl &dest, QWidget *window=0)
Moves file to remote location.