• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • kdelibs
  • Sitemap
  • Contact Us
 

KDEUI

kcmodule.h

Go to the documentation of this file.
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., 51 Franklin Street, Fifth Floor,
00019    Boston, MA 02110-1301, USA.
00020 
00021 */
00022 
00023 #ifndef KCMODULE_H
00024 #define KCMODULE_H
00025 
00026 #include <kdeui_export.h>
00027 
00028 #include <QtCore/QVariant>
00029 #include <QtGui/QWidget>
00030 
00031 class QStringList;
00032 class KAboutData;
00033 class KConfigDialogManager;
00034 class KConfigSkeleton;
00035 class KCModulePrivate;
00036 class KComponentData;
00037 
00098 class KDEUI_EXPORT KCModule : public QWidget
00099 {
00100   Q_OBJECT
00101 
00102 public:
00103 
00111   enum Button { NoAdditionalButton=0, Help=1, Default=2, Apply=4 };
00112   Q_DECLARE_FLAGS( Buttons, Button )
00113 
00114 #ifdef KDE3_SUPPORT
00115   KDE_CONSTRUCTOR_DEPRECATED KCModule( QWidget *parent, const char *name, const QStringList& args = QStringList() );
00116 
00117   KDE_CONSTRUCTOR_DEPRECATED KCModule(const KComponentData &componentData, QWidget *parent, const QStringList& args);
00118 #endif
00119 
00126   explicit KCModule(const KComponentData &componentData, QWidget *parent = 0, const QVariantList& args = QVariantList());
00127 
00131   ~KCModule();
00132 
00142   virtual QString quickHelp() const;
00143 
00151   virtual const KAboutData *aboutData() const;
00152 
00156   void setAboutData( const KAboutData* about );
00157 
00166   Buttons buttons() const;
00167 
00180   QString rootOnlyMessage() const;
00181 
00192   bool useRootOnlyMessage() const;
00193 
00194   KComponentData componentData() const;
00195 
00199   QList<KConfigDialogManager*> configs() const;
00200 
00201 public Q_SLOTS:
00215   virtual void load();
00216 
00236   virtual void save();
00237 
00249   virtual void defaults();
00250 
00251 protected:
00261   KConfigDialogManager* addConfig( KConfigSkeleton *config, QWidget* widget );
00262 
00266   void setQuickHelp( const QString& help );
00267 
00268   virtual void showEvent(QShowEvent *ev);
00269 
00270   friend class KCModuleProxy;
00271 
00272 Q_SIGNALS:
00273 
00281   void changed(bool state);
00282 
00291   void quickHelpChanged();
00292 
00293 protected Q_SLOTS:
00294 
00298   void changed();
00299 
00304    void widgetChanged();
00305 
00306 protected:
00307 
00320   void setButtons(Buttons btn);
00321 
00330   void setRootOnlyMessage(const QString& message);
00331 
00340   void setUseRootOnlyMessage(bool on);
00341 
00345   bool managedWidgetChangeState() const;
00346 
00351   void unmanagedWidgetChangeState(bool);
00352 
00353 private:
00354   KCModulePrivate *const d;
00355 };
00356 
00357 Q_DECLARE_OPERATORS_FOR_FLAGS( KCModule::Buttons )
00358 
00359 #endif //KCMODULE_H
00360 

KDEUI

Skip menu "KDEUI"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • Kross
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.5.7
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal