2012-04-09 21:53:46 +00:00
|
|
|
/*
|
|
|
|
|
* Copyright (C) 2012 Felix Geyer <debfx@fobos.de>
|
|
|
|
|
*
|
|
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
|
* the Free Software Foundation, either version 2 or (at your option)
|
|
|
|
|
* version 3 of the License.
|
|
|
|
|
*
|
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
|
*
|
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#ifndef KEEPASSX_TOOLS_H
|
|
|
|
|
#define KEEPASSX_TOOLS_H
|
|
|
|
|
|
2013-10-03 13:18:16 +00:00
|
|
|
#include <QDateTime>
|
|
|
|
|
#include <QObject>
|
|
|
|
|
#include <QString>
|
2012-04-09 21:53:46 +00:00
|
|
|
|
2012-07-12 11:51:50 +00:00
|
|
|
#include "core/Global.h"
|
|
|
|
|
|
2012-05-02 09:06:24 +00:00
|
|
|
class QIODevice;
|
|
|
|
|
|
2012-04-09 21:53:46 +00:00
|
|
|
namespace Tools {
|
|
|
|
|
|
|
|
|
|
QString humanReadableFileSize(qint64 bytes);
|
2012-04-18 22:04:52 +00:00
|
|
|
bool hasChild(const QObject* parent, const QObject* child);
|
2012-05-10 17:00:36 +00:00
|
|
|
bool readFromDevice(QIODevice* device, QByteArray& data, int size = 16384);
|
2012-05-02 09:06:24 +00:00
|
|
|
bool readAllFromDevice(QIODevice* device, QByteArray& data);
|
2012-05-09 18:29:21 +00:00
|
|
|
QDateTime currentDateTimeUtc();
|
2012-05-10 16:09:42 +00:00
|
|
|
QString imageReaderFilter();
|
2012-05-10 16:34:51 +00:00
|
|
|
bool isHex(const QByteArray& ba);
|
2015-11-01 17:30:50 +00:00
|
|
|
bool isBase64(const QByteArray& ba);
|
2012-07-12 11:51:50 +00:00
|
|
|
void sleep(int ms);
|
|
|
|
|
void wait(int ms);
|
2012-07-18 18:54:26 +00:00
|
|
|
QString platform();
|
2012-10-13 09:05:50 +00:00
|
|
|
void disableCoreDumps();
|
2012-04-09 21:53:46 +00:00
|
|
|
|
2012-04-18 20:08:22 +00:00
|
|
|
} // namespace Tools
|
2012-04-09 21:53:46 +00:00
|
|
|
|
|
|
|
|
#endif // KEEPASSX_TOOLS_H
|