Sayonara Player
GUI_DirectoryWidget.h
1 /* GUI_DirectoryWidget.h */
2 
3 /* Copyright (C) 2011-2017 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 
35  public Gui::Widget,
36  public InfoDialogContainer
37 {
38  Q_OBJECT
39  PIMPL(GUI_DirectoryWidget)
40  UI_CLASS(GUI_DirectoryWidget)
41 
42  public:
43  explicit GUI_DirectoryWidget(QWidget* parent=nullptr);
45 
46  QFrame* header_frame() const;
47 
48  private:
49  void init_shortcuts();
50 
51  private slots:
52  void search_button_clicked();
53  void search_text_edited(const QString& text);
54 
55  void dir_enter_pressed();
56  void dir_opened(QModelIndex idx);
57  void dir_pressed(QModelIndex idx);
58  void dir_clicked(QModelIndex idx);
59  void dir_append_clicked();
60  void dir_play_clicked();
61  void dir_play_next_clicked();
62  void dir_play_new_tab_clicked();
63  void dir_delete_clicked();
64 
65  void file_dbl_clicked(QModelIndex idx);
66  void file_enter_pressed();
67  void file_pressed(QModelIndex idx);
68  void file_append_clicked();
69  void file_play_clicked();
70  void file_play_next_clicked();
71  void file_play_new_tab_clicked();
72  void file_delete_clicked();
73 
74  void import_requested(LibraryId library_id, const QStringList& paths, const QString& target_dir);
75  void import_dialog_requested(const QString& target_dir);
76 
77  void splitter_moved(int pos, int index);
78 
79  void set_lib_path_clicked();
80  void new_library_created();
81  void check_libraries();
82 
83  protected:
84  MD::Interpretation metadata_interpretation() const override;
85  MetaDataList info_dialog_data() const override;
86 
87  void language_changed() override;
88  void skin_changed() override;
89 };
90 
91 #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
Definition: GUI_DirectoryWidget.h:34
Definition: GUI_ControlsBase.h:43
The MetaDataList class.
Definition: MetaDataList.h:37