tageditor.h 2.09 KB
Newer Older
1 2 3 4 5
/***************************************************************************
                          tageditor.h  -  description
                             -------------------
    begin                : Sat Sep 7 2002
    copyright            : (C) 2002 by Scott Wheeler
6
    email                : wheeler@kde.org
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   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.                                   *
 *                                                                         *
 ***************************************************************************/

#ifndef TAGEDITOR_H
#define TAGEDITOR_H

#include <kcombobox.h>
#include <klineedit.h>
#include <knuminput.h>
#include <keditcl.h>

#include "tag.h"
#include "playlistitem.h"
28
#include "collectionlist.h"
29 30 31 32 33 34 35 36 37 38 39
#include "genrelist.h"

class TagEditor : public QWidget
{
    Q_OBJECT

public: 
    TagEditor(QWidget *parent = 0, const char *name = 0);
    virtual ~TagEditor();

public slots:
40
    void setItems(const PlaylistItemList &list);
41 42 43
    void refresh();
    void clear();
    void save();
44
    void updateCollection();
45 46 47 48 49 50 51 52
    
signals:
    void changed();

private:
    void setupLayout();
    void readConfig();
    void saveConfig();
53
    void save(const PlaylistItemList &list);
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68
    void saveChangesPrompt();

    GenreList *genreList;

    KComboBox *artistNameBox;
    KLineEdit *trackNameBox;
    KComboBox *albumNameBox;
    KComboBox *genreBox;
    KLineEdit *fileNameBox;
    KIntSpinBox *trackSpin;
    KIntSpinBox *yearSpin;
    KLineEdit *lengthBox;
    KLineEdit *bitrateBox;
    KEdit *commentBox;

69
    PlaylistItemList items;
70 71 72 73 74 75 76 77 78
    
    bool dataChanged;

private slots:
    void setDataChanged(bool c = true);

};

#endif