kradio4 r778

plugin_configuration_dialog.h

Go to the documentation of this file.
00001 /***************************************************************************
00002                           plugin_configuration_dialog.h  -  description
00003                              -------------------
00004     begin                : Sam Jun 21 2003
00005     copyright            : (C) 2003 by Martin Witte
00006     email                : emw-kradio@nocabal.de
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  ***************************************************************************/
00017 #ifndef KRADIO_PLUGIN_CONFIGURATION_DIALOG
00018 #define KRADIO_PLUGIN_CONFIGURATION_DIALOG
00019 
00020 #ifdef HAVE_CONFIG_H
00021 #include <config.h>
00022 #endif
00023 
00024 #include <kpagedialog.h>
00025 #include "widgetpluginbase.h"
00026 
00027 
00028 #ifdef KRADIO_ENABLE_FIXMES
00029     #warning "FIXME: should we switch to KConfigDialog????"
00030 #endif
00031 class PluginConfigurationDialog : public KPageDialog,
00032                                   public WidgetPluginBase
00033 {
00034 
00035 Q_OBJECT
00036 
00037 public:
00038     PluginConfigurationDialog(
00039         const QString         &instanceID,
00040         KPageDialog::FaceType  dialogFace,
00041         const QString         &caption,
00042         KDialog::ButtonCodes   buttonMask,
00043         KDialog::ButtonCode    defaultButton,
00044         QWidget               *parent    = 0,
00045         const QString         &name      = QString(),
00046         bool                   modal     = true,
00047         bool                   separator = false
00048     );
00049 
00050     // PluginBase
00051 
00052     virtual QString pluginClassName() const { return "PluginConfigurationDialog"; }
00053 
00054     virtual void   saveState    (      KConfigGroup &) const;
00055     virtual void   restoreState (const KConfigGroup &);
00056     virtual void   restoreState (const KConfigGroup &c, bool b) { WidgetPluginBase::restoreState(c,b); }
00057 
00058 
00059 
00060     virtual void noticePluginsChanged(const PluginList &);
00061     virtual void noticePluginRenamed(PluginBase */*p*/, const QString &/*name*/);
00062 
00063 protected :
00064 
00065     virtual ConfigPageInfo  createConfigurationPage();
00066 //     virtual AboutPageInfo   createAboutPage();
00067 
00068     // WidgetPluginBase
00069 
00070 public slots:
00071     virtual void toggleShown() { WidgetPluginBase::pToggleShown(); }
00072     virtual void cancel() { reject(); }
00073 
00074     // QWidget overrides
00075 public:
00076     virtual void setVisible(bool v);
00077 
00078 protected:
00079     virtual void showEvent(QShowEvent *);
00080     virtual void hideEvent(QHideEvent *);
00081 
00082 //     virtual       QWidget *getWidget()         { return this; }
00083 //     virtual const QWidget *getWidget() const   { return this; }
00084 
00085     QString m_Caption;
00086 };
00087 
00088 
00089 #endif
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines