From 3fb9f6fdad018a4a150ef2739730e73e6ed8bf22 Mon Sep 17 00:00:00 2001 From: Arno Date: Thu, 30 Dec 2010 16:47:46 +0100 Subject: Enhance filters in SeriesTreeWidget a little more Allow operators in filter. Operators are only valid if it's a NumericQuery. Operators are <>=. Also allow postfixes for numbers: k, m, g for kilobytes, megabytes and gigabytes. Also fix a little usability bug when filtering. If the result set was empty, the root item was collapsed. On the next search with a result, the root item was still collapsed. Since it wasn't shown there was no way to expand it. --- helper.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'helper.h') diff --git a/helper.h b/helper.h index c9d1ad3..5955320 100644 --- a/helper.h +++ b/helper.h @@ -10,6 +10,7 @@ #include #include +#include #include @@ -25,6 +26,7 @@ namespace Helper { 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); class SortFileInfoList : public std::binary_function { public: bool operator()(const QFileInfo &lhs, const QFileInfo &rhs) const; -- cgit v1.2.3-70-g09d2