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/Helper/SayonaraWidget/SayonaraWidget.h"
25 #include "GUI/InfoDialog/InfoDialogContainer.h"
26 #include "Helper/MetaData/MetaDataFwd.h"
27 #include "Helper/Pimpl.h"
28 
29 class QComboBox;
30 namespace Ui { class GUI_DirectoryWidget; }
31 
33  public SayonaraWidget,
34  public InfoDialogContainer
35 
36 {
37  Q_OBJECT
38 
39 public:
40  explicit GUI_DirectoryWidget(QWidget *parent = 0);
41  virtual ~GUI_DirectoryWidget();
42 
43  QComboBox* get_libchooser();
44  void init();
45 
46 
47 private:
48  PIMPL(GUI_DirectoryWidget)
49  Ui::GUI_DirectoryWidget* ui=nullptr;
50 
51 private:
52 
53  void showEvent(QShowEvent* e) override;
54  void init_shortcuts();
55 
56 
57 private slots:
58  void search_button_clicked();
59  void search_term_changed(const QString& term);
60  void directory_loaded(const QString& path);
61  void init_dir_view();
62  void dir_clicked(QModelIndex idx);
63  void dir_pressed(QModelIndex idx);
64  void file_dbl_clicked(QModelIndex idx);
65  void file_pressed(QModelIndex idx);
66 
67  void dir_append_clicked();
68  void dir_play_next_clicked();
69  void dir_delete_clicked();
70 
71  void file_append_clicked();
72  void file_play_next_clicked();
73  void file_delete_clicked();
74  void language_changed() override;
75 
76  // InfoDialogContainer interface
77 protected:
78  MD::Interpretation get_metadata_interpretation() const override;
79  MetaDataList get_data_for_info_dialog() const override;
80 };
81 
82 #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:32
Definition: GUI_SomaFM.h:34
Definition: MetaDataList.h:39
Widget with Settings connection. Also contains triggers for language_changed() and skin_changed() wi...
Definition: SayonaraWidget.h:36
Definition: ui_GUI_DirectoryWidget.h:149