widgetplugins.h

Go to the documentation of this file.
00001 /***************************************************************************
00002                           widgetplugins.h  -  description
00003                              -------------------
00004     begin                : Mi Aug 27 2003
00005     copyright            : (C) 2003 by Martin Witte
00006     email                : witte@kawo1.rwth-aachen.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 
00018 #ifndef KRADIO_WIDGETPLUGINS_INTERFACES_H
00019 #define KRADIO_WIDGETPLUGINS_INTERFACES_H
00020 
00021 #ifdef HAVE_CONFIG_H
00022 #include <config.h>
00023 #endif
00024 
00025 #include "plugins.h"
00026 
00027 class QWidget;
00028 
00029 class WidgetPluginBase : public PluginBase
00030 {
00031 public :
00032     WidgetPluginBase(const QString &name, const QString &description);
00033 
00034     virtual void     saveState    (KConfig *) const;
00035     virtual void     restoreState (KConfig *);
00036     virtual void     restoreState (KConfig *, bool showByDefault);
00037     virtual void     startPlugin();
00038 
00039     virtual       QWidget *getWidget() = 0;
00040     virtual const QWidget *getWidget() const = 0;
00041 
00042     virtual bool           isReallyVisible(const QWidget *w = NULL) const;
00043     virtual bool           isAnywhereVisible(const QWidget *w = NULL) const;
00044     virtual void           showOnOrgDesktop () = 0;
00045 
00046 protected:
00047     virtual void pShowOnOrgDesktop ();
00048     virtual void pShow ();
00049     virtual void pShow (bool show);
00050     virtual void pHide ();
00051     virtual void pToggleShown ();
00052 
00053     virtual void pShowEvent(QShowEvent *);
00054     virtual void pHideEvent(QHideEvent *);
00055 
00056     virtual void notifyManager(bool shown);
00057 
00058     virtual void getKWinState(const QWidget *w = NULL) const;
00059 
00060 protected:
00061     // temporary data
00062     mutable bool        m_geoCacheValid;
00063     mutable bool        m_saveMinimized;
00064     mutable bool        m_saveMaximized;
00065     mutable bool        m_saveSticky;
00066     mutable int         m_saveDesktop;
00067     mutable QRect       m_saveGeometry;
00068 
00069     bool                m_geoRestoreFlag;
00070     bool                m_restoreShow;
00071 };
00072 
00073 
00074 
00075 #endif

Generated on Fri Jan 28 16:28:08 2011 for kradio by  doxygen 1.4.7