Sayonara Player
TabMenu.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 "MenuEntry.h"
25 #include "Utils/Pimpl.h"
26 
27 #include <QMenu>
28 
29 namespace Gui
30 {
31  class PreferenceAction;
32 }
33 
39  public Gui::WidgetTemplate<QMenu>
40 {
41  Q_OBJECT
42  PIMPL(PlaylistTabMenu)
43 
44  signals:
45  void sig_delete_clicked();
46  void sig_save_clicked();
47  void sig_save_as_clicked();
48  void sig_close_clicked();
49  void sig_close_others_clicked();
50  void sig_reset_clicked();
51  void sig_rename_clicked();
52  void sig_clear_clicked();
53  void sig_open_file_clicked();
54  void sig_open_dir_clicked();
55  void sig_save_to_file_clicked();
56 
57  protected:
58  void language_changed() override;
59  void skin_changed() override;
60 
61 
62  public:
63  explicit PlaylistTabMenu(QWidget* parent=nullptr);
64  ~PlaylistTabMenu();
65 
66  void show_menu_items(PlaylistMenuEntries entries);
67  void show_close(bool b);
68 
69  void add_preference_action(Gui::PreferenceAction* action);
70 };
71 
72 
73 #endif // PLAYLISTTABMENU_H
Template for Sayonara Widgets. This template is responsible for holding a reference to the settings.
Definition: WidgetTemplate.h:84
The PlaylistTabMenu class.
Definition: TabMenu.h:38
A PreferenceAction can be added to each widget supporting QActions. When triggering this action,...
Definition: PreferenceAction.h:38