kdeui
kmenubar.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
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
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