Sayonara Player
PlaylistTabMenu.h
1 
2 /* Copyright (C) 2011-2019 Lucio Carreras
3  *
4  * This file is part of sayonara player
5  *
6  * This program is free software: you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation, either version 3 of the License, or
9  * (at your option) any later version.
10 
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15 
16  * You should have received a copy of the GNU General Public License
17  * along with this program. If not, see <http://www.gnu.org/licenses/>.
18  */
19 
20 #ifndef PLAYLISTTABMENU_H
21 #define PLAYLISTTABMENU_H
22 
23 #include "Gui/Utils/Widgets/WidgetTemplate.h"
24 #include "PlaylistMenuEntry.h"
25 #include "Utils/Pimpl.h"
26 
27 #include <QMenu>
28 
29 namespace Gui
30 {
31  class PreferenceAction;
32 }
33 
34 namespace Playlist
35 {
40  class TabMenu :
41  public Gui::WidgetTemplate<QMenu>
42  {
43  Q_OBJECT
44  PIMPL(TabMenu)
45 
46  signals:
47  void sig_delete_clicked();
48  void sig_save_clicked();
49  void sig_save_as_clicked();
50  void sig_close_clicked();
51  void sig_close_others_clicked();
52  void sig_reset_clicked();
53  void sig_rename_clicked();
54  void sig_clear_clicked();
55  void sig_open_file_clicked();
56  void sig_open_dir_clicked();
57  void sig_save_to_file_clicked();
58 
59  protected:
60  void language_changed() override;
61  void skin_changed() override;
62 
63  public:
64  explicit TabMenu(QWidget* parent=nullptr);
65  ~TabMenu() override;
66 
67  void show_menu_items(MenuEntries entries);
68  void show_close(bool b);
69 
70  void add_preference_action(Gui::PreferenceAction* action);
71  };
72 }
73 
74 #endif // PLAYLISTTABMENU_H
Definition: AbstractLibrary.h:36
Template for Sayonara Widgets. This template is responsible for holding a reference to the settings...
Definition: WidgetTemplate.h:84
The PlaylistTabMenu class.
Definition: PlaylistTabMenu.h:40
A PreferenceAction can be added to each widget supporting QActions. When triggering this action...
Definition: PreferenceAction.h:38
Definition: Playlist.h:32