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