Olive
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
exportdialog.h
Go to the documentation of this file.
1 /***
2 
3  Olive - Non-Linear Video Editor
4  Copyright (C) 2019 Olive Team
5 
6  This program is free software: you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation, either version 3 of the License, or
9  (at your option) any later version.
10 
11  This program is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with this program. If not, see <http://www.gnu.org/licenses/>.
18 
19 ***/
20 
21 #ifndef EXPORTDIALOG_H
22 #define EXPORTDIALOG_H
23 
24 #include <QDialog>
25 #include <QComboBox>
26 #include <QSpinBox>
27 #include <QDoubleSpinBox>
28 #include <QLabel>
29 #include <QProgressBar>
30 #include <QGroupBox>
31 
32 #include "timeline/sequence.h"
33 #include "rendering/exportthread.h"
34 
42 class ExportDialog : public QDialog
43 {
44  Q_OBJECT
45 public:
53  explicit ExportDialog(QWidget *parent);
54 
55 private slots:
65  void format_changed(int index);
66 
72  void StartExport();
73 
85  void update_progress_bar(int value, qint64 remaining_ms);
86 
96 
106  void vcodec_changed(int index);
107 
117  void comp_type_changed(int index);
118 
125 
126 private:
130  void setup_ui();
131 
141  void prep_ui_for_render(bool r);
142 
156  void add_codec_to_combobox(QComboBox* box, enum AVCodecID codec);
157 
161  QVector<QString> format_strings;
162 
169 
178 
182  QComboBox* rangeCombobox;
183 
187  QSpinBox* widthSpinbox;
188 
192  QDoubleSpinBox* videobitrateSpinbox;
193 
198 
202  QDoubleSpinBox* framerateSpinbox;
203 
207  QComboBox* vcodecCombobox;
208 
212  QComboBox* acodecCombobox;
213 
218 
223 
227  QProgressBar* progressBar;
228 
232  QComboBox* formatCombobox;
233 
237  QSpinBox* heightSpinbox;
238 
242  QPushButton* export_button;
243 
247  QPushButton* cancel_button;
248 
252  QPushButton* renderCancel;
253 
257  QGroupBox* videoGroupbox;
258 
262  QGroupBox* audioGroupbox;
263 
268 
273 };
274 
275 #endif // EXPORTDIALOG_H
QSpinBox * samplingRateSpinbox
SpinBox for the exported audio&#39;s sample rate.
Definition: exportdialog.h:217
void export_thread_finished()
Slot for the export thread completing (both succeeding and failing)
Definition: exportdialog.cpp:333
QVector< QString > format_strings
Internal array of human-readable names corresponding to enum ExportFormats.
Definition: exportdialog.h:161
void update_progress_bar(int value, qint64 remaining_ms)
Slot for the export thread to update the progress bar&#39;s value.
Definition: exportdialog.cpp:590
QComboBox * acodecCombobox
ComboBox for the exported audio&#39;s codec.
Definition: exportdialog.h:212
QGroupBox * audioGroupbox
GroupBox containing all audio-related UI objects.
Definition: exportdialog.h:262
QComboBox * rangeCombobox
ComboBox for selecting the time range of the Sequence to export.
Definition: exportdialog.h:182
QSpinBox * heightSpinbox
SpinBox for the exported video&#39;s height.
Definition: exportdialog.h:237
void add_codec_to_combobox(QComboBox *box, enum AVCodecID codec)
Retrieves the human-readable name of an AVCodecID and adds it to a QComboBox.
Definition: exportdialog.cpp:121
ExportThread * export_thread_
Pointer to an ExportThread.
Definition: exportdialog.h:168
QComboBox * vcodecCombobox
ComboBox for the exported video codec.
Definition: exportdialog.h:207
void prep_ui_for_render(bool r)
Enables/disables certain UI objects based on the exporting state.
Definition: exportdialog.cpp:372
QProgressBar * progressBar
Progress bar for visually showing the export progress.
Definition: exportdialog.h:227
QDoubleSpinBox * videobitrateSpinbox
SpinBox for the exported video&#39;s bitrate.
Definition: exportdialog.h:192
QSpinBox * audiobitrateSpinbox
SpinBox for the exported audio&#39;s bitrate.
Definition: exportdialog.h:222
Definition: exportthread.h:72
The ExportDialog class.
Definition: exportdialog.h:42
QSpinBox * widthSpinbox
SpinBox for the exported video&#39;s width.
Definition: exportdialog.h:187
void open_advanced_video_dialog()
Slot to open the Advanced Video Dialog.
Definition: exportdialog.cpp:672
QGroupBox * videoGroupbox
GroupBox containing all video-related UI objects.
Definition: exportdialog.h:257
void vcodec_changed(int index)
Slot for when the video codec changes.
Definition: exportdialog.cpp:616
QPushButton * renderCancel
Cancel button to abort the export before completion.
Definition: exportdialog.h:252
void comp_type_changed(int index)
Slot for when the compression type changes.
Definition: exportdialog.cpp:649
QComboBox * formatCombobox
ComboBox for the exported video&#39;s format.
Definition: exportdialog.h:232
qint64 total_export_time_start
Time value set when exporting begins to determine the total duration of the export.
Definition: exportdialog.h:272
void StartExport()
Slot for when the user clicks the Export button.
Definition: exportdialog.cpp:380
QDoubleSpinBox * framerateSpinbox
SpinBox for the exported video&#39;s frame rate.
Definition: exportdialog.h:202
QPushButton * export_button
Export button to trigger the start of an export.
Definition: exportdialog.h:242
void setup_ui()
Function to create UI objects.
Definition: exportdialog.cpp:677
QComboBox * compressionTypeCombobox
ComboBox for the exported video compression type.
Definition: exportdialog.h:267
QPushButton * cancel_button
Dialog cancel button to close this dialog.
Definition: exportdialog.h:247
Definition: exportthread.h:67
void format_changed(int index)
Slot for when the user changes the format.
Definition: exportdialog.cpp:135
ExportDialog(QWidget *parent)
ExportDialog Constructor.
Definition: exportdialog.cpp:71
QLabel * videoBitrateLabel
Label for the exported video&#39;s bitrate - changes depending on the compression type.
Definition: exportdialog.h:197
VideoCodecParams vcodec_params
Struct for advanced video codec parameters.
Definition: exportdialog.h:177