Sayonara Player
GUI_DirectoryWidget.h
1 /* GUI_DirectoryWidget.h */
2 
3 /* Copyright (C) 2011-2019 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 GUI_DIRECTORYWIDGET_H
22 #define GUI_DIRECTORYWIDGET_H
23 
24 #include "Gui/Utils/Widgets/Widget.h"
25 #include "Gui/InfoDialog/InfoDialogContainer.h"
26 #include "Utils/Pimpl.h"
27 
28 class QPoint;
29 class QFrame;
30 class QComboBox;
31 
32 UI_FWD(GUI_DirectoryWidget)
33 
34 
39  public Gui::Widget,
40  public InfoDialogContainer
41 {
42  Q_OBJECT
43  PIMPL(GUI_DirectoryWidget)
44  UI_CLASS(GUI_DirectoryWidget)
45 
46  public:
47  explicit GUI_DirectoryWidget(QWidget* parent=nullptr);
48  ~GUI_DirectoryWidget() override;
49 
50  QFrame* header_frame() const;
51 
52  private:
53  void init_shortcuts();
54  void create_delete_filescanner(const QStringList& files);
55 
56  private slots:
57  void search_button_clicked();
58  void search_text_edited(const QString& text);
59 
60  void dir_enter_pressed();
61  void dir_opened(QModelIndex idx);
62  void dir_pressed(QModelIndex idx);
63  void dir_clicked(QModelIndex idx);
64  void dir_append_clicked();
65  void dir_play_clicked();
66  void dir_play_next_clicked();
67  void dir_play_new_tab_clicked();
68  void dir_delete_clicked();
69 
70  void file_dbl_clicked(QModelIndex idx);
71  void file_enter_pressed();
72  void file_pressed(QModelIndex idx);
73  void file_append_clicked();
74  void file_play_clicked();
75  void file_play_next_clicked();
76  void file_play_new_tab_clicked();
77  void file_delete_clicked();
78 
79  void import_requested(LibraryId library_id, const QStringList& paths, const QString& target_dir);
80  void import_dialog_requested(const QString& target_dir);
81 
82  void splitter_moved(int pos, int index);
83 
84  void set_lib_path_clicked();
85  void new_library_created();
86  void check_libraries();
87 
88  void scanner_delete_finished();
89 
90  protected:
91  MD::Interpretation metadata_interpretation() const override;
92  MetaDataList info_dialog_data() const override;
93  bool has_metadata() const override;
94  QStringList pathlist() const override;
95 
96  void language_changed() override;
97  void skin_changed() override;
98 };
99 
100 #endif // GUI_DIRECTORYWIDGET_H
MetaDataList
The MetaDataList class.
Definition: MetaDataList.h:37
GUI_DirectoryWidget
The GUI_DirectoryWidget class.
Definition: GUI_DirectoryWidget.h:38
InfoDialogContainer
An interface used to abstract the usage of the info dialog. An implementing class has to return the i...
Definition: InfoDialogContainer.h:61