1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105
|
/***************************************************************************
* Copyright (C) 2003-2006 by liuspider *
* liuspider@users.sourceforge.net *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
**************************************************************************/
#ifndef KAUTOCMODULE_H
#define KAUTOCMODULE_H
#include <kcmodule.h>
class KConfig;
class KConfigSkeleton;
class KConfigDialogManager;
class KAutoCModule : public KCModule
{
Q_OBJECT
public:
// /**
// * Standard KCModule constructor. Use KGlobal::config()
// */
// KAutoCModule( QWidget * parent = 0, const char * name = 0, const QStringList & args = QStringList() );
/**
* Standard KCModule constructor. Use KGlobal::config()
*/
KAutoCModule( KInstance * instance, QWidget * parent = 0, const QStringList & args = QStringList(), KConfigSkeleton * conf = 0 );
// /**
// * @param config the KConfig to use
// */
// KAutoCModule(KConfig* config, KInstance * instance, QWidget * parent = 0, const QStringList & args = QStringList() );
// /**
// * @param config the KConfig to use
// */
// KAutoCModule(KConfig* config, QWidget * parent = 0, const char * name=0 , const QStringList & args = QStringList() );
~KAutoCModule();
/**
* Set the main widget. @p widget will be lay out to take all available place in the module.
* @p widget must have this module as parent.
*
* This method automatically call KAutoConfig::addWidget() and KAutoConfig::retrieveSettings()
*
* @param widget the widget to place on the page and to add in the KAutoConfig
* @param group the name of the group where settings are stored in the config file
*/
void setMainWidget(QWidget *widget/*, const QString& group*/);
/**
* @brief a reference to the KAutoConfig
*
* You can add or remove manually some widget from the KAutoWidget.
* If you choose to don't add the main widget with setMainWidget() , you need
* to call KAutoConfig::retrieveSettings(true) yourself
*
* @return a reference to the KAutoConfig
*/
KConfigDialogManager *configDialgoMgr();
/**
* Reload the config from the configfile.
*
* You can also reimplement this method, but you should always call the parent KCModule::load()
* be sure you know what you are doing
*/
virtual void load();
/**
* Save the config to the configfile.
*
* You can also reimplement this method, but you should always call the parent KCModule::save()
* be sure you know what you are doing
*/
virtual void save();
/**
* Reload the default config
*
* You can also reimplement this method, but you should always call the parent KCModule::defaults()
* be sure you know what you are doing
*/
virtual void defaults();
protected slots:
/**
* Some setting was modified, updates buttons
*/
virtual void slotWidgetModified();
private:
class KAutoCModulePrivate;
KAutoCModulePrivate * d;
};
#endif
|