/* 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 of the License, or (at your option) any later version. */ #ifndef HELPER_H #define HELPER_H #include #include #include #include class QString; class QFileInfo; class QPixmap; namespace Helper { const QString mimeType(const QString &path); const QString md5Sum(const QString &path); const QString moveToArchive(const QString &path, const QString &md5, bool copy = false); bool removeFromArchive(const QString &filename, const QString &md5); const QString createArchivePath(const QString &path, const QString &md5, bool withMd5 = false); QPair programData(const QString &prefix, const QString &preferred = QString()); const QString durationFromSecs(qint64 secs); QVariant bytesFromUnit(QVariant number, const QString unit); const QStringList toStringList(const QList &list); const QString colorToHtml(const QColor &color); class SortFileInfoList : public std::binary_function { public: bool operator()(const QFileInfo &lhs, const QFileInfo &rhs) const; }; class FileInfoListContains : public std::binary_function { public: bool operator()(const QFileInfo &info, const QString &file) const; }; void centerWidget(QWidget *widget); } #endif