kdeui Library API Documentation

kmenubar.h

00001 /* This file is part of the KDE libraries
00002     Copyright (C) 1997, 1998, 1999, 2000  Sven Radej (radej@kde.org)
00003     Copyright (C) 1997, 1998, 1999, 2000 Matthias Ettrich (ettrich@kde.org)
00004     Copyright (C) 1999, 2000 Daniel "Mosfet" Duley (mosfet@kde.org)
00005 
00006 
00007     This library is free software; you can redistribute it and/or
00008     modify it under the terms of the GNU Library General Public
00009     License as published by the Free Software Foundation; either
00010     version 2 of the License, or (at your option) any later version.
00011 
00012     This library is distributed in the hope that it will be useful,
00013     but WITHOUT ANY WARRANTY; without even the implied warranty of
00014     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015     Library General Public License for more details.
00016 
00017     You should have received a copy of the GNU Library General Public License
00018     along with this library; see the file COPYING.LIB.  If not, write to
00019     the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00020     Boston, MA 02111-1307, USA.
00021 */
00022 
00023 //$Id: kmenubar.h,v 1.61.2.1 2004/04/19 11:53:37 lunakl Exp $
00024 
00025 #ifndef _KMENUBAR_H
00026 #define _KMENUBAR_H
00027 
00028 #include <qmenubar.h>
00029 
00040 class KMenuBar : public QMenuBar
00041 {
00042     Q_OBJECT
00043 
00044 public:
00045 
00046     KMenuBar (QWidget *parent=0, const char *name=0);
00047     ~KMenuBar ();
00048 
00066     void setTopLevelMenu(bool top_level = true);
00067 
00073     bool isTopLevelMenu() const;
00074 
00075     // TT are overloading virtuals :(
00076     virtual void setGeometry( const QRect &r );
00077     virtual void setGeometry( int x, int y, int w, int h );
00078     virtual void resize( int w, int h );
00079     void resize( const QSize& s ) { QMenuBar::resize( s ); }
00080 
00081     virtual void show();
00082     virtual void setFrameStyle( int );
00083     virtual void setLineWidth( int );
00084     virtual void setMargin( int );
00085 protected slots:
00086     void slotReadConfig();
00087 protected:
00088     virtual void showEvent( QShowEvent* );
00089     virtual void resizeEvent( QResizeEvent* );
00090     virtual bool eventFilter(QObject *, QEvent *);
00091     virtual bool x11Event( XEvent* );
00092     virtual void closeEvent( QCloseEvent* );
00093 private slots:
00094     void updateFallbackSize();
00095     void selectionTimeout();
00096 private:
00097     void setTopLevelMenuInternal(bool top_level);
00098     void checkSize( int& w, int& h );
00099     static int block_resize;
00100 protected:
00101     virtual void virtual_hook( int id, void* data );
00102 private:
00103     class KMenuBarPrivate;
00104     KMenuBarPrivate *d;
00105 };
00106 
00107 #endif
KDE Logo
This file is part of the documentation for kdeui Library Version 3.2.3.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Thu Sep 30 05:16:50 2004 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2003