[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    About the KHelpMenu change (What's this)
From:       Espen Sand <espen.sand () neo ! no>
Date:       1999-12-02 8:08:04
[Download RAW message or body]

This was added by ME last evening. 

QToolButton* wtb = QWhatsThis::whatsThisButton(0);
id = mMenu->insertItem( wtb->iconSet(),i18n( "What's &This" ) );
mMenu->connectItem( id, this, SLOT( contextHelpActivated() ) );
delete wtb;
mMenu->setAccel( SHIFT + Key_F1, id );

For me this is fine, but

1) Should this entry always be there? I think it would look pretty strange if 
an app has this entry in the help menu but no "What's This" help anywhere.
I can add a flag in the KHelpMenu constructor that decides if this entry should
be used or not. Default on or off ??
 

2) From the KHelpMenu docs:

 * 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 connect it to
 * the help menu. Here are the steps you must follow:
 *
 * 1. Make a help menu object with no text argument. If the text is missing
 *    the default dialog box will not be displayed:
 *    mHelpMenu = new KHelpMenu( this );
 *
 * 2. Make a slot method that launches your dialog:
 *    void slotShowAboutDialog( void )
 *
 * 3. Connect the slot to the help menu:
 *    QPopupMenu *help = mHelpMenu->menu();
 *    help->connectItem( 2, this, SLOT(slotShowAboutDialog()) );
 *

We need to make sure the "About application" entry always gets an Id == 2.
This is not the case after the change last evening. I will fix this 
later today (evening).

I had planned to add, after crash, a signal in khelpmenu and a virtual slot
in ktmainwindow (showAboutApplication()) that will make this simpler. 
Perhaps I should do this before crash?


-- 
Espen Sand

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic