Sayonara Player
GUI_EditLibrary.h
1 /* GUI_EditLibrary.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 #ifndef GUI_EDITLIBRARY_H
22 #define GUI_EDITLIBRARY_H
23 
24 #include "Utils/Pimpl.h"
25 #include "Gui/Utils/Widgets/Dialog.h"
26 
27 UI_FWD(GUI_EditLibrary)
28 
29 
30 
36  public Gui::Dialog
37 {
38  Q_OBJECT
39  PIMPL(GUI_EditLibrary)
40  UI_CLASS(GUI_EditLibrary)
41 
42 signals:
43  void sig_accepted();
44  void sig_recected();
45 
46 public:
47  explicit GUI_EditLibrary(const QString& name, const QString& path, QWidget *parent = 0);
48  explicit GUI_EditLibrary(QWidget* parent=nullptr);
49  ~GUI_EditLibrary();
50 
54  void reset();
55 
56  enum class EditMode
57  {
58  New=0,
59  Edit=1
60  };
61 
62  QString name() const;
63  QString path() const;
64 
65  bool has_name_changed() const;
66  bool has_path_changed() const;
67 
68  EditMode edit_mode() const;
69 
70 protected:
71  void language_changed() override;
72  void skin_changed() override;
73 
74 private slots:
75  void ok_clicked();
76  void cancel_clicked();
77  void choose_dir_clicked();
78  void name_edited(const QString& text);
79 };
80 
81 #endif // GUI_EDITLIBRARY_H
GUI_EditLibrary
The GUI_EditLibrary class.
Definition: GUI_EditLibrary.h:35