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