1 /***************************************************************************
2 componentchooser.h - description
4 copyright : (C) 2002 by Joseph Wenninger
6 ***************************************************************************/
8 /***************************************************************************
10 * This program is free software; you can redistribute it and/or modify *
11 * it under the terms of the GNU General Public License version 2 as *
12 * published by the Free Software Foundationi *
14 ***************************************************************************/
16 #ifndef _COMPONENTCHOOSER_H_
17 #define _COMPONENTCHOOSER_H_
19 #include "ui_componentchooser_ui.h"
20 #include "ui_componentconfig_ui.h"
24 #include <QVBoxLayout>
28 class QListWidgetItem
;
31 /* The CfgPlugin class is an exception. It is LGPL. It will be parted of the plugin interface
32 which I plan for KDE 3.2.
38 virtual ~CfgPlugin(){}
39 virtual void load(KConfig
*cfg
)=0;
40 virtual void save(KConfig
*cfg
)=0;
41 virtual void defaults()=0;
44 class CfgComponent
: public QWidget
, public Ui::ComponentConfig_UI
, public CfgPlugin
48 CfgComponent(QWidget
*parent
);
49 virtual ~CfgComponent();
50 virtual void load(KConfig
*cfg
);
51 virtual void save(KConfig
*cfg
);
52 virtual void defaults();
55 QHash
<QString
, QString
> m_lookupDict
,m_revLookupDict
;
58 void slotComponentChanged(const QString
&);
63 class ComponentChooser
: public QWidget
, public Ui::ComponentChooser_UI
69 ComponentChooser(QWidget
*parent
=0);
70 virtual ~ComponentChooser();
73 void restoreDefault();
76 QString latestEditedService
;
77 bool somethingChanged
;
78 QWidget
*configWidget
;
79 QVBoxLayout
*myLayout
;
81 void emitChanged(bool);
82 void slotServiceSelected(QListWidgetItem
*);