class KHelpMenu


Module kdeui
Namespace
Class KHelpMenu
Inherits QObject
Standard %KDE help menu with dialog boxes.

This class provides the standard %KDE help menu with the default "about" dialog boxes and help entry.

This class is used in KMainWindow so normally you don't need to use this class yourself. However, if you need the help menu or any of its dialog boxes in your code that is not subclassed from KMainWindow you should use this class.

The usage is simple:

mHelpMenu = new KHelpMenu( this,  );
kmenubar->addMenu(mHelpMenu->menu() );

or if you just want to open a dialog box:

mHelpMenu = new KHelpMenu( this,  );
connect( this, SIGNAL(someSignal()), mHelpMenu,SLOT(aboutKDE()));

IMPORTANT: The first time you use KHelpMenu.menu(), a KMenu object is allocated. Only one object is created by the class so if you call KHelpMenu.menu() twice or more, the same pointer is returned. The class will destroy the popupmenu in the destructor so do not delete this pointer yourself.

The KHelpMenu object will be deleted when its parent is destroyed but you can delete it yourself if you want. The code below will always work.

MyClass.~MyClass()
{
delete mHelpMenu;
}

Using your own "about application" dialog box:

The standard "about application" dialog box is quite simple. If you need a dialog box with more functionality you must design that one yourself. When you want to display the dialog, you simply need to connect the help menu signal showAboutApplication() to your slot.

void MyClass.myFunc()
{
..
KHelpMenu *helpMenu = new KHelpMenu( this );
connect( helpMenu, SIGNAL(showAboutApplication()),
this, SLOT(myDialogSlot()));
..
}

void MyClass.myDialogSlot() { }

Author Espen Sand (espen@kde.org)



enums

enum details

methods