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 "simpleview-plugin-object.h" 21 22 #include "simpleview.h" 23 24 #include "gui/windows/main-configuration-window-service.h" 25 #include "gui/windows/main-configuration-window.h" 26 #include "misc/paths-provider.h" 27 SimpleviewPluginObject(QObject * parent)28SimpleviewPluginObject::SimpleviewPluginObject(QObject *parent) : 29 QObject{parent} 30 { 31 } 32 ~SimpleviewPluginObject()33SimpleviewPluginObject::~SimpleviewPluginObject() 34 { 35 } 36 setMainConfigurationWindowService(MainConfigurationWindowService * mainConfigurationWindowService)37void SimpleviewPluginObject::setMainConfigurationWindowService(MainConfigurationWindowService *mainConfigurationWindowService) 38 { 39 m_mainConfigurationWindowService = mainConfigurationWindowService; 40 } 41 setPathsProvider(PathsProvider * pathsProvider)42void SimpleviewPluginObject::setPathsProvider(PathsProvider *pathsProvider) 43 { 44 m_pathsProvider = pathsProvider; 45 } 46 setSimpleView(SimpleView * simpleView)47void SimpleviewPluginObject::setSimpleView(SimpleView *simpleView) 48 { 49 m_simpleView = simpleView; 50 } 51 init()52void SimpleviewPluginObject::init() 53 { 54 m_mainConfigurationWindowService->registerUiFile(m_pathsProvider->dataPath() + QStringLiteral("plugins/configuration/simpleview.ui")); 55 } 56 done()57void SimpleviewPluginObject::done() 58 { 59 m_mainConfigurationWindowService->unregisterUiFile(m_pathsProvider->dataPath() + QStringLiteral("plugins/configuration/simpleview.ui")); 60 } 61 62 #include "moc_simpleview-plugin-object.cpp" 63