kparts Library API Documentation

statusbarextension.h

00001 /* This file is part of the KDE project
00002    Copyright (C) 2003 Daniel Molkentin <molkentin@kde.org>
00003    Copyright (C) 2003 David Faure <faure@kde.org>
00004 
00005    This library is free software; you can redistribute it and/or
00006    modify it under the terms of the GNU Library General Public
00007    License as published by the Free Software Foundation; either
00008    version 2 of the License, or (at your option) any later version.
00009 
00010    This library is distributed in the hope that it will be useful,
00011    but WITHOUT ANY WARRANTY; without even the implied warranty of
00012    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013    Library General Public License for more details.
00014 
00015    You should have received a copy of the GNU Library General Public License
00016    along with this library; see the file COPYING.LIB.  If not, write to
00017    the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00018    Boston, MA 02111-1307, USA.
00019  */
00020 
00021 #ifndef KPARTS_STATUSBAREXTENSION_H
00022 #define KPARTS_STATUSBAREXTENSION_H
00023 
00024 #include <qwidget.h>
00025 #include <qvaluelist.h>
00026 
00027 class KStatusBar;
00028 class KMainWindow;
00029 class QEvent;
00030 
00031 namespace KParts
00032 {
00033 
00034   class ReadOnlyPart;
00035 
00036   // Defined in impl
00037   class StatusBarItem;
00038 
00039 
00051   class StatusBarExtension : public QObject
00052   {
00053     Q_OBJECT
00054 
00055     public:
00056       StatusBarExtension( KParts::ReadOnlyPart *parent, const char *name=0L );
00057       ~StatusBarExtension();
00058 
00080       void addStatusBarItem( QWidget * widget, int stretch, bool permanent );
00081 
00085       void removeStatusBarItem( QWidget * widget );
00086 
00091       KStatusBar* statusBar() const;
00092 
00100       void setStatusBar( KStatusBar* status );
00101 
00106       static StatusBarExtension *childObject( QObject *obj );
00107 
00109       virtual bool eventFilter( QObject *watched, QEvent* ev );
00110 
00111     private:
00112 
00113      QValueList<StatusBarItem> m_statusBarItems; // Our statusbar items
00114      mutable KStatusBar* m_statusBar;
00115 
00116      // for future extensions
00117      class StatusBarExtensionPrivate;
00118      StatusBarExtensionPrivate *d;
00119   };
00120 
00121 }
00122 #endif // KPARTS_STATUSBAREXTENSION_H
00123 
00124 // vim: ts=2 sw=2 et
KDE Logo
This file is part of the documentation for kparts Library Version 3.2.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Fri Jan 21 09:58:11 2005 by doxygen 1.3.6 written by Dimitri van Heesch, © 1997-2003