kdeui Library: kmenubar.h Source File (kdeui Library)

| # kdeui Library API Documentation
Overview | Class Hierarchy | Classes | Classes (annotated) | Members | Namespaces | Source Files

# 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 392834 2005-02-24 15:55:43Z lunakl $
    00024
    00025 #ifndef _KMENUBAR_H
    00026 #define _KMENUBAR_H
    00027
    00028 #include <qmenubar.h>
    00029
    00030 #include <kdelibs_export.h>
    00031
    00042 class KDEUI_EXPORT KMenuBar : public QMenuBar
    00043 {
    00044     Q_OBJECT
    00045
    00046 public:
    00047
    00048     KMenuBar (QWidget *parent=0, const char *name=0);
    00049     ~KMenuBar ();
    00050
    00068     void setTopLevelMenu(bool top_level = true);
    00069
    00075     bool isTopLevelMenu() const;
    00076
    00077     // TT are overloading virtuals :(
    00078     virtual void setGeometry( const QRect &r );
    00079     virtual void setGeometry( int x, int y, int w, int h );
    00080     virtual void resize( int w, int h );
    00081     void resize( const QSize& s ) { QMenuBar::resize( s ); }
    00082
    00083     virtual void show();
    00084     virtual void setFrameStyle( int );
    00085     virtual void setLineWidth( int );
    00086     virtual void setMargin( int );
    00087     virtual QSize sizeHint() const;
    00088 protected slots:
    00089     void slotReadConfig();
    00090 protected:
    00091     virtual void showEvent( QShowEvent* );
    00092     virtual void resizeEvent( QResizeEvent* );
    00093     virtual bool eventFilter(QObject *, QEvent *);
    00094 #ifdef Q_WS_X11
    00095     virtual bool x11Event( XEvent* );
    00096 #endif
    00097     virtual void closeEvent( QCloseEvent* );
    00098     virtual void drawContents( QPainter* );
    00099 private slots:
    00100     void updateFallbackSize();
    00101     void selectionTimeout();
    00102 private:
    00103     void setTopLevelMenuInternal(bool top_level);
    00104     void updateMenuBarSize();
    00105     void checkSize( int& w, int& h );
    00106     static int block_resize;
    00107 protected:
    00108     virtual void virtual_hook( int id, void* data );
    00109 private:
    00110     class KMenuBarPrivate;
    00111     KMenuBarPrivate *d;
    00112 };
    00113
    00114 #endif

This file is part of the documentation for kdeui Library Version 3.4.1.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Sat Jun 11 20:20:19 2005 by doxygen 1.4.1 written by Dimitri van Heesch, © 1997-2003