blob: 57a9d522137764aaf80e74e7566d6b0f77d95fa1 (
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
|
/*
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 ARCHIVEFILEWIDGET_H
#define ARCHIVEFILEWIDGET_H
#include <QWidget>
#include <QHash>
#include <QList>
#include <QLineEdit>
#include <QSpinBox>
class QTextEdit;
class QComboBox;
class QPushButton;
class QStringList;
class MovieModel;
class ListModel;
class ArchiveFileWidget : public QWidget {
Q_OBJECT
public:
ArchiveFileWidget(MovieModel *model = 0, QWidget *parent = 0, Qt::WindowFlags f = 0);
~ArchiveFileWidget() {};
void setMovieModel(MovieModel *model);
void setGenreModel(ListModel *model);
void setActorsModel(ListModel *model);
void setFiles(const QStringList &files);
const QList<int> actorIds() const;
int genreId() const;
int quality() const { return mQuality->value(); };
const QString movieTitle() const { return mTitle->text(); };
const QHash<QString, QString> md5Sums() const { return mMd5Sums; };
signals:
void statusbarMessage(const QString &message);
void archive();
private slots:
void addActor();
void removeActor();
private:
void createActorList();
MovieModel *mModel;
ListModel *mGenreModel;
ListModel *mActorsModel;
QTextEdit *mFiles;
QTextEdit *mSelectedActors;
QComboBox *mGenre;
QComboBox *mActors;
QPushButton *mAddActor;
QPushButton *mRemoveActor;
QSpinBox *mQuality;
QLineEdit *mTitle;
QStringList mFileList;
QHash<QString, QString> mMd5Sums;
QHash<QString, int> mActorIdMap;
};
#endif
|