Sayonara Player
GUI_ImportDialog.h
1/* GUIImportFolder.h */
2
3/* Copyright (C) 2011-2020 Michael Lugmair (Lucio Carreras)
4 *
5 * This file is part of sayonara player
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#ifndef GUIIMPORTDIALOG_H_
22#define GUIIMPORTDIALOG_H_
23
24#include "Gui/Utils/Widgets/Dialog.h"
25#include "Components/Library/Importer/LibraryImporter.h"
26#include "Utils/Pimpl.h"
27
28class GUI_TagEdit;
29class LocalLibrary;
30
31UI_FWD(GUI_ImportDialog)
32
34 public Gui::Dialog
35{
36 Q_OBJECT
37 UI_CLASS(GUI_ImportDialog)
38 PIMPL(GUI_ImportDialog)
39
40 signals:
41 void sigProgress(int);
42
43 public:
44 GUI_ImportDialog(LocalLibrary* library, bool copy_enabled, QWidget* parent);
45 ~GUI_ImportDialog() override;
46
47 void setTargetDirectory(const QString& targetDirectory);
48
49 private slots:
50 void accept() override;
51 void reject() override;
52
53 void chooseDirectory();
54 void editPressed();
55 void setMetadata(const MetaDataList& tracks);
56 void setStatus(Library::Importer::ImportStatus status);
57 void setProgress(int percent);
58 void cachedFilesChanged();
59
60 private:
61 QAbstractButton* btnOk();
62 QAbstractButton* btnCancel();
63
64 protected:
65 void showEvent(QShowEvent* e) override;
66};
67
68#endif /* GUIIMPORTFOLDER_H_ */
Definition: GUI_ImportDialog.h:35
Definition: GUI_TagEdit.h:44
Definition: LocalLibrary.h:38
The MetaDataList class.
Definition: MetaDataList.h:39