From bb1da332b9a71f59e22b1a9dae42e072e7e32bec Mon Sep 17 00:00:00 2001 From: trialuser02 Date: Sun, 9 Apr 2017 19:57:49 +0000 Subject: added directory name to title formatting options git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@7112 90c681e8-e032-0410-971d-27865f9a5e38 --- src/qmmpui/metadataformatter.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/qmmpui/metadataformatter.h') diff --git a/src/qmmpui/metadataformatter.h b/src/qmmpui/metadataformatter.h index 967087e4f..e28af2826 100644 --- a/src/qmmpui/metadataformatter.h +++ b/src/qmmpui/metadataformatter.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2015 by Ilya Kotov * + * Copyright (C) 2015-2017 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -52,7 +52,8 @@ public: * %y - year, * %l - duration, * %I - track index, - * %if(A,B,C) or %if(A&B&C,D,E) - condition. + * %if(A,B,C) or %if(A&B&C,D,E) - condition, + * %dir(n) - Name of the directory located on \b n levels above. */ MetaDataFormatter(const QString &pattern = QString()); /*! @@ -95,7 +96,8 @@ private: PRINT_TEXT = 0, IF_KEYWORD, OR_OPERATOR, - AND_OPERATOR + AND_OPERATOR, + DIR_FUNCTION } command; QList params; @@ -106,6 +108,7 @@ private: enum { FIELD = 0, TEXT, + NUMERIC, NODES } type; @@ -120,11 +123,13 @@ private: int field; QString text; + int number; QList children; }; bool parseField(QList *nodes, QString::const_iterator *i, QString::const_iterator end); bool parseIf(QList *nodes, QString::const_iterator *i, QString::const_iterator end); + bool parseDir(QList *nodes, QString::const_iterator *i, QString::const_iterator end); void parseText(QList *nodes, QString::const_iterator *i, QString::const_iterator end); void parseEscape(QList *nodes, QString::const_iterator *i, QString::const_iterator end); -- cgit v1.2.3-13-gbd6f