| # kdeui Library API Documentation
Overview | Class Hierarchy | Classes | Classes (annotated) | Members | Source Files

# kcmodule.h

    00001 /*
    00002    This file is part of the KDE libraries
    00003
    00004    Copyright (c) 1999 Matthias Hoelzer-Kluepfel <hoelzer@kde.org>
    00005
    00006    This library is free software; you can redistribute it and/or
    00007    modify it under the terms of the GNU Library General Public
    00008    License as published by the Free Software Foundation; either
    00009    version 2 of the License, or (at your option) any later version.
    00010
    00011    This library is distributed in the hope that it will be useful,
    00012    but WITHOUT ANY WARRANTY; without even the implied warranty of
    00013    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    00014    Library General Public License for more details.
    00015
    00016    You should have received a copy of the GNU Library General Public License
    00017    along with this library; see the file COPYING.LIB.  If not, write to
    00018    the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    00019    Boston, MA 02111-1307, USA.
    00020
    00021 */
    00022 #ifndef __KCMODULE_H__
    00023 #define __KCMODULE_H__
    00024
    00025 #include <qwidget.h>
    00026 #include <qstringlist.h>
    00027 class KAboutData;
    00028 class KCModulePrivate;
    00029 class KInstance;
    00030
    00062 class KCModule : public QWidget
    00063 {
    00064   Q_OBJECT
    00065
    00066 public:
    00067
    00074   enum Button {Help=1, Default=2, Apply=16,
    00075                Reset=4, /* obsolete, do not use! */
    00076                Cancel=8, /* obsolete, do not use! */
    00077                Ok=32, /* obsolete, do not use! */
    00078                SysDefault=64 /* obsolete, do not use! */ };
    00079
    00080   /*
    00081    * Base class for all KControlModules.
    00082    * Make sure you have a QStringList argument in your
    00083    * implementation.
    00084    */
    00085   KCModule(QWidget *parent=0, const char *name=0, const QStringList &args=QStringList() );
    00086
    00087   KCModule(KInstance *instance, QWidget *parent=0, const QStringList &args=QStringList() );
    00088
    00089   /*
    00090    * Destroys the module.
    00091    */
    00092   ~KCModule();
    00093
    00108   virtual void load() {};
    00109
    00121   virtual void save() {};
    00122
    00129   virtual void defaults() {};
    00130
    00139   virtual void sysdefaults() { defaults(); };
    00140
    00150   virtual QString quickHelp() const { return QString::null; };
    00151
    00157   virtual const KAboutData *aboutData() const { return 0; }
    00158
    00167   int buttons() const { return _btn; };
    00168
    00181   QString rootOnlyMsg() const;
    00182
    00193   bool useRootOnlyMsg() const;
    00194
    00195
    00196   KInstance *instance() const;
    00197
    00198 signals:
    00199
    00208   void changed(bool state);
    00209
    00218   void quickHelpChanged();
    00219
    00220 protected:
    00221
    00234   void setButtons(int btn) { _btn = btn; };
    00235
    00245   void setRootOnlyMsg(const QString& msg);
    00246
    00255   void setUseRootOnlyMsg(bool on);
    00256
    00257 private:
    00258
    00259   int _btn;
    00260 protected:
    00261   virtual void virtual_hook( int id, void* data );
    00262 private:
    00263   KCModulePrivate *d;
    00264 };
    00265
    00266 #endif

This file is part of the documentation for kdelibs Version 3.1.5.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Wed Jan 28 12:56:15 2004 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2001