Tools

Boudewijn Rempt boud at valdyas.org
Sun Mar 13 18:03:03 CET 2005


On Sun, 13 Mar 2005, Michael Thaler wrote:

> Hello,
>
> I thought about working on the tools and to this end I tried to create a new
> tool to try out some things. I still have some code to create stars and I
> tried to create a star tool. I copied kis_tool_ellipse.h and
> kis_tool_ellipse.cc to kis_tool_star.h and kis_tool_star.cc, set the name to
>
> m_action = new KRadioAction(i18n("Tool &Star"),
>          "star",
>          shortcut,
>          this,
>          SLOT(activate()),
>          collection,
>          name());
>
> and also added them to the Makefile.am. I changed all the classnames and also
> added
>
> r -> add(new KisToolStarFactory( actionCollection() ));
>
> to default_tools.cc. I also copied a file star.png to the directory pics.
>
> If I add a debug statement to KisToolStar::setup to shows that the setup code
> is actually called when Krita is started. However no icon shows up to
> actually use the tool. What else do I have to do to make the tool show up in
> the toolbar?

You also need to add the tool to the relevant .rc file -- however, it would be
much better if you'd copy the tool_crop plugin and put this tool in a plugin. That
would make compiling much faster for you, and keep interdependencies to a minimum.


More information about the kimageshop mailing list