[Qt-creator] Plugin question
Enrico Ros
enrico.qt at email.it
Wed Jul 8 15:35:46 CEST 2009
On Wednesday 08 July 2009 13:46:25 Eike Ziller wrote:
> On Jul 7, 2009, at 11:07 AM, Teske Daniel (Nokia-D-Qt/Berlin) wrote:
> > ext Enrico Ros schrieb:
> >> Hello, I'm starting to develop a QtCreator Plugin, based on the
> >> "helloworld"
> >> example. I've got 3 quick questions:
> >>
> >> - the menu entry for the plugin and the "mode button" are disabled by
> >> default, even if I enable the actions in the code. what do I miss
> >> here?
> >
> > Ah that's probably the "context" thing. Each action you register has a
> > context. (Multiple plugins can register the same action in different
> > contexts.)
> > Context is mostly determined by which widget has focus and I think the
> > mode. I don't think we have that documented.
>
> Actually there is some documentation about that in the
> Core::ActionManager class :)
> You can generate the little bit of existing API documentation by
> running qdoc3 on qtcreator-api.qdocconf in the doc/api/ directory
> (after that open html/index.html).
>
> ++ Eike
Thanks Eike. Reading the docs finally clarified the details to me ;-)
While on the subject, I took down some notes that maybe can be somewhat useful
to you.
- ActionContainer::addAction takes a Core::Command (not Action?). Suggestion:
addCommand(Command *, ...); or some other renaming?
- The Debugger::Constants::C_GDBDEBUGGER is: 1. not strictly related to GDB
(CDB). 2. represents the Debug Mode (ctrl+3), thus only representes "being in
the debug panel". Suggested: C_DEBUG_MODE
- Debugger::Constants::GDBRUNNING is a context identifier but: 1. lacks the
C_, 2. not strictly GDB, 3. represents something being Debugged but it's
active only when the application is interrupted. Suggested: C_DEBUGGER_ACTIVE
- The "Debug Menu" Action Collection is ProjectExplorer::Constants::M_DEBUG.
Suggested: Debug::Constants::M_DEBUG, like other tools.
Those are only from a "user" point of view. Feel free to ignore all this,
writing a plugin is easy anyways ;-)
Enrico Ros
--
--
Caselle da 1GB, trasmetti allegati fino a 3GB e in piu' IMAP, POP3 e SMTP autenticato? GRATIS solo con Email.it http://www.email.it/f
Sponsor:
Visita il nuovo portale di Riccione Turismo e prenota online la tua vacanza a Riccione! Ti aspettano offerte speciali personalizzate
Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=9312&d=8-7
More information about the Qt-creator-old
mailing list