1 | // Copyright (C) 2021 The Qt Company Ltd. |
---|---|
2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only |
3 | |
4 | #ifndef INPUTTAB_H |
5 | #define INPUTTAB_H |
6 | |
7 | #include "converterthread.h" |
8 | |
9 | #include <QWidget> |
10 | #include <QStringList> |
11 | |
12 | QT_BEGIN_NAMESPACE |
13 | class QLineEdit; |
14 | class QPlainTextEdit; |
15 | class QPushButton; |
16 | QT_END_NAMESPACE |
17 | |
18 | class InputListView; |
19 | class SettingsTab; |
20 | |
21 | class InputTab : public QWidget |
22 | { |
23 | Q_OBJECT |
24 | |
25 | public: |
26 | explicit InputTab(SettingsTab *settings, QWidget *parent = nullptr); |
27 | |
28 | QStringList getInputFiles() const; |
29 | QString getOutputPath() const; |
30 | |
31 | void convert(); |
32 | |
33 | private slots: |
34 | void browseInput(); |
35 | void browseOutput(); |
36 | void removeSelected(); |
37 | void selectAll(); |
38 | |
39 | void convertStart(const QString &text); |
40 | void convertUpdate(const QString &text); |
41 | void convertDone(const QString &text); |
42 | |
43 | private: |
44 | SettingsTab *settingsTab = nullptr; |
45 | QLineEdit *outputPathEdit = nullptr; |
46 | InputListView *inputFilesListBox = nullptr; |
47 | QPushButton *convertButton = nullptr; |
48 | QPlainTextEdit *statusText = nullptr; |
49 | |
50 | QString lastInputPath; |
51 | ConverterThread converterThread; |
52 | }; |
53 | |
54 | #endif |
55 |