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 protected :
00059 
00060     virtual ConfigPageInfo  createConfigurationPage();
00061 //     virtual AboutPageInfo   createAboutPage();
00062 
00063     // WidgetPluginBase
00064 
00065 public slots:
00066     virtual void toggleShown() { WidgetPluginBase::pToggleShown(); }
00067     virtual void cancel() { reject(); }
00068 
00069     // QWidget overrides
00070 public:
00071     virtual void setVisible(bool v);
00072 
00073 protected:
00074     virtual void showEvent(QShowEvent *);
00075     virtual void hideEvent(QHideEvent *);
00076 
00077 //     virtual       QWidget *getWidget()         { return this; }
00078 //     virtual const QWidget *getWidget() const   { return this; }
00079 
00080     QString m_Caption;
00081 };
00082 
00083 
00084 #endif

Generated on Tue Jun 2 19:19:57 2009 for kradio4 by  doxygen 1.5.8