Sayonara Player
GUI_AudioConverter.h
1 /* GUI_AudioConverter.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_AUDIOCONVERTER_H
22 #define GUI_AUDIOCONVERTER_H
23 
24 #include "Interfaces/PlayerPlugin/PlayerPlugin.h"
25 #include "Helper/Playlist/PlaylistMode.h"
26 #include "Components/PlayManager/PlayState.h"
27 
28 namespace Ui { class GUI_AudioConverter; }
29 
30 class EngineHandler;
33 {
34  Q_OBJECT
35 
36 public:
37  explicit GUI_AudioConverter(QWidget *parent=nullptr);
38  virtual ~GUI_AudioConverter();
39 
40  QString get_name() const override;
41  QString get_display_name() const override;
42 
43 
44 private slots:
45  void rb_cbr_toggled(bool b);
46  void rb_vbr_toggled(bool b);
47  void quality_changed(int index);
48  void cb_active_toggled(bool b);
49  void mp3_enc_found();
50  void playstate_changed(PlayState state);
51  void stopped();
52 
53 
54 private:
55  Ui::GUI_AudioConverter* ui=nullptr;
56  EngineHandler* _engine=nullptr;
57  Playlist::Mode _pl_mode;
58  bool _mp3_enc_available;
59 
60 
61 private:
62  void fill_cbr();
63  void fill_vbr();
64  void pl_mode_backup();
65  void pl_mode_restore();
66 
67  void retranslate_ui() override;
68  void init_ui() override;
69 };
70 
71 #endif // GUI_AUDIOCONVERTER_H
The Mode class.
Definition: PlaylistMode.h:31
Definition: GUI_SomaFM.h:34
Definition: GUI_AudioConverter.h:31
The EngineHandler class.
Definition: EngineHandler.h:41
Definition: ui_GUI_AudioConverter.h:100
Interface for PlayerPlugin classes. get_name() and language_changed() must be overwritten.
Definition: PlayerPlugin.h:38
PlayState
The PlayState enum.
Definition: PlayState.h:30