HELP: how do I show a declaration tooltip

Milian Wolff mail at milianw.de
Mon Aug 31 19:31:33 UTC 2009


David Nolden, 31.08.2009:
> Am Montag 31 August 2009 20:47:50 schrieb Milian Wolff:
> > David Nolden, 31.08.2009:
> > > Am Donnerstag 27 August 2009 18:41:47 schrieb Milian Wolff:
> > > > What is the preferred way to show a declaration tooltip?
> > > >
> > > > I put my hopes on DUChain::self()->emitDeclarationSelected() but the
> > > > contextbrowser requires views and does a lot stuff internally...
> > > >
> > > > Essentially I just want to create a tooltip a bit below the cursor
> > > > position. Actually I want to fix
> > > > https://bugs.kde.org/show_bug.cgi?id=189966 , i.e. show the tooltip
> > > > when a user hovers an entry which resembles a declaration in the
> > > > classbrowser.
> > > >
> > > > You find my current approach attached, but sadly it doesn't show
> > > > anything :( The signals and such stuff is properly delegated so I
> > > > think something in the contextbrowser is messing up... Isn't there a
> > > > simpler way to show the tooltip?
> > >
> > > emitDeclarationSelected does not trigger the tooltip to be shown, it
> > > just causes the declaration to be use-highlighted, shown in the
> > > context-browser, and hopefully also in the code-flow view soon.
> > >
> > > Showing a tooltip is slightly more complicated right now, see
> > > ContextBrowserPlugin::showToolTip for example. We should move some of
> > > that code into a central location, as it already is replicated in a few
> > > other places.
> >
> > Some questions so I can hack on that eventually:
> >
> > a) Where should I put the code?
>
> Hmm somewhere in kdevplatform/language/duchain/navigation I guess
>
> > b) Where is it already replicated?
>
> At least:
> - Context browser
> - Project tree

Where in the project tree is the widget shown?! It would make sense, but 
currently I don't see it...
-- 
Milian Wolff
mail at milianw.de
http://milianw.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20090831/6b87f0b4/attachment.sig>


More information about the KDevelop-devel mailing list