How to get a pointer for mainwindow?
dukju ahn
dukjuahn at gmail.com
Mon Mar 12 07:55:47 UTC 2007
Hi,
>From my plugin, I want to append popup menu in mainwindow
ie.
connect( Core::mainWindow(),
SIGNAL(contextMenu(KMenu *, const Context *)),
this,
SLOT(contextMenu(KMenu *, const Context *)));
void KDevSubversionPart::contextMenu
(KMenu *menu, const KDevelop::Context *ctx)
{ menu->add.. }
This is from kdevcontext.h documentation. However, Core::mainWindow()
does not actually exist. I cannot find any other way to retrieve
mainwindow pointer.
Plugins can have access to ICore, and through ICore, IUiController
can be accessed. But activeMainWindow() or defaultMainWindow()
only exist in UiController, which the plugins does not have access.z
I looked up the KDevelop3 source code. At kdev3, ICore(KDevCore) emits
contextMenu signal. Does the framework API is changed?
More information about the KDevelop-devel
mailing list