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);
49 
50  QFrame* header_frame() const;
51 
52  private:
53  void init_shortcuts();
54 
55  private slots:
56  void search_button_clicked();
57  void search_text_edited(const QString& text);
58 
59  void dir_enter_pressed();
60  void dir_opened(QModelIndex idx);
61  void dir_pressed(QModelIndex idx);
62  void dir_clicked(QModelIndex idx);
63  void dir_append_clicked();
64  void dir_play_clicked();
65  void dir_play_next_clicked();
66  void dir_play_new_tab_clicked();
67  void dir_delete_clicked();
68 
69  void file_dbl_clicked(QModelIndex idx);
70  void file_enter_pressed();
71  void file_pressed(QModelIndex idx);
72  void file_append_clicked();
73  void file_play_clicked();
74  void file_play_next_clicked();
75  void file_play_new_tab_clicked();
76  void file_delete_clicked();
77 
78  void import_requested(LibraryId library_id, const QStringList& paths, const QString& target_dir);
79  void import_dialog_requested(const QString& target_dir);
80 
81  void splitter_moved(int pos, int index);
82 
83  void set_lib_path_clicked();
84  void new_library_created();
85  void check_libraries();
86 
87  protected:
88  MD::Interpretation metadata_interpretation() const override;
89  MetaDataList info_dialog_data() const override;
90 
91  void language_changed() override;
92  void skin_changed() override;
93 };
94 
95 #endif // GUI_DIRECTORYWIDGET_H
An interface used to abstract the usage of the info dialog. An implementing class has to return the i...
Definition: InfoDialogContainer.h:35
The GUI_DirectoryWidget class.
Definition: GUI_DirectoryWidget.h:38
The MetaDataList class.
Definition: MetaDataList.h:37