1 /*
2  * %kadu copyright begin%
3  * Copyright 2015 Rafał Przemysław Malinowski (rafal.przemyslaw.malinowski@gmail.com)
4  * %kadu copyright end%
5  *
6  * This program is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License as
8  * published by the Free Software Foundation; either version 2 of
9  * the License, or (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 #include "sound-chat-configuration-widget-factory.h"
21 
22 #include "gui/sound-chat-configuration-widget.h"
23 #include "plugin/plugin-injected-factory.h"
24 #include "sound-manager.h"
25 
SoundChatConfigurationWidgetFactory(QObject * parent)26 SoundChatConfigurationWidgetFactory::SoundChatConfigurationWidgetFactory(QObject *parent) :
27 		QObject{parent}
28 {
29 }
30 
~SoundChatConfigurationWidgetFactory()31 SoundChatConfigurationWidgetFactory::~SoundChatConfigurationWidgetFactory()
32 {
33 }
34 
setPluginInjectedFactory(PluginInjectedFactory * pluginInjectedFactory)35 void SoundChatConfigurationWidgetFactory::setPluginInjectedFactory(PluginInjectedFactory *pluginInjectedFactory)
36 {
37 	m_pluginInjectedFactory = pluginInjectedFactory;
38 }
39 
setSoundManager(SoundManager * soundManager)40 void SoundChatConfigurationWidgetFactory::setSoundManager(SoundManager *soundManager)
41 {
42 	m_soundManager = soundManager;
43 }
44 
createWidget(const Chat & chat,QWidget * parent)45 ChatConfigurationWidget * SoundChatConfigurationWidgetFactory::createWidget(const Chat &chat, QWidget *parent)
46 {
47 	return m_pluginInjectedFactory->makeInjected<SoundChatConfigurationWidget>(chat, m_soundManager, parent);
48 }
49