1
/***************************************************************************
2
* Copyright (C) 2008 by Volker Lanz <vl@fidra.de> *
4
* This program is free software; you can redistribute it and/or modify *
5
* it under the terms of the GNU General Public License as published by *
6
* the Free Software Foundation; either version 2 of the License, or *
7
* (at your option) any later version. *
9
* This program 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 *
12
* GNU General Public License for more details. *
14
* You should have received a copy of the GNU General Public License *
15
* along with this program; if not, write to the *
16
* Free Software Foundation, Inc., *
17
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
18
***************************************************************************/
20
#include "kparttest.h"
23
#include <kactioncollection.h>
24
#include <kpluginfactory.h>
25
#include <kpluginloader.h>
26
#include <kmessagebox.h>
27
#include <kstandardaction.h>
30
#include <QApplication>
32
KPartTest::KPartTest() :
38
KPluginFactory* factory = KPluginLoader("partitionmanagerpart").factory();
39
m_Part = factory ? factory->create<KParts::ReadOnlyPart>("PartitionManagerPart", this) : NULL;
43
KMessageBox::error(this, "Could not load Partition Manager's KPart");
48
setCentralWidget(m_Part->widget());
50
setupGUI(ToolBar | Keys | StatusBar | Save);
54
void KPartTest::setupActions()
56
KStandardAction::quit(qApp, SLOT(closeAllWindows()), actionCollection());