Sayonara Player
SayonaraWidgetTemplate.h
1 /* SayonaraWidgetTemplate.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 SAYONARAWIDGETTEMPLATE_H
22 #define SAYONARAWIDGETTEMPLATE_H
23 
24 #include "Helper/Settings/SayonaraClass.h"
25 class QWidget;
26 
27 #define combo_current_index_changed_int static_cast<void (QComboBox::*) (int)>(&QComboBox::currentIndexChanged)
28 #define combo_activated_int static_cast<void (QComboBox::*) (int)>(&QComboBox::activated)
29 #define spinbox_value_changed_int static_cast<void (QSpinBox::*) (int)>(&QSpinBox::valueChanged)
30 
31 
32 template<typename T>
41  public T,
42  protected SayonaraClass
43 {
44 protected:
45 
46 public:
47  explicit SayonaraWidgetTemplate(QWidget* parent=nullptr) :
48  T(parent),
50  {}
51 
52  virtual ~SayonaraWidgetTemplate() {}
53 };
54 
55 #endif // SAYONARAWIDGETTEMPLATE_H
The SayonaraClass class provides access to Settings and notifications.
Definition: SayonaraClass.h:29
Template for Sayonara Widgets. This template is responsible for holding a reference to the settings a...
Definition: SayonaraWidgetTemplate.h:40