org.kde.koala
public class KHelpMenu extends QObject
mHelpMenu = new KHelpMenu( this,or if you just want to open a dialog box:); kmenubar.insertItem(i18n("&Help"), mHelpMenu.menu() );
mHelpMenu = new KHelpMenu( this,IMPORTANT: The first time you use KHelpMenu.menu(), a KPopupMenu 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.); connect( this, SIGNAL("someSignal()"), mHelpMenu,SLOT("mHelpMenu.aboutKDE()"));
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 can choose one of two methods. Common for both is that you must make a help menu object with no text argument If the text is missing the default dialog box will not be displayed: Example 1 Using showAboutApplication signal (preferred)
void MyClass.myFunc() { .. KHelpMenu helpMenu = new KHelpMenu( this ); connect( helpMenu, SIGNAL("showAboutApplication()"), this, SLOT("myDialogSlot()")); .. } void MyClass.myDialogSlot() {Example 2 Old style - connecting directly to the menu entry.}
void MyClass.myFunc() { KHelpMenu helpMenu = new KHelpMenu( this ); KPopupMenu help = mHelpMenu.menu(); help.connectItem( KHelpMenu.menuAboutApp, this, SLOT("myDialogSlot()") ); } void MyClass.myDialogSlot() {See KHelpMenuSignals for signals emitted by KHelpMenu}
UNKNOWN: Standard %KDE help menu with dialog boxes.
Field Summary | |
---|---|
static int | menuAboutApp |
static int | menuAboutKDE |
static int | menuHelpContents |
static int | menuReportBug |
static int | menuWhatsThis |
Constructor Summary | |
---|---|
protected | KHelpMenu(Class dummy) |
KHelpMenu(QWidget parent, String aboutAppText, boolean showWhatsThis)
Constructor. | |
KHelpMenu(QWidget parent, String aboutAppText) | |
KHelpMenu(QWidget parent) | |
KHelpMenu() | |
KHelpMenu(QWidget parent, KAboutData aboutData, boolean showWhatsThis, KActionCollection actions)
Constructor.
| |
KHelpMenu(QWidget parent, KAboutData aboutData, boolean showWhatsThis) | |
KHelpMenu(QWidget parent, KAboutData aboutData) |
Method Summary | |
---|---|
void | aboutApplication()
Opens an application specific dialog box. |
void | aboutKDE()
Opens the standard "About KDE" dialog box. |
void | appHelpActivated()
Opens the help page for the application. |
String | className() |
void | contextHelpActivated()
Activates What's This help for the application. |
void | dispose() Delete the wrapped C++ instance ahead of finalize() |
protected void | finalize() Deletes the wrapped C++ instance |
boolean | isDisposed() Has the wrapped C++ instance been deleted? |
KPopupMenu | menu()
Returns a popup menu you can use in the menu bar or where you
need it.
|
QMetaObject | metaObject() |
void | reportBug()
Opens the standard "Report Bugs" dialog box. |
Parameters: parent The parent of the dialog boxes. The boxes are modeless and will be centered with respect to the parent. aboutAppText User definable string that is used in the application specific dialog box. Note: The help menu will not open this dialog box if you don't define a string. See showAboutApplication() for more information. showWhatsThis Decides whether a "Whats this" entry will be added to the dialog.
UNKNOWN: Constructor.
Parameters: parent The parent of the dialog boxes. The boxes are modeless and will be centered with respect to the parent. aboutData User and app data used in the About app dialog showWhatsThis Decides whether a "Whats this" entry will be added to the dialog. actions KActionCollection that is used instead of the standard actions.
UNKNOWN: Constructor.
UNKNOWN: Opens an application specific dialog box.
UNKNOWN: Opens the standard "About KDE" dialog box.
UNKNOWN: Opens the help page for the application.
UNKNOWN: Activates What's This help for the application.
UNKNOWN: Returns a popup menu you can use in the menu bar or where you need it.
UNKNOWN: Opens the standard "Report Bugs" dialog box.