Sayonara Player
GUI_LocalLibrary.h
1 /* GUI_LocalLibrary.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 
22 /*
23  * GUI_LocalLibrary.h
24  *
25  * Created on: Apr 24, 2011
26  * Author: Lucio Carreras
27  */
28 
29 #ifndef GUI_LOCAL_LIBRARY_H_
30 #define GUI_LOCAL_LIBRARY_H_
31 
32 #include "GUI_AbstractLibrary.h"
33 #include "Utils/Pimpl.h"
34 #include "Utils/Library/LibraryNamespaces.h"
35 
36 UI_FWD(GUI_LocalLibrary)
37 
38 namespace Library
39 {
45  public GUI_AbstractLibrary
46  {
47  Q_OBJECT
48  UI_CLASS(GUI_LocalLibrary)
49  PIMPL(GUI_LocalLibrary)
50 
51  public:
52  explicit GUI_LocalLibrary(LibraryId id, QWidget* parent=nullptr);
53  virtual ~GUI_LocalLibrary() override;
54 
55  QMenu* menu() const;
56  QFrame* header_frame() const;
57 
58  protected:
59 
60  bool has_selections() const override;
61  void showEvent(QShowEvent* e) override;
62 
63  TableView* lv_artist() const override;
64  TableView* lv_album() const override;
65  TableView* lv_tracks() const override;
66 
67  SearchBar* le_search() const override;
68  QList<Filter::Mode> search_options() const override;
69 
70  void language_changed() override;
71  void skin_changed() override;
72 
73  private:
74  void check_view_state();
75  void check_reload_status();
76  void check_file_extension_bar();
77 
78  private slots:
79  void tracks_loaded();
80  void switch_album_view();
81  void filter_changed();
82 
83  void progress_changed(const QString& type, int progress);
84 
85  void genre_selection_changed(const QStringList& genres);
86  void invalid_genre_selected();
87 
88  void reload_library_deep_requested();
89  void reload_library_requested();
90  void reload_library_requested_with_quality(ReloadQuality quality);
91  void reload_library_accepted(ReloadQuality quality);
92  void reload_library(ReloadQuality quality);
93  void reload_finished();
94 
95  void import_dirs_requested();
96  void import_files_requested();
97  void name_changed(LibraryId id);
98  void path_changed(LibraryId id);
99 
100  // importer requests dialog
101  void import_dialog_requested(const QString& target_dir);
102 
103  void splitter_artist_moved(int pos, int idx);
104  void splitter_tracks_moved(int pos, int idx);
105  void splitter_genre_moved(int pos, int idx);
106 
107  // reimplemented from Abstract Library
108  TrackDeletionMode show_delete_dialog(int track_count) override;
109  void clear_selections() override;
110 
111  void show_info_box();
112  };
113 }
114 
115 #endif /* GUI_LocalLibrary_H_ */
116 
ReloadQuality
The ReloadQuality enum.
Definition: LibraryNamespaces.h:47
The GUI_LocalLibrary class.
Definition: GUI_LocalLibrary.h:44
The GUI_AbstractLibrary class.
Definition: GUI_AbstractLibrary.h:45
TrackDeletionMode
The TrackDeletionMode enum.
Definition: LibraryNamespaces.h:36
The TableView class.
Definition: TableView.h:36
The searchbar has a special context menu which allows to select the search mode. A special search mod...
Definition: LibrarySearchBar.h:38
An interface class needed when implementing a library plugin.
Definition: LocalLibraryWatcher.h:32
Definition: org_mpris_media_player2_adaptor.h:20