blob: d5097749337fdbef92266b4efa5ca0daa9bd5742 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
|
#ifndef OPTIONSEDITOR_H
#define OPTIONSEDITOR_H
#include <kdialogbase.h>
//#include <kpushbutton.h>
class Options;
class Config;
class TagEngine;
class FileList;
class FileListItem;
class KLineEdit;
class KComboBox;
class KIntSpinBox;
class KTextEdit;
class KPushButton;
class QLabel;
/**
* @short The options edit dialog that can be opened through the file list's context menu
* @author Daniel Faust <[email protected]>
* @version 0.3
*/
class OptionsEditor : public KDialogBase
{
Q_OBJECT
public:
enum Page {
OptionsPage,
TagsPage
};
/**
* Constructor
*/
OptionsEditor( TagEngine*, Config*, FileList* _fileList, QWidget* parent = 0, const char* name=0, Page startPage = OptionsPage );
/**
* Destructor
*/
virtual ~OptionsEditor();
FileListItem* selectedItem();
private:
FileList* fileList;
Config* config;
TagEngine* tagEngine;
QFrame* conversionOptions;
QFrame* tags;
/** The widget, where we can set our output options */
Options* options;
/** A lineedit for entering the title of track */
QLabel* lTitleLabel;
KLineEdit* lTitle;
KPushButton* pTitleEdit;
/** A spinbox for entering or selecting the track number */
QLabel* lNumberLabel;
KIntSpinBox* iNumber;
KPushButton* pNumberEdit;
/** A lineedit for entering the artist of a track */
QLabel* lArtistLabel;
KLineEdit* lArtist;
KPushButton* pArtistEdit;
/** A lineedit for entering the composer of a track */
QLabel* lComposerLabel;
KLineEdit* lComposer;
KPushButton* pComposerEdit;
/** A lineedit for entering the album name */
QLabel* lAlbumLabel;
KLineEdit* lAlbum;
KPushButton* pAlbumEdit;
/** A spinbox for entering or selecting the disc number */
QLabel* lDiscLabel;
KIntSpinBox* iDisc;
KPushButton* pDiscEdit;
/** A spinbox for entering or selecting the year of the album */
QLabel* lYearLabel;
KIntSpinBox* iYear;
KPushButton* pYearEdit;
/** A combobox for entering or selecting the genre of the album */
QLabel* lGenreLabel;
KComboBox* cGenre;
KPushButton* pGenreEdit;
/** A textedit for entering a comment for a track */
QLabel* lCommentLabel;
KTextEdit* tComment;
KPushButton* pCommentEdit;
/** When hitting this button, the options lock (when multiple files are selected) will be deactivated */
QLabel* lEditOptions;
KPushButton* pEditOptions;
/** When hitting this button, the tag lock (when reading tags failed) will be deactivated */
QLabel* lEditTags;
KPushButton* pEditTags;
//FileListItem* currentItem;
QValueList<FileListItem*> selectedItems;
void setTagInputEnabled( bool enabled );
private slots:
void optionsChanged();
void editTitleClicked();
void editNumberClicked();
void editArtistClicked();
void editComposerClicked();
void editAlbumClicked();
void editDiscClicked();
void editYearClicked();
void editGenreClicked();
void editCommentClicked();
void titleChanged( const QString& text );
void numberChanged( int value );
void artistChanged( const QString& text );
void composerChanged( const QString& text );
void albumChanged( const QString& text );
void discChanged( int value );
void yearChanged( int value );
void genreChanged( const QString& text );
void commentChanged();
void editOptionsClicked();
void editTagsClicked();
public slots:
void itemsSelected( QValueList<FileListItem*> );
void setPreviousEnabled( bool );
void setNextEnabled( bool );
//void moveWindow( int x, int y );
signals:
void previousItem();
void nextItem();
};
#endif // OPTIONSEDITOR_H
|