• Skip to content
  • Skip to link menu
KDE 4.4 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 #ifdef Q_WS_X11
00032 #include <fixx11h.h>
00033 #endif
00034 
00035 class QStringList;
00036 class KAboutData;
00037 class KConfigDialogManager;
00038 class KConfigSkeleton;
00039 class KCModulePrivate;
00040 class KComponentData;
00041 
00042 namespace KAuth {
00043     class Action;
00044 }
00045 
00106 class KDEUI_EXPORT KCModule : public QWidget
00107 {
00108   Q_OBJECT
00109 
00110 public:
00111 
00119   enum Button { NoAdditionalButton=0, Help=1, Default=2, Apply=4 };
00120   Q_DECLARE_FLAGS( Buttons, Button )
00121 
00122 #ifdef KDE3_SUPPORT
00123   KDE_CONSTRUCTOR_DEPRECATED KCModule( QWidget *parent, const char *name, const QStringList& args = QStringList() );
00124 
00125   KDE_CONSTRUCTOR_DEPRECATED KCModule(const KComponentData &componentData, QWidget *parent, const QStringList& args);
00126 #endif
00127 
00134   explicit KCModule(const KComponentData &componentData, QWidget *parent = 0, const QVariantList& args = QVariantList());
00135 
00139   ~KCModule();
00140 
00150   virtual QString quickHelp() const;
00151 
00159   virtual const KAboutData *aboutData() const;
00160 
00164   void setAboutData( const KAboutData* about );
00165 
00174   Buttons buttons() const;
00175 
00188   QString rootOnlyMessage() const;
00189 
00200   bool useRootOnlyMessage() const;
00201 
00202   KComponentData componentData() const;
00203 
00207   QList<KConfigDialogManager*> configs() const;
00208   
00227   void setNeedsAuthorization(bool needsAuth);
00228   
00234   bool needsAuthorization() const;
00235 
00241   KAuth::Action *authAction() const;
00242 
00243 public Q_SLOTS:
00257   virtual void load();
00258 
00278   virtual void save();
00279 
00291   virtual void defaults();
00292 
00293 protected:
00303   KConfigDialogManager* addConfig( KConfigSkeleton *config, QWidget* widget );
00304 
00308   void setQuickHelp( const QString& help );
00309 
00310   virtual void showEvent(QShowEvent *ev);
00311 
00312   friend class KCModuleProxy;
00313 
00314 Q_SIGNALS:
00315 
00323   void changed(bool state);
00324 
00333   void quickHelpChanged();
00334 
00343   void rootOnlyMessageChanged(bool use, QString message);
00344 
00345 protected Q_SLOTS:
00346 
00350   void changed();
00351 
00356    void widgetChanged();
00357    
00361    void authStatusChanged(int);
00362 
00363 protected:
00364 
00379   void setButtons(Buttons btn);
00380 
00389   void setRootOnlyMessage(const QString& message);
00390 
00399   void setUseRootOnlyMessage(bool on);
00400 
00404   bool managedWidgetChangeState() const;
00405 
00410   void unmanagedWidgetChangeState(bool);
00411 
00412 private:
00413   KCModulePrivate *const d;
00414 };
00415 
00416 Q_DECLARE_OPERATORS_FOR_FLAGS( KCModule::Buttons )
00417 
00418 #endif //KCMODULE_H
00419 

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
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUtils
  • Nepomuk
  • Plasma
  •     Sodep
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.5.9-20090814
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