summaryrefslogtreecommitdiffstats
path: root/helper.h
diff options
context:
space:
mode:
authorArno <am@disconnect.de>2010-12-30 16:47:46 +0100
committerArno <am@disconnect.de>2010-12-30 16:47:46 +0100
commit3fb9f6fdad018a4a150ef2739730e73e6ed8bf22 (patch)
tree2034348e29a5f31ec5d1a4af1db3c1184b59757d /helper.h
parent3c508cad0032f46be56279f3a3ab5a7df9128bef (diff)
downloadSheMov-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.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/helper.h b/helper.h
index c9d1ad3..5955320 100644
--- a/helper.h
+++ b/helper.h
@@ -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;