2
Copyright 2014 Giorgos Tsiapaliokas <giorgos.tsiapaliokas@kde.org>
4
This library is free software; you can redistribute it and/or
5
modify it under the terms of the GNU Library General Public
6
License as published by the Free Software Foundation; either
7
version 2 of the License, or (at your option) any later version.
9
This library is distributed in the hope that it will be useful,
10
but WITHOUT ANY WARRANTY; without even the implied warranty of
11
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12
Library General Public License for more details.
14
You should have received a copy of the GNU Library General Public License
15
along with this library; see the file COPYING.LIB. If not, write to
16
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17
Boston, MA 02110-1301, USA.
20
#include "savesystemviewplugin.h"
21
#include "savesystemview.h"
23
#include <interfaces/icore.h>
24
#include <interfaces/iuicontroller.h>
25
#include <interfaces/iplugincontroller.h>
29
#include <KActionCollection>
30
#include <KLocalizedString>
32
K_PLUGIN_FACTORY(KDevSaveSystemFactory, registerPlugin<SaveSystemViewPlugin>(); )
34
class KDevSaveSystemViewFactory: public KDevelop::IToolViewFactory
37
KDevSaveSystemViewFactory(SaveSystemViewPlugin *plugin)
41
virtual QWidget* create(QWidget *parent = 0)
43
SaveSystemView *view = new SaveSystemView(m_plugin);
44
return QWidget::createWindowContainer(view, parent);
46
virtual Qt::DockWidgetArea defaultPosition()
48
return Qt::LeftDockWidgetArea;
50
virtual QString id() const
52
return "org.kdevelop.SaveSystemView";
55
SaveSystemViewPlugin *m_plugin;
58
SaveSystemViewPlugin::SaveSystemViewPlugin(QObject *parent, const QVariantList&)
59
: IPlugin("kdevsavesystemview", parent),
60
m_factory(new KDevSaveSystemViewFactory(this))
62
setXMLFile("kdevsavesystemview.rc");
63
KDevelop::ICore::self()->uiController()->addToolView(i18n("Save System"), m_factory);
66
SaveSystemViewPlugin::~SaveSystemViewPlugin()
70
void SaveSystemViewPlugin::unload()
72
KDevelop::ICore::self()->uiController()->removeToolView(m_factory);
76
#include "savesystemviewplugin.moc"