filerenameroptions.h 2.13 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
/**
 * Copyright (C) 2004 Michael Pyne <mpyne@kde.org>
 *
 * This program is free software; you can redistribute it and/or modify it under
 * the terms of the GNU General Public License as published by the Free Software
 * Foundation; either version 2 of the License, or (at your option) any later
 * version.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT ANY
 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
 * PARTICULAR PURPOSE. See the GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License along with
 * this program.  If not, see <http://www.gnu.org/licenses/>.
 */
16

17 18 19 20
#ifndef JUK_FILERENAMEROPTIONS_H
#define JUK_FILERENAMEROPTIONS_H

#include <QDialog>
21

Laurent Montel's avatar
Laurent Montel committed
22
#include "ui_filerenameroptionsbase.h"
23 24 25 26 27
#include "tagrenameroptions.h"

/**
 * Base widget implementing the options for a particular tag type.
 *
28
 * @author Michael Pyne <mpyne@kde.org>
29
 */
30
class FileRenamerTagOptions : public QWidget, public Ui::FileRenamerTagOptionsBase
31 32
{
    Q_OBJECT
33
public:
34 35 36 37
    FileRenamerTagOptions(QWidget *parent, const TagRenamerOptions &options);

    const TagRenamerOptions &options() const { return m_options; }

38
protected slots:
39 40 41 42
    virtual void slotBracketsChanged();
    virtual void slotTrackWidthChanged();
    virtual void slotEmptyActionChanged();

43
private:
44 45 46 47 48 49
    TagRenamerOptions m_options;
};

/**
 * This defines the dialog that actually gets the options from the user.
 *
50
 * @author Michael Pyne <mpyne@kde.org>
51
 */
52
class TagOptionsDialog : public QDialog
53 54 55
{
    Q_OBJECT

56
public:
57
    TagOptionsDialog(QWidget *parent, const TagRenamerOptions &options, unsigned categoryNumber);
58 59 60 61

    const TagRenamerOptions &options() const { return m_options; }

    protected slots:
62
    virtual void accept() override;
63

64
private:
65 66 67 68 69 70 71 72 73 74

    // Private methods

    void loadConfig(); // Loads m_options from KConfig
    void saveConfig(); // Saves m_options to KConfig

    // Private members

    FileRenamerTagOptions *m_widget;
    TagRenamerOptions m_options;
75
    unsigned m_categoryNumber;
76 77
};

78
#endif /* JUK_FILERENAMEROPTIONS_H */
79

80
// vim: set et sw=4 tw=0 sta: