Debian Codegraph @

src/playlisteditor.hpp

raw
1 /*
2 * This file is part of Bino, a 3D video player.
3 *
4 * Copyright (C) 2023
5 * Martin Lambers <[email protected]>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #pragma once
22
23 #include <QDialog>
24 class QLabel;
25 class QComboBox;
26 class QPushButton;
27 class QTableWidget;
28
29 #include "playlist.hpp"
30
31
32 class PlaylistEntryEditor : public QDialog
33 {
34 Q_OBJECT
35
36 private:
37 QLabel* urlLabel;
38 QComboBox* inputModeBox;
39 QComboBox* surroundModeBox;
40 QComboBox* videoTrackBox;
41 QComboBox* audioTrackBox;
42 QComboBox* subtitleTrackBox;
43
44 void updateBoxStates();
45
46 private slots:
47 void updateEntry();
48 void setFile();
49 void setURL();
50
51 public:
52 PlaylistEntry entry;
53
54 PlaylistEntryEditor(const PlaylistEntry& entry, QWidget* parent);
55 };
56
57 class PlaylistEditor : public QDialog
58 {
59 Q_OBJECT
60
61 private:
62 QTableWidget* table;
63 QPushButton* upBtn;
64 QPushButton* downBtn;
65 QPushButton* addBtn;
66 QPushButton* delBtn;
67 QPushButton* editBtn;
68
69 void updateTable();
70 int selectedRow();
71
72 private slots:
73 void updateButtonState();
74 void up();
75 void down();
76 void add();
77 void del();
78 void edit();
79
80 public:
81 PlaylistEditor(QWidget* parent);
82 };