1
/***************************************************************************
2
* Copyright (C) 2009 by 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
***************************************************************************/
20
#ifndef SETTINGS_BASE_H
21
#define SETTINGS_BASE_H
25
#include "tooltipmanager.h"
26
#include "ui_configDialog.h"
29
#include <QStackedWidget>
33
#include <KActionMenu>
34
#include <KConfigDialog>
35
#include <KXmlGuiWindow>
36
#include <KAboutApplicationDialog>
38
class SettingsBase : public KXmlGuiWindow
43
explicit SettingsBase(QWidget * parent = 0);
48
virtual QSize sizeHint() const;
51
void initApplication();
55
void initMenuList(MenuItem * parent);
60
void viewChange(bool state);
61
void updateViewActions();
62
void changeToolBar( BaseMode::ToolBarItems toolbar );
63
void changeAboutMenu( const KAboutData * menuAbout, KAction * menuItem, QString fallback );
67
QMap<QString, BaseMode *> possibleViews;
68
QList<ToolTipManager*> tooltipManagers;
69
BaseMode * activeView;
71
KLineEdit * searchText;
72
QWidget * spacerWidget;
74
KAction * searchAction;
75
KAction * spacerAction;
76
KAction * configureAction;
79
KAction * aboutViewAction;
80
KAction * aboutModuleAction;
81
KActionMenu * helpActionMenu;
83
KConfigDialog * configDialog;
84
Ui::ConfigDialog configWidget;
85
QButtonGroup viewSelection;
87
QStackedWidget * stackedWidget;
89
MenuItem * rootModule;
91
KService::List categories;
92
KService::List modules;
94
KAboutApplicationDialog * aboutDialog;