diff options
author | Arno <am@disconnect.de> | 2010-12-30 16:47:46 +0100 |
---|---|---|
committer | Arno <am@disconnect.de> | 2010-12-30 16:47:46 +0100 |
commit | 3fb9f6fdad018a4a150ef2739730e73e6ed8bf22 (patch) | |
tree | 2034348e29a5f31ec5d1a4af1db3c1184b59757d /helper.h | |
parent | 3c508cad0032f46be56279f3a3ab5a7df9128bef (diff) | |
download | SheMov-3fb9f6fdad018a4a150ef2739730e73e6ed8bf22.tar.gz SheMov-3fb9f6fdad018a4a150ef2739730e73e6ed8bf22.tar.bz2 SheMov-3fb9f6fdad018a4a150ef2739730e73e6ed8bf22.zip |
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.
Diffstat (limited to 'helper.h')
-rw-r--r-- | helper.h | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -10,6 +10,7 @@ #include <QPair> #include <QStringList> +#include <QVariant> #include <magic.h> @@ -25,6 +26,7 @@ namespace Helper { const QString createArchivePath(const QString &path, const QString &md5, bool withMd5 = false); QPair<QString, QStringList> 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<QFileInfo, QFileInfo, bool> { public: bool operator()(const QFileInfo &lhs, const QFileInfo &rhs) const; |