1
/***************************************************************************
2
* Copyright (C) 2009 Ben Cooksley <bcooksley@kde.org> *
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
***************************************************************************/
24
#include <QAbstractItemView>
26
#include <KConfigGroup>
27
#include <KConfigDialog>
28
#include <KServiceTypeTrader>
32
#include "ModuleView.h"
34
class BaseMode::Private {
38
QList<QAction*> actionsList;
39
KService::Ptr service;
44
BaseMode::BaseMode( QObject* parent )
55
void BaseMode::init( const KService::Ptr modeService )
57
d->rootItem = BaseData::instance()->menuItem();
58
d->service = modeService;
59
d->config = BaseData::instance()->configGroup( modeService->library() );
61
connect( moduleView(), SIGNAL( moduleChanged( bool ) ), this, SIGNAL( viewChanged( bool ) ) );
64
void BaseMode::initEvent()
68
QWidget * BaseMode::mainWidget()
73
KAboutData * BaseMode::aboutData()
78
ModuleView * BaseMode::moduleView() const
83
QList<QAction*>& BaseMode::actionsList() const
85
return d->actionsList;
88
const KService::Ptr& BaseMode::service() const
93
void BaseMode::searchChanged( const QString& text )
98
void BaseMode::saveState()
102
void BaseMode::leaveModuleView()
106
void BaseMode::giveFocus()
110
void BaseMode::addConfiguration( KConfigDialog * config )
115
void BaseMode::loadConfiguration()
119
void BaseMode::saveConfiguration()
123
MenuItem * BaseMode::rootItem() const
128
KConfigGroup& BaseMode::config() const
133
QList<QAbstractItemView*> BaseMode::views() const
135
return QList<QAbstractItemView*>();
138
#include "BaseMode.moc"