kmenubar.h
/* This file is part of the KDE libraries
Copyright (C) 1997, 1998, 1999, 2000 Sven Radej (radej@kde.org)
Copyright (C) 1997, 1998, 1999, 2000 Matthias Ettrich (ettrich@kde.org)
Copyright (C) 1999, 2000 Daniel "Mosfet" Duley (mosfet@kde.org)
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
//$Id: kmenubar.h 465272 2005-09-29 09:47:40Z mueller $
#ifndef _KMENUBAR_H
#define _KMENUBAR_H
#include <qmenubar.h>
#include <kdelibs_export.h>
class KDEUI_EXPORT KMenuBar : public QMenuBar
{
Q_OBJECT
public:
KMenuBar (QWidget *parent=0, const char *name=0);
~KMenuBar ();
void setTopLevelMenu(bool top_level = true);
bool isTopLevelMenu() const;
// TT are overloading virtuals :(
virtual void setGeometry( const QRect &r );
virtual void setGeometry( int x, int y, int w, int h );
virtual void resize( int w, int h );
void resize( const QSize& s ) { QMenuBar::resize( s ); }
virtual void show();
virtual void setFrameStyle( int );
virtual void setLineWidth( int );
virtual void setMargin( int );
virtual QSize sizeHint() const;
protected slots:
void slotReadConfig();
protected:
virtual void showEvent( QShowEvent* );
virtual void resizeEvent( QResizeEvent* );
virtual bool eventFilter(QObject *, QEvent *);
#ifdef Q_WS_X11
virtual bool x11Event( XEvent* );
#endif
virtual void closeEvent( QCloseEvent* );
virtual void drawContents( QPainter* );
private slots:
void updateFallbackSize();
void selectionTimeout();
private:
void setTopLevelMenuInternal(bool top_level);
void updateMenuBarSize();
void checkSize( int& w, int& h );
static int block_resize;
protected:
virtual void virtual_hook( int id, void* data );
private:
class KMenuBarPrivate;
KMenuBarPrivate *d;
};
#endif

KDE Home | KDE Accessibility Home | Description of Access Keys