1
/***************************************************************************
2
begin : Sun Oct 31 2004
3
copyright : (C) 2004 by Michael Pyne
4
email : michael.pyne@kdemail.net
5
***************************************************************************/
7
/***************************************************************************
9
* This program is free software; you can redistribute it and/or modify *
10
* it under the terms of the GNU General Public License as published by *
11
* the Free Software Foundation; either version 2 of the License, or *
12
* (at your option) any later version. *
14
***************************************************************************/
16
#ifndef JUK_CATEGORYREADERINTERFACE_H
17
#define JUK_CATEGORYREADERINTERFACE_H
19
#include "tagrenameroptions.h"
23
template<class T> class QValueList;
26
* This class is used to map categories into values. You should implement the
27
* functionality in a subclass.
29
* @author Michael Pyne <michael.pyne@kdemail.net>
31
class CategoryReaderInterface
34
virtual ~CategoryReaderInterface() { }
37
* Returns the textual representation of \p type, without any processing done
38
* on it. For example, track values shouldn't be expanded out to the minimum
39
* width from this function.
41
* @param category to retrieve the value of.
42
* @return textual representation of that category's value.
44
virtual QString categoryValue(TagType type) const = 0;
47
* Returns the user-specified prefix string for \p category.
49
* @param category the category to retrieve the value for.
50
* @return user-specified prefix string for \p category.
52
virtual QString prefix(TagType category) const = 0;
55
* Returns the user-specified suffix string for \p category.
57
* @param category the category to retrieve the value for.
58
* @return user-specified suffix string for \p category.
60
virtual QString suffix(TagType category) const = 0;
63
* Returns the user-specified empty action for \p category.
65
* @param category the category to retrieve the value for.
66
* @return user-specified empty action for \p category.
68
virtual TagRenamerOptions::EmptyActions emptyAction(TagType category) const = 0;
71
* Returns the user-specified empty text for \p category. This text might
72
* be used to replace an empty value.
74
* @param category the category to retrieve the value for.
75
* @return the user-specified empty text for \p category.
77
virtual QString emptyText(TagType category) const = 0;
79
virtual QValueList<TagType> categoryOrder() const = 0;
81
// You probably shouldn't reimplement this
82
virtual QString value(TagType category) const;
84
virtual QString separator() const = 0;
86
virtual QString musicDirectory() const = 0;
88
virtual int trackWidth() const = 0;
90
virtual bool hasDirSeparator(int index) const = 0;
92
virtual bool isDisabled(TagType category) const = 0;
94
// You probably shouldn't reimplement this
95
virtual bool isRequired(TagType category) const;
97
// You probably shouldn't reimplement this
98
virtual bool isEmpty(TagType category) const;
101
#endif /* JUK_CATEGORYREADERINTERFACE_H */
103
// vim: set et sw=4 ts=4: