class KMenuBar

KDE floatable menubar. More...

Definition#include <kmenubar.h>
InheritsQFrame (qt)
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Members

Protected Members

Protected Slots

Signals


Detailed Description

This is floatable toolbar. It can be set to float, Top, or Bottom of KTopLevelWidget. It can be used without KTopLevelWidget, but then you should maintain items (toolbars, menubar, statusbar) yourself.

Interface is the same as QMenuBar, except that you can't add pixmaps.

If you want to add other methods for 100% compatibility with QMenuBar just add those methods, and pass all arguments ot menu bar. see kmenubar.cpp for details. It is extremly simple.

enum menuPosition {Top, Bottom, Floating, Flat, FloatingSystem}

Positions of menubar.

KMenuBar ( QWidget *parent=0, const char *name=0)

Constructor. For all details about inserting items see QMenuBar

~KMenuBar ()

Destructor. Embeds menubar back if floating. Delete menubar in your destructor or closeEvent for 100% safety

void enableMoving (bool flag = TRUE)

Enable or disable moving. This only disables user moving menubar can be moved wit setMenuBarPos.

menuPosition menuBarPos ()

Returns menubar position.

void enableFloating (bool flag = TRUE)

Enables/disables floating.

void setMenuBarPos (menuPosition mpos)

Sets position. Can be used when floating or moving is disabled. This cannot be used to set toolbar flat. For that, use setFlat .

void setTitle (const char *_title)

Sets title for floating menu bar. Default is Main widget title.

uint count ()
[virtual]

The rest is standard QMenuBar interface. See Qt docs for details.

void setFlat (bool)

This method switches flat/unflat mode. Carefull: might not work If menubar is floating.

void moved (menuPosition)
[signal]

This signal is connected to KTopLevel::updateRects. It is emited when menu bar changes its position.

void highlighted (int id)
[signal]

This signal is emited when item id is highlighted.

void activated (int id)
[signal]

This signal is emited when item id is activated.


Generated by: root@jedi.mandrakesoft.com on Sat Dec 25 21:35:43 199.