~neon/juk/master

1264 by Michael Pyne
GUI: Overhaul the file renamer configuration dialog based on a design of Scott's. This involved a lot more code than I thought at first, but it should be pretty neat.
1
/***************************************************************************
2
    begin                : Sun Oct 31 2004
3
    copyright            : (C) 2004 by Michael Pyne
4
    email                : michael.pyne@kdemail.net
5
***************************************************************************/
6
7
/***************************************************************************
8
 *                                                                         *
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.                                   *
13
 *                                                                         *
14
 ***************************************************************************/
15
1564 by Michael Pyne
Also standardize all of the JuK include header guards, to the most common style to save me
16
#ifndef CATEGORYREADERINTERFACE_H
17
#define CATEGORYREADERINTERFACE_H
1264 by Michael Pyne
GUI: Overhaul the file renamer configuration dialog based on a design of Scott's. This involved a lot more code than I thought at first, but it should be pretty neat.
18
1553 by Scott Wheeler
Since 3.5 devel seems to have mostly slowed down, I'm synching with the branch
19
#include "tagrenameroptions.h"
1713 by Tim Beaulen
Next step in porting Qt3 functions to Qt4 functions
20
1553 by Scott Wheeler
Since 3.5 devel seems to have mostly slowed down, I'm synching with the branch
21
enum TagType;
1713 by Tim Beaulen
Next step in porting Qt3 functions to Qt4 functions
22
1264 by Michael Pyne
GUI: Overhaul the file renamer configuration dialog based on a design of Scott's. This involved a lot more code than I thought at first, but it should be pretty neat.
23
class QString;
24
1713 by Tim Beaulen
Next step in porting Qt3 functions to Qt4 functions
25
template<class T> class QList;
1264 by Michael Pyne
GUI: Overhaul the file renamer configuration dialog based on a design of Scott's. This involved a lot more code than I thought at first, but it should be pretty neat.
26
27
/**
28
 * This class is used to map categories into values.  You should implement the
29
 * functionality in a subclass.
30
 *
31
 * @author Michael Pyne <michael.pyne@kdemail.net>
32
 */
33
class CategoryReaderInterface
34
{
35
public:
36
    virtual ~CategoryReaderInterface() { }
37
1269 by Scott Wheeler
CVS_SILENT indent the API docs as is standard KDE / doxygen style
38
    /**
39
     * Returns the textual representation of \p type, without any processing done
40
     * on it.  For example, track values shouldn't be expanded out to the minimum
1553 by Scott Wheeler
Since 3.5 devel seems to have mostly slowed down, I'm synching with the branch
41
     * width from this function.  No CategoryID is needed since the value is constant
42
     * for a category.
1269 by Scott Wheeler
CVS_SILENT indent the API docs as is standard KDE / doxygen style
43
     *
1553 by Scott Wheeler
Since 3.5 devel seems to have mostly slowed down, I'm synching with the branch
44
     * @param type, The category to retrieve the value of.
1269 by Scott Wheeler
CVS_SILENT indent the API docs as is standard KDE / doxygen style
45
     * @return textual representation of that category's value.
46
     */
1264 by Michael Pyne
GUI: Overhaul the file renamer configuration dialog based on a design of Scott's. This involved a lot more code than I thought at first, but it should be pretty neat.
47
    virtual QString categoryValue(TagType type) const = 0;
48
1269 by Scott Wheeler
CVS_SILENT indent the API docs as is standard KDE / doxygen style
49
    /**
50
     * Returns the user-specified prefix string for \p category.
51
     *
52
     * @param category the category to retrieve the value for.
53
     * @return user-specified prefix string for \p category.
54
     */
1553 by Scott Wheeler
Since 3.5 devel seems to have mostly slowed down, I'm synching with the branch
55
    virtual QString prefix(const CategoryID &category) const = 0;
1264 by Michael Pyne
GUI: Overhaul the file renamer configuration dialog based on a design of Scott's. This involved a lot more code than I thought at first, but it should be pretty neat.
56
1269 by Scott Wheeler
CVS_SILENT indent the API docs as is standard KDE / doxygen style
57
    /**
58
     * Returns the user-specified suffix string for \p category.
59
     *
60
     * @param category the category to retrieve the value for.
61
     * @return user-specified suffix string for \p category.
62
     */
1553 by Scott Wheeler
Since 3.5 devel seems to have mostly slowed down, I'm synching with the branch
63
    virtual QString suffix(const CategoryID &category) const = 0;
1264 by Michael Pyne
GUI: Overhaul the file renamer configuration dialog based on a design of Scott's. This involved a lot more code than I thought at first, but it should be pretty neat.
64
1269 by Scott Wheeler
CVS_SILENT indent the API docs as is standard KDE / doxygen style
65
    /**
66
     * Returns the user-specified empty action for \p category.
67
     *
68
     * @param category the category to retrieve the value for.
69
     * @return user-specified empty action for \p category.
70
     */
1553 by Scott Wheeler
Since 3.5 devel seems to have mostly slowed down, I'm synching with the branch
71
    virtual TagRenamerOptions::EmptyActions emptyAction(const CategoryID &category) const = 0;
1264 by Michael Pyne
GUI: Overhaul the file renamer configuration dialog based on a design of Scott's. This involved a lot more code than I thought at first, but it should be pretty neat.
72
1269 by Scott Wheeler
CVS_SILENT indent the API docs as is standard KDE / doxygen style
73
    /**
74
     * Returns the user-specified empty text for \p category.  This text might
75
     * be used to replace an empty value.
76
     *
77
     * @param category the category to retrieve the value for.
78
     * @return the user-specified empty text for \p category.
79
     */
1553 by Scott Wheeler
Since 3.5 devel seems to have mostly slowed down, I'm synching with the branch
80
    virtual QString emptyText(const CategoryID &category) const = 0;
81
82
    /**
83
     * @return the categories in the order the user has chosen.  Categories may
84
     * be repeated (which is why CategoryID has the categoryNumber value to
85
     * disambiguate duplicates).
86
     */
1713 by Tim Beaulen
Next step in porting Qt3 functions to Qt4 functions
87
    virtual QList<CategoryID> categoryOrder() const = 0;
1553 by Scott Wheeler
Since 3.5 devel seems to have mostly slowed down, I'm synching with the branch
88
89
    /**
90
     * @return track width for the Track item identified by categoryNum.
91
     */
1566 by Scott Wheeler
Fix a few more classes.
92
    virtual int trackWidth(int categoryNum) const = 0;
1264 by Michael Pyne
GUI: Overhaul the file renamer configuration dialog based on a design of Scott's. This involved a lot more code than I thought at first, but it should be pretty neat.
93
94
    // You probably shouldn't reimplement this
1553 by Scott Wheeler
Since 3.5 devel seems to have mostly slowed down, I'm synching with the branch
95
    virtual QString value(const CategoryID &category) const;
1264 by Michael Pyne
GUI: Overhaul the file renamer configuration dialog based on a design of Scott's. This involved a lot more code than I thought at first, but it should be pretty neat.
96
97
    virtual QString separator() const = 0;
98
1268 by Scott Wheeler
s/directory/folder/g
99
    virtual QString musicFolder() const = 0;
1264 by Michael Pyne
GUI: Overhaul the file renamer configuration dialog based on a design of Scott's. This involved a lot more code than I thought at first, but it should be pretty neat.
100
1553 by Scott Wheeler
Since 3.5 devel seems to have mostly slowed down, I'm synching with the branch
101
    /**
102
     * @param index the zero-based index of the item just before the
103
     *        separator in question.
104
     * @return true if a folder separator should be placed between the tags
105
     * at index and index + 1.
106
     */
1566 by Scott Wheeler
Fix a few more classes.
107
    virtual bool hasFolderSeparator(int index) const = 0;
1553 by Scott Wheeler
Since 3.5 devel seems to have mostly slowed down, I'm synching with the branch
108
109
    virtual bool isDisabled(const CategoryID &category) const = 0;
1264 by Michael Pyne
GUI: Overhaul the file renamer configuration dialog based on a design of Scott's. This involved a lot more code than I thought at first, but it should be pretty neat.
110
111
    // You probably shouldn't reimplement this
1553 by Scott Wheeler
Since 3.5 devel seems to have mostly slowed down, I'm synching with the branch
112
    virtual bool isRequired(const CategoryID &category) const;
1264 by Michael Pyne
GUI: Overhaul the file renamer configuration dialog based on a design of Scott's. This involved a lot more code than I thought at first, but it should be pretty neat.
113
114
    // You probably shouldn't reimplement this
115
    virtual bool isEmpty(TagType category) const;
1553 by Scott Wheeler
Since 3.5 devel seems to have mostly slowed down, I'm synching with the branch
116
117
    // You probably shouldn't reimplement this
1566 by Scott Wheeler
Fix a few more classes.
118
    virtual QString fixupTrack(const QString &track, int categoryNum) const;
1264 by Michael Pyne
GUI: Overhaul the file renamer configuration dialog based on a design of Scott's. This involved a lot more code than I thought at first, but it should be pretty neat.
119
};
120
1564 by Michael Pyne
Also standardize all of the JuK include header guards, to the most common style to save me
121
#endif /* CATEGORYREADERINTERFACE_H */
1264 by Michael Pyne
GUI: Overhaul the file renamer configuration dialog based on a design of Scott's. This involved a lot more code than I thought at first, but it should be pretty neat.
122
1562 by Michael Pyne
Since we're standardizing the source style, figured I'd throw in the Big Huge Vim Modeline
123
// vim: set et sw=4 tw=0 sta: