diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2017-04-09 19:57:49 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2017-04-09 19:57:49 +0000 |
| commit | bb1da332b9a71f59e22b1a9dae42e072e7e32bec (patch) | |
| tree | 8e2d55debe0e4244d04c5d9bf0a717058260701f /src/qmmpui/metadataformatter.h | |
| parent | f164ce6e3299bc82f30990b6006b9d5db19443f7 (diff) | |
| download | qmmp-bb1da332b9a71f59e22b1a9dae42e072e7e32bec.tar.gz qmmp-bb1da332b9a71f59e22b1a9dae42e072e7e32bec.tar.bz2 qmmp-bb1da332b9a71f59e22b1a9dae42e072e7e32bec.zip | |
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
Diffstat (limited to 'src/qmmpui/metadataformatter.h')
| -rw-r--r-- | src/qmmpui/metadataformatter.h | 11 |
1 files changed, 8 insertions, 3 deletions
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<Param> 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<Node> children; }; bool parseField(QList<Node> *nodes, QString::const_iterator *i, QString::const_iterator end); bool parseIf(QList<Node> *nodes, QString::const_iterator *i, QString::const_iterator end); + bool parseDir(QList<Node> *nodes, QString::const_iterator *i, QString::const_iterator end); void parseText(QList<Node> *nodes, QString::const_iterator *i, QString::const_iterator end); void parseEscape(QList<Node> *nodes, QString::const_iterator *i, QString::const_iterator end); |
