• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdelibs-4.14.38 API Reference
  • KDE Home
  • Contact Us
 

KDEUI

Public Member Functions | Protected Slots | Protected Member Functions | Properties | List of all members
KMenuBar Class Reference

#include <kmenubar.h>

Inheritance diagram for KMenuBar:
QMenuBar

Public Member Functions

 KMenuBar (QWidget *parent=0)
 
 ~KMenuBar ()
 
bool isTopLevelMenu () const
 
void resize (const QSize &s)
 
virtual void resize (int w, int h)
 
virtual void setFrameStyle (int)
 
virtual void setGeometry (const QRect &r)
 
virtual void setGeometry (int x, int y, int w, int h)
 
virtual void setLineWidth (int)
 
virtual void setMargin (int)
 
void setTopLevelMenu (bool top_level=true)
 
virtual QSize sizeHint () const
 

Protected Slots

void slotReadConfig ()
 

Protected Member Functions

virtual void closeEvent (QCloseEvent *)
 
virtual bool eventFilter (QObject *, QEvent *)
 
virtual void paintEvent (QPaintEvent *)
 
virtual void resizeEvent (QResizeEvent *)
 
virtual bool x11Event (XEvent *)
 

Properties

bool topLevelMenu
 

Detailed Description

KDE Style-able menubar.

This is required since QMenuBar is currently not handled by QStyle.

Author
Daniel "Mosfet" Duley.

Definition at line 38 of file kmenubar.h.

Constructor & Destructor Documentation

◆ KMenuBar()

KMenuBar::KMenuBar ( QWidget *  parent = 0)
explicit

Definition at line 135 of file kmenubar.cpp.

◆ ~KMenuBar()

KMenuBar::~KMenuBar ( )

Definition at line 150 of file kmenubar.cpp.

Member Function Documentation

◆ closeEvent()

void KMenuBar::closeEvent ( QCloseEvent *  e)
protectedvirtual

Definition at line 463 of file kmenubar.cpp.

◆ eventFilter()

bool KMenuBar::eventFilter ( QObject *  obj,
QEvent *  ev 
)
protectedvirtual

Definition at line 236 of file kmenubar.cpp.

◆ isTopLevelMenu()

bool KMenuBar::isTopLevelMenu ( ) const

Is our menubar a top-level (Macintosh style) menubar?

Returns
True if it is top-level.

Definition at line 224 of file kmenubar.cpp.

◆ paintEvent()

void KMenuBar::paintEvent ( QPaintEvent *  pe)
protectedvirtual

Definition at line 471 of file kmenubar.cpp.

◆ resize() [1/2]

void KMenuBar::resize ( const QSize &  s)

Definition at line 373 of file kmenubar.cpp.

◆ resize() [2/2]

void KMenuBar::resize ( int  w,
int  h 
)
virtual

Definition at line 363 of file kmenubar.cpp.

◆ resizeEvent()

void KMenuBar::resizeEvent ( QResizeEvent *  e)
protectedvirtual

Definition at line 334 of file kmenubar.cpp.

◆ setFrameStyle()

void KMenuBar::setFrameStyle ( int  style)
virtual

Definition at line 439 of file kmenubar.cpp.

◆ setGeometry() [1/2]

void KMenuBar::setGeometry ( const QRect &  r)
virtual

Definition at line 346 of file kmenubar.cpp.

◆ setGeometry() [2/2]

void KMenuBar::setGeometry ( int  x,
int  y,
int  w,
int  h 
)
virtual

Definition at line 351 of file kmenubar.cpp.

◆ setLineWidth()

void KMenuBar::setLineWidth ( int  width)
virtual

Definition at line 447 of file kmenubar.cpp.

◆ setMargin()

void KMenuBar::setMargin ( int  margin)
virtual

Definition at line 455 of file kmenubar.cpp.

◆ setTopLevelMenu()

void KMenuBar::setTopLevelMenu ( bool  top_level = true)

This controls whether or not this menubar will be a top-level bar similar to the way Macintosh handles menubars.

This overrides any global config settings.

Keep in mind that it is probably a really bad idea to use this unless you really know what you're doing. A feature like a top-level menubar is one that should really be shared by all applications. If your app is the only one with a top-level bar, then things might look very... odd.

This is included only for those people that do know that they need to use it.

Parameters
top_levelIf set to true, then this menubar will be a top-level menu

Definition at line 155 of file kmenubar.cpp.

◆ sizeHint()

QSize KMenuBar::sizeHint ( ) const
virtual

Definition at line 393 of file kmenubar.cpp.

◆ slotReadConfig

void KMenuBar::slotReadConfig ( )
protectedslot

Definition at line 230 of file kmenubar.cpp.

◆ x11Event()

bool KMenuBar::x11Event ( XEvent *  ev)
protectedvirtual

Definition at line 415 of file kmenubar.cpp.

Property Documentation

◆ topLevelMenu

bool KMenuBar::topLevelMenu
readwrite

Definition at line 1 of file kmenubar.h.


The documentation for this class was generated from the following files:
  • kmenubar.h
  • kmenubar.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KDEUI

Skip menu "KDEUI"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Modules
  • Related Pages

kdelibs-4.14.38 API Reference

Skip menu "kdelibs-4.14.38 API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal