delay a few things on startup, such as setting the visibility mode, which ensures...
[personal-kdebase.git] / runtime / kcontrol / componentchooser / componentchooser.h
blob050a0b50d60acb4b301af3c6ad2fe0d36f9f97f5
1 /***************************************************************************
2 componentchooser.h - description
3 -------------------
4 copyright : (C) 2002 by Joseph Wenninger
5 email : jowenn@kde.org
6 ***************************************************************************/
8 /***************************************************************************
9 * *
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 *
13 * *
14 ***************************************************************************/
16 #ifndef _COMPONENTCHOOSER_H_
17 #define _COMPONENTCHOOSER_H_
19 #include "ui_componentchooser_ui.h"
20 #include "ui_componentconfig_ui.h"
21 #include <QHash>
23 //Added by qt3to4:
24 #include <QVBoxLayout>
26 #include <kservice.h>
28 class QListWidgetItem;
29 class KConfig;
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.
34 class CfgPlugin
36 public:
37 CfgPlugin(){}
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
46 Q_OBJECT
47 public:
48 CfgComponent(QWidget *parent);
49 virtual ~CfgComponent();
50 virtual void load(KConfig *cfg);
51 virtual void save(KConfig *cfg);
52 virtual void defaults();
54 protected:
55 QHash<QString, QString> m_lookupDict,m_revLookupDict;
57 protected Q_SLOTS:
58 void slotComponentChanged(const QString&);
59 Q_SIGNALS:
60 void changed(bool);
63 class ComponentChooser : public QWidget, public Ui::ComponentChooser_UI
66 Q_OBJECT
68 public:
69 ComponentChooser(QWidget *parent=0);
70 virtual ~ComponentChooser();
71 void load();
72 void save();
73 void restoreDefault();
75 private:
76 QString latestEditedService;
77 bool somethingChanged;
78 QWidget *configWidget;
79 QVBoxLayout *myLayout;
80 protected Q_SLOTS:
81 void emitChanged(bool);
82 void slotServiceSelected(QListWidgetItem *);
84 Q_SIGNALS:
85 void changed(bool);
90 #endif