-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfilesbox.h
132 lines (89 loc) · 2.53 KB
/
filesbox.h
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
#ifndef FILESBOX_H
#define FILESBOX_H
#include <QListWidget>
#include <QListView>
#include <QFileSystemModel>
#include <QtWidgets/QAction>
#include <QtWidgets/QApplication>
#include <QtWidgets/QButtonGroup>
#include <QtWidgets/QCheckBox>
#include <QtWidgets/QComboBox>
#include <QtWidgets/QGroupBox>
#include <QtWidgets/QHBoxLayout>
#include <QtWidgets/QHeaderView>
#include <QtWidgets/QLabel>
#include <QtWidgets/QLineEdit>
#include <QtWidgets/QListWidget>
#include <QtWidgets/QPushButton>
#include <QtWidgets/QSpacerItem>
#include <QtWidgets/QVBoxLayout>
#include <QtWidgets/QGroupBox>
#include <QtWidgets/QSpinBox>
enum mediaType{
video,
audio,
subs
};
class FilesBox : public QWidget
{
Q_OBJECT
public:
explicit FilesBox(mediaType type, QWidget *parent = 0);
~FilesBox();
QWidget *getUi();
QListView *getView();
void setNameBox(QString nameBox);
void setRootPath(QString path);
QString getLang();
QString getCharset();
QString getName();
QString getSync();
QString getPathToFolder();
QString getPathToFile(int row);
QString getFileName(int row);
mediaType getMediaType();
int getFilesCount ();
public slots:
void changeFilter(QString filter);
void openFolder();
void closeButtonClicked();
void setItemSelected(int item);
void indexChanged(QModelIndexList);
void useVideoFolderSignal();
signals:
void selectItem(int);
void useVideoFolder(FilesBox*);
void removeMe(FilesBox*);
private slots:
private:
QFileSystemModel *fsmodel;
QListView *listView;
QStringList pathsFiles;
QString sDir;
mediaType boxType;
QWidget *box;
QDir dirFiles;
void createVideoBox();
void createAudioBox();
void createSubsBox();
void addButtons();
void addCharset();
void addNameAndLang();
void addFilter();
void addSync();
void addVideoAudioSpacer();
void setSelected (int n);
QVBoxLayout *boxLayout, *vert2, *vert3;
QHBoxLayout *codepageLayout, *buttonLayout, *checkBoxLayout,
*filterLayout, *nameLayout, *langLayout, *syncLayout;
QPushButton *folderButton, *closeButton;
QLineEdit *filterEdit, *nameEdit;
QComboBox *charsetBox, *langBox;
QLabel *nameLabel, *filterLabel, *codepageLabel, *langLabel,
*syncLabel, *selectedLabel;
QCheckBox *useVideoFolderCheckBox;
QSpacerItem *filterH, *codePageH, *nameHS, *langHS,
*buttonHS1, *buttonHS2, *buttonHS3, *videoAudioV, *syncH, *selectH;
QSpinBox *syncBox;
};
#endif // FILESBOX_H